/* ============================================================
   KREDITWERTE BANK — Design System
   Néo-bancaire allemand : épuré, précis, sobre
   ============================================================ */

:root {
    --navy:       #0d1f3c;
    --navy-mid:   #1a3560;
    --navy-light: #2a4a80;
    --teal:       #0ea5a0;
    --teal-light: #14b8b3;
    --gold:       #c8a84b;
    --white:      #ffffff;
    --off-white:  #f7f8fc;
    --gray-50:    #f4f5f9;
    --gray-100:   #eaecf4;
    --gray-200:   #d0d4e8;
    --gray-400:   #8892b0;
    --gray-600:   #4a5578;
    --gray-800:   #1e2640;
    --danger:     #e53e3e;
    --success:    #38a169;
    --warning:    #d97706;

    --radius-sm:  6px;
    --radius:     12px;
    --radius-lg:  18px;
    --radius-xl:  24px;
    --shadow-sm:  0 1px 4px rgba(13,31,60,0.06);
    --shadow:     0 4px 16px rgba(13,31,60,0.10);
    --shadow-lg:  0 12px 40px rgba(13,31,60,0.14);

    --sidebar-w:  240px;
    --topbar-h:   64px;
    --font-main:  'DM Sans', sans-serif;
    --font-serif: 'DM Serif Display', serif;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
    font-family: var(--font-main);
    background: var(--off-white);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: var(--font-main); cursor: pointer; }
input, select, textarea {
    font-family: var(--font-main);
    font-size: 0.95rem;
}
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================
   AUTH
   ============================================================ */
#authPage {
    min-height: 100vh;
    display: flex;
}

.auth-split {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.auth-left {
    width: 45%;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}
.auth-left::before {
    content: '';
    position: absolute;
    top: -120px; right: -120px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(14,165,160,0.18) 0%, transparent 70%);
    pointer-events: none;
}
.auth-left::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(200,168,75,0.10) 0%, transparent 70%);
    pointer-events: none;
}

.auth-left-content { position: relative; z-index: 1; max-width: 360px; }

.brand-mark {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 56px;
}
.brand-logo {
    width: 44px; height: 44px;
    background: var(--teal);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
}
.brand-mark span {
    color: white;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
}

.auth-headline {
    font-family: var(--font-serif);
    font-size: 3.2rem;
    color: white;
    line-height: 1.15;
    margin-bottom: 20px;
    font-weight: 400;
}
.auth-headline em {
    font-style: italic;
    color: var(--teal-light);
}

.auth-tagline {
    color: rgba(255,255,255,0.55);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 48px;
    font-weight: 300;
}

.auth-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.stat-pill {
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 40px;
    padding: 8px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
}
.stat-num {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}
.stat-label {
    color: rgba(255,255,255,0.45);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: white;
}

.auth-form-wrap {
    width: 100%;
    max-width: 400px;
}

.form-header {
    margin-bottom: 28px;
}
.form-header h2 {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
}
.form-header p {
    color: var(--gray-400);
    font-size: 0.9rem;
}

/* CHAMPS */
.field-group {
    margin-bottom: 18px;
    position: relative;
}
.field-group label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 7px;
}
.field-group input,
.field-group select,
.field-select {
    width: 100%;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    font-size: 0.95rem;
    color: var(--gray-800);
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    appearance: none;
}
.field-group input:focus,
.field-group select:focus {
    border-color: var(--navy-mid);
    box-shadow: 0 0 0 3px rgba(26,53,96,0.08);
}
.field-group input[type="range"] {
    padding: 0;
    border: none;
    background: none;
    accent-color: var(--navy);
    cursor: pointer;
    box-shadow: none;
    width: 100%;
}
.field-group input[type="file"] {
    padding: 8px 10px;
    font-size: 0.82rem;
    color: var(--gray-600);
    background: var(--gray-50);
}
.field-hint {
    position: absolute;
    right: 0; top: 0;
    font-size: 0.75rem;
    color: var(--teal);
    font-weight: 500;
}

.fields-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.btn-primary {
    width: 100%;
    padding: 13px;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: background 0.2s, transform 0.1s;
    margin-top: 4px;
}
.btn-primary:hover { background: var(--navy-mid); }
.btn-primary:active { transform: scale(0.99); }
.btn-primary:disabled {
    background: var(--gray-200);
    color: var(--gray-400);
    cursor: not-allowed;
}

.btn-outline {
    padding: 10px 20px;
    border: 1.5px solid var(--gray-200);
    background: white;
    color: var(--navy);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    transition: border-color 0.2s, background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-outline:hover { border-color: var(--navy); background: var(--gray-50); }

.btn-navy {
    padding: 10px 20px;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    transition: background 0.2s;
}
.btn-navy:hover { background: var(--navy-mid); }

.auth-switch {
    text-align: center;
    margin-top: 20px;
    font-size: 0.88rem;
    color: var(--gray-400);
}
.auth-switch a { color: var(--teal); font-weight: 600; }

.msg-box {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.84rem;
    margin-bottom: 12px;
}
.msg-success { background: #f0fdf4; border: 1px solid #86efac; color: var(--success); }
.msg-error   { background: #fff5f5; border: 1px solid #fc8181; color: var(--danger); }

/* ============================================================
   APP LAYOUT
   ============================================================ */
#appPage {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */
#sidebar {
    width: var(--sidebar-w);
    background: var(--navy);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 100;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.brand-logo-sm {
    width: 34px; height: 34px;
    background: var(--teal);
    color: white;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sidebar-brand span {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.55);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 2px;
    cursor: pointer;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: rgba(255,255,255,0.9); }
.nav-item.active {
    background: rgba(14,165,160,0.15);
    color: var(--teal-light);
}
.nav-item.active svg { stroke: var(--teal-light); }
.nav-logout { color: rgba(255,100,100,0.7); }
.nav-logout:hover { background: rgba(229,62,62,0.1); color: #fc8181; }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.06);
}

/* MAIN */
#mainContent {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* TOPBAR */
.topbar {
    height: var(--topbar-h);
    background: white;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    padding: 0 28px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gray-600);
    padding: 4px;
}
.topbar-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--navy);
    flex: 1;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.notif-btn {
    position: relative;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--gray-600);
    transition: background 0.15s;
}
.notif-btn:hover { background: var(--gray-50); }
.notif-dot {
    position: absolute;
    top: 6px; right: 7px;
    width: 7px; height: 7px;
    background: var(--danger);
    border-radius: 50%;
    border: 1.5px solid white;
}
.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 5px;
    border: 1.5px solid var(--gray-100);
    border-radius: 40px;
    cursor: pointer;
    transition: border-color 0.15s;
}
.user-chip:hover { border-color: var(--gray-200); }
.user-avatar-sm {
    width: 28px; height: 28px;
    background: var(--navy);
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
#userNameSm {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
}

/* CONTENT AREA */
.content-area { flex: 1; padding: 28px; max-width: 1200px; }

/* SECTIONS */
.section { animation: fadeUp 0.25s ease both; }
.section.hidden { display: none !important; }
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}
.section-sub {
    color: var(--gray-400);
    font-size: 0.88rem;
    margin-top: 3px;
}
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: white;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}
.card-wide { grid-column: span 2; }
.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.card-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--navy);
}
.card-link {
    font-size: 0.8rem;
    color: var(--teal);
    font-weight: 600;
}
.card-divider { height: 1px; background: var(--gray-100); margin: 20px 0; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 20px; }
.mt-4 { margin-top: 28px; }

/* DASH GRID */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

/* BALANCE STRIP */
.balance-strip {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.balance-card {
    flex: 1;
    min-width: 200px;
    background: white;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    transition: box-shadow 0.2s;
}
.balance-card:hover { box-shadow: var(--shadow); }
.balance-card.primary {
    background: var(--navy);
    border-color: var(--navy);
    color: white;
}
.balance-card::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 100px; height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,0.04);
}
.balance-currency {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gray-400);
    margin-bottom: 6px;
}
.balance-card.primary .balance-currency { color: rgba(255,255,255,0.5); }
.balance-amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.balance-card.primary .balance-amount { color: white; }
.balance-iban {
    font-size: 0.72rem;
    color: var(--gray-400);
    margin-top: 8px;
    font-family: 'DM Sans', monospace;
    letter-spacing: 0.04em;
}
.balance-card.primary .balance-iban { color: rgba(255,255,255,0.45); }
.balance-flag { font-size: 1.1rem; margin-bottom: 6px; }

/* TRANSACTIONS */
.tx-list { display: flex; flex-direction: column; gap: 2px; }
.tx-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    transition: background 0.12s;
}
.tx-item:hover { background: var(--gray-50); }
.tx-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.tx-icon.credit { background: #f0fdf4; color: var(--success); }
.tx-icon.debit  { background: #fff7ed; color: var(--warning); }
.tx-icon.transfer { background: #eff6ff; color: var(--navy); }
.tx-body { flex: 1; min-width: 0; }
.tx-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tx-date {
    font-size: 0.75rem;
    color: var(--gray-400);
    margin-top: 1px;
}
.tx-amount {
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
}
.tx-amount.credit { color: var(--success); }
.tx-amount.debit  { color: var(--gray-800); }

/* ACCOUNTS GRID */
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.account-card {
    background: white;
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-sm);
}
.account-card.main { border-top: 3px solid var(--navy); }
.account-type { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gray-400); margin-bottom: 8px; }
.account-balance { font-size: 1.6rem; font-weight: 700; color: var(--navy); letter-spacing: -0.02em; margin-bottom: 4px; }
.account-iban { font-size: 0.75rem; color: var(--gray-400); font-family: monospace; margin-bottom: 14px; letter-spacing: 0.03em; }
.account-actions { display: flex; gap: 8px; }
.account-actions button {
    flex: 1; padding: 8px; border: 1.5px solid var(--gray-200);
    background: white; border-radius: var(--radius-sm);
    font-size: 0.78rem; font-weight: 600; color: var(--navy);
    transition: all 0.15s; cursor: pointer;
}
.account-actions button:hover { background: var(--navy); color: white; border-color: var(--navy); }

/* QUICK ACTIONS */
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 4px; }
.quick-btn {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    padding: 14px 8px; border-radius: var(--radius);
    border: 1.5px solid var(--gray-100); background: white;
    font-size: 0.78rem; font-weight: 600; color: var(--gray-600);
    transition: all 0.15s; cursor: pointer;
}
.quick-btn:hover { border-color: var(--gray-200); background: var(--gray-50); color: var(--navy); }
.quick-icon {
    width: 36px; height: 36px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 700;
}
.quick-icon.navy  { background: rgba(13,31,60,0.08); color: var(--navy); }
.quick-icon.teal  { background: rgba(14,165,160,0.1); color: var(--teal); }
.quick-icon.gold  { background: rgba(200,168,75,0.1); color: var(--gold); }
.quick-icon.slate { background: var(--gray-100); color: var(--gray-600); }

/* TWO-COL */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* TRANSFER TABS */
.toggle-tabs { display: flex; border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm); overflow: hidden; }
.ttab {
    flex: 1; padding: 9px; border: none; background: white;
    font-size: 0.84rem; font-weight: 600; color: var(--gray-400);
    transition: all 0.15s; cursor: pointer;
}
.ttab.active { background: var(--navy); color: white; }

/* INVESTMENT PACKS */
.inv-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.inv-pack {
    background: white;
    border: 1.5px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.inv-pack:hover { border-color: var(--navy-light); box-shadow: var(--shadow); }
.inv-pack.featured { border-color: var(--navy); }
.pack-badge {
    display: inline-block;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 40px;
    margin-bottom: 14px;
}
.inv-pack.featured .pack-badge { background: var(--navy); color: white; }
.pack-name { font-size: 1.1rem; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.pack-return { font-size: 2rem; font-weight: 800; color: var(--teal); margin-bottom: 4px; letter-spacing: -0.02em; }
.pack-duration { font-size: 0.82rem; color: var(--gray-400); margin-bottom: 16px; }
.pack-features { list-style: none; margin-bottom: 20px; display: flex; flex-direction: column; gap: 7px; }
.pack-features li { font-size: 0.84rem; color: var(--gray-600); display: flex; align-items: center; gap: 7px; }
.pack-features li::before { content: '✓'; color: var(--teal); font-weight: 700; }
.pack-input {
    width: 100%;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.95rem;
    margin-bottom: 12px;
    outline: none;
}
.pack-input:focus { border-color: var(--navy); }
.pack-btn {
    width: 100%;
    padding: 11px;
    background: var(--navy);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    transition: background 0.15s;
    cursor: pointer;
}
.pack-btn:hover { background: var(--navy-mid); }
.inv-pack.featured .pack-btn { background: var(--teal); }
.inv-pack.featured .pack-btn:hover { background: var(--teal-light); }

/* LOAN SIMULATOR */
.loan-result {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px 0;
}
.loan-stat { text-align: center; }
.loan-stat-val { display: block; font-size: 1.15rem; font-weight: 700; color: var(--navy); }
.loan-stat-label { font-size: 0.72rem; color: var(--gray-400); font-weight: 500; margin-top: 2px; }
.range-val {
    text-align: right;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--navy);
    margin-top: 6px;
}

/* CARDS GRID */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.virtual-card {
    border-radius: var(--radius-lg);
    padding: 26px;
    color: white;
    position: relative;
    overflow: hidden;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: var(--shadow-lg);
}
.virtual-card.eur { background: linear-gradient(135deg, var(--navy), var(--navy-mid)); }
.virtual-card.usd { background: linear-gradient(135deg, #1a4731, #276749); }
.virtual-card.chf { background: linear-gradient(135deg, #7c3a1e, #a0522d); }
.virtual-card::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 180px; height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}
.card-chip { font-size: 1.4rem; margin-bottom: 16px; }
.card-number { font-size: 0.95rem; letter-spacing: 0.15em; font-weight: 500; opacity: 0.9; margin-bottom: 16px; }
.card-foot { display: flex; justify-content: space-between; align-items: flex-end; }
.card-name { font-size: 0.82rem; font-weight: 600; letter-spacing: 0.04em; opacity: 0.8; }
.card-expiry { font-size: 0.72rem; opacity: 0.6; }
.card-brand { font-size: 1.6rem; }

/* BADGES */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 40px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.badge-pending  { background: #fffbeb; color: var(--warning); border: 1px solid #fde68a; }
.badge-verified { background: #f0fdf4; color: var(--success); border: 1px solid #86efac; }
.badge-rejected { background: #fff5f5; color: var(--danger);  border: 1px solid #fc8181; }

/* KYC BLOCK */
.kyc-status-block { display: flex; flex-direction: column; gap: 8px; }
.kyc-label { font-size: 0.88rem; font-weight: 600; color: var(--navy); }

/* FILTER */
.filter-row { display: flex; gap: 8px; align-items: center; }
.filter-select {
    padding: 6px 12px;
    border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--gray-600);
    background: white;
    cursor: pointer;
    outline: none;
}

/* EMPTY STATE */
.empty-state {
    text-align: center;
    padding: 28px;
    color: var(--gray-400);
    font-size: 0.88rem;
}

/* MODAL */
.overlay {
    position: fixed; inset: 0;
    background: rgba(13,31,60,0.45);
    display: flex; align-items: center; justify-content: center;
    z-index: 200;
    backdrop-filter: blur(4px);
}
.modal {
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px;
    width: 90%; max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-100);
}
.modal-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.modal-header button {
    background: none; border: none;
    font-size: 1.4rem; color: var(--gray-400);
    cursor: pointer; line-height: 1;
}

/* TOAST */
#toastArea {
    position: fixed; bottom: 28px; right: 24px;
    display: flex; flex-direction: column-reverse; gap: 10px;
    z-index: 9999;
    pointer-events: none;
}
.toast {
    pointer-events: all;
    background: white;
    border-radius: var(--radius);
    padding: 14px 18px;
    min-width: 280px; max-width: 360px;
    box-shadow: var(--shadow-lg);
    border-left: 3px solid var(--navy);
    display: flex; align-items: flex-start; gap: 12px;
    animation: toastIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
.toast-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.toast-body { flex: 1; }
.toast-title { font-weight: 700; font-size: 0.85rem; color: var(--navy); }
.toast-msg   { font-size: 0.78rem; color: var(--gray-400); margin-top: 2px; }

/* INVESTMENT DASH ITEM */
.inv-dash-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 0; border-bottom: 1px solid var(--gray-100);
}
.inv-dash-item:last-child { border: none; }
.inv-tag {
    background: rgba(14,165,160,0.1);
    color: var(--teal);
    padding: 4px 10px; border-radius: 40px;
    font-size: 0.72rem; font-weight: 700;
}
.inv-dash-label { flex: 1; font-size: 0.88rem; font-weight: 600; color: var(--navy); }
.inv-dash-return { font-size: 0.85rem; font-weight: 700; color: var(--teal); }

/* LOAN ITEM */
.loan-item {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 10px;
}
.loan-item-head { display: flex; justify-content: space-between; margin-bottom: 8px; }
.loan-item-name { font-weight: 700; color: var(--navy); font-size: 0.9rem; }
.loan-item-amount { font-weight: 700; color: var(--navy); }
.loan-progress { height: 5px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
.loan-progress-bar { height: 100%; background: var(--teal); border-radius: 3px; }

/* STATEMENT HISTORY */
.stmt-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 0; border-bottom: 1px solid var(--gray-100);
}
.stmt-item:last-child { border: none; }
.stmt-info { flex: 1; }
.stmt-name { font-size: 0.88rem; font-weight: 600; color: var(--navy); }
.stmt-date { font-size: 0.75rem; color: var(--gray-400); }

/* HIDDEN */
.hidden { display: none !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .dash-grid { grid-template-columns: 1fr; }
    .card-wide { grid-column: span 1; }
    .inv-packs { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .auth-left { display: none; }
    .auth-right { padding: 32px 24px; }

    #sidebar {
        transform: translateX(-100%);
    }
    #sidebar.open { transform: translateX(0); }
    .sidebar-backdrop {
        position: fixed; inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 99;
        display: none;
    }
    .sidebar-backdrop.show { display: block; }

    #mainContent { margin-left: 0; }
    .menu-toggle { display: flex; }
    .content-area { padding: 20px 16px; }
    .two-col { grid-template-columns: 1fr; }
    .inv-packs { grid-template-columns: 1fr; }
    .fields-row { grid-template-columns: 1fr; }
    .balance-strip { gap: 12px; }
    .balance-card { min-width: 160px; }
    .balance-amount { font-size: 1.4rem; }
    .section-title { font-size: 1.25rem; }
    .loan-result { grid-template-columns: 1fr; gap: 8px; }
    .quick-grid { grid-template-columns: repeat(3, 1fr); }
    .topbar { padding: 0 16px; }
    #userNameSm { display: none; }
}

@media (max-width: 480px) {
    .auth-right { padding: 24px 20px; }
    .topbar-title { font-size: 0.9rem; }
    .cards-grid { grid-template-columns: 1fr; }
    .accounts-grid { grid-template-columns: 1fr; }
}