/* =====================================================================
   JJ-MONEY — Brand design system
   Colors from logo: navy, royal blue, orange, cyan.
   ===================================================================== */
:root {
    --jj-navy: #0f39ff;
    --jj-navy-2: #0f39ff;
    --jj-blue: #0f39ff;
    --jj-blue-light: #4a6bff;
    --jj-orange: #ff6a00;
    --jj-orange-light: #ff8a3d;
    --jj-green: #17a964;
    --jj-red: #e65a5a;
    --jj-text: #161a2c;
    --jj-muted: #6b7384;
    --jj-border: #eaedf4;
    --jj-bg: #f5f7fb;
    --jj-white: #ffffff;
    --jj-cyan: #00C6FF;

    --text: #161a2c;
    --text-muted: #6b7384;
    --surface: #ffffff;
    --bg: #f5f7fb;
    --border: #eaedf4;
    --shadow: 0 10px 30px rgba(3, 10, 43, .08);
    --shadow-lg: 0 24px 60px rgba(3, 10, 43, .14);
    --radius: 18px;

    --success: #17a964;
    --danger: #e65a5a;
    --warning: #F79009;
    --info: #00C6FF;
}

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

a { color: var(--jj-blue); text-decoration: none; }
a:hover { color: var(--jj-blue-light); }

/* ---------- Brand gradient bg (auth pages) ---------- */
.jj-gradient-bg {
    background: linear-gradient(135deg, #0f39ff 0%, #3a5eff 55%, #4a6bff 80%, rgba(255,106,0,0.18) 100%);
    color: #fff;
    min-height: 100vh;
    position: relative;
}
.jj-gradient-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(255,255,255,0.10) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(255,106,0,0.14) 0%, transparent 60%);
    pointer-events: none;
}

/* ---------- Buttons ---------- */
.btn-jj {
    background: linear-gradient(135deg, var(--jj-orange), var(--jj-orange-light));
    border: none; color: #fff; font-weight: 700; border-radius: 50px;
    padding: .75rem 1.75rem; letter-spacing: .3px;
    box-shadow: 0 8px 22px rgba(255,106,0,.3); transition: transform .2s, box-shadow .2s;
}
.btn-jj:hover { color:#fff; transform: translateY(-2px); box-shadow: 0 14px 30px rgba(255,106,0,.42); }
.btn-jj-blue {
    background: var(--jj-blue);
    box-shadow: 0 8px 22px rgba(15,57,255,.3); border:none; color:#fff; font-weight:700;
    border-radius:50px; padding:.75rem 1.75rem;
}
.btn-jj-blue:hover { color:#fff; transform: translateY(-2px); }
.btn-jj-outline {
    background: transparent; border: 1.5px solid var(--jj-blue); color: var(--jj-blue);
    font-weight: 700; border-radius: 50px; padding: .7rem 1.6rem;
}
.btn-jj-ghost { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 12px; font-weight:600; }

/* ---------- Cards ---------- */
.jj-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow);
}
.jj-card-pad { padding: 1.5rem; }

/* Auth card */
.auth-card {
    background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
    border-radius: 24px; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 30px 70px rgba(0,0,0,.4); color: #fff;
}
.auth-card .form-label { color: rgba(255,255,255,.85); font-weight: 600; font-size: .85rem; }
.auth-card .form-control, .auth-card .form-select {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #fff; border-radius: 12px;
    padding: .7rem .9rem;
}
.auth-card .form-control::placeholder { color: rgba(255,255,255,.4); }
.auth-card .form-control:focus, .auth-card .form-select:focus {
    background: rgba(255,255,255,.12); border-color: #fff; color:#fff;
    box-shadow: 0 0 0 .2rem rgba(255,255,255,.2);
}
.auth-card .form-select option { color: #0f1633; }

/* ---------- Logo mark ---------- */
.jj-logo-mark {
    width: 72px; height: 72px; border-radius: 50%; background: #fff; padding: 6px;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,.25);
}
.jj-logo-mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }

/* ---------- Password toggle ---------- */
.pw-wrap { position: relative; }
.pw-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px;
}
.auth-card .pw-toggle { color: rgba(255,255,255,.6); }

/* ---------- Dashboard shell ---------- */
.jj-shell {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}
.jj-sidebar {
    width: 260px; background: var(--jj-blue); color: #fff; flex-shrink: 0;
    position: fixed; top: 0; bottom: 0; left: 0; padding: 1.25rem 1rem; overflow-y: auto; z-index: 1030;
    transition: transform .28s ease;
}
.jj-sidebar .brand {
    display: flex; align-items: center; gap: .9rem; padding: .35rem .5rem 1.4rem;
    margin-bottom: .35rem; border-bottom: 1px solid rgba(255,255,255,.08);
}
.jj-sidebar .brand-copy { display: flex; flex-direction: column; line-height: 1.1; }
.jj-sidebar .brand-copy strong { font-weight: 900; letter-spacing: -.5px; font-size: 1.16rem; }
.jj-sidebar .brand-copy small { color: rgba(255,255,255,.58); font-size: .72rem; letter-spacing: .2px; }
.jj-brand-logo { width: 58px; height: 58px; padding: 7px; flex-shrink: 0; }
.jj-nav-link {
    display: flex; align-items: center; gap: .8rem; color: rgba(255,255,255,.72);
    padding: .7rem .9rem; border-radius: 12px; font-weight: 600; font-size: .92rem; margin-bottom: .2rem;
}
.jj-nav-link i { width: 20px; text-align: center; }
.jj-nav-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.jj-nav-link.active { background: rgba(255,255,255,.18); color: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.jj-nav-section { color: rgba(255,255,255,.35); font-size: .68rem; letter-spacing: 1.5px; text-transform: uppercase; padding: 1rem .9rem .4rem; }

.jj-main { flex: 1; margin-left: 260px; min-width: 0; }
.jj-topbar {
    background: rgba(255,255,255,.86); border-bottom: 1px solid rgba(230,233,244,.9);
    padding: 1rem 1.5rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 1020;
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 10px 24px rgba(3,10,43,.05);
}
.jj-topbar-title { font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; }
.jj-topbar-subtitle { color: var(--text-muted); font-size: .8rem; margin-top: .1rem; }
.jj-content { padding: 1.6rem; }

.sidebar-toggle { display: none; background: none; border: none; font-size: 1.3rem; color: var(--text); }

@media (max-width: 992px) {
    .jj-sidebar { transform: translateX(-100%); }
    .jj-sidebar.open { transform: translateX(0); }
    .jj-main { margin-left: 0; }
    .sidebar-toggle { display: inline-block; }
}

/* ---------- Stat cards ---------- */
.stat-card { position: relative; overflow: hidden; padding: 1.4rem 1.5rem; border-radius: var(--radius); color: #fff; }
.stat-card .stat-label { font-size: .8rem; opacity: .85; text-transform: uppercase; letter-spacing: .8px; font-weight: 600; }
.stat-card .stat-value { font-size: 1.7rem; font-weight: 800; margin-top: .3rem; }
.stat-card .stat-icon { position: absolute; right: 1rem; top: 1rem; font-size: 2.2rem; opacity: .22; }
.stat-blue { background: var(--jj-blue); }
.stat-orange { background: linear-gradient(135deg, var(--jj-orange), var(--jj-orange-light)); }
.stat-navy { background: var(--jj-blue); }
.stat-cyan { background: linear-gradient(135deg, #0091c6, var(--jj-cyan)); }

/* ---------- Badges / status chips ---------- */
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .7rem; border-radius: 50px; font-size: .74rem; font-weight: 700; letter-spacing: .3px; }
.chip-success { background: rgba(18,183,106,.12); color: var(--success); }
.chip-danger  { background: rgba(240,68,56,.12); color: var(--danger); }
.chip-warning { background: rgba(247,144,9,.14); color: var(--warning); }
.chip-info    { background: rgba(0,198,255,.14); color: #0091c6; }
.chip-muted   { background: #eef0f7; color: var(--text-muted); }
.chip-blue    { background: rgba(15,57,255,.1); color: var(--jj-blue); }

/* ---------- Tables ---------- */
.jj-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.jj-table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .6px; color: var(--text-muted); padding: .8rem 1rem; border-bottom: 1px solid var(--border); }
.jj-table td { padding: .85rem 1rem; border-bottom: 1px solid var(--border); font-size: .9rem; vertical-align: middle; }
.jj-table tr:last-child td { border-bottom: none; }
.jj-table tbody tr:hover { background: var(--bg); }

/* ---------- Forms ---------- */
.form-label { font-weight: 600; font-size: .85rem; color: var(--text); margin-bottom: .3rem; }
.form-control, .form-select { border-radius: 12px; border: 1px solid var(--border); padding: .65rem .85rem; }
.form-control:focus, .form-select:focus { border-color: var(--jj-blue-light); box-shadow: 0 0 0 .2rem rgba(15,57,255,.12); }
.req::after { content: " *"; color: var(--danger); }

/* ---------- Misc ---------- */
.text-jj-orange { color: var(--jj-orange) !important; }
.text-jj-blue { color: var(--jj-blue) !important; }
.bg-jj-navy { background: var(--jj-blue) !important; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 1.3rem 1.8rem; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--border); }
.timeline li.done::before { background: var(--success); }
.timeline li.active::before { background: var(--jj-orange); box-shadow: 0 0 0 4px rgba(255,106,0,.2); }
.timeline li:not(:last-child)::after { content: ''; position: absolute; left: 9px; top: 16px; bottom: 0; width: 2px; background: var(--border); }

.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--bg); }
.avatar-lg { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; }

/* ---------- Premium dashboard blocks ---------- */
.jj-page-hero {
    position: relative;
    overflow: hidden;
    padding: 1.5rem;
    border-radius: 26px;
    background: var(--jj-blue);
    color: #fff;
    box-shadow: 0 30px 70px rgba(3,10,43,.22);
}
.jj-page-hero::after {
    content: '';
    position: absolute;
    inset: auto -8% -40% auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.jj-page-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .45rem .78rem;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    color: rgba(255,255,255,.84);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}
.jj-page-hero__title { font-size: clamp(1.65rem, 2.4vw, 2.25rem); font-weight: 900; line-height: 1.08; margin: 1rem 0 .5rem; letter-spacing: -.04em; }
.jj-page-hero__text { color: rgba(255,255,255,.76); max-width: 720px; margin-bottom: 0; }
.jj-page-hero__meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .9rem;
    margin-top: 1.3rem;
    position: relative;
    z-index: 1;
}
.jj-hero-stat {
    padding: 1rem 1.05rem;
    border-radius: 18px;
    background: rgba(255,255,255,.11);
    border: 1px solid rgba(255,255,255,.12);
}
.jj-hero-stat__label { color: rgba(255,255,255,.62); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.jj-hero-stat__value { font-weight: 800; font-size: 1.02rem; margin-top: .35rem; }

/* ---------- Dashboard hero: welcome + balance split ---------- */
.jj-dash-hero {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 1.5rem;
    align-items: center;
}
.jj-dash-hero__intro { position: relative; z-index: 1; }
.jj-hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.3rem; }
.btn-jj-ghost-light {
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.22);
    color: #fff; font-weight: 700; border-radius: 50px; padding: .75rem 1.6rem;
    transition: background-color .2s ease, transform .2s ease;
}
.btn-jj-ghost-light:hover { background: rgba(255,255,255,.2); color: #fff; transform: translateY(-2px); }
.jj-hero-balance, .jj-hero-panel {
    position: relative; z-index: 1;
    padding: 1.4rem 1.5rem; border-radius: 22px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.jj-hero-balance__label, .jj-hero-panel__label { color: rgba(255,255,255,.66); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.jj-hero-balance__value, .jj-hero-panel__value { font-size: clamp(1.9rem, 3vw, 2.5rem); font-weight: 900; letter-spacing: -.02em; margin: .35rem 0 .9rem; }
.jj-hero-balance__foot, .jj-hero-panel__foot { display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.jj-hero-balance__foot span, .jj-hero-panel__foot span { color: rgba(255,255,255,.78); font-size: .8rem; font-weight: 600; }

/* Two-metric split inside a hero panel (e.g. wallet available + locked). */
.jj-hero-panel__rows { display: grid; gap: .55rem; }
.jj-hero-panel__row {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: .7rem .85rem; border-radius: 14px;
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
}
.jj-hero-panel__row .k { color: rgba(255,255,255,.72); font-size: .82rem; font-weight: 600; }
.jj-hero-panel__row .v { font-weight: 800; font-size: 1.02rem; }

/* Generic split hero: intro on the left, contextual panel on the right. */
.jj-split-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: center; }
.jj-split-hero > .jj-page-hero__intro { position: relative; z-index: 1; }

@media (max-width: 992px) {
    .jj-dash-hero, .jj-split-hero { grid-template-columns: 1fr; gap: 1.2rem; }
}
.jj-section-title { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.jj-section-title h6, .jj-section-title h5 { margin: 0; font-weight: 800; }
.jj-section-title p { margin: .18rem 0 0; color: var(--text-muted); font-size: .9rem; }
.jj-glass-card {
    background: rgba(255,255,255,.8);
    border: 1px solid rgba(230,233,244,.9);
    box-shadow: 0 20px 48px rgba(3,10,43,.08);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.jj-info-list { display: grid; gap: .9rem; }
.jj-info-row {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    padding: .95rem 1rem;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(244,246,252,.8), rgba(255,255,255,.96));
    border: 1px solid var(--border);
}
.jj-info-row__icon {
    width: 42px; height: 42px; border-radius: 14px; flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(15,57,255,.08); color: var(--jj-blue);
}
.jj-info-row__title { font-weight: 700; margin-bottom: .15rem; }
.jj-info-row__text { color: var(--text-muted); font-size: .88rem; margin: 0; }
.jj-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .9rem;
}
.jj-action-tile {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    padding: 1rem;
    min-height: 100%;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #fff, #f8faff);
    box-shadow: 0 16px 34px rgba(3,10,43,.06);
    color: var(--text);
}
.jj-action-tile__icon {
    width: 52px; height: 52px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem; color: #fff;
    background: var(--jj-blue);
    box-shadow: 0 14px 28px rgba(15,57,255,.22);
}
.jj-action-tile.orange .jj-action-tile__icon {
    background: linear-gradient(135deg, var(--jj-orange), var(--jj-orange-light));
    box-shadow: 0 14px 28px rgba(255,106,0,.22);
}
.jj-action-tile.cyan .jj-action-tile__icon {
    background: linear-gradient(135deg, #0091c6, var(--jj-cyan));
    box-shadow: 0 14px 28px rgba(0,198,255,.22);
}
.jj-action-tile__title { font-weight: 800; margin: 0; }
.jj-action-tile__text { margin: 0; color: var(--text-muted); font-size: .88rem; }
.jj-transaction-list { display: grid; gap: .8rem; }
.jj-transaction-item {
    display: flex;
    align-items: center;
    gap: .95rem;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #fff, #fbfcff);
}
.jj-transaction-item__icon {
    width: 46px; height: 46px; border-radius: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(18,183,106,.1); color: var(--success); flex-shrink: 0;
}
.jj-transaction-item.debit .jj-transaction-item__icon { background: rgba(240,68,56,.1); color: var(--danger); }
.jj-transaction-item__amount { font-weight: 800; text-align: right; }
.jj-transaction-item__amount small { display: block; color: var(--text-muted); font-weight: 600; font-size: .75rem; }
.jj-account-card {
    position: relative;
    overflow: hidden;
    padding: 1.25rem;
    border-radius: 24px;
    background: var(--jj-blue);
    color: #fff;
    box-shadow: 0 24px 46px rgba(3,10,43,.2);
}
.jj-account-card__number {
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 900;
    letter-spacing: .12em;
}
.jj-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .42rem .8rem;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.14);
    color: rgba(255,255,255,.9);
    font-size: .78rem;
    font-weight: 700;
}
.jj-kpi-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}
.jj-kpi-chip {
    padding: .95rem 1rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 14px 28px rgba(3,10,43,.05);
}
.jj-kpi-chip__label { color: var(--text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.jj-kpi-chip__value { font-size: 1.15rem; font-weight: 800; margin-top: .25rem; }
.jj-stack { display: grid; gap: 1rem; }

/* =====================================================================
   Mobile / responsive layer
   ===================================================================== */

/* Never let a wide element force a horizontal scroll of the whole page. */
html, body { max-width: 100%; overflow-x: hidden; }
img, svg, video, canvas { max-width: 100%; height: auto; }

/* Wide tables should scroll inside their own container, not the page.
   Wrap tables in <div class="table-responsive"> or .jj-table-wrap. */
.jj-table-wrap, .table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Dim + click-to-close scrim when the mobile sidebar is open. */
@media (max-width: 992px) {
    .jj-sidebar.open ~ .jj-main::before {
        content: ''; position: fixed; inset: 0; z-index: 1025;
        background: rgba(3, 10, 43, .5);
        -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    }
    .jj-sidebar { box-shadow: 0 0 40px rgba(0,0,0,.4); }
}

/* Tablet */
@media (max-width: 768px) {
    .jj-content { padding: 1.1rem; }
    .stat-card { padding: 1.15rem 1.2rem; }
    .stat-card .stat-value { font-size: 1.45rem; }
    .container, .container-lg, .container-md { padding-left: 14px; padding-right: 14px; }
    .btn-jj, .btn-jj-blue, .btn-jj-outline { padding: .7rem 1.4rem; }
    .jj-page-hero { padding: 1.3rem; border-radius: 22px; }
    .jj-page-hero__meta { grid-template-columns: 1fr; }
    .jj-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Phones */
@media (max-width: 576px) {
    body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

    /* Auth pages */
    .jj-gradient-bg { padding-left: 12px; padding-right: 12px; }
    .auth-card { padding-left: 16px !important; padding-right: 16px !important; border-radius: 18px; }
    .auth-card .form-label { font-size: .9rem; }

    /* Registration is a long form — keep field pairs stacked & comfy */
    .auth-card .row.g-3 > [class*="col-"] { margin-bottom: .15rem; }

    /* Password field: leave room for the toggle so text never hides under it */
    .pw-wrap .form-control { padding-right: 48px; }
    .pw-toggle { right: 10px; padding: 8px; }

    /* 16px inputs prevent iOS auto-zoom on focus */
    select.form-select, input.form-control, textarea.form-control { font-size: 16px; }

    /* Dashboard shell */
    .jj-topbar { padding: .78rem .85rem; gap: .6rem; }
    .jj-topbar-title { font-size: 1rem; }
    .jj-topbar-subtitle { display: none !important; }
    .jj-content { padding: .9rem; }
    .jj-sidebar { width: min(82vw, 300px); }
    .jj-sidebar .brand { padding-bottom: 1.15rem; }
    .jj-brand-logo { width: 88px; height: 88px; padding: 10px; }
    .jj-sidebar .brand-copy strong { font-size: 1.32rem; }
    .jj-sidebar .brand-copy small { font-size: .85rem; }

    /* Stat cards go full-width, comfortable tap size */
    .stat-card { padding: 1.1rem 1.15rem; }
    .stat-card .stat-value { font-size: 1.5rem; }
    .stat-card .stat-icon { font-size: 1.9rem; }

    /* Tables: tighter padding + allow horizontal scroll for the widest ones */
    .jj-table { min-width: 520px; }
    .jj-table th, .jj-table td { padding: .7rem .7rem; font-size: .85rem; }

    /* Cards */
    .jj-card-pad { padding: 1.1rem; }
    .jj-page-hero { padding: 1.15rem; border-radius: 20px; }
    .jj-page-hero__title { font-size: 1.45rem; margin-top: .85rem; }
    .jj-page-hero__text { font-size: .92rem; }
    .jj-hero-stat { padding: .9rem; }
    .jj-action-grid, .jj-kpi-strip { grid-template-columns: 1fr; }
    .jj-action-tile { padding: .95rem; border-radius: 18px; }
    .jj-account-card { padding: 1.05rem; border-radius: 20px; }
    .jj-account-card__number { font-size: 1.38rem; letter-spacing: .08em; }
    .jj-info-row { padding: .9rem; border-radius: 16px; }
    .jj-transaction-item { padding: .9rem; border-radius: 16px; }

    /* Comfortable tap targets everywhere (WCAG ~44px) */
    .btn, .pw-toggle, .jj-nav-link, .form-select, .form-control { min-height: 44px; }
    .btn { display: inline-flex; align-items: center; justify-content: center; }

    /* Full-width primary actions read better on phones */
    .btn-jj.w-100, .btn-jj-blue.w-100 { padding-top: .85rem; padding-bottom: .85rem; }
}

@media (max-width: 400px) {
    .jj-logo-mark { width: 72px; height: 72px; }
    .auth-card { padding-left: 12px !important; padding-right: 12px !important; }
    .jj-topbar-title { font-size: .95rem; }
    .jj-brand-logo { width: 80px; height: 80px; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
    .btn-jj, .btn-jj-blue, .jj-sidebar, .svc-card { transition: none !important; }
}

/* =====================================================================
   MODERN POLISH LAYER  (v2 — animations & visual effects)
   Motion & depth only; brand colours unchanged. All motion is disabled
   under prefers-reduced-motion at the bottom of this block.
   ===================================================================== */

/* ---------- Keyframes ---------- */
@keyframes jjFadeUp   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes jjFadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes jjPop      { 0% { opacity: 0; transform: scale(.94); } 60% { transform: scale(1.02); } 100% { opacity: 1; transform: scale(1); } }
@keyframes jjSheen    { 0% { transform: translateX(-120%) skewX(-18deg); } 100% { transform: translateX(320%) skewX(-18deg); } }
@keyframes jjFloat    { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes jjAurora   { 0% { background-position: 0% 50%, 100% 50%, 50% 50%; } 50% { background-position: 100% 50%, 0% 50%, 50% 60%; } 100% { background-position: 0% 50%, 100% 50%, 50% 50%; } }
@keyframes jjShimmer  { 0% { background-position: -450px 0; } 100% { background-position: 450px 0; } }
@keyframes jjSpin     { to { transform: rotate(360deg); } }
@keyframes jjPulse    { 0%,100% { box-shadow: 0 0 0 0 rgba(255,106,0,.35); } 50% { box-shadow: 0 0 0 7px rgba(255,106,0,0); } }

/* ---------- Global smoothing ---------- */
html { scroll-behavior: smooth; }
::selection { background: rgba(15,57,255,.18); }
body { scrollbar-color: var(--jj-blue-light) transparent; }
body ::-webkit-scrollbar { width: 10px; height: 10px; }
body ::-webkit-scrollbar-thumb { background: rgba(15,57,255,.35); border-radius: 50px; border: 2px solid transparent; background-clip: padding-box; }
body ::-webkit-scrollbar-thumb:hover { background: rgba(15,57,255,.6); background-clip: padding-box; }

/* ---------- Entrance animations ---------- */
.jj-content > * { animation: jjFadeUp .5s cubic-bezier(.22,.61,.36,1) both; }
.jj-content > *:nth-child(2) { animation-delay: .05s; }
.jj-content > *:nth-child(3) { animation-delay: .10s; }
.jj-content > *:nth-child(4) { animation-delay: .15s; }
.jj-content > *:nth-child(5) { animation-delay: .20s; }
.jj-content > *:nth-child(n+6) { animation-delay: .24s; }
.auth-card { animation: jjPop .55s cubic-bezier(.22,.61,.36,1) both; }

/* Scroll-reveal utility (JS adds .in when element enters viewport) */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.22,.61,.36,1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Cards: interactive depth ---------- */
.jj-card { transition: transform .28s cubic-bezier(.22,.61,.36,1), box-shadow .28s ease, border-color .28s ease; }
.jj-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: rgba(15,57,255,.22); }

/* ---------- Stat cards: sheen sweep + hover glow ---------- */
.stat-card { transition: transform .3s cubic-bezier(.22,.61,.36,1), box-shadow .3s ease; box-shadow: 0 14px 32px rgba(3,10,43,.16); }
.stat-card::after {
    content: ''; position: absolute; top: 0; left: 0; width: 45%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
    transform: translateX(-120%) skewX(-18deg); pointer-events: none;
}
.stat-card:hover { transform: translateY(-5px) scale(1.012); box-shadow: 0 26px 52px rgba(3,10,43,.26); }
.stat-card:hover::after { animation: jjSheen .9s ease; }
.stat-card .stat-icon { transition: transform .4s ease, opacity .3s ease; }
.stat-card:hover .stat-icon { transform: scale(1.15) rotate(-6deg); opacity: .3; }

/* ---------- Buttons: shine + tactile press ---------- */
.btn-jj, .btn-jj-blue { position: relative; overflow: hidden; }
.btn-jj::before, .btn-jj-blue::before {
    content: ''; position: absolute; top: 0; left: 0; width: 40%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
    transform: translateX(-150%) skewX(-20deg); pointer-events: none;
}
.btn-jj:hover::before, .btn-jj-blue:hover::before { animation: jjSheen .8s ease; }
.btn-jj:active, .btn-jj-blue:active { transform: translateY(0) scale(.97); }
.btn-jj-outline, .btn-jj-ghost, .btn { transition: transform .18s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease, border-color .2s ease; }
.btn-jj-outline:hover { background: var(--jj-blue); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15,57,255,.28); }

/* Click ripple (JS injects .jj-ripple span) */
.jj-ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.5); animation: jjRipple .6s ease-out; pointer-events: none; }
@keyframes jjRipple { to { transform: scale(2.6); opacity: 0; } }

/* ---------- Solid Biro Blue background for auth / gradient pages ---------- */
.jj-gradient-bg > * { position: relative; z-index: 1; }

/* ---------- Sidebar nav: sliding active accent ---------- */
.jj-nav-link { position: relative; transition: color .2s ease, background-color .2s ease, transform .2s ease; }
.jj-nav-link:hover { transform: translateX(3px); }
.jj-nav-link.active::before {
    content: ''; position: absolute; left: -1rem; top: 50%; transform: translateY(-50%);
    width: 4px; height: 60%; border-radius: 0 4px 4px 0; background: #fff;
    box-shadow: 0 0 10px rgba(255,255,255,.5);
}
.jj-nav-link i { transition: transform .2s ease; }
.jj-nav-link:hover i { transform: scale(1.15); }

/* ---------- Logo mark gentle float ---------- */
.auth-card .jj-logo-mark, .jj-gradient-bg .jj-logo-mark { animation: jjFloat 5s ease-in-out infinite; }

/* ---------- Chips: subtle attention pulse for pending/warning ---------- */
.chip-warning { animation: jjPulse 2.6s ease-in-out infinite; }

/* ---------- Table rows: smooth hover ---------- */
.jj-table tbody tr { transition: background-color .18s ease, transform .18s ease; }
.jj-table tbody tr:hover { transform: scale(1.004); }

/* ---------- Inputs: lift on focus ---------- */
.form-control, .form-select { transition: border-color .2s ease, box-shadow .2s ease, transform .12s ease; }
.form-control:focus, .form-select:focus { transform: translateY(-1px); }

/* ---------- Shimmer skeleton (add .jj-skeleton to a placeholder box) ---------- */
.jj-skeleton {
    background: linear-gradient(90deg, #eef0f7 25%, #f7f8fc 37%, #eef0f7 63%);
    background-size: 900px 100%; animation: jjShimmer 1.4s linear infinite; border-radius: 10px; color: transparent !important;
}

/* ---------- Lightweight spinner utility ---------- */
.jj-spin { display: inline-block; width: 1em; height: 1em; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: jjSpin .6s linear infinite; vertical-align: -.15em; }

/* ---------- Fade page content in on first paint ---------- */
.jj-fade-in { animation: jjFadeIn .4s ease both; }

/* ---------- Respect reduced motion (covers the whole polish layer) ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important; animation-iteration-count: 1 !important;
        transition-duration: .001ms !important; scroll-behavior: auto !important;
    }
    .reveal { opacity: 1 !important; transform: none !important; }
}


/* =====================================================================
   Deposit Banner — Fund Wallet page
   ===================================================================== */
.jj-deposit-banner {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 1.8rem 2rem;
    background: var(--jj-blue);
    color: #fff;
    box-shadow: 0 28px 64px rgba(3,10,43,.28);
    border: 1px solid rgba(255,255,255,.10);
}
.jj-deposit-banner__glow {
    pointer-events: none;
    position: absolute;
    top: -40%;
    right: -8%;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.10) 0%, transparent 70%);
    animation: jjFloat 6s ease-in-out infinite;
}
.jj-deposit-banner__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.4rem;
}
.jj-deposit-banner__icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 8px 20px rgba(0,0,0,.22);
}
.jj-deposit-banner__body {
    flex: 1;
    min-width: 0;
}
.jj-deposit-banner__title {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 .35rem;
}
.jj-deposit-banner__text {
    color: rgba(255,255,255,.78);
    font-size: .9rem;
    margin: 0 0 .85rem;
}
.jj-deposit-banner__options {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}
.jj-deposit-banner__option {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .55rem .9rem;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    font-size: .84rem;
}
.jj-deposit-banner__option-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
}
.jj-deposit-banner__option-icon--blue {
    background: rgba(255,255,255,.25);
    color: #fff;
}
.jj-deposit-banner__option-icon--gold {
    background: rgba(255,153,0,.3);
    color: #ffd580;
}
.jj-deposit-banner__option-title {
    font-weight: 700;
    line-height: 1.2;
}
.jj-deposit-banner__option-desc {
    color: rgba(255,255,255,.62);
    font-size: .78rem;
}
.jj-deposit-banner__badge {
    flex-shrink: 0;
    align-self: flex-start;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .55rem 1rem;
    border-radius: 50px;
    background: rgba(18,183,106,.2);
    border: 1px solid rgba(18,183,106,.35);
    color: #5bf0a4;
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .jj-deposit-banner { padding: 1.3rem; border-radius: 20px; }
    .jj-deposit-banner__badge { align-self: stretch; justify-content: center; margin-left: 0; }
    .jj-deposit-banner__content { gap: 1rem; }
    .jj-deposit-banner__icon { width: 52px; height: 52px; font-size: 1.3rem; }
}
@media (max-width: 576px) {
    .jj-deposit-banner { padding: 1.15rem; border-radius: 20px; }
    .jj-deposit-banner__content { flex-direction: column; align-items: flex-start; gap: .9rem; }
    .jj-deposit-banner__icon { width: 48px; height: 48px; font-size: 1.2rem; border-radius: 16px; }
    .jj-deposit-banner__title { font-size: 1.15rem; }
    .jj-deposit-banner__text { font-size: .88rem; margin-bottom: .75rem; }
    .jj-deposit-banner__options { flex-direction: column; gap: .6rem; }
    .jj-deposit-banner__option { padding: .65rem .8rem; }
    .jj-deposit-banner__option-icon { width: 34px; height: 34px; font-size: .9rem; }
    .jj-deposit-banner__option-title { font-size: .85rem; }
    .jj-deposit-banner__option-desc { font-size: .76rem; }
    .jj-deposit-banner__badge { padding: .5rem .9rem; font-size: .78rem; }
}
