/* General Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    background-color: #f9f9f9;
    color: #333;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.main-header {
    background: #fff;
    padding: 15px 0;
    border-bottom: 1px solid #e7e7e7;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-logo img {
    height: 35px;
    display: block;
}

.header-nav a {
    margin-left: 25px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

.header-nav a:hover {
    color: #007bff;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 80px 20px;
    background-color: #fff;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: #222;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 60px 20px;
}

.tool-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.tool-card i {
    font-size: 2.5rem;
    color: #007bff;
    margin-bottom: 15px;
}

.tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.tool-card p {
    color: #666;
    margin-bottom: 20px;
}

.input-field, textarea.input-field { 
    border: 1px solid #ccc; 
    padding: 8px; 
    border-radius: 4px; 
}
.btn { 
    border: none; 
}

/* Profile layout fixes */
.profile-container { max-width: 1050px; margin: 0 auto; padding-top: 18px; }
.profile-container aside { width: 280px; flex: 0 0 280px; }
.profile-container main { min-width: 0; }

.btn {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #0056b3;
}

.btn.disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

/* FAQ Section */
#faq {
    background: #fff;
    padding: 60px 20px;
}

#faq h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.faq-item {
    max-width: 700px;
    margin: 0 auto 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.faq-item h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.faq-item p {
    color: #666;
}

/* Admin helpers: constrain long lists/tables and allow scrolling inside card */
.admin-scrollable { max-height: 720px; overflow: auto; }

/* File list layout improvements */
.files-scroll { overflow: auto; }
.files-scroll table { width: 100%; table-layout: fixed; }
.file-name-cell { max-width: 60ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-actions { white-space: nowrap; display: flex; gap: 6px; justify-content: flex-end; }
.file-actions .btn { flex: 0 0 auto; }

/* Scroll area for user files in admin details. Height chosen to display ~3 medium thumbnails comfortably */
.user-files-scroll { max-height: 360px; overflow: auto; padding-right: 8px; }

/* Admin actions history scroll container */
.admin-actions-scroll { max-height: 420px; overflow: auto; padding-right: 8px; margin-bottom: 10px; }

/* Make responsive tables horizontally scrollable on small screens */
.table-responsive { width: 100%; overflow-x: auto; }

/* Admin panel details: ensure content wraps and tables inside scrollable panels behave */
.panel-body.admin-scrollable table { width: 100%; table-layout: fixed; }
.panel-body.admin-scrollable pre { white-space: pre-wrap; word-break: break-word; }

/* Small screens: stack action buttons vertically to avoid overflow */
@media (max-width: 720px) {
    .file-actions { flex-direction: column; align-items: stretch; }
    .file-actions .btn { width: 100%; }
}


/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background-color: #f2f2f2;
    color: #666;
    font-size: 0.9rem;
}
