@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary-dark: #0f172a;
    --primary-slate: #1e293b;
    --border-dark: rgba(255, 255, 255, 0.08);
    --border-light: #e2e8f0;
    --accent-emerald: #10b981;
    --accent-emerald-dark: #059669;
    --accent-emerald-light: #34d399;
    --bg-page: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-light: #f8fafc;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -2px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.05);
    --shadow-dropdown: 0 20px 25px -5px rgba(0, 0, 0, 0.25), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   TOP NAVIGATION BAR (MENÚ SUPERIOR MODERNO Y ELEGANTE)
   ========================================================================== */

.top-nav-bar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.top-nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Brand / Logo */
.brand-box {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
    flex-shrink: 0;
}

.brand-img {
    height: 42px;
    width: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    transition: transform 0.2s ease;
}

.brand-box:hover .brand-img {
    transform: scale(1.04);
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent-emerald-light);
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Mobile Toggle */
.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 1.25rem;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Nav Content Wrapper */
.nav-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    margin-left: 32px;
}

.nav-main-list {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 6px;
}

.nav-main-item {
    position: relative;
}

.nav-main-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 15px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.nav-main-link .nav-icon {
    font-size: 0.95rem;
    opacity: 0.85;
    transition: transform 0.2s;
}

.nav-main-link .nav-arrow {
    font-size: 0.7rem;
    margin-left: 2px;
    transition: transform 0.25s ease;
    opacity: 0.7;
}

.nav-main-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-main-link:hover .nav-icon {
    transform: translateY(-1px);
}

.nav-main-link.active,
.has-dropdown.active-parent > .nav-main-link {
    color: #34d399;
    background: rgba(16, 185, 129, 0.16);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.3);
}

.has-dropdown:hover > .nav-main-link .nav-arrow {
    transform: rotate(180deg);
}

/* Dropdown Panes */
.dropdown-pane {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 290px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-dropdown);
    padding: 12px;
    display: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1020;
    pointer-events: none;
    margin-top: 4px;
}

/* Puente invisible para que el cursor no pierda el hover al transitar al menú */
.dropdown-pane::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 14px;
    background: transparent;
    display: block;
}

.dropdown-pane-wide {
    min-width: 580px;
}

.dropdown-grid-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Dropdown show trigger on desktop & touch */
.has-dropdown:hover .dropdown-pane,
.has-dropdown:focus-within .dropdown-pane,
.has-dropdown.dropdown-open .dropdown-pane {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-pane-inner {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-group-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    color: #94a3b8;
    padding: 6px 12px;
    margin-bottom: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all 0.15s ease;
}

.dropdown-link:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(3px);
}

.dropdown-link.active {
    background: rgba(16, 185, 129, 0.14);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.25);
}

.link-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.link-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.link-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #f1f5f9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.link-subtitle {
    font-size: 0.75rem;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Icon backgrounds */
.bg-blue-tint   { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.bg-purple-tint { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.bg-green-tint  { background: rgba(34, 197, 94, 0.15);  color: #22c55e; }
.bg-orange-tint { background: rgba(249, 115, 22, 0.15); color: #f97316; }
.bg-amber-tint  { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.bg-slate-tint  { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

.badge-mini-soon {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 9999px;
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* User Profile & Actions */
.nav-user-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 5px 12px 5px 6px;
    border-radius: 9999px;
}

.user-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-emerald-dark));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-display-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.1;
}

.user-badge-role {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--accent-emerald-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.logout-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
}

.logout-action-btn:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ==========================================================================
   LEGACY NAVBAR COMPATIBILITY
   ========================================================================== */
.navbar {
    background-color: var(--primary-slate);
    color: #fff;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.navbar img { height: 40px; vertical-align: middle; margin-right: 15px; }
.navbar a { color: #ecf0f1; text-decoration: none; margin-left: 20px; font-weight: 500; }

/* ==========================================================================
   PAGE LAYOUT & GENERAL COMPONENTS
   ========================================================================== */

.container {
    padding: 32px 24px 60px;
    max-width: 1240px;
    margin: auto;
    box-sizing: border-box;
}

.page-header-box {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border-light);
}

.page-header-box h1 {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    margin: 4px 0 6px 0;
    letter-spacing: -0.5px;
}

.page-subtitle {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 700px;
    line-height: 1.5;
}

.badge-module-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 9999px;
    background: #fef3c7;
    color: #92400e;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

h1 {
    color: #0f172a;
    font-weight: 800;
    margin-top: 0;
}

/* Botones */
.btn-crear {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.btn-crear:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    filter: brightness(1.08);
}

.btn-crear.bg-blue { background: #2563eb; } 
.btn-crear.bg-blue:hover { background: #1d4ed8; }
.btn-crear.bg-purple { background: #7c3aed; } 
.btn-crear.bg-purple:hover { background: #6d28d9; }
.btn-crear.bg-green { background: #059669; } 
.btn-crear.bg-green:hover { background: #047857; }
.btn-crear.bg-orange { background: #ea580c; } 
.btn-crear.bg-orange:hover { background: #c2410c; }

/* Tablas */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-top: 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.92rem;
}

th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

tbody tr:hover {
    background-color: #f8fafc;
}

.text-right { text-align: right; }
.text-cargo { color: #dc2626; font-weight: 600; }
.text-abono { color: #16a34a; font-weight: 600; }
.truncate { max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: #fff;
    margin: 4% auto;
    padding: 32px;
    border-radius: var(--radius-lg);
    width: 620px;
    max-width: 92%;
    max-height: 88vh;
    overflow-y: auto;
    box-sizing: border-box;
    box-shadow: var(--shadow-dropdown);
    animation: modalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-15px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-file, .modal-pdf { width: 90%; height: 90vh; max-width: 1200px; max-height: 95vh; }
.close { float: right; font-size: 28px; font-weight: bold; cursor: pointer; color: #94a3b8; transition: color 0.15s; }
.close:hover { color: #0f172a; }

/* Formularios */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; color: #334155; font-weight: 600; font-size: 0.88rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.92rem;
    transition: all 0.2s;
    background-color: #ffffff;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.form-group textarea { resize: vertical; height: 90px; }

.btn-submit {
    padding: 12px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    width: 100%;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 12px;
    transition: all 0.2s;
}

.btn-submit:hover { filter: brightness(1.08); }
.btn-submit.bg-blue { background-color: #2563eb; }
.btn-submit.bg-purple { background-color: #7c3aed; }
.btn-submit.bg-green { background-color: #059669; }
.btn-submit.bg-orange { background-color: #ea580c; }

.action-icon {
    font-size: 1.05rem;
    margin: 0 6px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s;
    display: inline-block;
}
.action-icon:hover { transform: scale(1.15); }
.icon-view { color: #0284c7; }
.icon-edit { color: #d97706; }
.icon-delete { color: #dc2626; }

.view-group { margin-bottom: 15px; border-bottom: 1px solid #f1f5f9; padding-bottom: 10px; }
.view-group label { font-weight: 600; color: #64748b; font-size: 0.82rem; display: block; margin-bottom: 3px; text-transform: uppercase; }
.view-group .data { color: #0f172a; font-size: 0.95rem; font-weight: 500; }

.alert { padding: 14px 18px; border-radius: var(--radius-md); margin-bottom: 24px; font-weight: 500; font-size: 0.92rem; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

.badge { padding: 4px 8px; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-inactive { background: #fee2e2; color: #991b1b; }

.thumb { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; vertical-align: middle; border: 2px solid #e2e8f0; }
.img-large { max-width: 160px; max-height: 160px; border-radius: var(--radius-md); object-fit: cover; border: 1px solid var(--border-light); }

.flex-desktop { display: flex; gap: 15px; }

/* Empty state / placeholder card */
.card-empty-state {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px dashed #cbd5e1;
    padding: 60px 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    margin-top: 20px;
}

.empty-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.card-empty-state h2 {
    color: #0f172a;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.card-empty-state p {
    color: var(--text-muted);
    max-width: 550px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Dashboard Specific Styles */
.dashboard-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 36px 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    right: -40px;
    bottom: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.dashboard-hero h1 {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.dashboard-hero p {
    color: #94a3b8;
    font-size: 1rem;
    margin: 0;
}

.section-heading-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 28px 0 16px 0;
}

.section-heading-row h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.dashboard-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.module-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.module-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.card-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}

.card-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 9999px;
    letter-spacing: 0.5px;
}

.card-badge.badge-ready { background: #dcfce7; color: #166534; }
.card-badge.badge-dev   { background: #fef3c7; color: #92400e; }

.card-body h3 {
    margin: 0 0 6px 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
}

.card-body p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.card-footer-action {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #2563eb;
}

.module-card:hover .card-footer-action {
    gap: 10px;
}

/* Cuentas Specific */
.filter-box {
    background: white;
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.filter-box select {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    width: 100%;
    max-width: 320px;
}

.saldos-container { display: flex; gap: 32px; text-align: right; flex-wrap: wrap; }
.saldo-box { display: flex; flex-direction: column; align-items: flex-end; }
.saldo-box h3 { margin: 0 0 4px 0; color: #64748b; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
.saldo-box h2 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.saldo-positivo { color: #16a34a; }
.saldo-negativo { color: #dc2626; }

/* Login Specific */
.login-container {
    max-width: 420px;
    margin: 80px auto;
    background: white;
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    text-align: center;
}

.login-container h1 {
    color: #0f172a;
    margin-bottom: 24px;
    font-size: 1.85rem;
    font-weight: 800;
}

.login-container .error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    text-align: left;
    font-size: 0.88rem;
    border: 1px solid #fecaca;
}

/* ==========================================================================
   RESPONSIVE DESIGN (TABLETS Y MÓVILES)
   ========================================================================== */

@media (max-width: 992px) {
    .mobile-nav-toggle {
        display: block;
    }

    .nav-content-wrapper {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: #0f172a;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding: 20px 24px;
        margin-left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    }

    .nav-content-wrapper.nav-open {
        display: flex;
    }

    .nav-main-list {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .nav-main-link {
        width: 100%;
        justify-content: space-between;
        padding: 12px 14px;
    }

    .dropdown-pane {
        position: static;
        display: none;
        opacity: 1;
        transform: none;
        box-shadow: none;
        background: #1e293b;
        margin-top: 6px;
        min-width: unset;
        width: 100%;
    }

    .dropdown-pane-wide {
        min-width: unset;
    }

    .dropdown-grid-cols {
        grid-template-columns: 1fr;
    }

    .has-dropdown.dropdown-open .dropdown-pane {
        display: block;
    }

    .nav-user-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding-top: 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .user-chip {
        justify-content: flex-start;
    }

    .logout-action-btn {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .container { padding: 20px 16px; }
    .page-header-box { flex-direction: column; align-items: stretch; }
    .modal-content { width: 95%; padding: 20px; margin: 10% auto; }
    .modal-file { width: 100%; height: 80vh; margin: 5% auto; }
    .flex-desktop { flex-direction: column; gap: 0; }
    .saldos-container { justify-content: flex-start; text-align: left; }
    .saldo-box { align-items: flex-start; }
    .dashboard-hero { padding: 24px 20px; }
    .dashboard-hero h1 { font-size: 1.6rem; }
}
