:root {
    /* Blue Ocean Theme (Modern & Minimalist) */
    --primary-color: #2563eb;
    /* Royal Blue */
    --primary-dark: #1e40af;
    /* Dark Blue */
    --accent-color: #60a5fa;
    /* Light Blue */
    --background-color: #f0f9ff;
    /* Very Light Sky Blue */
    --text-color: #0f172a;
    /* Slate 900 */
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.15), 0 8px 10px -6px rgba(37, 99, 235, 0.1);
    --radius: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Ensure form elements inherit the main font */
button,
input,
select,
textarea {
    font-family: inherit;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    /* Subtle gradient background for modern feel */
    background-image: radial-gradient(at 0% 0%, rgba(96, 165, 250, 0.1) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(37, 99, 235, 0.1) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    /* overflow: hidden; Removed to allow scrolling */
}

/* ... header styles skipped ... */

/* Main layout corrections for Login */
.login-container {
    display: flex;
    flex-direction: row;
    width: 100%;
    min-height: 100vh;
}

.login-content {
    display: none;
}

.login-visual {
    flex: 58;
    background: #020617;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;
    text-align: left;
    padding: 4rem;
}

/* ... visual content ... */
.tech-image-container {
    width: 100%;
}

.tech-image-container img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

.login-form-side {
    flex: 42;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem;
    background: #fff;
    z-index: 10;
}

.login-footer {
    width: 100%;
    padding: 1.5rem;
    text-align: center;
    color: #94a3b8;
    background-color: #0f172a;
    /* Dark background to match left side */
    font-size: 0.85rem;
    border-color: rgba(255, 255, 255, 0.1);
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 0 20px;
}

/* Footer text inside login box - HIDDEN as we moved it */
.footer-text {
    display: none;
}

/* =========================================
   DASHBOARD STYLES
   ========================================= */

.dashboard-container {
    /* display: flex; Removed to prevent overflow with fixed sidebar */
    min-height: 100vh;
    width: 100%;
}

/* Sidebar */
/* =========================================
   SIDEBAR STYLES (Futuristic & Glassmorphism)
   ========================================= */

.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 20px 0 40px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 1000;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

/* Sidebar Header */
.sidebar-header {

    padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.sidebar-user-profile {
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(37, 99, 235, 0.01);
}

.sidebar-header-bottom {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.sidebar-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
    flex-shrink: 0;
    overflow: hidden;
}

.sidebar-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-user-details {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-username {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 3px;
    /* Extra thin */
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background-color: rgba(203, 213, 225, 0.5);
    /* Semi-transparent Slate 300 */
    border-radius: 20px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background-color: #94a3b8;
    /* Darker on hover */
}


.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1rem;
    color: #64748b;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all 0.2s;
    font-weight: 500;
}

.nav-item:hover,
.nav-item.active {
    background-color: var(--background-color);
    color: var(--primary-color);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* Sidebar Submenu */
.nav-group {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.nav-group-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    color: #64748b;
    transition: all 0.3s ease;
    user-select: none;
    border-radius: var(--radius);
    margin: 0 0.5rem;
}

.nav-group-header span {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Hover Effect - Light Gray/Futuristic overlap feel */
.nav-group-header:hover {
    color: var(--primary-color);
    background: rgba(241, 245, 249, 0.8);
    /* Slate 100 with opacity */
    transform: translateX(4px);
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.02);
}

.nav-group-content {
    display: none;
    background: transparent;
    /* Seamless blend */
    padding: 0.25rem 0;
    margin-bottom: 0.5rem;
    /* Add spacing after group */
    transition: all 0.3s ease;
}

.nav-group-content.open {
    display: block;
}

.nav-group-content .nav-item {
    font-size: 0.9rem;
    padding-left: 2rem;
    /* Indent subitems */
    border-radius: 0;
}


.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: 600;
    font-size: 0.9rem;
}

.role {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 260px;
    /* Width of sidebar */
    padding: 3rem;
    background-color: var(--background-color);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.top-bar h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 10px;
}

.top-bar h1 i {
    -webkit-text-fill-color: var(--primary-color);
    color: var(--primary-color);
    font-size: 1.2em;
    /* Slightly larger icon */
}

/* Responsive Top Bar */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .top-bar h1 {
        font-size: 1.25rem;
    }

    .actions {
        width: 100%;
        justify-content: space-between;
    }
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.breadcrumb .separator {
    color: #cbd5e1;
}

.breadcrumb .current {
    color: #64748b;
}

.actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Generic Card Component */
.card {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid .stat-card.featured,
    .stats-grid .stat-card {
        grid-column: span 1 !important;
    }
}

.stat-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.1);
}

.stat-card.featured {
    grid-column: span 2;
    flex-direction: row;
    align-items: center;
    padding: 2.5rem;
}

.stat-card.dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: white;
    border: none;
}

.stat-card.featured.primary {
    border: 1px solid var(--primary-color);
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.stat-card.featured .stat-icon {
    width: 80px;
    height: 80px;
    font-size: 2.2rem;
}

.stat-card.featured .stat-info {
    padding-left: 1rem;
}

.stat-card.featured .stat-value {
    font-size: 3.5rem;
    line-height: 1;
    letter-spacing: -2px;
}

.stat-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.stat-info h3 {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.25rem;
}

.stat-change {
    font-size: 0.75rem;
    color: #94a3b8;
}

.stat-change.positive {
    color: #10b981;
}

.stat-change.negative {
    color: #ef4444;
}

.stat-change.critical {
    color: #f59e0b;
}

/* Data Tables */
.table-container {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
    overflow-x: auto;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.data-table th {
    font-weight: 600;
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    color: var(--text-color);
    font-size: 0.95rem;
}

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-jpg {
    background-color: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.badge-pdf {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-dot.success {
    background-color: #10b981;
}

.status-dot.pending {
    background-color: #f59e0b;
}

.text-right {
    text-align: right !important;
}

.actions-cell {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal.hidden {
    display: none !important;
}

.modal-content {
    max-width: 1125px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    scrollbar-width: thin;
    background-color: var(--white);
    border-radius: var(--radius);
}

/* Header User Section */
.header-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-align: right;
}

.header-user .avatar {
    width: 45px;
    height: 45px;
    font-size: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

#headerUserInfo {
    line-height: 1.2;
}

#headerUsername {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
}

#headerEmail {
    font-size: 0.75rem;
    color: #64748b;
}

/* Logout Button - Matched with Avatar */
.logout-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    border: none;
    background: var(--primary-color);
    /* Match avatar background */
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    /* Match avatar shadow */
    font-size: 1rem;
    opacity: 1;
    /* Removed opacity 0.9 to match avatar */
}

.logout-btn:hover {
    background: #1e40af;
    /* Slightly darker blue */
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.logout-btn i {
    color: white;
    /* Changed from soft red to white to match avatar */
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal {
        align-items: flex-end;
    }

    /* Make modal form grids single column on mobile */
    .modal-content form>div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .modal-content form>div[style*="grid-template-columns"]>div[style*="grid-column: span 2"] {
        grid-column: span 1 !important;
    }
}

.modal.hidden {
    display: none;
}

/* Profile Page Styles (Appended) */
.profile-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f1f5f9;
}

.profile-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2);
    flex-shrink: 0;
}

.profile-name {
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.profile-meta {
    color: #64748b;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.full-width {
    grid-column: span 2;
}

/* Responsive Profile */
@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .profile-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: span 1;
    }

    .filter-container {
        grid-template-columns: 1fr;
    }
}

.filter-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    align-items: end;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge.inactive {
    background-color: rgba(100, 116, 139, 0.15);
    color: #64748b;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

/* =========================================
   FORM STYLES (Added for Global Consistency)
   ========================================= */

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    color: var(--text-color);
    background-color: var(--white);
    border: 1px solid #cbd5e1;
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.btn.primary:hover {
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
}

.btn.secondary {
    background-color: var(--white);
    color: #64748b;
    border: 1px solid #e2e8f0;
}

.btn.secondary:hover {
    background-color: #f8fafc;
    color: var(--text-color);
    border-color: #cbd5e1;
}

.btn.danger {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.btn.danger:hover {
    background-color: #fecaca;
    color: #b91c1c;
    box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.2);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Input Group */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =========================================
   PROGRESS BAR STYLES
   ========================================= */

.progress-container {
    width: 100%;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.progress-bar {
    width: 0%;
    height: 10px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 9999px;
    transition: width 0.4s ease;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Animated stripe effect */
.progress-bar::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(-45deg,
            rgba(255, 255, 255, 0.2) 25%,
            transparent 25%,
            transparent 50%,
            rgba(255, 255, 255, 0.2) 50%,
            rgba(255, 255, 255, 0.2) 75%,
            transparent 75%,
            transparent);
    background-size: 20px 20px;
    animation: move 1s linear infinite;
    border-radius: 9999px;
}

@keyframes move {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 20px 20px;
    }
}

.progress-percentage {
    text-align: right;
    font-size: 0.85rem;
    color: var(--primary-color);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    /* Darker overlay */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    /* Ensure it's on top of everything */
}

.progress-modal-content {
    background: var(--white);
    padding: 3rem;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    width: 90%;
    max-width: 500px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-overlay.hidden {
    display: none !important;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* =========================================
   UPLOAD UI IMPROVEMENTS
   ========================================= */

.upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius);
    padding: 2.5rem;
    text-align: center;
    transition: all 0.2s ease;
    background: #f8fafc;
    cursor: pointer;
    position: relative;
    margin-top: 0.5rem;
}

.upload-zone:hover,
.upload-zone.dragging {
    border-color: var(--primary-color);
    background: #f1f5f9;
}

.upload-zone i.upload-icon {
    font-size: 3rem;
    color: #94a3b8;
    margin-bottom: 1rem;
    display: block;
}

.upload-zone p {
    margin: 0;
    color: var(--text-color);
    font-weight: 500;
}

.upload-zone span {
    color: #64748b;
    font-size: 0.85rem;
}

#pautaFile,
#userFirma {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.preview-item {
    margin-top: 1.5rem;
    padding: 1rem;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-image-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.preview-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-info {
    flex: 1;
}

.preview-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.9rem;
    color: var(--text-color);
    word-break: break-all;
}

.preview-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #64748b;
}

.btn-delete-file {
    background: #fee2e2;
    color: #dc2626;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    flex-shrink: 0;
}

.btn-delete-file:hover {
    background: #fecaca;
    color: #b91c1c;
    transform: scale(1.1);
}

/* =========================================
   LOADING SIMULATION STYLES
   ========================================= */

#loaderOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    color: white;
    transition: opacity 0.6s ease, visibility 0.6s;
}

#loaderOverlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem;
    border-radius: 24px;
    text-align: center;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.loader-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    filter: drop-shadow(0 0 15px rgba(37, 99, 235, 0.5));
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.loader-text {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    min-height: 1.5em;
    animation: pulseText 2s infinite ease-in-out;
}

.loader-subtext {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes pulseText {

    0%,
    100% {
        opacity: 0.8;
        transform: scale(0.98);
    }

    50% {
        opacity: 1;
        transform: scale(1);
    }
}

.loader-progress-container {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 1rem;
}

.loader-progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0%;
    transition: width 0.4s ease;
    box-shadow: 0 0 10px var(--primary-color);
}

/* =========================================
   CERTIFICATIONS ENHANCEMENTS
   ========================================= */

.row-certified {
    background-color: rgba(37, 99, 235, 0.04) !important;
    transition: background-color 0.3s ease;
}

.row-certified td:first-child {
    border-left: 4px solid var(--primary-color);
}

.row-certified:hover {
    background-color: rgba(37, 99, 235, 0.08) !important;
}

.image-modal {
    display: none;
    position: fixed;
    z-index: 11000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.image-modal-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.5);
    position: relative;
    top: 50%;
    transform: translateY(-50%);
}

.image-modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.image-modal-close:hover {
    color: #bbb;
}

.certified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-color);
    color: white;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
}

/* Confirmation Modal Styles */
.confirm-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    width: 90%;
    max-width: 500px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.confirm-modal.hidden {
    display: none;
}

.confirm-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #1e293b;
}

.confirm-text {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.confirm-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Ensure buttons in modal look good */
.confirm-buttons .btn {
    min-width: 120px;
}

/* =========================================
   LOGIN PAGE SPECIFIC STYLES
   ========================================= */

.login-visual {
    flex: 58;
    background: #020617;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.visual-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.visual-content p {
    font-size: 1.2rem;
    opacity: 0.8;
    max-width: 500px;
    color: #94a3b8;
}

.auth-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    color: #64748b;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.auth-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

.login-header {
    margin-bottom: 3.5rem;
}

.login-header .logo-text {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.login-header h2 {
    font-size: 1.25rem;
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #64748b;
    font-size: 0.95rem;
}

.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e2e8f0;
}

.divider:not(:empty)::before {
    margin-right: .5em;
}

.divider:not(:empty)::after {
    margin-left: .5em;
}

.g-sign-in-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    background-color: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    cursor: pointer;
    padding: 0 16px;
    transition: background-color 0.2s, box-shadow 0.2s;
    font-family: 'Roboto', arial, sans-serif;
    margin-top: 2rem;
    position: relative;
}

.g-sign-in-button:hover {
    background-color: #f8f9fa;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.30), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    border-color: #d2e3fc;
}

.g-sign-in-button .content-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.g-sign-in-button .logo-wrapper {
    width: 18px;
    height: 18px;
    margin-right: 12px;
}

.g-sign-in-button .text-container {
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    letter-spacing: 0.21px;
}

/* Login Box Component */
.login-box {
    width: 100%;
    max-width: 480px;
    background: #fff;
    padding: 2.5rem;
    border-radius: var(--radius);
    /* box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); */
}

/* Responsive Login Layout */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .login-visual {
        flex: none;
        width: 100%;
        padding: 4rem 2rem;
        min-height: 300px;
        display: flex;
        /* Ensure it's visible and flex */
    }

    .visual-content h1 {
        font-size: 2.5rem;
    }

    .login-form-side {
        flex: none;
        width: 100%;
        padding: 3rem 2rem;
        background: #fff;
    }
}

/* Ensure full height on desktop */
.login-container {
    align-items: stretch;
}

/* Sidebar Nav Group Enhancements */
.nav-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    cursor: pointer;
    color: #94a3b8;
    font-weight: 500;
    transition: all 0.2s;
    user-select: none;
}

.nav-group-header:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.05);
}

.nav-group-header .group-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.nav-group-header .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    color: #64748b;
    /* Slightly dimmer than text */
    transition: color 0.2s;
}

.nav-group-header:hover .nav-icon {
    color: var(--primary-color);
    /* Highlight icon on hover */
}

.nav-group-header .fa-chevron-down {
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

/* =========================================
   TAB SYSTEM STYLES
   ========================================= */
.tabs-container {
    margin-bottom: 2rem;
}

.tabs-header {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid #f1f5f9;
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Default switch/checkbox styles */
.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8fafc;
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px dashed var(--accent-color);
    margin-top: 1.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    margin-bottom: 0 !important;
}

/* SMTP Debug Log Styles */
.debug-log-entry {
    margin-bottom: 5px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.debug-log-entry.info { color: #60a5fa; }
.debug-log-entry.success { color: #10b981; font-weight: 600; }
.debug-log-entry.error { color: #f87171; }
.debug-log-entry.warning { color: #fbbf24; }
.debug-log-entry small { color: #94a3b8; margin-right: 8px; font-size: 0.75rem; }


    /* SMTP Debug Log Styles */
    .debug-log-entry {
        margin-bottom: 5px;
        padding-bottom: 5px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .debug-log-entry.info {
        color: #60a5fa;
    }

    .debug-log-entry.success {
        color: #10b981;
        font-weight: 600;
    }

    .debug-log-entry.error {
        color: #f87171;
    }

    .debug-log-entry.warning {
        color: #fbbf24;
    }

    .debug-log-entry small {
        color: #94a3b8;
        margin-right: 8px;
        font-size: 0.75rem;
    }