/* Root Variables (Standex-inspired) */
:root {
    --standex-blue: #254061;
    --standex-blue-dark: #1a2d45;
    --standex-green: #4CAF50;
    --standex-green-dark: #388E3C;
    --standex-gray-light: #f8f9fa;
    --border-color: #e0e0e0;
    --text-secondary: #6c757d;
    --transition-base: 0.2s ease;
    --sidebar-bg: rgb(36, 75, 140);
    --sidebar-width: 260px;
}

/* Body Layout */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-logo {
    width: 60px;
    height: 60px;
    margin: 0 auto 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    padding: 0.75rem;
}

.sidebar-logo img {
    width: 80%;
    height: 80%;
    object-fit: contain; /* Keeps aspect ratio */
}

.sidebar-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: white;
}

.sidebar-menu {
    flex: 1;
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.sidebar-item {
    margin: 0.25rem 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-item.active .sidebar-link {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 500;
}

.sidebar-item.active .sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
}

.sidebar-link i {
    font-size: 1.125rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
}

.logout-btn i {
    font-size: 1rem;
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 2rem;
}

/* Container Layout */
.upload-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Page Header */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    color: var(--standex-blue);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Card Container */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-body {
    padding: 2rem;
}

/* Form Section */
.form-section {
    margin-bottom: 2rem;
}

.form-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--standex-blue);
    margin-bottom: 0.5rem;
}

.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9375rem;
    background: white;
    transition: border-color var(--transition-base);
    font-family: inherit;
    color: #333;
}

/* When nothing is selected (showing placeholder) */
.form-group select:invalid {
    color: #999;
}

/* When an option is selected */
.form-group select:valid {
    color: #333;
}

.form-group select:focus {
    outline: none;
    border-color: var(--standex-blue);
}

/* Upload Dropzone */
.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 2.5rem 2rem;
    text-align: center;
    background: var(--standex-gray-light);
    transition: all var(--transition-base);
    cursor: pointer;
    margin-bottom: 1.5rem;
}

.upload-dropzone:hover,
.upload-dropzone.drag-over {
    border-color: var(--standex-blue);
    background: rgba(37, 64, 97, 0.04);
}

.upload-dropzone.drag-over {
    transform: scale(1.01);
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: rgb(36, 75, 140);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.75rem;
}

.upload-dropzone h3 {
    font-size: 1.125rem;
    color: var(--standex-blue);
    margin-bottom: 0.5rem;
}

.upload-dropzone p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Status View */
#status-view {
    display: none;
}

#status-view:not(.hidden) {
    display: block;
}

.file-name-display {
    font-weight: 600;
    color: var(--standex-blue);
    margin: 1rem 0 0.5rem;
}

.status-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* Icons */
.success-icon {
    color: var(--standex-green);
}

.error-icon {
    color: #D8000C;
}

.hidden {
    display: none !important;
}

/* Buttons */
.submit-area {
    padding-top: 1rem;
    display: flex;
    justify-content: center;
}

.btn-secondary {
    background: white;
    color: var(--standex-blue);
    border: 1px solid var(--standex-blue);
    padding: 0.625rem 1.5rem;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    background: var(--standex-blue);
    color: white;
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }

    .sidebar-header {
        padding: 1.5rem 0.5rem;
    }

    .sidebar-logo {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    /* Add this for mobile logo sizing */
    .sidebar-logo img {
        width: 80%;  /* Even smaller percentage on mobile */
        height: 80%;
    }

    .sidebar-title,
    .sidebar-link span,
    .logout-btn span {
        display: none;
    }

    .sidebar-link {
        justify-content: center;
        padding: 0.875rem 0;
    }

    .logout-btn {
        justify-content: center;
        padding: 0.875rem 0;
    }

    .main-content {
        margin-left: 70px;
        padding: 1rem;
    }

    .upload-container {
        margin: 0;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .sidebar {
        display: none;
    }
}


/* ========================================
   ADMIN PANEL STYLES
   ======================================== */

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Card Header */
.card-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--standex-gray-light);
}

.card-title {
    font-size: 1.25rem;
    color: var(--standex-blue);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-subtitle {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* Log Filters */
.log-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2rem;
    background: white;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-group label {
    font-size: 0.875rem;
    color: var(--standex-blue);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-select {
    padding: 0.5rem 2.5rem 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    background: white;
    color: var(--standex-blue-dark);
    cursor: pointer;
    transition: border-color var(--transition-base);
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--standex-blue);
}

.search-group {
    position: relative;
    flex: 1;
    max-width: 350px;
}

.search-group i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.search-input {
    width: 75%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.875rem;
    transition: border-color var(--transition-base);
}

.search-input:focus {
    outline: none;
    border-color: var(--standex-blue);
}

/* Log Tabs */
.log-tabs {
    display: flex;
    background: white;
    border-bottom: 2px solid var(--border-color);
    padding: 0 2rem;
    gap: 0.5rem;
}

.log-tab {
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: -2px;
}

.log-tab:hover {
    color: var(--standex-blue);
    background: var(--standex-gray-light);
}

.log-tab.active {
    color: var(--standex-blue);
    border-bottom-color: var(--standex-blue);
}

.tab-count {
    background: var(--standex-gray-light);
    padding: 0.125rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.log-tab.active .tab-count {
    background: rgba(36, 75, 140, 0.1);
    color: var(--standex-blue);
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.success {
    background: #d4edda;
    color: #155724;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.status-badge.error {
    background: #f8d7da;
    color: #721c24;
}

.status-badge i {
    font-size: 0.625rem;
}

/* Table Footer */
.table-footer {
    padding: 1rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--standex-gray-light);
}

.table-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.table-info span {
    font-weight: 600;
    color: var(--standex-blue);
}

/* Report Type Badge */
.report-type-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.report-type-badge.ardent {
    background: #e3f2fd;
    color: #1565c0;
}

.report-type-badge.lifepoint {
    background: #f3e5f5;
    color: #6a1b9a;
}

.report-type-badge.scion {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Responsive */
@media (max-width: 768px) {
    .log-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group,
    .search-group {
        width: 100%;
        max-width: none;
    }

    .log-tabs {
        overflow-x: auto;
        padding: 0 1rem;
    }

    .log-tab {
        white-space: nowrap;
    }
}

/* Log Files Section */
.log-files-section {
    padding: 0;
}

.table-container {
    overflow-x: auto;
}

.log-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375rem;
}

.log-table thead {
    background: var(--standex-gray-light);
    border-bottom: 2px solid var(--border-color);
}

.log-table th {
    padding: 1rem 2rem;
    text-align: left;
    font-weight: 600;
    color: var(--standex-blue);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.log-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color var(--transition-base);
}

.log-table tbody tr:hover {
    background: var(--standex-gray-light);
}

.log-table td {
    padding: 1rem 1.5rem;
    color: var(--standex-blue-dark);
}

.no-data {
    text-align: center;
    padding: 3rem 1rem !important;
    color: var(--text-secondary);
}

.no-data i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
    display: block;
}

.no-data p {
    margin: 0;
    font-size: 0.9375rem;
}

/* Table Actions */
.table-actions {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    background: var(--standex-gray-light);
}

.btn-refresh {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: white;
    color: var(--standex-blue);
    border: 1px solid var(--standex-blue);
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-refresh:hover {
    background: var(--standex-blue);
    color: white;
}

.btn-refresh i {
    font-size: 0.875rem;
}

/* Action Buttons in Table */
.btn-download {
    padding: 0.375rem 0.875rem;
    background: var(--standex-blue);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.btn-download:hover {
    background: var(--standex-blue-dark);
}

.btn-download i {
    font-size: 0.75rem;
}

/* Stats Grid (for future use) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.stat-icon {
    width: 56px;
    height: 56px;
    background: rgba(36, 75, 140, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--standex-blue);
    font-size: 1.5rem;
}

.stat-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-value {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--standex-blue);
}

/* Responsive - Admin Panel Tables */
@media (max-width: 768px) {
    .admin-container {
        padding: 0;
    }

    .card-header,
    .table-actions {
        padding: 1rem;
    }

    .log-table th,
    .log-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8125rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}




/* ========================================
   SPLASH SCREEN STYLES
   ======================================== */

.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgb(36, 75, 140) 0%, #1a2d45 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeOut 0.5s ease-in-out 2s forwards;
}

@keyframes fadeOut {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.splash-content {
    text-align: center;
    color: white;
}

.splash-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.splash-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.splash-spinner {
    margin: 2rem auto;
    width: 50px;
    height: 50px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.splash-text {
    margin-top: 1rem;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.05em;
}

/* ========================================
   LOGIN PAGE STYLES
   ======================================== */

.login-page {
    background: linear-gradient(135deg, rgb(36, 75, 140) 0%, #1a2d45 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 2rem;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 3rem 2.5rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgb(36, 75, 140);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-header h1 {
    font-size: 1.75rem;
    color: var(--standex-blue);
    margin: 0 0 0.5rem 0;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

.login-form {
    margin-top: 2rem;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--standex-blue);
    margin-bottom: 0.5rem;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    left: 1rem;
    color: var(--text-secondary);
    font-size: 1rem;
}

.input-with-icon input {
    width: 100%;
    padding: 0.875rem 1rem 0.875rem 3rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9375rem;
    transition: all var(--transition-base);
    font-family: inherit;
}

.input-with-icon input:focus {
    outline: none;
    border-color: rgb(36, 75, 140);
    box-shadow: 0 0 0 3px rgba(36, 75, 140, 0.1);
}

.input-with-icon input::placeholder {
    color: #999;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.checkbox-label input[type="checkbox"] {
    cursor: pointer;
}

.forgot-password {
    color: rgb(36, 75, 140);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-base);
}

.forgot-password:hover {
    color: var(--standex-blue-dark);
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    padding: 1rem;
    background: rgb(36, 75, 140);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-login:hover {
    background: #2a5a9e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(36, 75, 140, 0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.login-error {
    margin-top: 1rem;
    padding: 0.875rem;
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 6px;
    color: #c33;
    font-size: 0.875rem;
    text-align: center;
}

.login-error.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 600px) {
    .login-container {
        padding: 1rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }

    .splash-logo {
        width: 100px;
        height: 100px;
    }
}

/* ========================================
   PREVIEW MODAL STYLES
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--standex-gray-light);
}

.modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--standex-blue);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    transition: color var(--transition-base);
}

.modal-close:hover {
    color: var(--standex-blue);
}

.modal-body {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.preview-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 2rem 0;
    border-bottom: 2px solid var(--border-color);
}

.preview-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    margin-bottom: -2px;
}

.preview-tab:hover {
    color: var(--standex-blue);
    background: var(--standex-gray-light);
}

.preview-tab.active {
    color: var(--standex-blue);
    border-bottom-color: var(--standex-blue);
}

.preview-content {
    flex: 1;
    overflow: auto;
    padding: 1.5rem 2rem;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--text-secondary);
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.preview-table thead {
    background: var(--standex-gray-light);
    position: sticky;
    top: 0;
    z-index: 10;
}

.preview-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--standex-blue);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.preview-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--standex-blue-dark);
}

.preview-table tbody tr:hover {
    background: var(--standex-gray-light);
}

.preview-empty {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.preview-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
    display: block;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    background: var(--standex-gray-light);
}

.file-preview-link {
    color: var(--standex-blue);
    text-decoration: none;
    transition: color var(--transition-base);
    display: inline-flex;
    align-items: center;
}

.file-preview-link:hover {
    color: var(--standex-blue-dark);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }

    .preview-tabs {
        padding: 1rem 1rem 0;
        overflow-x: auto;
    }

    .preview-tab {
        white-space: nowrap;
    }

    .preview-table {
        font-size: 0.8125rem;
    }

    .preview-table th,
    .preview-table td {
        padding: 0.5rem;
    }
}

/* ========================================
   PASSWORD RESET MODAL STYLES
   ======================================== */

.modal.hidden {
    display: none !important;
}

.modal:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

#password-modal .modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 420px;
    padding: 2.5rem;
    animation: slideDown 0.3s ease;
    z-index: 1;
}

#password-modal .modal-header {
    text-align: center;
    padding: 0;
    margin-bottom: 2rem;
    border-bottom: none;
    background: none;
    display: block;
}

#password-modal .modal-header h2 {
    font-size: 1.5rem;
    color: var(--standex-blue);
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

#password-modal .modal-header p {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

#password-modal .login-form {
    margin-top: 0;
}

#password-error {
    margin-bottom: 1rem;
}

#password-error:not(.hidden) {
    display: block;
}

.password-success {
    margin-top: 1rem;
    padding: 0.875rem;
    background: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 6px;
    color: #155724;
    font-size: 0.875rem;
    text-align: center;
}

.password-success.hidden {
    display: none;
}