/* ═══════════════════════════════════════════════════════════════
   Track iT — Master Design System
   Premium Fintech Startup Stylesheet (Luxury Banking Overrides)
   ═══════════════════════════════════════════════════════════════ */

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

/* ══════════════════════════════════════════════════════════════
   CSS CUSTOM PROPERTIES (LIGHT & DARK - FORCE UNIFIED LUXURY DARK)
   ══════════════════════════════════════════════════════════════ */
:root, [data-theme="dark"], [data-theme="light"] {
    /* Primary (Burnished Gold) */
    --primary: #d4af37;
    --primary-dark: #b89543;
    --primary-light: rgba(212, 175, 55, 0.1);
    --primary-rgb: 212, 175, 55;

    /* Accent */
    --accent-green: #10b981;
    --accent-green-light: rgba(16, 185, 129, 0.12);
    --accent-red: #ef4444;
    --accent-red-light: rgba(239, 68, 68, 0.15);
    --accent-gold: #d4af37;
    --accent-gold-light: rgba(212, 175, 55, 0.15);

    /* Text */
    --text: #f4f4f7;
    --text-secondary: #a1a1aa;
    --text-muted: #52525b;

    /* Backgrounds */
    --bg: #09090b;
    --bg-secondary: #121214;
    --card: #121216;
    --card-hover: #1c1c22;

    /* Borders & Shadows */
    --border: rgba(212, 175, 55, 0.18);
    --border-light: rgba(255, 255, 255, 0.05);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.5);
    --shadow: 0 10px 30px rgba(0,0,0,0.6);
    --shadow-lg: 0 20px 50px rgba(0,0,0,0.8);
    --shadow-primary: 0 8px 24px rgba(212, 175, 55, 0.2);

    /* Glass */
    --glass-bg: rgba(18, 18, 22, 0.7);
    --glass-border: rgba(212, 175, 55, 0.18);
    --glass-blur: 24px;

    /* Radius */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s ease;

    /* Z-index layers */
    --z-dropdown: 100;
    --z-navbar: 200;
    --z-modal: 300;
    --z-toast: 400;
    --z-loading: 500;
}

/* ══════════════════════════════════════════════════════════════
   GLOBAL RESET & BASE STYLES
   ══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--transition), color var(--transition);
}

a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p { color: var(--text-secondary); line-height: 1.7; }

/* ══════════════════════════════════════════════════════════════
   LAYOUT UTILITIES
   ══════════════════════════════════════════════════════════════ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 24px; }
.container-lg { max-width: 1400px; margin: 0 auto; padding: 0 24px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.gap-xl { gap: 32px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Sections */
.section { padding: 80px 0; }
.section-sm { padding: 48px 0; }
.section-title { margin-bottom: 12px; }
.section-subtitle { color: var(--text-secondary); font-size: 1.1rem; max-width: 600px; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header .section-subtitle { margin: 0 auto; }

/* ══════════════════════════════════════════════════════════════
   GLASSMORPHISM
   ══════════════════════════════════════════════════════════════ */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: transform var(--transition), box-shadow var(--transition);
}
.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ══════════════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn.primary {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-primary);
}
.btn.primary:hover { background: var(--primary-dark); color: #fff; }

.btn.secondary {
    background: var(--accent-green);
    color: #fff;
}
.btn.secondary:hover { background: #0d9668; color: #fff; }

.btn.outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn.outline:hover { background: var(--primary); color: #fff; }

.btn.light {
    background: var(--primary-light);
    color: var(--primary);
}
.btn.light:hover { background: var(--primary); color: #fff; }

.btn.danger { background: var(--accent-red); color: #fff; }
.btn.danger:hover { background: #dc2626; color: #fff; }

.btn.ghost { background: transparent; color: var(--text-secondary); }
.btn.ghost:hover { background: var(--bg-secondary); color: var(--text); }

.btn.sm { padding: 8px 16px; font-size: 0.85rem; border-radius: var(--radius-sm); }
.btn.lg { padding: 16px 32px; font-size: 1.05rem; border-radius: var(--radius-lg); }
.btn.xl { padding: 18px 40px; font-size: 1.1rem; border-radius: var(--radius-lg); }

.btn.gradient {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: #fff;
    border: none;
}
.btn.gradient:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #6d28d9 100%);
    color: #fff;
    box-shadow: 0 8px 30px rgba(37,99,235,0.3);
}

.btn-icon {
    width: 40px; height: 40px;
    padding: 0;
    border-radius: var(--radius);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--card);
    border: 1px solid var(--border);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition);
}
.btn-icon:hover { background: var(--bg-secondary); color: var(--text); }

/* ══════════════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════════════ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition);
}
.card:hover { box-shadow: var(--shadow); }

.card-elevated {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all var(--transition);
}
.card-elevated:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ══════════════════════════════════════════════════════════════
   FORM ELEMENTS
   ══════════════════════════════════════════════════════════════ */
input, select, textarea {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.field-group { margin-bottom: 20px; }

.field-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.field-label .muted { font-weight: 400; color: var(--text-muted); font-size: 0.8rem; }

.field-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 0.95rem;
    transition: all var(--transition-fast);
    outline: none;
}
.field-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}
.field-input::placeholder { color: var(--text-muted); }

textarea.field-input { resize: vertical; min-height: 100px; line-height: 1.6; }

select.field-input { cursor: pointer; }

.field-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 16px;
}
.field-col { display: flex; flex-direction: column; gap: 6px; }
.field-col.full { grid-column: 1 / -1; }

.form-actions { display: flex; gap: 12px; margin-top: 20px; align-items: center; }

.form-errors {
    background: var(--accent-red-light);
    color: #991b1b;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid rgba(239,68,68,0.2);
    font-size: 0.9rem;
}
[data-theme="dark"] .form-errors { color: #fca5a5; }

.form-success {
    background: var(--accent-green-light);
    color: #065f46;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid rgba(16,185,129,0.2);
    font-size: 0.9rem;
}
[data-theme="dark"] .form-success { color: #6ee7b7; }

/* ══════════════════════════════════════════════════════════════
   BADGES
   ══════════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    width: fit-content;
    vertical-align: middle;
}
.badge.income { background: var(--accent-green-light); color: #065f46; }
.badge.expense { background: var(--accent-red-light); color: #991b1b; }
.badge.info { background: var(--primary-light); color: var(--primary); }
.badge.warning { background: var(--accent-gold-light); color: #92400e; }
.badge.success { background: var(--accent-green-light); color: #065f46; }
[data-theme="dark"] .badge.income { color: #6ee7b7; }
[data-theme="dark"] .badge.expense { color: #fca5a5; }
[data-theme="dark"] .badge.info { color: #93c5fd; }

/* ══════════════════════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════════════════════ */
.table-container {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }

thead { background: var(--bg-secondary); }
[data-theme="dark"] thead { background: rgba(255,255,255,0.05); }

th {
    padding: 14px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.925rem;
    vertical-align: middle;
}

tbody tr { transition: background var(--transition-fast); }
tbody tr:hover { background: var(--card-hover); }
tbody tr:last-child td { border-bottom: none; }

.table-actions { display: flex; gap: 8px; align-items: center; }

.action-small {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.action-edit { background: var(--primary-light); color: var(--primary); }
.action-edit:hover { background: var(--primary); color: #fff; }
.action-delete { background: var(--accent-red-light); color: var(--accent-red); }
.action-delete:hover { background: var(--accent-red); color: #fff; }

/* Category icon in tables */
.cat { display: flex; gap: 10px; align-items: center; }
.cat .icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: var(--primary-light);
}

/* ══════════════════════════════════════════════════════════════
   STAT CARDS (Dashboard Summary)
   ══════════════════════════════════════════════════════════════ */
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 12px;
}
.stat-card .stat-label { font-size: 0.85rem; color: var(--text-secondary); font-weight: 500; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 800; font-family: 'Outfit', sans-serif; margin-top: 4px; }
.stat-card .stat-trend { font-size: 0.8rem; margin-top: 6px; font-weight: 600; }
.stat-card .stat-trend.up { color: var(--accent-green); }
.stat-card .stat-trend.down { color: var(--accent-red); }

.stat-card.income-card .stat-icon { background: var(--accent-green-light); }
.stat-card.income-card .stat-value { color: var(--accent-green); }
.stat-card.expense-card .stat-icon { background: var(--accent-red-light); }
.stat-card.expense-card .stat-value { color: var(--accent-red); }
.stat-card.balance-card .stat-icon { background: var(--primary-light); }
.stat-card.balance-card .stat-value { color: var(--primary); }
.stat-card.savings-card .stat-icon { background: var(--accent-gold-light); }
.stat-card.savings-card .stat-value { color: var(--accent-gold); }

/* ══════════════════════════════════════════════════════════════
   INSIGHT CARDS
   ══════════════════════════════════════════════════════════════ */
.insight-card {
    display: flex;
    gap: 14px;
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--card);
    align-items: flex-start;
    transition: all var(--transition);
}
.insight-card:hover { box-shadow: var(--shadow-sm); }
.insight-card .insight-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 2px; }
.insight-card .insight-text { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.5; }
.insight-card.success { border-left: 3px solid var(--accent-green); }
.insight-card.warning { border-left: 3px solid var(--accent-gold); }
.insight-card.info { border-left: 3px solid var(--primary); }

/* ══════════════════════════════════════════════════════════════
   CHART CONTAINERS
   ══════════════════════════════════════════════════════════════ */
.chart-box {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.chart-box .chart-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    font-family: 'Outfit', sans-serif;
}
.chart-box canvas { max-height: 300px; }

/* ══════════════════════════════════════════════════════════════
   FILTER BAR
   ══════════════════════════════════════════════════════════════ */
.filter-row {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-row select, .filter-row input[type="text"], .filter-row input[type="date"] {
    padding: 10px 14px;
    border-radius: var(--radius);
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text);
    font-size: 0.9rem;
    min-width: 140px;
    outline: none;
    transition: border-color var(--transition-fast);
}
.filter-row select:focus, .filter-row input:focus { border-color: var(--primary); }

/* ══════════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════════ */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 32px;
    align-items: center;
}
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    transition: all var(--transition);
    text-decoration: none;
}
.pagination a:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .dots { border: none; background: none; color: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ══════════════════════════════════════════════════════════════ */
.toast-container {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 14px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    color: #fff;
    box-shadow: var(--shadow-lg);
    animation: slideInRight 0.3s ease, fadeOut 0.3s ease 3s forwards;
    max-width: 380px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.toast.success { background: var(--accent-green); }
.toast.error { background: var(--accent-red); }
.toast.info { background: var(--primary); }
.toast.warning { background: var(--accent-gold); color: #1a1a1a; }

/* ══════════════════════════════════════════════════════════════
   LOADING SCREEN
   ══════════════════════════════════════════════════════════════ */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: var(--z-loading);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    transition: opacity 0.5s ease;
}
.loading-screen.hidden { opacity: 0; pointer-events: none; }
.loading-logo { font-size: 3rem; animation: pulse 1.5s infinite; }
.loading-text { font-family: 'Outfit', sans-serif; font-size: 1.5rem; font-weight: 700; color: var(--text); }
.loading-bar {
    width: 200px; height: 4px;
    background: var(--border);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.loading-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #7c3aed);
    border-radius: var(--radius-full);
    animation: loadProgress 1.5s ease forwards;
}

/* ══════════════════════════════════════════════════════════════
   GRADIENT TEXT
   ══════════════════════════════════════════════════════════════ */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 50%, var(--accent-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ══════════════════════════════════════════════════════════════
   BACK TO TOP
   ══════════════════════════════════════════════════════════════ */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px; height: 48px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-primary);
    z-index: var(--z-dropdown);
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition);
    pointer-events: none;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: all; }
.back-to-top:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(37,99,235,0.35); }

/* ══════════════════════════════════════════════════════════════
   EMPTY STATE
   ══════════════════════════════════════════════════════════════ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 16px; opacity: 0.6; }
.empty-state .empty-title { font-size: 1.2rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state .empty-text { font-size: 0.95rem; margin-bottom: 20px; }

/* ══════════════════════════════════════════════════════════════
   DROPDOWN MENU
   ══════════════════════════════════════════════════════════════ */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);
    z-index: 999999;
    padding: 8px;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-item {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text) !important;
    transition: background var(--transition-fast), color var(--transition-fast);
    cursor: pointer !important;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    text-decoration: none !important;
    box-sizing: border-box;
    white-space: nowrap;
    pointer-events: auto !important;
}
.dropdown-item:hover {
    background: var(--primary-light);
    color: var(--primary) !important;
}
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; width: 100%; }

/* ══════════════════════════════════════════════════════════════
   MODAL
   ══════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: scale(0.95);
    transition: transform var(--transition);
}
.modal-overlay.active .modal { transform: scale(1); }
.modal-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 16px; }

/* ══════════════════════════════════════════════════════════════
   ANIMATIONS & KEYFRAMES
   ══════════════════════════════════════════════════════════════ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideInLeft { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }
@keyframes loadProgress { 0% { width: 0%; } 100% { width: 100%; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes countUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.animate-fadeIn { animation: fadeIn 0.5s ease; }
.animate-fadeInUp { animation: fadeInUp 0.6s ease; }
.animate-slideInLeft { animation: slideInLeft 0.5s ease; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* Scroll-triggered animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children */
.stagger-children > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children > *:nth-child(6) { transition-delay: 0.3s; }

/* ══════════════════════════════════════════════════════════════
   SCROLLBAR STYLING
   ══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .section { padding: 60px 0; }
}

@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .summary { grid-template-columns: repeat(2, 1fr); }
    .section { padding: 48px 0; }
    .form-actions { flex-direction: column; align-items: stretch; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    .filter-row { flex-direction: column; }
    .filter-row select, .filter-row input { width: 100%; }
}

@media (max-width: 480px) {
    .summary { grid-template-columns: 1fr; }
    .stat-card .stat-value { font-size: 1.4rem; }
    .btn.xl { padding: 14px 24px; font-size: 1rem; }
}

/* ══════════════════════════════════════════════════════════════
   SPINNER
   ══════════════════════════════════════════════════════════════ */
.spinner {
    width: 20px; height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* ══════════════════════════════════════════════════════════════
   AVATAR
   ══════════════════════════════════════════════════════════════ */
.avatar {
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    flex-shrink: 0;
}
.avatar.sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.2rem; }
.avatar.xl { width: 80px; height: 80px; font-size: 1.6rem; }

.avatar img {
    width: 100%; height: 100%;
    border-radius: var(--radius-full);
    object-fit: cover;
}

/* ══════════════════════════════════════════════════════════════
   TAG CHIPS (for category filters)
   ══════════════════════════════════════════════════════════════ */
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; }
.tag {
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid var(--border);
    background: var(--card);
    color: var(--text-secondary);
    transition: all var(--transition);
    text-decoration: none;
}
.tag:hover, .tag.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ══════════════════════════════════════════════════════════════
   GLOBAL LUXURY DIGITAL BANKING OVERRIDES
   ══════════════════════════════════════════════════════════════ */
body {
    background-color: var(--bg) !important;
    color: var(--text) !important;
}

/* Luxury headings typography override */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cinzel', serif !important;
    font-weight: 500 !important;
    color: #ffffff !important;
}

/* Brand name typography override in navbar and sidebar */
.navbar-name, .sidebar-brand .name, .sidebar-brand-name, .logo-text {
    font-family: 'Cinzel', serif !important;
    font-weight: 700 !important;
    letter-spacing: 0.05em !important;
}

/* Buttons style override */
.btn {
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: 0.03em;
    border-radius: 6px !important;
}
.btn.primary, .btn.gradient {
    background: linear-gradient(135deg, #e4c885, #b89543) !important;
    color: #1c1917 !important;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.2) !important;
    border: none !important;
}
.btn.primary:hover, .btn.gradient:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.35) !important;
    background: linear-gradient(135deg, #f0d796, #c5a860) !important;
    color: #1c1917 !important;
}
.btn.outline {
    border: 1px solid var(--border) !important;
    color: var(--text) !important;
    background: rgba(255, 255, 255, 0.01) !important;
}
.btn.outline:hover {
    border-color: var(--primary) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--primary) !important;
}

/* Global Cards style overrides */
.card, .glass-card, .card-elevated, .stat-card, .dash-stat-card, .summary-card {
    background: var(--card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow) !important;
}
.card:hover, .glass-card:hover, .card-elevated:hover, .stat-card:hover, .dash-stat-card:hover, .summary-card:hover {
    border-color: var(--primary) !important;
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.15) !important;
}

/* Global Forms inputs style overrides */
.field-input, input[type="text"], input[type="email"], input[type="password"], select, textarea {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-radius: 6px !important;
}
.field-input:focus, input:focus, select:focus, textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2) !important;
}

/* Tables style overrides */
.table-container {
    border: 1px solid var(--border) !important;
    background: var(--card) !important;
    border-radius: 12px !important;
}
thead {
    background: rgba(255, 255, 255, 0.03) !important;
}
th {
    border-bottom: 1px solid var(--border) !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    font-family: 'Outfit', sans-serif !important;
    font-size: 0.78rem !important;
}
td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04) !important;
}
tbody tr:hover {
    background: rgba(255, 255, 255, 0.02) !important;
}

/* Avatar styling */
.avatar {
    border: 1px solid var(--border) !important;
    background: linear-gradient(135deg, #e4c885, #b89543) !important;
    color: #1c1917 !important;
}

/* Tag chips styling override */
.tag {
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    background: rgba(255, 255, 255, 0.01) !important;
    border-radius: 6px !important;
    color: var(--text-secondary) !important;
}
.tag:hover, .tag.active {
    background: var(--primary) !important;
    color: #1c1917 !important;
    border-color: var(--primary) !important;
}

/* Sidebar navigation active state */
.sidebar-link.active {
    background: rgba(212, 175, 55, 0.1) !important;
    color: var(--primary) !important;
    border-left: 3px solid var(--primary) !important;
    border-radius: 0 6px 6px 0 !important;
}

/* ── Global Animated Fintech Backdrop ── */
.fintech-bg-container {
    position: fixed;
    inset: 0;
    overflow: hidden;
    z-index: -1; /* Place behind all elements */
    pointer-events: none;
    background: var(--bg);
}

.ambient-glows {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.glow-well {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.08; /* Subtle background glow for content readability */
}

.glow-1 {
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, #1e3a8a 0%, transparent 75%);
    top: -20%;
    right: -10%;
    animation: floatGlow1 28s infinite alternate ease-in-out;
}

.glow-2 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary) 0%, transparent 75%);
    bottom: -15%;
    left: -5%;
    animation: floatGlow2 24s infinite alternate ease-in-out;
}

@keyframes floatGlow1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-60px, 40px) scale(1.05); }
}

@keyframes floatGlow2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(80px, -40px) scale(0.95); }
}

.svg-graph-lines {
    position: absolute;
    inset: 0;
    opacity: 0.25;
    z-index: 1;
}

.trendline {
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    animation: flowData 28s linear infinite, waveMotion 10s ease-in-out infinite;
}

.trendline-1 { animation-delay: 0s; }
.trendline-2 { animation-delay: -5s; }

@keyframes flowData {
    to { stroke-dashoffset: 0; }
}

@keyframes waveMotion {
    0%, 100% { transform: translateY(0) scaleY(1); }
    50% { transform: translateY(20px) scaleY(1.05); }
}

/* Floating Rupee symbols */
.floating-rupee {
    position: absolute;
    font-family: var(--font-outfit);
    font-weight: 800;
    color: rgba(212, 175, 55, 0.015);
    font-size: 4rem;
    z-index: 1;
    pointer-events: none;
    animation: floatRupee 16s infinite linear;
}

.rupee-1 { top: 15%; left: 35%; animation-delay: 0s; }
.rupee-2 { bottom: 25%; left: 70%; animation-delay: -4s; font-size: 5rem; }
.rupee-3 { top: 60%; left: 10%; animation-delay: -8s; font-size: 3rem; }

@keyframes floatRupee {
    0% { transform: translateY(0) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(360deg); opacity: 0; }
}

/* Glowing Gold Particles */
.glow-particle {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--primary);
    box-shadow: 0 0 10px var(--primary);
    z-index: 1;
    opacity: 0.15;
    animation: pulseParticle 4s infinite ease-in-out;
}

.particle-1 { top: 25%; left: 20%; animation-delay: 0s; }
.particle-2 { bottom: 30%; right: 25%; animation-delay: -2s; }
.particle-3 { top: 75%; left: 12%; animation-delay: -1s; }

@keyframes pulseParticle {
    0%, 100% { transform: scale(1); opacity: 0.12; }
    50% { transform: scale(1.4); opacity: 0.28; }
}

/* Adjust all main contents to be above the fixed backgrounds */
.dash-layout, .container, .section, main, .mobile-nav, .cta-banner-structured {
    position: relative;
    z-index: 10;
}

/* ══════════════════════════════════════════════════════════════
   GLOBAL LUXURY PROFILE BUTTON & DROPDOWN (APPLE CARD STYLE)
   ══════════════════════════════════════════════════════════════ */
.user-menu-trigger {
    background: rgba(15, 15, 15, 0.82) !important;
    border: 1px solid #d4af37 !important;
    color: #e5c76b !important;
    border-radius: 999px !important;
    padding: 7px 18px !important;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.45), 0 0 14px rgba(212, 175, 55, 0.22) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
    cursor: pointer;
}
.user-menu-trigger .user-name {
    color: #e5c76b !important;
    font-weight: 600 !important;
    letter-spacing: 0.02em;
    transition: color 0.25s ease;
}
.user-menu-trigger svg {
    color: #d4af37 !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.user-menu-trigger:hover,
.blog-dropdown.open .user-menu-trigger,
.user-menu-trigger.active {
    background: linear-gradient(135deg, rgba(35, 30, 18, 0.92), rgba(20, 18, 14, 0.95)) !important;
    border-color: #d4af37 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.65), 0 0 24px rgba(212, 175, 55, 0.42) !important;
    transform: translateY(-2px) !important;
}
.user-menu-trigger:hover .user-name,
.blog-dropdown.open .user-menu-trigger .user-name {
    color: #ffffff !important;
}




