/* ============================================================
   1. VARIABLES Y RESET
   ============================================================ */
:root {
    --bg-primary: #0f0f13;
    --bg-secondary: #1a1a22;
    --bg-card: #22222e;
    --bg-card-hover: #2a2a38;
    --bg-sidebar: #121216;
    --accent: #00e676;
    --accent-hover: #00c853;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border: #2a2a35;
    --radius: 12px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
    --transition: 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    --font: 'Inter', system-ui, -apple-system, sans-serif;
    --sidebar-width: 240px;
}

body.light-mode {
    --bg-primary: #f1f5f9;
    --bg-secondary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-sidebar: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background 0.3s ease, color 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
}

input, select, textarea {
    user-select: text;
    -webkit-user-select: text;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ============================================================
   2. AUTH
   ============================================================ */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 400px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    transition: background 0.3s ease, border-color 0.3s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-logo { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.auth-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.auth-header h2 span { color: var(--accent); }
.auth-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-form .form-group {
    margin-bottom: 1.2rem;
}
.auth-form .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
}
.auth-form .form-group input {
    width: 100%;
    padding: 0.7rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}
.auth-form .form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.auth-btn {
    width: 100%;
    padding: 0.8rem;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font);
}
.auth-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 230, 118, 0.25);
}

.auth-switch {
    text-align: center;
    margin-top: 1.2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.auth-switch a {
    color: var(--accent);
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}
.auth-switch a:hover { text-decoration: underline; }

/* ============================================================
   3. DASHBOARD
   ============================================================ */
.dashboard {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   4. SIDEBAR
   ============================================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.sidebar-logo { font-size: 1.6rem; }
.sidebar-title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}
.sidebar-title span { color: var(--accent); }

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1.5rem 0.8rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    cursor: pointer;
}
.nav-item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}
.nav-item.active {
    background: rgba(0, 230, 118, 0.08);
    color: var(--accent);
}
.nav-item .nav-icon { font-size: 1.2rem; width: 24px; text-align: center; }

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.theme-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.logout-btn {
    flex: 1;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font);
}
.logout-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
}

/* ============================================================
   5. MAIN CONTENT
   ============================================================ */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 1.5rem 2rem 3rem;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ============================================================
   6. MAIN HEADER
   ============================================================ */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 1rem;
}

.menu-toggle-dash {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 5px;
}
.menu-toggle-dash span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}
.menu-toggle-dash.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle-dash.active span:nth-child(2) { opacity: 0; }
.menu-toggle-dash.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.main-header-title h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}
.main-header-title p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.main-header-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.date-range-selector {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--bg-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    flex-wrap: wrap;
}
.date-range-selector input[type="date"] {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.8rem;
    padding: 0.2rem 0;
    max-width: 120px;
}
.date-range-selector input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.7);
    cursor: pointer;
}
.date-range-selector span {
    color: var(--text-muted);
    font-size: 0.8rem;
}
.btn-apply-date, .btn-reset-date {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.7rem;
    font-family: var(--font);
    transition: all 0.2s ease;
}
.btn-apply-date:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.btn-reset-date:hover {
    border-color: #ef4444;
    color: #ef4444;
}
body.light-mode .date-range-selector input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(0.2);
}

.export-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.25s ease;
}
.export-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.notification-bell {
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s ease;
    position: relative;
}
.notification-bell:hover { transform: scale(1.15); }
.notification-bell::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

/* ============================================================
   7. KPI CARDS
   ============================================================ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    padding: 1.5rem 0;
}

.kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.25s ease;
    position: relative;
    cursor: grab;
}
.kpi-card:active { cursor: grabbing; }
.kpi-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}
.kpi-card.dragging {
    opacity: 0.5;
    border-color: var(--accent);
    transform: scale(0.95);
}
.kpi-card.drag-over {
    border-color: var(--accent);
    border-style: dashed;
    transform: scale(1.02);
}

.drag-handle {
    position: absolute;
    top: 8px;
    right: 12px;
    color: var(--text-muted);
    font-size: 0.8rem;
    opacity: 0.3;
    cursor: grab;
    transition: opacity 0.2s ease;
}
.kpi-card:hover .drag-handle { opacity: 0.8; }

.kpi-icon { font-size: 2rem; }
.kpi-info { display: flex; flex-direction: column; }
.kpi-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
}
.kpi-change {
    font-size: 0.75rem;
    font-weight: 600;
}
.kpi-change.positive { color: var(--accent); }
.kpi-change.negative { color: #ef4444; }

/* ============================================================
   8. CHARTS
   ============================================================ */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding: 1.5rem 0;
}

.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.25s ease;
}
.chart-card:hover { border-color: var(--accent); }
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.chart-header h3 { font-size: 1rem; font-weight: 600; }
.chart-period {
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.chart-container {
    position: relative;
    height: 200px;
    width: 100%;
}
.chart-container canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* ============================================================
   9. CALENDARIO
   ============================================================ */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-top: 0.5rem;
    max-width: 100%;
}
.calendar-grid .calendar-header {
    text-align: center;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.3rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.calendar-grid .calendar-day {
    text-align: center;
    padding: 0.4rem 0;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    cursor: default;
}
.calendar-grid .calendar-day:hover {
    background: rgba(0, 230, 118, 0.05);
}
.calendar-grid .calendar-day.empty {
    color: var(--text-muted);
    opacity: 0.3;
}
.calendar-grid .calendar-day.today {
    background: var(--accent);
    color: #000;
    font-weight: 700;
}
.calendar-grid .calendar-day.has-event {
    position: relative;
}
.calendar-grid .calendar-day.has-event::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
}
.calendar-grid .calendar-day.has-transaction {
    color: var(--accent);
    font-weight: 600;
}

/* ============================================================
   10. RECENT TRANSACTIONS
   ============================================================ */
.recent-transactions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.recent-transaction {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0.8rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    transition: background 0.2s ease;
}
.recent-transaction:hover {
    background: var(--bg-card-hover);
}
.recent-transaction .recent-info {
    display: flex;
    flex-direction: column;
}
.recent-transaction .recent-name {
    font-size: 0.85rem;
    font-weight: 500;
}
.recent-transaction .recent-date {
    font-size: 0.7rem;
    color: var(--text-muted);
}
.recent-transaction .recent-amount {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
}

/* ============================================================
   11. TABLE
   ============================================================ */
.table-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-top: 1.5rem;
    transition: all 0.25s ease;
}
.table-section:hover { border-color: var(--accent); }

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.table-header h3 { font-size: 1rem; font-weight: 600; }

.table-controls {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}
.table-controls input,
.table-controls select {
    padding: 0.4rem 0.8rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.85rem;
    transition: border-color 0.2s ease;
}
.table-controls input:focus,
.table-controls select:focus {
    outline: none;
    border-color: var(--accent);
}

.table-wrapper { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
thead { border-bottom: 1px solid var(--border); }
th {
    text-align: left;
    padding: 0.7rem 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
td {
    padding: 0.7rem 0.8rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}
tr:last-child td { border-bottom: none; }

.status {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}
.status.completado { background: rgba(0, 230, 118, 0.15); color: var(--accent); }
.status.pendiente { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.status.cancelado { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

/* ============================================================
   12. EXPORT BUTTON
   ============================================================ */
.export-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.25s ease;
}
.export-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-export-csv {
    padding: 0.4rem 1rem;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font);
}
.btn-export-csv:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* ============================================================
   13. PROFILE
   ============================================================ */
.profile-avatar-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
}
.btn-avatar-upload {
    padding: 0.3rem 1.2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font);
}
.btn-avatar-upload:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}
.profile-stat {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}
.profile-stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}
.profile-stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ============================================================
   14. SECTION HEADER ACTIONS
   ============================================================ */
.section-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.section-header-actions h2 {
    font-size: 1.3rem;
    font-weight: 700;
}

.btn-add {
    padding: 0.5rem 1.2rem;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font);
}
.btn-add:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 230, 118, 0.2);
}

.total-transactions {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ============================================================
   15. SETTINGS
   ============================================================ */
.settings-container { max-width: 600px; }
.settings-container h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.settings-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: border-color 0.25s ease;
}
.settings-card:hover { border-color: var(--accent); }
.settings-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.settings-group {
    margin-bottom: 1rem;
}
.settings-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}
.settings-group input,
.settings-group select {
    width: 100%;
    padding: 0.6rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}
.settings-group input:focus,
.settings-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-save {
    padding: 0.6rem 1.5rem;
    background: var(--accent);
    color: #000;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: var(--font);
}
.btn-save:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 230, 118, 0.2);
}

/* ============================================================
   16. MODAL
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(5, 5, 8, 0.88);
    backdrop-filter: blur(10px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}
.modal-overlay.active { display: flex; }

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 500px;
    width: 100%;
    padding: 2rem;
    position: relative;
    animation: fadeInUp 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.modal-close {
    position: absolute;
    top: 1rem; right: 1.2rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
}
.modal-close:hover { color: var(--accent); transform: rotate(90deg); }

.modal-content .form-group {
    margin-bottom: 1.2rem;
}
.modal-content .form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.3rem;
}
.modal-content .form-group input,
.modal-content .form-group select {
    width: 100%;
    padding: 0.6rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.95rem;
}
.modal-content .form-group input:focus,
.modal-content .form-group select:focus {
    outline: none;
    border-color: var(--accent);
}
.modal-content .auth-btn { margin-top: 0.5rem; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   17. NOTIFICATION MODAL
   ============================================================ */
.notification-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(5, 5, 8, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}
.notification-modal.active { display: flex; }

.notification-content {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 450px;
    width: 100%;
    padding: 2rem;
    animation: fadeInUp 0.3s ease;
}
.notification-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.notification-content ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}
.notification-content ul li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.notification-content ul li:last-child { border-bottom: none; }

/* ============================================================
   18. TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: 100%;
    pointer-events: none;
}

.toast {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.4s ease;
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    border-left: 4px solid var(--accent);
}
.toast.success { border-left-color: var(--accent); }
.toast.error { border-left-color: #ef4444; }
.toast.warning { border-left-color: #fbbf24; }
.toast.info { border-left-color: #3b82f6; }

.toast-icon { font-size: 1.4rem; flex-shrink: 0; }
.toast-content { flex: 1; }
.toast-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}
.toast-message {
    font-size: 0.8rem;
    color: var(--text-secondary);
}
.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 0.2rem;
    transition: color 0.2s ease;
}
.toast-close:hover { color: var(--text-primary); }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}
.toast.hiding {
    animation: slideOutRight 0.3s ease forwards;
}

/* ============================================================
   19. RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .charts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .menu-toggle-dash { display: flex; }

    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .sidebar.open { transform: translateX(0); }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .kpi-grid { grid-template-columns: 1fr 1fr; }
    .charts-grid { grid-template-columns: 1fr; }
    .chart-container { height: 160px; }

    .main-header-title h1 { font-size: 1.3rem; }
    .main-header-title p { font-size: 0.8rem; }
    .avatar { width: 34px; height: 34px; font-size: 0.75rem; }
    .date-range-selector { width: 100%; justify-content: center; }
    .date-range-selector input[type="date"] { max-width: 100px; }

    .table-header { flex-direction: column; align-items: stretch; }
    .table-controls { flex-direction: column; }
    .table-controls input,
    .table-controls select { width: 100%; }

    .section-header-actions { flex-direction: column; align-items: stretch; }
    .auth-card { padding: 1.5rem; margin: 1rem; }
    .modal-content { margin: 1rem; padding: 1.5rem; }

    .profile-stats { grid-template-columns: 1fr 1fr; }
    .profile-stats .profile-stat:last-child { grid-column: span 2; }
    .calendar-grid { gap: 1px; }
    .calendar-grid .calendar-day { padding: 0.3rem 0; font-size: 0.7rem; }

    .toast-container { max-width: 90%; right: 5%; }
}

@media (max-width: 480px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .kpi-card { padding: 1rem; }
    .kpi-value { font-size: 1.2rem; }
    .sidebar { width: 100%; }
    .auth-card { padding: 1.2rem; }
    .profile-stats { grid-template-columns: 1fr; }
    .profile-stats .profile-stat:last-child { grid-column: span 1; }
    .recent-transaction { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
    .btn-export-csv { width: 100%; text-align: center; }
    .date-range-selector input[type="date"] { max-width: 80px; font-size: 0.7rem; }
}