/* ==========================================================================
   BimaTrack — Dark Blue Design System
   Professional, responsive (large / desktop / tablet / mobile)
   ========================================================================== */

:root {
    /* Core surfaces */
    --bg:          #0a1424;
    --bg-2:        #0c1a2e;
    --surface:     #101f38;
    --surface-2:   #142a48;
    --surface-3:   #17325a;
    --border:      #1e3a63;
    --border-soft: #17304f;

    /* Brand blues */
    --primary:     #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --accent:      #38bdf8;
    --glow:        rgba(59,130,246,.35);

    /* Text */
    --text:        #eaf1fb;
    --text-2:      #b6c6de;
    --muted:       #7f95b4;
    --muted-2:     #5f77a0;

    /* Status */
    --ok:    #34d399;
    --ok-bg: rgba(52,211,153,.14);
    --warn:  #fbbf24;
    --warn-bg: rgba(251,191,36,.14);
    --bad:   #f87171;
    --bad-bg: rgba(248,113,113,.14);

    /* Chart palette */
    --c1: #3b82f6;
    --c2: #38bdf8;
    --c3: #818cf8;
    --c4: #22d3ee;
    --c5: #a78bfa;
    --track: rgba(148,180,224,.12);

    /* Metrics */
    --radius:   14px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --sidebar-w: 264px;
    --shadow:   0 10px 30px -12px rgba(0,0,0,.55);
    --shadow-lg: 0 24px 60px -20px rgba(0,0,0,.7);
    --ring: 0 0 0 3px var(--glow);

    --ff: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--ff);
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
svg { display: block; }

/* Ambient background for app + marketing */
body.app, body.marketing {
    background:
        radial-gradient(1200px 600px at 80% -10%, rgba(56,189,248,.10), transparent 60%),
        radial-gradient(1000px 700px at -10% 10%, rgba(59,130,246,.12), transparent 55%),
        var(--bg);
    background-attachment: fixed;
}

/* ==========================================================================
   App layout
   ========================================================================== */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: linear-gradient(180deg, var(--bg-2), var(--bg));
    border-right: 1px solid var(--border-soft);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
}

.sidebar__brand {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 18px 14px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand__mark {
    width: 34px; height: 34px; border-radius: 10px;
    display: grid; place-items: center;
    font-weight: 800; font-size: 18px; color: #fff;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 6px 18px -6px var(--glow);
}
.brand__text { font-size: 19px; font-weight: 750; letter-spacing: -.02em; }
.sidebar__close { display: none; background: none; border: 0; color: var(--muted); }

.sidebar__role { padding: 4px 18px 16px; border-bottom: 1px solid var(--border-soft); }
.role-chip {
    display: inline-block; font-size: 11.5px; font-weight: 650; letter-spacing: .03em;
    text-transform: uppercase; padding: 4px 10px; border-radius: 999px;
    color: #dbeafe; background: rgba(59,130,246,.16); border: 1px solid rgba(59,130,246,.3);
}
.role-chip--finance { color:#a7f3d0; background:rgba(52,211,153,.14); border-color:rgba(52,211,153,.3); }
.role-chip--agent   { color:#bae6fd; background:rgba(56,189,248,.14); border-color:rgba(56,189,248,.3); }
.role-chip--client  { color:#ddd6fe; background:rgba(167,139,250,.16); border-color:rgba(167,139,250,.3); }
.role-chip--partner { color:#fde68a; background:rgba(251,191,36,.14); border-color:rgba(251,191,36,.3); }
.sidebar__group { color: var(--muted); font-size: 12px; margin-top: 8px; }

.nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 3px; overflow-y: auto; flex: 1; }
.nav__item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--text-2); font-size: 14.5px; font-weight: 500;
    transition: background .15s, color .15s;
}
.nav__item .ico { color: var(--muted); transition: color .15s; }
.nav__item:hover { background: var(--surface); color: var(--text); }
.nav__item:hover .ico { color: var(--accent); }
.nav__item.is-active {
    background: linear-gradient(90deg, rgba(59,130,246,.22), rgba(59,130,246,.05));
    color: #fff; box-shadow: inset 3px 0 0 var(--primary);
}
.nav__item.is-active .ico { color: var(--accent); }

.sidebar__foot { padding: 12px; border-top: 1px solid var(--border-soft); }
.sidebar__ver { color: var(--muted-2); font-size: 11.5px; text-align: center; margin-top: 8px; }

.sidebar-scrim {
    display: none; position: fixed; inset: 0; background: rgba(4,10,20,.6);
    backdrop-filter: blur(2px); z-index: 39;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* Topbar */
.topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 26px;
    background: rgba(10,20,36,.75);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
}
.topbar__left { display: flex; align-items: center; gap: 14px; min-width: 0; flex: 1; }
.topbar__menu { display: none; background: none; border: 0; color: var(--text); flex-shrink: 0; }
.topbar__titles { min-width: 0; }
.topbar__titles h1 { font-size: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__titles p { color: var(--muted); font-size: 13px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__right { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.topbar__actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
    position: relative; width: 40px; height: 40px; border-radius: 11px;
    display: grid; place-items: center; color: var(--text-2);
    background: var(--surface); border: 1px solid var(--border-soft);
    transition: .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--border); }
.dot-badge { position: absolute; top: 9px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--surface); }

.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
    font-weight: 700; font-size: 13px; color: #fff;
    background: linear-gradient(135deg, var(--primary-700), var(--accent));
}
.user-chip__meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip__meta strong { font-size: 13.5px; }
.user-chip__meta small { color: var(--muted); font-size: 11.5px; }

.content { padding: 26px; flex: 1; max-width: 1500px; width: 100%; margin: 0 auto; }

.app-foot {
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 18px 26px; color: var(--muted); font-size: 12.5px;
    border-top: 1px solid var(--border-soft);
}
.app-foot__note { color: var(--muted-2); }

/* ==========================================================================
   Buttons, pills, chips
   ========================================================================== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px; border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600; border: 1px solid transparent;
    transition: .15s; white-space: nowrap;
}
.btn--primary { background: linear-gradient(135deg, var(--primary-600), var(--primary)); color: #fff; box-shadow: 0 8px 20px -8px var(--glow); }
.btn--primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn--ghost { background: var(--surface); color: var(--text-2); border-color: var(--border-soft); }
.btn--ghost:hover { color: var(--text); border-color: var(--border); }
.btn--sm { padding: 7px 12px; font-size: 13px; }
.btn--block { width: 100%; justify-content: center; }

.pill {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
    border: 1px solid transparent; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill--ok   { color: var(--ok);   background: var(--ok-bg);   border-color: rgba(52,211,153,.25); }
.pill--warn { color: var(--warn); background: var(--warn-bg); border-color: rgba(251,191,36,.25); }
.pill--bad  { color: var(--bad);  background: var(--bad-bg);  border-color: rgba(248,113,113,.25); }
.pill--muted{ color: var(--muted);background: var(--track);   border-color: var(--border-soft); }

.tag { font-size: 11.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border-soft); padding: 2px 8px; border-radius: 6px; }

/* ==========================================================================
   Cards & grids
   ========================================================================== */
.grid { display: grid; gap: 18px; }
.page-head { display:flex; justify-content:space-between; align-items:flex-end; gap:16px; flex-wrap:wrap; margin-bottom: 20px; }
.page-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }

.kpi-row {
    display: grid; gap: 16px; margin-bottom: 20px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.kpi {
    background: linear-gradient(160deg, var(--surface), var(--bg-2));
    border: 1px solid var(--border-soft); border-radius: var(--radius);
    padding: 18px; display: flex; gap: 14px; align-items: flex-start;
    box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::after { content:""; position:absolute; right:-30px; top:-30px; width:120px; height:120px; border-radius:50%; background: radial-gradient(circle, var(--glow), transparent 70%); opacity:.5; }
.kpi__icon {
    width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center;
    color: var(--accent); background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.22);
}
.kpi__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kpi__label { color: var(--muted); font-size: 13px; font-weight: 500; }
.kpi__value { font-size: 25px; font-weight: 750; letter-spacing: -.02em; }
.kpi__delta { font-size: 12.5px; font-weight: 600; }
.kpi__delta--up { color: var(--ok); }
.kpi__delta--down { color: var(--bad); }

.card {
    background: var(--surface);
    border: 1px solid var(--border-soft); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
}
.card__head {
    display: flex; justify-content: space-between; align-items: center; gap: 14px;
    padding: 18px 20px; border-bottom: 1px solid var(--border-soft);
}
.card__title { font-size: 16px; }
.card__sub { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.card__actions { display: flex; gap: 8px; align-items: center; }
.card__body { padding: 20px; }
.card__body--flush { padding: 0; }

.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.span-2 { grid-column: span 2; }
.dash-grid { grid-template-columns: 2fr 1fr; align-items: start; }

/* ==========================================================================
   Tables
   ========================================================================== */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 520px; }
table.data th {
    text-align: left; color: var(--muted); font-weight: 600; font-size: 12px;
    text-transform: uppercase; letter-spacing: .04em;
    padding: 12px 16px; border-bottom: 1px solid var(--border-soft); white-space: nowrap;
}
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.cell-strong { font-weight: 600; color: var(--text); }
.cell-sub { color: var(--muted); font-size: 12px; }
.cell-main { display: flex; flex-direction: column; }
.mini-avatar {
    width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center;
    font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary-700), var(--accent));
}
.who { display: flex; align-items: center; gap: 10px; }

/* ==========================================================================
   Charts
   ========================================================================== */
.chart-wrap { width: 100%; }
.chart { width: 100%; height: auto; overflow: visible; }
.chart--bars { height: 240px; }
.chart--area { height: 220px; }
.bar { fill: url(#barGrad); }
.chart--bars .bar { fill: var(--primary); opacity: .9; transition: opacity .15s; }
.chart--bars .bar:hover { opacity: 1; }
.chart-label { fill: var(--muted); font-size: 11px; }
.grid { stroke: var(--border-soft); stroke-width: 1; stroke-dasharray: 3 5; }
.spark { stroke: var(--accent); }
.dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.chart-xlabels { display: flex; justify-content: space-between; margin-top: 8px; }
.chart-xlabels span { color: var(--muted); font-size: 11.5px; }

.donut-block { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; justify-content: center; }
.chart--donut { flex-shrink: 0; }
.donut-center { fill: var(--text); font-size: 22px; font-weight: 750; }
.donut-sub { fill: var(--muted); font-size: 11px; }
.legend { display: flex; flex-direction: column; gap: 12px; min-width: 150px; }
.legend li { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.dot-legend { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.legend-label { color: var(--text-2); flex: 1; }
.legend-val { font-weight: 700; }

.progress { height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.progress.ok span { background: linear-gradient(90deg, #059669, var(--ok)); }
.progress.warn span { background: linear-gradient(90deg, #d97706, var(--warn)); }

/* Waterfall / breakdown list */
.waterfall { display: flex; flex-direction: column; gap: 2px; }
.wf-row { display: grid; grid-template-columns: 1.4fr auto 90px; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px dashed var(--border-soft); }
.wf-row:last-child { border-bottom: 0; }
.wf-row.total { border-top: 2px solid var(--border); margin-top: 4px; padding-top: 14px; font-weight: 700; }
.wf-label { color: var(--text-2); font-size: 14px; }
.wf-pct { color: var(--muted); font-size: 12.5px; text-align: right; font-variant-numeric: tabular-nums; }
.wf-amt { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.wf-neg .wf-amt { color: var(--bad); }
.wf-pos .wf-amt { color: var(--ok); }

/* Info / list rows */
.stack { display: flex; flex-direction: column; gap: 14px; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border-soft); }
.list-row:last-child { border-bottom: 0; }
.list-row__main { flex: 1; min-width: 0; }
.list-row__main strong { font-size: 14px; display: block; }
.list-row__main span { color: var(--muted); font-size: 12.5px; }
.list-row__amt { font-weight: 700; font-variant-numeric: tabular-nums; }

.def-list { display: grid; grid-template-columns: auto 1fr; gap: 12px 20px; font-size: 14px; }
.def-list dt { color: var(--muted); }
.def-list dd { margin: 0; text-align: right; font-weight: 550; }

/* Callout */
.callout {
    display: flex; gap: 14px; padding: 16px 18px; border-radius: var(--radius);
    background: linear-gradient(120deg, rgba(59,130,246,.12), rgba(56,189,248,.06));
    border: 1px solid rgba(59,130,246,.25);
}
.callout__mark { flex-shrink: 0; color: var(--accent); }
.callout h4 { font-size: 14.5px; margin-bottom: 3px; }
.callout p { color: var(--text-2); font-size: 13px; }

.empty { text-align: center; color: var(--muted); padding: 40px 20px; }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 13px; color: var(--text-2); font-weight: 550; }
.field input, .field select, .field textarea {
    width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
    background: var(--bg-2); border: 1px solid var(--border); color: var(--text);
    font-size: 14px; font-family: inherit; transition: .15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: var(--ring);
}
.field input::placeholder { color: var(--muted-2); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }

/* KYC document capture tiles */
.kyc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kyc-tile {
    position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 4px; padding: 18px 12px; cursor: pointer;
    border: 1px dashed var(--border); border-radius: var(--radius-sm);
    background: var(--bg-2); transition: .15s; overflow: hidden;
}
.kyc-tile:hover { border-color: var(--primary); background: var(--surface); }
.kyc-tile__preview {
    width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
    color: var(--accent); background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.22);
    margin-bottom: 6px; overflow: hidden; flex-shrink: 0;
}
.kyc-tile__preview img { width: 100%; height: 100%; object-fit: cover; }
.kyc-tile__title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.kyc-tile__hint { font-size: 11.5px; color: var(--muted); }
.kyc-tile__action { font-size: 11.5px; color: var(--accent); font-weight: 600; margin-top: 4px; }
.kyc-tile.is-filled { border-style: solid; border-color: var(--ok); background: var(--surface); }
.kyc-tile.is-filled .kyc-tile__preview { color: var(--ok); background: var(--ok-bg); border-color: rgba(52,211,153,.3); }
.kyc-tile.is-filled .kyc-tile__action { color: var(--ok); }
.kyc-tile__check { position: absolute; top: 8px; right: 8px; color: var(--ok); display: none; }
.kyc-tile.is-filled .kyc-tile__check { display: block; }

.alert { padding: 12px 15px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 16px; }
.alert--error { background: var(--bad-bg); color: #fecaca; border: 1px solid rgba(248,113,113,.3); }
.alert--ok { background: var(--ok-bg); color: #bbf7d0; border: 1px solid rgba(52,211,153,.3); }

/* ==========================================================================
   Auth / login
   ========================================================================== */
.auth {
    min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
}
.auth__aside {
    padding: 52px 56px; display: flex; flex-direction: column; justify-content: space-between;
    background:
        radial-gradient(900px 500px at 70% 20%, rgba(56,189,248,.18), transparent 60%),
        linear-gradient(160deg, #12294a, var(--bg));
    border-right: 1px solid var(--border-soft); position: relative; overflow: hidden;
}
.auth__brand { display: flex; align-items: center; gap: 12px; }
.auth__brand .brand__text { font-size: 22px; }
.auth__hero h2 { font-size: 34px; line-height: 1.15; letter-spacing: -.03em; max-width: 460px; }
.auth__hero p { color: var(--text-2); font-size: 15.5px; margin-top: 16px; max-width: 440px; }
.auth__points { display: flex; flex-direction: column; gap: 14px; margin-top: 30px; }
.auth__point { display: flex; align-items: center; gap: 12px; color: var(--text-2); font-size: 14.5px; }
.auth__point .ico { color: var(--accent); flex-shrink: 0; }
.auth__foot { color: var(--muted); font-size: 12.5px; }

.auth__main { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card > p.sub { color: var(--muted); font-size: 14px; margin-bottom: 26px; }

.demo-accounts { margin-top: 26px; border-top: 1px solid var(--border-soft); padding-top: 20px; }
.demo-accounts h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 12px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.demo-chip {
    text-align: left; padding: 10px 12px; border-radius: var(--radius-sm);
    background: var(--surface); border: 1px solid var(--border-soft); color: var(--text-2);
    font-size: 12.5px; transition: .15s;
}
.demo-chip:hover { border-color: var(--primary); color: var(--text); }
.demo-chip strong { display: block; color: var(--text); font-size: 13px; margin-bottom: 1px; }

/* ==========================================================================
   Marketing landing
   ========================================================================== */
.mk-nav {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 40px; background: rgba(10,20,36,.7); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-soft);
}
.mk-nav__links { display: flex; align-items: center; gap: 28px; }
.mk-nav__links a { color: var(--text-2); font-size: 14.5px; }
.mk-nav__links a:hover { color: var(--text); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 40px; }
.hero { padding: 90px 0 70px; text-align: center; position: relative; }
.hero__badge {
    display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2);
    background: var(--surface); border: 1px solid var(--border-soft); padding: 6px 14px; border-radius: 999px;
    margin-bottom: 26px;
}
.hero__badge b { color: var(--accent); }
.hero h1 { font-size: 56px; line-height: 1.05; letter-spacing: -.03em; max-width: 900px; margin: 0 auto; }
.hero h1 .grad { background: linear-gradient(120deg, var(--accent), var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { color: var(--text-2); font-size: 19px; max-width: 680px; margin: 22px auto 0; }
.hero__cta { display: flex; gap: 14px; justify-content: center; margin-top: 34px; flex-wrap: wrap; }
.btn--lg { padding: 14px 26px; font-size: 15.5px; }

.stat-strip {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
    max-width: 900px; margin: 60px auto 0; padding: 26px;
    background: var(--surface); border: 1px solid var(--border-soft); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.stat-strip__item { text-align: center; }
.stat-strip__item b { display: block; font-size: 34px; font-weight: 780; letter-spacing: -.02em;
    background: linear-gradient(120deg, var(--accent), var(--primary)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-strip__item span { color: var(--muted); font-size: 13.5px; }

.section { padding: 76px 0; }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.section__eyebrow { color: var(--accent); font-size: 13px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; }
.section__head h2 { font-size: 38px; letter-spacing: -.02em; margin-top: 12px; }
.section__head p { color: var(--text-2); font-size: 16px; margin-top: 14px; }
.section--alt { background: linear-gradient(180deg, transparent, rgba(12,26,46,.5), transparent); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature {
    padding: 26px; border-radius: var(--radius-lg);
    background: linear-gradient(160deg, var(--surface), var(--bg-2));
    border: 1px solid var(--border-soft); transition: .2s;
}
.feature:hover { transform: translateY(-4px); border-color: var(--border); box-shadow: var(--shadow-lg); }
.feature__ico { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; color: var(--accent);
    background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.22); margin-bottom: 16px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { color: var(--text-2); font-size: 14.5px; }

.portal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; }
.portal-card {
    padding: 24px; border-radius: var(--radius-lg); text-align: left;
    background: var(--surface); border: 1px solid var(--border-soft); transition: .2s;
}
.portal-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.portal-card .n { font-size: 12px; font-weight: 700; color: var(--accent); }
.portal-card h3 { font-size: 17px; margin: 10px 0 8px; }
.portal-card p { color: var(--muted); font-size: 13.5px; }

.arch { display: flex; flex-direction: column; gap: 14px; max-width: 900px; margin: 0 auto; }
.arch-layer {
    display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: center;
    padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border-soft);
}
.arch-layer h4 { font-size: 15px; color: var(--accent); }
.arch-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.arch-chip { font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--border-soft); padding: 5px 11px; border-radius: 8px; }

.cta-band {
    text-align: center; padding: 64px 40px; margin: 40px auto; max-width: 1000px;
    border-radius: var(--radius-lg);
    background: radial-gradient(600px 300px at 50% 0, rgba(56,189,248,.2), transparent 60%), linear-gradient(160deg, var(--surface-2), var(--bg-2));
    border: 1px solid var(--border);
}
.cta-band h2 { font-size: 34px; letter-spacing: -.02em; }
.cta-band p { color: var(--text-2); font-size: 16px; margin: 14px auto 28px; max-width: 520px; }

.mk-foot { border-top: 1px solid var(--border-soft); padding: 40px 0; margin-top: 40px; color: var(--muted); font-size: 13.5px; }
.mk-foot .container { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }

/* ==========================================================================
   Responsive — large / desktop / tablet / mobile
   ========================================================================== */

/* Large desktops keep generous max width (handled by .content max-width) */

/* Tablets & small laptops */
@media (max-width: 1024px) {
    .dash-grid { grid-template-columns: 1fr; }
    .cols-2, .cols-3 { grid-template-columns: 1fr; }
    .span-2 { grid-column: auto; }
    .feature-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-strip { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 46px; }
    .arch-layer { grid-template-columns: 1fr; gap: 12px; }
}

/* Tablet: collapse sidebar to off-canvas */
@media (max-width: 860px) {
    .sidebar {
        position: fixed; left: 0; top: 0; transform: translateX(-100%);
        transition: transform .25s ease; box-shadow: var(--shadow-lg);
    }
    .sidebar.is-open { transform: translateX(0); }
    .sidebar__close { display: block; }
    .sidebar-scrim.is-open { display: block; }
    .topbar__menu { display: grid; place-items: center; }
    .content { padding: 20px 18px; }
    .auth { grid-template-columns: 1fr; }
    .auth__aside { display: none; }
    .mk-nav { padding: 14px 20px; }
    .mk-nav__links { display: none; }
    .container { padding: 0 22px; }
    .section { padding: 56px 0; }
}

/* Mobile phones */
@media (max-width: 560px) {
    .topbar { padding: 12px 16px; }
    .topbar__titles h1 { font-size: 17px; }
    .topbar__titles p { display: none; }
    .topbar__actions { display: none; }
    .user-chip__meta { display: none; }
    .kpi__value { font-size: 22px; }
    .feature-grid, .portal-grid { grid-template-columns: 1fr; }
    .stat-strip { grid-template-columns: repeat(2, 1fr); padding: 20px; gap: 16px; }
    .hero { padding: 56px 0 44px; }
    .hero h1 { font-size: 34px; }
    .hero p.lead { font-size: 16px; }
    .section__head h2, .cta-band h2 { font-size: 27px; }
    .form-grid { grid-template-columns: 1fr; }
    .card__head { flex-direction: column; align-items: flex-start; }
    .page-head { flex-direction: column; align-items: flex-start; }
    .demo-grid { grid-template-columns: 1fr; }
    .wf-row { grid-template-columns: 1fr auto; }
    .wf-pct { display: none; }
}
