:root {
    color-scheme: light;
    --ink-950: #07101f;
    --ink-900: #0b172a;
    --ink-800: #12233c;
    --ink-700: #253a57;
    --ink-600: #465a74;
    --ink-500: #5f7188;
    --ink-400: #93a1b4;
    --ink-300: #c1cad6;
    --ink-200: #dbe2ea;
    --ink-100: #edf1f5;
    --ink-50: #f6f8fb;
    --surface: #ffffff;
    --canvas: #f3f6fa;
    --brand: #2563eb;
    --brand-strong: #1d4ed8;
    --brand-soft: #eaf1ff;
    --aqua: #2dd4bf;
    --aqua-soft: #e8fbf7;
    --positive: #006d4c;
    --positive-soft: #e8f7f1;
    --negative: #b3263a;
    --negative-soft: #fff0f2;
    --warning: #805200;
    --warning-soft: #fff7e8;
    --shadow-xs: 0 1px 2px rgba(7, 16, 31, .04);
    --shadow-sm: 0 6px 18px rgba(7, 16, 31, .06);
    --shadow-md: 0 18px 45px rgba(7, 16, 31, .10);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --sidebar: 260px;
    --content: 1320px;
    --ease: 180ms cubic-bezier(.2, .7, .2, 1);
    /* Alias sementara untuk paparan pentadbiran lama yang belum dipisahkan. */
    --panel-2: var(--ink-50);
    --line: var(--ink-200);
    --text: var(--ink-900);
}

* { box-sizing: border-box; }

html { min-height: 100%; scroll-behavior: smooth; }

body {
    min-height: 100vh;
    margin: 0;
    background: var(--canvas);
    color: var(--ink-900);
    font: 15px/1.55 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
}

button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
svg { display: block; }
.icon { flex: 0 0 auto; }

:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .35);
    outline-offset: 2px;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    transform: translateY(-150%);
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink-950);
    box-shadow: var(--shadow-md);
    min-height: 44px;
}
.skip-link:focus { transform: translateY(0); }

.app-shell { min-height: 100vh; }

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 40;
    width: var(--sidebar);
    padding: 24px 18px 18px;
    color: #d9e3f2;
    background:
        radial-gradient(circle at 15% 0%, rgba(45, 212, 191, .12), transparent 28%),
        linear-gradient(180deg, #09172a 0%, #07101f 100%);
    border-right: 1px solid rgba(255,255,255,.06);
    display: flex;
    flex-direction: column;
}

.brand-lockup {
    min-height: 52px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 2px 8px 18px;
}
.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: linear-gradient(145deg, #59e2cc, #1c9cce 55%, #2874ee);
    box-shadow: 0 10px 24px rgba(35, 160, 211, .25), inset 0 1px 0 rgba(255,255,255,.4);
    position: relative;
    overflow: hidden;
}
.brand-mark::before,
.brand-mark::after {
    content: "";
    position: absolute;
    bottom: 9px;
    width: 5px;
    border-radius: 3px;
    background: #fff;
}
.brand-mark::before { left: 10px; height: 12px; box-shadow: 8px -7px 0 #fff, 16px -15px 0 #fff; }
.brand-name { display: block; color: #fff; font-size: 1rem; font-weight: 760; letter-spacing: -.02em; }
.brand-sub { display: block; color: #7890ad; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }

.account-status {
    margin: 2px 0 18px;
    padding: 14px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 14px;
    background: rgba(255,255,255,.045);
}
.account-status__name { color: #fff; font-size: .82rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-status__meta { margin-top: 3px; color: #8498b3; font-size: .73rem; }
.sync-status { display: flex; align-items: center; gap: 7px; margin-top: 11px; color: #a7f3d0; font-size: .73rem; }
.sync-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52,211,153,.1); }
.sync-status.alert { color: #fecaca; }
.sync-status.alert::before { background: #fb7185; box-shadow: 0 0 0 4px rgba(251,113,133,.1); }

.sidebar-gmail-cta { min-height: 48px; margin: -4px 0 16px; padding: 8px 11px; display: flex; align-items: center; gap: 11px; border: 1px solid rgba(94,234,212,.22); border-radius: 12px; color: #ccfbf1; background: rgba(45,212,191,.09); }
.sidebar-gmail-cta > span { min-width: 0; }
.sidebar-gmail-cta strong, .sidebar-gmail-cta small { display: block; }
.sidebar-gmail-cta strong { color: #f0fdfa; font-size: .78rem; }
.sidebar-gmail-cta small { margin-top: 1px; color: #7dd3c7; font-size: .65rem; }
.sidebar-gmail-cta:hover, .sidebar-gmail-cta.on { color: #fff; background: rgba(45,212,191,.17); border-color: rgba(94,234,212,.38); }
.sidebar > nav { min-height: 0; flex: 1; overflow-y: auto; margin-right: -8px; padding-right: 8px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
.nav-group { margin-bottom: 18px; }
.nav-label { padding: 0 12px 7px; color: #536b89; font-size: .66rem; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; }
.nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    margin: 3px 0;
    border-radius: 11px;
    color: #8fa2ba;
    font-size: .86rem;
    font-weight: 570;
    transition: color var(--ease), background var(--ease), transform var(--ease);
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.055); transform: translateX(2px); }
.nav-link.on { color: #fff; background: linear-gradient(90deg, rgba(37,99,235,.3), rgba(45,212,191,.08)); box-shadow: inset 3px 0 0 #36d7c2; }
.nav-link.on .icon { color: #5eead4; }
.sidebar-spacer { display: none; }
.sidebar-user { border-top: 1px solid rgba(255,255,255,.07); padding: 16px 8px 0; display: flex; align-items: center; gap: 10px; }
.user-avatar { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; color: #cbddf4; background: rgba(255,255,255,.08); font-size: .73rem; font-weight: 800; }
.user-name { min-width: 0; flex: 1; }
.user-name strong { display: block; color: #eaf2ff; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-name span { display: block; color: #7890ad; font-size: .68rem; }
.logout-button { min-width: 44px; height: 40px; padding: 0 9px; border: 1px solid rgba(255,255,255,.08); border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; color: #91a5bf; background: rgba(255,255,255,.035); cursor: pointer; font-size: .68rem; font-weight: 680; white-space: nowrap; }
.logout-button:hover { color: #fff; background: rgba(255,255,255,.06); }

.workspace { min-height: 100vh; margin-left: var(--sidebar); }
.topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    min-height: 66px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 30px;
    background: rgba(255,255,255,.88);
    border-bottom: 1px solid rgba(219,226,234,.85);
    backdrop-filter: blur(14px);
}
.topbar-title { min-width: 0; flex: 1; }
.topbar-title strong { display: block; font-size: .9rem; letter-spacing: -.01em; }
.topbar-title span { display: block; color: var(--ink-500); font-size: .72rem; }
.topbar-pill { min-height: 36px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid var(--ink-200); border-radius: 999px; color: var(--ink-600); background: rgba(255,255,255,.8); font-size: .75rem; font-weight: 620; }
.topbar-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 0 3px var(--positive-soft); }
.topbar-session { min-width: 0; display: flex; align-items: center; gap: 9px; padding-left: 15px; border-left: 1px solid var(--ink-200); }
.topbar-session__avatar { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; color: #155e75; background: var(--aqua-soft); font-size: .7rem; font-weight: 800; }
.topbar-session__copy { min-width: 0; }
.topbar-session__copy > span { display: block; color: var(--ink-400); font-size: .62rem; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; }
.topbar-session__copy strong { display: block; overflow: hidden; color: var(--ink-900); font-size: .75rem; white-space: nowrap; text-overflow: ellipsis; }
.topbar-session__copy small { display: block; overflow: hidden; color: var(--ink-500); font-size: .65rem; font-weight: 570; white-space: nowrap; text-overflow: ellipsis; }
.topbar-gmail { min-height: 36px; padding: 7px 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #a5f3fc; border-radius: 10px; color: #0e7490; background: #ecfeff; font-size: .7rem; font-weight: 720; white-space: nowrap; }
.topbar-gmail:hover { color: #155e75; background: #cffafe; border-color: #67e8f9; }
.topbar-logout { min-height: 36px; padding: 7px 10px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #fecdd3; border-radius: 10px; color: var(--negative); background: var(--negative-soft); box-shadow: none; font-size: .7rem; white-space: nowrap; }
.topbar-logout:hover { color: #9f1239; background: #ffe4e6; box-shadow: none; transform: none; }
.mobile-brand, .mobile-menu-button, .mobile-nav, .mobile-sheet, .menu-backdrop { display: none; }

.content { width: 100%; max-width: var(--content); margin: 0 auto; padding: 30px 32px 56px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head__eyebrow { margin-bottom: 5px; color: var(--brand); font-size: .69rem; font-weight: 760; letter-spacing: .12em; text-transform: uppercase; }
.page-head h1 { margin: 0; color: var(--ink-950); font-size: clamp(1.55rem, 2vw, 2rem); line-height: 1.2; letter-spacing: -.035em; }
.page-head p { max-width: 700px; margin: 7px 0 0; color: var(--ink-500); font-size: .88rem; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

h1 { margin: 0 0 4px; font-size: 1.75rem; line-height: 1.25; letter-spacing: -.035em; }
h2 { margin: 0; font-size: 1.05rem; letter-spacing: -.015em; }
p.hint { margin: 5px 0 18px; color: var(--ink-500); font-size: .84rem; }

.card {
    min-width: 0;
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid var(--ink-200);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-xs);
}
.card > h3, .section-title {
    margin: 0 0 14px;
    color: var(--ink-800);
    font-size: .78rem;
    font-weight: 760;
    text-transform: uppercase;
    letter-spacing: .085em;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.card-head h2 { color: var(--ink-950); }
.card-head p { margin: 4px 0 0; color: var(--ink-500); font-size: .79rem; }
.card-link { min-height: 44px; display: inline-flex; align-items: center; gap: 5px; color: var(--brand); font-size: .78rem; font-weight: 680; white-space: nowrap; }
.card-link:hover { color: var(--brand-strong); }

.hero-card {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 300px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
    gap: 34px;
    padding: 30px;
    border-radius: var(--radius-lg);
    color: #fff;
    background:
        radial-gradient(circle at 86% 0%, rgba(45,212,191,.22), transparent 33%),
        radial-gradient(circle at 14% 110%, rgba(37,99,235,.42), transparent 40%),
        linear-gradient(135deg, #0a1930 0%, #0b2138 54%, #0a2838 100%);
    box-shadow: 0 22px 54px rgba(9, 23, 42, .20);
}
.hero-card::after { content: ""; position: absolute; z-index: -1; inset: 0; opacity: .08; background-image: linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px); background-size: 36px 36px; mask-image: linear-gradient(to left, #000, transparent 82%); }
.hero-label { display: flex; align-items: center; gap: 8px; color: #9fb1c8; font-size: .73rem; font-weight: 730; text-transform: uppercase; letter-spacing: .1em; }
.hero-label .pulse { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 5px rgba(74,222,128,.11); }
.hero-value { margin-top: 12px; font: 750 clamp(2.25rem, 4vw, 3.65rem)/1.05 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: -.055em; }
.hero-value.negative { color: #ff8994; }
.hero-value.positive { color: #7ee8bd; }
.hero-sub { margin-top: 10px; color: #a6b7cc; font-size: .83rem; }
.hero-sub strong { color: #fff; font-weight: 650; }
.hero-metrics { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.hero-metric { min-width: 118px; padding: 11px 13px; border: 1px solid rgba(255,255,255,.09); border-radius: 12px; background: rgba(255,255,255,.055); }
.hero-metric span { display: block; color: #91a5bd; font-size: .66rem; text-transform: uppercase; letter-spacing: .07em; }
.hero-metric strong { display: block; margin-top: 3px; color: #fff; font: 650 .92rem ui-monospace, Menlo, monospace; }
.hero-chart { min-width: 0; align-self: center; }
.hero-chart__head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.hero-chart__head span { color: #91a5bd; font-size: .72rem; }
.hero-chart__head strong { font: 650 .84rem ui-monospace, Menlo, monospace; }
.chart-frame { position: relative; height: 168px; border-bottom: 1px solid rgba(255,255,255,.12); }
.chart-frame svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: rgba(255,255,255,.08); stroke-width: 1; stroke-dasharray: 4 5; }
.chart-area { fill: url(#heroArea); }
.chart-line { fill: none; stroke: #5eead4; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 4px 5px rgba(45,212,191,.18)); }
.chart-dot { fill: #fff; stroke: #2dd4bf; stroke-width: 3; }
.chart-empty { height: 168px; display: grid; place-items: center; color: #8196af; font-size: .78rem; }

.light-chart { height: 230px; margin-top: 12px; }
.light-chart svg { width: 100%; height: 100%; overflow: visible; }
.light-chart .grid { stroke: var(--ink-100); stroke-width: 1; stroke-dasharray: 4 5; }
.light-chart .area { fill: url(#lightArea); }
.light-chart .line { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 7px; color: var(--ink-400); font-size: .66rem; }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 18px 0; }
.stat-card { min-height: 144px; padding: 20px; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow-xs); }
.stat-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stat-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--brand); background: var(--brand-soft); }
.stat-card__label { color: var(--ink-500); font-size: .75rem; font-weight: 650; }
.stat-card__value { margin-top: 14px; color: var(--ink-950); font: 720 1.55rem/1.15 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: -.035em; }
.stat-card__note { margin-top: 6px; color: var(--ink-500); font-size: .75rem; }
.stat-card__note strong { color: var(--ink-700); }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .8fr); gap: 18px; align-items: start; }
.dashboard-grid > * { min-width: 0; }
.stack { min-width: 0; display: grid; gap: 18px; }
.stack > .card { margin-bottom: 0; }

.distribution { padding: 20px; border-radius: var(--radius-md); color: #dfeafb; background: linear-gradient(145deg, #12233c, #0e1d32); box-shadow: var(--shadow-sm); }
.distribution h3 { margin: 0; color: #fff; font-size: .92rem; }
.distribution p { margin: 5px 0 17px; color: #8ea4bf; font-size: .77rem; }
.distribution-status { padding: 13px; border-radius: 12px; background: rgba(255,255,255,.055); }
.distribution-status span { display: block; color: #8ea4bf; font-size: .67rem; text-transform: uppercase; letter-spacing: .08em; }
.distribution-status strong { display: block; margin-top: 5px; color: #fff; font-size: .92rem; }
.distribution .bar { margin-top: 16px; background: rgba(255,255,255,.08); }
.distribution .bar > i { background: linear-gradient(90deg, #2563eb, #2dd4bf); }
.distribution-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 9px; color: #8298b4; font-size: .69rem; }
.plain-language { margin-top: 14px; color: #b6c5d8; font-size: .76rem; line-height: 1.55; }

.data-status-card { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid #bce7d7; border-radius: 14px; background: var(--positive-soft); }
.data-status-card.alert { border-color: #fecdd3; background: var(--negative-soft); }
.data-status-card .status-icon { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--positive); background: #fff; }
.data-status-card.alert .status-icon { color: var(--negative); }
.data-status-card strong { display: block; color: var(--ink-900); font-size: .8rem; }
.data-status-card span { display: block; margin-top: 2px; color: var(--ink-600); font-size: .72rem; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 12px; }
.tile { min-width: 0; padding: 17px; border: 1px solid var(--ink-100); border-radius: 13px; background: var(--ink-50); }
.tile .k { color: var(--ink-500); font-size: .68rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.tile .v { margin-top: 7px; color: var(--ink-950); font: 700 1.25rem/1.15 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: -.025em; }
.tile .s { margin-top: 5px; color: var(--ink-500); font-size: .72rem; }

.pos { color: var(--positive) !important; }
.neg { color: var(--negative) !important; }
.muted { color: var(--ink-500) !important; }
.mono, code, td.num, th.num { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-variant-numeric: tabular-nums; }

.trend { display: inline-flex; align-items: center; gap: 3px; padding: 3px 7px; border-radius: 99px; font-size: .68rem; font-weight: 720; }
.trend.up { color: var(--positive); background: var(--positive-soft); }
.trend.down { color: var(--negative); background: var(--negative-soft); }

.badge { display: inline-flex; align-items: center; gap: 5px; min-height: 24px; padding: 3px 8px; border: 1px solid var(--ink-200); border-radius: 999px; color: var(--ink-600); background: #fff; font-size: .67rem; font-weight: 700; }
.badge.ok { color: var(--positive); border-color: #a7dfcb; background: var(--positive-soft); }
.badge.bad { color: var(--negative); border-color: #fecdd3; background: var(--negative-soft); }
.badge.wait { color: var(--warning); border-color: #f6d79a; background: var(--warning-soft); }

.bar { height: 7px; overflow: hidden; border-radius: 999px; background: var(--ink-100); }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--aqua)); }

.table-shell { overflow: hidden; border: 1px solid var(--ink-200); border-radius: 14px; }
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; color: var(--ink-800); font-size: .81rem; }
th, td { padding: 12px 13px; text-align: left; border-bottom: 1px solid var(--ink-100); white-space: nowrap; }
th { color: var(--ink-500); background: var(--ink-50); font-size: .66rem; font-weight: 760; text-transform: uppercase; letter-spacing: .07em; }
td.num, th.num { text-align: right; }
tbody tr { transition: background var(--ease); }
tbody tr:hover { background: #fafcff; }
tbody tr:last-child td { border-bottom: 0; }
tfoot td { font-weight: 700; border-top: 1px solid var(--ink-200); border-bottom: 0; background: var(--ink-50); }
.row-primary { color: var(--ink-950); font-weight: 650; }
.outcome { display: inline-flex; align-items: center; gap: 5px; font-weight: 720; }
.outcome::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.mobile-trade-list { display: none; }
.trade-card { padding: 15px; border: 1px solid var(--ink-200); border-radius: 14px; background: #fff; }
.trade-card__top, .trade-card__bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.trade-card__title { display: flex; align-items: center; gap: 8px; color: var(--ink-950); font-weight: 730; }
.trade-card__route { display: flex; align-items: center; gap: 7px; margin: 14px 0; color: var(--ink-700); font-family: ui-monospace, Menlo, monospace; }
.trade-card__route .arrow { color: var(--ink-400); }
.trade-card__meta { color: var(--ink-500); font-size: .72rem; }
.trade-card__net { font: 720 .9rem ui-monospace, Menlo, monospace; }

.kv { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px 16px; font-size: .81rem; }
.kv .lbl { color: var(--ink-500); }
.kv .val { color: var(--ink-900); font-family: ui-monospace, Menlo, monospace; text-align: right; }
.kv .rule { grid-column: 1 / -1; margin: 4px 0; border-top: 1px solid var(--ink-100); }

.button, button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #fff;
    background: var(--brand);
    box-shadow: 0 5px 14px rgba(37,99,235,.16);
    font-weight: 690;
    font-size: .82rem;
    cursor: pointer;
    transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
}
.button:hover, button:hover { background: var(--brand-strong); box-shadow: 0 8px 18px rgba(37,99,235,.22); transform: translateY(-1px); }
.button.ghost, button.ghost { color: var(--ink-700); background: #fff; border-color: var(--ink-200); box-shadow: none; }
.button.ghost:hover, button.ghost:hover { color: var(--ink-950); border-color: var(--ink-300); background: var(--ink-50); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

form.inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
label { display: block; margin-bottom: 5px; color: var(--ink-600); font-size: .71rem; font-weight: 650; }
input, select, textarea { min-height: 44px; padding: 9px 11px; border: 1px solid var(--ink-200); border-radius: 10px; color: var(--ink-900); background: #fff; font-size: .82rem; transition: border var(--ease), box-shadow var(--ease); }
input:hover, select:hover, textarea:hover { border-color: var(--ink-300); }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
input[type=checkbox] { width: 20px; height: 20px; min-height: 0; accent-color: var(--brand); }

.flash { margin-bottom: 18px; padding: 13px 15px; border-radius: 12px; font-size: .8rem; }
.flash.ok { color: #066847; background: var(--positive-soft); border: 1px solid #a7dfcb; }
.flash.err { color: #ac2637; background: var(--negative-soft); border: 1px solid #fecdd3; }

.empty-state { padding: 40px 24px; text-align: center; }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 14px; border-radius: 16px; color: var(--brand); background: var(--brand-soft); }
.empty-state h3 { margin: 0; color: var(--ink-950); font-size: .95rem; }
.empty-state p { max-width: 440px; margin: 7px auto 0; color: var(--ink-500); font-size: .79rem; }

.info-tip { position: relative; width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: 50%; color: var(--ink-500); background: var(--ink-100); cursor: help; }
.info-tip::after { content: attr(data-tooltip); position: absolute; z-index: 20; right: 0; bottom: calc(100% + 9px); width: 240px; padding: 9px 11px; border-radius: 9px; color: #dce8f7; background: var(--ink-950); font-size: .69rem; font-weight: 500; line-height: 1.45; text-align: left; opacity: 0; pointer-events: none; transform: translateY(5px); transition: opacity var(--ease), transform var(--ease); box-shadow: var(--shadow-md); }
.info-tip:hover::after, .info-tip:focus::after { opacity: 1; transform: translateY(0); }
td a { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; }

.audit-details summary { min-height: 44px; display: flex; align-items: center; color: var(--ink-800); font-weight: 700; cursor: pointer; list-style: none; }
.audit-details summary::-webkit-details-marker { display: none; }
.audit-details summary::after { content: "+"; margin-left: auto; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: var(--ink-600); background: var(--ink-100); }
.audit-details[open] summary::after { content: "−"; }

.report-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-bottom: 18px; }
.upload-card { min-width: 0; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 22px; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-xs); cursor: pointer; transition: border var(--ease), box-shadow var(--ease); }
.upload-card:hover { border-color: #b9cdf9; box-shadow: var(--shadow-sm); }
.upload-card:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.upload-card__icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: var(--brand); background: var(--brand-soft); }
.upload-card__icon.aqua { color: var(--positive); background: var(--aqua-soft); }
.upload-card__copy { min-width: 0; }
.upload-card__copy strong { display: block; color: var(--ink-950); font-size: .88rem; }
.upload-card__copy span { display: block; margin-top: 3px; color: var(--ink-500); font-size: .74rem; }
.upload-card input[type=file] { grid-column: 1 / -1; width: 100%; padding: 8px; color: var(--ink-600); background: var(--ink-50); }
.upload-card input[type=file]::file-selector-button { min-height: 34px; margin-right: 10px; padding: 6px 10px; border: 1px solid var(--ink-200); border-radius: 8px; color: var(--ink-700); background: #fff; font-weight: 650; cursor: pointer; }
.import-explainer { margin-top: 0; }
.process-list { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.process-list li { min-width: 0; display: flex; gap: 10px; padding: 14px; border: 1px solid var(--ink-100); border-radius: 12px; background: var(--ink-50); }
.process-list li > span { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; color: var(--brand); background: var(--brand-soft); font-size: .72rem; font-weight: 800; }
.process-list strong { display: block; color: var(--ink-900); font-size: .76rem; }
.process-list small { display: block; margin-top: 3px; color: var(--ink-500); font-size: .68rem; line-height: 1.45; }

.report-status-hero { min-height: 126px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 16px; margin-bottom: 18px; padding: 22px; border: 1px solid #a7dfcb; border-radius: var(--radius-md); background: linear-gradient(135deg, #f3fcf8, #e8f7f1); }
.report-status-hero.needs-review { border-color: #f6d79a; background: linear-gradient(135deg, #fffaf0, var(--warning-soft)); }
.report-status-hero__icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--positive); background: #fff; box-shadow: var(--shadow-xs); }
.report-status-hero.needs-review .report-status-hero__icon { color: var(--warning); }
.report-status-hero .eyebrow { color: var(--ink-500); font-size: .66rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.report-status-hero h2 { margin-top: 4px; color: var(--ink-950); font-size: 1.2rem; }
.report-status-hero p { max-width: 740px; margin: 5px 0 0; color: var(--ink-600); font-size: .78rem; }
.report-stat-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.report-stat-grid .stat-card { min-height: 128px; }
.report-stat-grid .stat-card__value { font-size: 1.28rem; }
.check-list { display: grid; gap: 3px; }
.check-row { min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--ink-100); }
.check-row:last-child { border-bottom: 0; }
.check-row__icon { width: 28px; height: 28px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; }
.check-row__icon.pass { color: var(--positive); background: var(--positive-soft); }
.check-row__icon.fail { color: var(--negative); background: var(--negative-soft); }
.check-row strong { display: block; color: var(--ink-900); font-size: .76rem; }
.check-row small { display: block; margin-top: 2px; color: var(--ink-500); font-size: .68rem; }
.source-files { display: grid; gap: 8px; }
.source-files a { min-height: 62px; display: flex; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--ink-100); border-radius: 12px; color: var(--ink-700); background: var(--ink-50); }
.source-files a:hover { color: var(--brand); border-color: #cfe0ff; background: var(--brand-soft); }
.source-files a > span { min-width: 0; flex: 1; }
.source-files strong { display: block; color: var(--ink-900); font-size: .76rem; }
.source-files small { display: block; overflow: hidden; margin-top: 2px; color: var(--ink-500); font-size: .67rem; text-overflow: ellipsis; white-space: nowrap; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr; background: var(--ink-950); }
.auth-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 56px; color: #fff; background: radial-gradient(circle at 20% 20%, rgba(45,212,191,.2), transparent 30%), radial-gradient(circle at 80% 80%, rgba(37,99,235,.3), transparent 36%), #081426; }
.auth-visual::after { content: ""; position: absolute; inset: 0; opacity: .08; background-image: linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px); background-size: 42px 42px; }
.auth-copy { position: relative; z-index: 1; max-width: 550px; }
.auth-copy h1 { font-size: clamp(2.3rem, 5vw, 4.4rem); line-height: 1.02; letter-spacing: -.055em; }
.auth-copy p { max-width: 460px; color: #9eb1c9; font-size: .98rem; }
.auth-panel { display: grid; place-items: center; padding: 32px; background: #f6f8fb; }
.login-card { width: min(430px, 100%); padding: 34px; border: 1px solid var(--ink-200); border-radius: 22px; background: #fff; box-shadow: var(--shadow-md); }
.login-card h2 { font-size: 1.5rem; }
.login-card p { margin: 7px 0 25px; color: var(--ink-500); font-size: .82rem; }
.field { margin-bottom: 15px; }
.field input { width: 100%; }
.connection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field-label { min-width: 0; }
.field-label > span { display: block; margin-bottom: 7px; color: var(--ink-800); font-size: .77rem; font-weight: 700; }
.field-label > span em { color: var(--ink-400); font-style: normal; font-weight: 550; }
.field-label input { width: 100%; }
.field-label small { display: block; margin-top: 6px; color: var(--ink-500); font-size: .7rem; line-height: 1.45; }
.connection-toggle { display: flex; align-items: flex-start; gap: 11px; margin-top: 20px; padding: 15px; border: 1px solid var(--ink-200); border-radius: 12px; background: var(--ink-50); }
.connection-toggle input { flex: 0 0 auto; margin-top: 1px; }
.connection-toggle strong, .connection-toggle small { display: block; }
.connection-toggle strong { color: var(--ink-900); font-size: .8rem; }
.connection-toggle small { margin-top: 3px; color: var(--ink-500); font-size: .71rem; }
.login-button { width: 100%; margin-top: 8px; }

.app-footer { padding: 10px 32px 30px; color: var(--ink-400); font-size: .68rem; text-align: center; }

/* Investor dashboard — one range controls every number below it. */
.dashboard-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.dashboard-intro > div { min-width: 0; flex: 1; }
.dashboard-intro h1 { margin: 0; color: var(--ink-950); font-size: clamp(1.65rem,2.3vw,2.15rem); letter-spacing: -.04em; }
.dashboard-intro p { margin: 7px 0 0; color: var(--ink-500); font-size: .84rem; }
.period-toolbar { margin-bottom: 16px; padding: 15px 16px; border: 1px solid var(--ink-200); border-radius: 16px; background: rgba(255,255,255,.86); box-shadow: 0 8px 28px rgba(7,16,31,.035); }
.period-toolbar__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.period-toolbar__head > div > span { display: block; color: var(--ink-500); font-size: .66rem; font-weight: 720; text-transform: uppercase; letter-spacing: .08em; }
.period-toolbar__head > div > strong { display: block; margin-top: 2px; color: var(--ink-950); font-size: .92rem; }
.period-toolbar__dates { min-height: 32px; padding: 6px 10px; display: inline-flex; align-items: center; gap: 7px; border-radius: 9px; color: var(--ink-600); background: var(--ink-50); font-size: .72rem; font-weight: 620; }
.period-chips { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.period-chips::-webkit-scrollbar { display: none; }
.period-chip { min-height: 36px; padding: 8px 13px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border: 1px solid var(--ink-200); border-radius: 999px; color: var(--ink-600); background: #fff; font-size: .72rem; font-weight: 680; white-space: nowrap; }
.period-chip:hover { color: var(--ink-900); border-color: var(--ink-300); }
.period-chip.on { color: #fff; border-color: var(--ink-900); background: var(--ink-900); box-shadow: 0 7px 16px rgba(7,16,31,.15); }
.custom-period { margin-top: 9px; }
.custom-period summary { width: fit-content; min-height: 34px; display: flex; align-items: center; gap: 7px; padding: 6px 9px; border-radius: 9px; color: var(--brand); font-size: .71rem; font-weight: 680; cursor: pointer; list-style: none; }
.custom-period summary::-webkit-details-marker { display: none; }
.custom-period summary:hover { background: var(--brand-soft); }
.custom-period__form { display: flex; align-items: flex-end; gap: 9px; margin-top: 8px; padding: 12px; border: 1px solid var(--ink-100); border-radius: 12px; background: var(--ink-50); }
.custom-period__form > div { flex: 1; }
.custom-period__form label { display: block; margin: 0 0 5px; color: var(--ink-500); font-size: .66rem; }
.custom-period__form input { width: 100%; min-height: 40px; background: #fff; }
.custom-period__form button { min-height: 40px; }
.custom-period__arrow { align-self: center; color: var(--ink-400); }

.performance-board { position: relative; isolation: isolate; min-height: 350px; display: grid; grid-template-columns: minmax(0,1.05fr) minmax(360px,.95fr); gap: 36px; margin-bottom: 15px; padding: 30px; overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 22px; color: #fff; background: linear-gradient(128deg,#07101f 0%,#0c2139 54%,#0e3d4c 100%); box-shadow: 0 24px 60px rgba(7,16,31,.17); }
.performance-board::before { content: ""; position: absolute; z-index: -1; width: 360px; height: 360px; right: -140px; top: -180px; border-radius: 50%; background: rgba(45,212,191,.12); filter: blur(2px); }
.performance-board.is-negative { background: linear-gradient(128deg,#07101f 0%,#191a2e 54%,#48212b 100%); }
.performance-board__main { min-width: 0; align-self: center; }
.performance-eyebrow { display: flex; align-items: center; gap: 9px; color: #9fb1c8; font-size: .69rem; font-weight: 730; text-transform: uppercase; letter-spacing: .1em; }
.performance-value { margin-top: 13px; color: #fff; font-size: clamp(2.65rem,4vw,4.2rem); font-weight: 780; line-height: 1; letter-spacing: -.065em; }
.performance-value.positive { color: #f0fdfa; }
.performance-value.negative { color: #fecdd3; }
.performance-caption { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 11px; color: #9fb1c8; font-size: .76rem; }
.performance-return { padding: 4px 7px; border-radius: 999px; font-size: .68rem; font-weight: 720; }
.performance-return.positive { color: #a7f3d0; background: rgba(16,185,129,.13); }
.performance-return.negative { color: #fecdd3; background: rgba(244,63,94,.13); }
.performance-kpis { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 0; margin-top: 28px; border-top: 1px solid rgba(255,255,255,.09); padding-top: 20px; }
.performance-kpis > div { min-width: 0; padding: 0 14px; border-left: 1px solid rgba(255,255,255,.09); }
.performance-kpis > div:first-child { padding-left: 0; border-left: 0; }
.performance-kpis span { display: block; color: #8096b0; font-size: .62rem; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.performance-kpis strong { display: block; overflow: hidden; margin-top: 5px; color: #f8fafc; font-size: .93rem; text-overflow: ellipsis; white-space: nowrap; }
.performance-chart { min-width: 0; align-self: stretch; padding: 18px 19px 12px; border: 1px solid rgba(255,255,255,.08); border-radius: 17px; background: rgba(255,255,255,.045); }
.performance-chart__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.performance-chart__head span { color: #91a5bd; font-size: .68rem; }
.performance-chart__head strong { color: #f8fafc; font-size: .85rem; }
.performance-chart svg { width: 100%; height: 218px; overflow: visible; }
.performance-chart__area { fill: url(#periodArea); }
.performance-chart__line { fill: none; stroke: #5eead4; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 5px 9px rgba(45,212,191,.32)); }
.performance-chart__axis { display: flex; justify-content: space-between; color: #7890ad; font-size: .62rem; }
.performance-chart__empty { min-height: 214px; display: grid; place-content: center; justify-items: center; gap: 10px; color: #7890ad; font-size: .7rem; text-align: center; }

.investor-summary { display: grid; grid-template-columns: 1.45fr repeat(2,minmax(0,1fr)); margin-bottom: 15px; overflow: hidden; border: 1px solid var(--ink-200); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow-sm); }
.investor-summary__lead, .investor-summary__metric { min-width: 0; padding: 19px 21px; }
.investor-summary__lead { display: flex; align-items: center; gap: 14px; background: linear-gradient(100deg,#f4fffd,#fff); }
.investor-summary__icon { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: #0f766e; background: var(--aqua-soft); }
.investor-summary__lead span:not(.investor-summary__icon), .investor-summary__metric span { display: block; color: var(--ink-500); font-size: .69rem; font-weight: 650; }
.investor-summary__lead strong { display: block; margin-top: 3px; color: var(--ink-950); font-size: 1.55rem; letter-spacing: -.035em; }
.investor-summary__lead small, .investor-summary__metric small { display: block; margin-top: 3px; color: var(--ink-400); font-size: .65rem; }
.investor-summary__metric { border-left: 1px solid var(--ink-100); }
.investor-summary__metric strong { display: block; margin-top: 8px; color: var(--ink-950); font-size: 1.12rem; letter-spacing: -.025em; }

.analysis-strip { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin-bottom: 15px; }
.analysis-strip article { min-width: 0; padding: 17px 18px; border: 1px solid var(--ink-200); border-radius: 15px; background: var(--surface); box-shadow: 0 5px 18px rgba(7,16,31,.025); }
.analysis-strip span { display: block; color: var(--ink-500); font-size: .67rem; font-weight: 660; }
.analysis-strip strong { display: block; overflow: hidden; margin-top: 8px; color: var(--ink-950); font-size: 1.12rem; text-overflow: ellipsis; white-space: nowrap; }
.analysis-strip small { display: block; margin-top: 4px; color: var(--ink-400); font-size: .63rem; }
.analysis-strip strong.pos, .investor-summary__metric strong.pos { color: var(--positive); }
.analysis-strip strong.neg, .investor-summary__metric strong.neg { color: var(--negative); }
.dashboard-grid--investor { grid-template-columns: minmax(0,1.4fr) minmax(300px,.72fr); }
.dashboard-empty { padding: 28px 12px; }
.table-sub { display: block; margin-top: 2px; color: var(--ink-400); font-size: .64rem; }

.install-banner { position: fixed; z-index: 100; right: 18px; bottom: 18px; width: min(430px,calc(100vw - 32px)); min-height: 78px; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; color: #fff; background: rgba(7,16,31,.96); box-shadow: 0 22px 55px rgba(7,16,31,.3); backdrop-filter: blur(18px); }
.install-banner[hidden], .install-app-button[hidden] { display: none !important; }
.install-banner__icon .brand-mark { width: 46px; height: 46px; display: block; border-radius: 14px; }
.install-banner__copy { min-width: 0; flex: 1; }
.install-banner__copy strong, .install-banner__copy small { display: block; }
.install-banner__copy strong { font-size: .79rem; }
.install-banner__copy small { margin-top: 3px; color: #91a5bd; font-size: .65rem; }
.install-banner > button:not(.install-banner__close) { min-height: 38px; padding: 7px 12px; }
.install-banner__close { width: 32px; height: 32px; min-height: 32px; padding: 0; border: 0; color: #91a5bd; background: transparent; box-shadow: none; font-size: 1.25rem; }
.install-dialog { width: min(440px,calc(100vw - 28px)); padding: 0; overflow: visible; border: 0; border-radius: 22px; background: transparent; }
.install-dialog::backdrop { background: rgba(7,16,31,.66); backdrop-filter: blur(5px); }
.install-dialog__panel { position: relative; padding: 28px; border: 1px solid var(--ink-200); border-radius: 22px; background: #fff; box-shadow: 0 30px 80px rgba(7,16,31,.28); }
.install-dialog__close { position: absolute; top: 12px; right: 12px; width: 38px; height: 38px; min-height: 38px; padding: 0; border: 0; color: var(--ink-500); background: var(--ink-50); box-shadow: none; font-size: 1.25rem; }
.install-dialog__icon .brand-mark { width: 52px; height: 52px; display: block; margin-bottom: 19px; border-radius: 16px; }
.install-dialog h2 { margin: 0 0 15px; font-size: 1.18rem; }
.install-dialog ol { margin: 0; padding-left: 20px; color: var(--ink-700); font-size: .82rem; line-height: 1.65; }
.install-dialog li + li { margin-top: 7px; }
.install-dialog__note { margin: 16px 0; padding: 11px 12px; border-radius: 10px; color: var(--ink-600); background: var(--ink-50); font-size: .72rem; }
.install-app-button { width: 100%; margin-top: 10px; }
.sheet-account { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 11px; border: 1px solid var(--ink-100); border-radius: 13px; background: var(--ink-50); }
.sheet-account > span:last-child { min-width: 0; }
.sheet-account strong, .sheet-account small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-account strong { color: var(--ink-900); font-size: .76rem; }
.sheet-account small { margin-top: 2px; color: var(--ink-500); font-size: .64rem; }

@media (display-mode: standalone) {
    body { padding-top: env(safe-area-inset-top); }
    .install-banner, .install-app-button { display: none !important; }
}

@media (max-width: 1120px) {
    :root { --sidebar: 224px; }
    .sidebar { padding-inline: 14px; }
    .content { padding-inline: 22px; }
    .hero-card { grid-template-columns: minmax(0,1fr) minmax(300px,.85fr); }
    .dashboard-grid { grid-template-columns: minmax(0,1.3fr) minmax(280px,.8fr); }
    .process-list { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .report-stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .performance-board { grid-template-columns: minmax(0,1fr) minmax(320px,.85fr); gap: 22px; padding: 25px; }
    .performance-kpis { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px 0; }
    .performance-kpis > div:nth-child(3) { padding-left: 0; border-left: 0; }
    .dashboard-grid--investor { grid-template-columns: minmax(0,1.2fr) minmax(280px,.76fr); }
}

@media (max-width: 860px) {
    :root { --sidebar: 0px; }
    body { padding-bottom: 76px; }
    .sidebar { display: none; }
    .workspace { margin-left: 0; }
    .topbar { min-height: 64px; padding: 9px 16px; flex-wrap: wrap; gap: 8px 12px; }
    .mobile-brand { min-height: 44px; display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
    .mobile-brand .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
    .mobile-brand .brand-mark::before { left: 8px; bottom: 7px; transform: scale(.82); transform-origin: bottom left; }
    .mobile-brand strong { display: block; color: var(--ink-950); font-size: .83rem; }
    .mobile-brand span { display: block; color: var(--ink-500); font-size: .65rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .topbar-title { display: none; }
    .topbar-pill { min-height: 34px; padding-inline: 9px; font-size: .68rem; }
    .topbar-pill .desktop-only { display: none; }
    .topbar-session { display: none; }
    .topbar-session__copy { flex: 1; }
    .topbar-gmail { min-height: 40px; padding-inline: 11px; }
    .topbar-logout { min-height: 40px; padding-inline: 12px; }
    .mobile-menu-button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; color: var(--ink-700); background: transparent; box-shadow: none; }
    .mobile-menu-button:hover { color: var(--ink-950); background: var(--ink-100); box-shadow: none; transform: none; }
    .content { padding: 22px 16px 32px; }
    .page-head { align-items: flex-start; }
    .page-actions { width: 100%; }
    .hero-card { grid-template-columns: 1fr; min-height: 0; padding: 24px; }
    .hero-chart { display: none; }
    .stat-grid { grid-template-columns: repeat(3, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .mobile-nav { position: fixed; z-index: 60; inset: auto 0 0; height: calc(68px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); padding: 6px 8px env(safe-area-inset-bottom); border-top: 1px solid var(--ink-200); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); box-shadow: 0 -10px 25px rgba(7,16,31,.07); }
    .mobile-nav a, .mobile-nav button { min-width: 0; height: 56px; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 4px; border: 0; border-radius: 10px; color: var(--ink-500); background: transparent; box-shadow: none; font-size: .62rem; font-weight: 650; }
    .mobile-nav a.on { color: var(--brand); background: var(--brand-soft); }
    .mobile-nav button:hover { transform: none; box-shadow: none; background: var(--ink-50); }
    .menu-backdrop { position: fixed; z-index: 69; inset: 0; display: block; background: rgba(7,16,31,.52); opacity: 0; pointer-events: none; transition: opacity var(--ease); }
    .mobile-sheet { position: fixed; z-index: 70; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); display: block; max-height: min(78vh, 620px); overflow-y: auto; padding: 14px; border: 1px solid var(--ink-200); border-radius: 22px; background: #fff; box-shadow: 0 28px 70px rgba(7,16,31,.24); transform: translateY(calc(100% + 30px)); transition: transform 240ms cubic-bezier(.2,.75,.2,1); }
    .menu-open { overflow: hidden; }
    .menu-open .menu-backdrop { opacity: 1; pointer-events: auto; }
    .menu-open .mobile-sheet { transform: translateY(0); }
    .sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 3px 4px 12px; }
    .sheet-head strong { font-size: .9rem; }
    .sheet-close { width: 44px; height: 44px; padding: 0; display: grid; place-items: center; color: var(--ink-700); background: var(--ink-50); border: 0; box-shadow: none; }
    .sheet-close:hover { color: var(--ink-950); background: var(--ink-100); box-shadow: none; transform: none; }
    .sheet-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }
    .sheet-link { min-height: 66px; display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--ink-100); border-radius: 13px; color: var(--ink-700); background: var(--ink-50); font-size: .77rem; font-weight: 650; }
    .sheet-link.on { color: var(--brand); border-color: #cfe0ff; background: var(--brand-soft); }
    .sheet-link .icon { color: var(--ink-500); }
    .mobile-logout { width: 100%; margin-top: 10px; color: var(--negative) !important; background: var(--negative-soft) !important; border-color: #fecdd3 !important; box-shadow: none !important; }
    .app-footer { display: none; }
    .dashboard-intro { align-items: center; }
    .performance-board { grid-template-columns: 1fr; min-height: 0; }
    .performance-chart { min-height: 260px; }
    .performance-chart svg { height: 205px; }
    .investor-summary { grid-template-columns: 1.3fr 1fr 1fr; }
    .analysis-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .dashboard-grid--investor { grid-template-columns: 1fr; }
    .install-banner { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

@media (max-width: 640px) {
    .topbar-pill { max-width: 145px; }
    .topbar-pill span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .content { padding-top: 18px; }
    .page-head { display: block; margin-bottom: 18px; }
    .page-head h1 { font-size: 1.48rem; }
    .page-head p { font-size: .8rem; }
    .page-actions { margin-top: 13px; }
    .page-actions .button, .page-actions button { flex: 1; }
    .card { padding: 17px; border-radius: 14px; }
    .card-head { margin-bottom: 14px; }
    .hero-card { margin-inline: 0; padding: 22px 19px; border-radius: 18px; }
    .hero-value { font-size: 2.25rem; }
    .hero-metrics { display: grid; grid-template-columns: repeat(2,1fr); margin-top: 22px; }
    .hero-metric { min-width: 0; }
    .stat-grid { grid-template-columns: 1fr; gap: 10px; }
    .stat-card { min-height: 0; padding: 17px; }
    .stat-card__value { margin-top: 10px; font-size: 1.34rem; }
    .dashboard-grid { gap: 12px; }
    .stack { gap: 12px; }
    .desktop-table { display: none; }
    .mobile-trade-list { display: grid; gap: 10px; }
    .table-shell { border-radius: 12px; }
    .tiles { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
    .tile { padding: 14px; }
    .tile .v { font-size: 1.05rem; }
    form.inline > div { flex: 1 1 140px; }
    form.inline input, form.inline select { width: 100%; }
    .kv { gap: 8px 12px; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-panel { padding: 20px; }
    .login-card { padding: 26px 22px; }
    .report-upload-grid, .process-list, .report-stat-grid { grid-template-columns: 1fr; }
    .upload-card { padding: 17px; }
    .connection-grid { grid-template-columns: 1fr; gap: 15px; }
    .report-status-hero { grid-template-columns: auto minmax(0,1fr); padding: 17px; }
    .report-status-hero > .badge { grid-column: 1 / -1; justify-self: start; }
    .dashboard-intro { align-items: flex-start; margin-bottom: 14px; }
    .dashboard-intro h1 { font-size: 1.5rem; }
    .dashboard-intro p { max-width: 245px; font-size: .72rem; line-height: 1.45; }
    .dashboard-history-link { width: 46px; min-width: 46px; height: 46px; flex: 0 0 46px; display: grid; place-items: center; padding: 0; overflow: hidden; color: var(--brand); font-size: 0; }
    .dashboard-history-link .icon { width: 19px; min-width: 19px; height: 19px; margin: 0; }
    .period-toolbar { margin-inline: -2px; padding: 13px; border-radius: 15px; }
    .period-toolbar__head { align-items: flex-end; margin-bottom: 11px; }
    .period-toolbar__dates { min-height: 0; padding: 0; background: transparent; font-size: .64rem; }
    .period-chip { min-height: 38px; padding-inline: 12px; }
    .custom-period__form { display: grid; grid-template-columns: 1fr auto 1fr; }
    .custom-period__form button { grid-column: 1 / -1; width: 100%; }
    .performance-board { margin-inline: -4px; padding: 22px 18px 18px; border-radius: 20px; box-shadow: 0 18px 42px rgba(7,16,31,.16); }
    .performance-value { margin-top: 11px; font-size: 2.62rem; }
    .performance-caption { font-size: .69rem; }
    .performance-kpis { margin-top: 22px; padding-top: 17px; }
    .performance-kpis > div { padding-inline: 12px; }
    .performance-kpis strong { font-size: .84rem; }
    .performance-chart { min-height: 0; padding: 15px 14px 10px; }
    .performance-chart svg { height: 165px; }
    .performance-chart__empty { min-height: 155px; }
    .investor-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .investor-summary__lead { grid-column: 1 / -1; padding: 17px; }
    .investor-summary__lead strong { font-size: 1.38rem; }
    .investor-summary__metric { padding: 15px 16px; border-top: 1px solid var(--ink-100); }
    .investor-summary__metric:first-of-type { border-left: 0; }
    .investor-summary__metric strong { font-size: 1rem; }
    .analysis-strip { gap: 8px; }
    .analysis-strip article { padding: 14px; }
    .analysis-strip strong { font-size: 1rem; }
    .cost-summary-card { order: 3; }
    .install-banner { right: 12px; width: calc(100vw - 24px); padding: 10px; border-radius: 16px; }
    .install-banner__icon .brand-mark { width: 42px; height: 42px; }
    .install-banner__copy small { max-width: 160px; }
}

.mobile-investor-dashboard, .mobile-date-backdrop, .mobile-date-sheet { display: none; }

@media (max-width: 860px) {
    body { background: #f3f6fa; }
    body.date-sheet-open { overflow: hidden; }
    .topbar { min-height: 60px; padding: 8px 16px; flex-wrap: nowrap; border-bottom-color: #e8edf4; background: rgba(255,255,255,.97); }
    .mobile-brand .brand-mark { width: 36px; height: 36px; }
    .mobile-brand strong { font-size: .86rem; letter-spacing: -.015em; }
    .mobile-brand span { margin-top: 1px; font-size: .61rem; }
    .topbar-pill, .mobile-menu-button { display: none; }
    .content { padding: 14px 14px 28px; }
    .desktop-investor-dashboard { display: none; }
    .mobile-investor-dashboard { display: grid; gap: 12px; width: 100%; max-width: 620px; margin: 0 auto; }

    .mobile-manager-card { position: relative; overflow: hidden; padding: 17px 18px 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 21px; color: #fff; background: radial-gradient(circle at 92% 0%,rgba(45,212,191,.22),transparent 34%),linear-gradient(145deg,#07101f 0%,#10233e 64%,#123a4c 100%); box-shadow: 0 17px 36px rgba(7,16,31,.18); }
    .mobile-manager-card__status { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #aebed1; font-size: .69rem; font-weight: 620; }
    .mobile-manager-card__status span:first-child { display: inline-flex; align-items: center; gap: 6px; }
    .mobile-manager-card__status i { width: 6px; height: 6px; display: block; border-radius: 50%; background: #5eead4; box-shadow: 0 0 0 4px rgba(94,234,212,.1); }
    .mobile-manager-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-top: 17px; }
    .mobile-manager-card__head > div > span { display: block; color: #aebed1; font-size: .72rem; font-weight: 650; }
    .mobile-manager-card__head > div > strong { display: block; margin-top: 5px; color: #fff; font-size: clamp(2.05rem,9vw,2.55rem); line-height: 1.04; letter-spacing: -.055em; }
    .mobile-manager-card__head > div > strong.pos { color: #99f6e4; }
    .mobile-manager-card__head > div > strong.neg { color: #fecdd3; }
    .mobile-manager-card__head > div > strong.flat { color: #fff; }
    .mobile-manager-card__head > a { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.1); border-radius: 13px; color: #99f6e4; background: rgba(255,255,255,.07); }
    .mobile-manager-card__comparison { margin: 8px 0 16px; color: #91a5bd; font-size: .69rem; line-height: 1.5; }
    .mobile-manager-card__comparison span { font-weight: 740; }
    .mobile-manager-card__comparison .pos { color: #99f6e4; }
    .mobile-manager-card__comparison .neg { color: #fecdd3; }
    .mobile-manager-metrics { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); }
    .mobile-manager-metrics > div { min-width: 0; min-height: 60px; display: flex; flex-direction: column; justify-content: center; padding: 9px 11px; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: rgba(255,255,255,.045); }
    .mobile-manager-metrics span, .mobile-manager-metrics small { display: block; color: #7f96b0; font-size: .61rem; line-height: 1.25; }
    .mobile-manager-metrics strong { display: block; overflow: hidden; margin-top: 5px; color: #f8fafc; font-size: .84rem; letter-spacing: -.02em; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-manager-metrics small { overflow: hidden; margin-top: 3px; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-manager-card .mobile-chart-note { color: #91a5bd; background: rgba(255,255,255,.055); }
    .mobile-manager-card .mobile-chart-note .icon { color: #7890ad; }
    .mobile-manager-card .mobile-performance-chart { border-top-color: rgba(255,255,255,.1); }
    .mobile-manager-card .mobile-performance-chart__label { color: #91a5bd; }
    .mobile-manager-card .mobile-performance-chart__label strong { color: #e2e8f0; }
    .mobile-manager-card .mobile-performance-chart line { stroke: rgba(255,255,255,.09); }
    .mobile-manager-card .mobile-performance-chart__axis { color: #7890ad; }
    .mobile-daily-fund-value { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; padding: 11px; border-radius: 12px; color: #91a5bd; background: rgba(255,255,255,.055); font-size: .67rem; }
    .mobile-daily-fund-value strong { color: #f8fafc; font-size: .76rem; white-space: nowrap; }

    .mobile-value-card { position: relative; overflow: hidden; padding: 17px 18px 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 21px; color: #fff; background: radial-gradient(circle at 88% 4%,rgba(45,212,191,.2),transparent 34%),linear-gradient(145deg,#07101f 0%,#10233e 62%,#123a4c 100%); box-shadow: 0 17px 36px rgba(7,16,31,.18); }
    .mobile-value-card::after { content: ''; position: absolute; right: -28px; bottom: -60px; width: 150px; height: 150px; border: 1px solid rgba(94,234,212,.14); border-radius: 50%; }
    .mobile-value-card__status { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; color: #9fb1c8; font-size: .64rem; font-weight: 620; }
    .mobile-value-card__status span:first-child { display: inline-flex; align-items: center; gap: 6px; }
    .mobile-value-card__status i { width: 6px; height: 6px; display: block; border-radius: 50%; background: #5eead4; box-shadow: 0 0 0 4px rgba(94,234,212,.1); }
    .mobile-value-card__label { position: relative; z-index: 1; display: block; color: #aebed1; font-size: .7rem; font-weight: 650; }
    .mobile-value-card__amount { position: relative; z-index: 1; display: block; margin-top: 5px; color: #fff; font-size: clamp(2.05rem,9vw,2.55rem); line-height: 1.05; letter-spacing: -.055em; }
    .mobile-value-card__foot { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 3px 14px; margin-top: 18px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.1); }
    .mobile-value-card__foot > span { color: #9fb1c8; font-size: .65rem; }
    .mobile-value-card__foot > strong { font-size: .86rem; }
    .mobile-value-card__foot > small { grid-column: 1 / -1; color: #7890ad; font-size: .61rem; }
    .mobile-value-card .pos { color: #99f6e4; }
    .mobile-value-card .neg { color: #fecdd3; }
    .mobile-value-card .flat { color: #d8e2ee; }

    .mobile-range-trigger { width: 100%; min-height: 68px; display: grid; grid-template-columns: 42px minmax(0,1fr) 22px; align-items: center; gap: 11px; padding: 10px 13px; border: 1px solid #dfe6ef; border-radius: 17px; color: var(--ink-900); background: #fff; box-shadow: 0 5px 16px rgba(7,16,31,.045); text-align: left; }
    .mobile-range-trigger:hover { top: 0; border-color: #cbd7e7; background: #fff; box-shadow: 0 7px 20px rgba(7,16,31,.07); }
    .mobile-range-trigger__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; color: #0f766e; background: #e8fbf7; }
    .mobile-range-trigger__copy { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr); align-items: baseline; column-gap: 8px; }
    .mobile-range-trigger__copy small { grid-column: 1 / -1; color: var(--ink-500); font-size: .59rem; font-weight: 650; }
    .mobile-range-trigger__copy strong { color: var(--ink-950); font-size: .8rem; }
    .mobile-range-trigger__copy > span { overflow: hidden; color: var(--ink-500); font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-range-trigger__chevron { color: var(--ink-400); }

    .mobile-period-card { padding: 18px; border: 1px solid #dfe6ef; border-radius: 21px; background: #fff; box-shadow: 0 8px 24px rgba(7,16,31,.055); }
    .mobile-period-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
    .mobile-period-card__head > div > span { display: block; color: var(--ink-500); font-size: .67rem; font-weight: 650; }
    .mobile-period-card__head > div > strong { display: block; margin-top: 5px; color: var(--ink-950); font-size: 2rem; line-height: 1.04; letter-spacing: -.05em; }
    .mobile-period-card__head > div > strong.pos { color: #087f6d; }
    .mobile-period-card__head > div > strong.neg { color: #be123c; }
    .mobile-period-card__head > div > strong.flat { color: var(--ink-950); }
    .mobile-period-card__head > a { width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center; border-radius: 13px; color: var(--brand); background: var(--brand-soft); }
    .mobile-period-card__comparison { min-height: 17px; margin: 7px 0 15px; color: var(--ink-500); font-size: .64rem; line-height: 1.45; }
    .mobile-period-card__comparison span { font-weight: 730; }
    .mobile-metric-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
    .mobile-metric-grid > div { min-width: 0; min-height: 67px; display: flex; flex-direction: column; justify-content: center; padding: 10px 11px; border: 1px solid #edf1f6; border-radius: 13px; background: #f8fafc; }
    .mobile-metric-grid span { color: var(--ink-500); font-size: .6rem; font-weight: 620; }
    .mobile-metric-grid strong { display: block; overflow: hidden; margin-top: 5px; color: var(--ink-900); font-size: .93rem; letter-spacing: -.018em; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-metric-grid strong.pos { color: #087f6d; }
    .mobile-metric-grid strong.neg { color: #be123c; }
    .mobile-metric-grid strong.flat { color: var(--ink-900); }
    .mobile-chart-note { min-height: 48px; display: flex; align-items: center; gap: 9px; margin-top: 12px; padding: 9px 11px; border-radius: 12px; color: var(--ink-500); background: #f8fafc; font-size: .63rem; line-height: 1.4; }
    .mobile-chart-note .icon { flex: 0 0 auto; color: var(--ink-400); }
    .mobile-performance-chart { margin-top: 15px; padding-top: 13px; border-top: 1px solid #edf1f6; }
    .mobile-performance-chart__label { display: flex; align-items: center; justify-content: space-between; color: var(--ink-500); font-size: .62rem; }
    .mobile-performance-chart__label strong { color: var(--ink-800); font-size: .7rem; }
    .mobile-performance-chart svg { width: 100%; height: 124px; margin-top: 4px; overflow: visible; }
    .mobile-performance-chart line { stroke: #edf1f6; stroke-width: 1; }
    .mobile-performance-chart polygon { fill: url(#mobilePeriodArea); }
    .mobile-performance-chart polyline { fill: none; stroke: #0d9488; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
    .mobile-performance-chart__axis { display: flex; justify-content: space-between; color: var(--ink-400); font-size: .59rem; }

    .mobile-status-list { overflow: hidden; border: 1px solid #dfe6ef; border-radius: 18px; background: #fff; box-shadow: 0 5px 18px rgba(7,16,31,.035); }
    .mobile-status-list > a { min-height: 70px; display: grid; grid-template-columns: 40px minmax(0,1fr) 18px; align-items: center; gap: 10px; padding: 10px 13px; color: var(--ink-800); }
    .mobile-status-list > a + a { border-top: 1px solid #edf1f6; }
    .mobile-status-list > a > span:nth-child(2) { min-width: 0; }
    .mobile-status-list strong, .mobile-status-list small { display: block; }
    .mobile-status-list strong { overflow: hidden; color: var(--ink-900); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-status-list small { margin-top: 3px; color: var(--ink-500); font-size: .59rem; }
    .mobile-status-list > a > .icon { color: var(--ink-400); }
    .mobile-status-list__icon { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; color: #0f766e; background: #e8fbf7; }

    .mobile-recent-trades { padding: 17px 15px 7px; border: 1px solid #dfe6ef; border-radius: 20px; background: #fff; box-shadow: 0 5px 18px rgba(7,16,31,.035); }
    .mobile-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 0 2px 12px; }
    .mobile-section-head span { color: var(--ink-500); font-size: .59rem; font-weight: 680; text-transform: uppercase; letter-spacing: .07em; }
    .mobile-section-head h2 { margin: 2px 0 0; color: var(--ink-950); font-size: .92rem; letter-spacing: -.02em; }
    .mobile-section-head > a { min-height: 44px; display: inline-flex; align-items: center; color: var(--brand); font-size: .67rem; font-weight: 700; }
    .mobile-empty-row { min-height: 72px; display: grid; grid-template-columns: 40px minmax(0,1fr); align-items: center; gap: 11px; padding: 10px 2px 13px; border-top: 1px solid #edf1f6; }
    .mobile-empty-row strong, .mobile-empty-row small { display: block; }
    .mobile-empty-row strong { color: var(--ink-800); font-size: .72rem; }
    .mobile-empty-row small { margin-top: 3px; color: var(--ink-500); font-size: .61rem; }
    .mobile-recent-trades__list { border-top: 1px solid #edf1f6; }
    .mobile-trade-row { min-height: 86px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; align-items: center; gap: 9px; color: var(--ink-800); }
    .mobile-trade-row + .mobile-trade-row { border-top: 1px solid #edf1f6; }
    .mobile-trade-row__date { width: 36px; height: 42px; display: grid; place-content: center; border-radius: 10px; color: var(--ink-800); background: #f1f5f9; font-size: .8rem; font-weight: 760; line-height: 1; text-align: center; }
    .mobile-trade-row__date small { margin-top: 3px; color: var(--ink-500); font-size: .52rem; font-weight: 650; text-transform: uppercase; }
    .mobile-trade-row__main { min-width: 0; }
    .mobile-trade-row__main strong, .mobile-trade-row__main small { display: block; }
    .mobile-trade-row__main strong { color: var(--ink-900); font-size: .69rem; }
    .mobile-trade-row__main small { margin-top: 3px; color: var(--ink-500); font-size: .64rem; line-height: 1.35; }
    .mobile-trade-row__net { font-size: .68rem; white-space: nowrap; }

    .mobile-position-monitor { padding: 17px 15px 7px; border: 1px solid #dfe6ef; border-radius: 20px; background: #fff; box-shadow: 0 5px 18px rgba(7,16,31,.035); }
    .mobile-position-monitor__empty { min-height: 64px; display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: center; gap: 9px; padding: 8px 2px 13px; border-top: 1px solid #edf1f6; color: #0f766e; }
    .mobile-position-monitor__empty strong, .mobile-position-monitor__empty small { display: block; }
    .mobile-position-monitor__empty strong { color: var(--ink-900); font-size: .73rem; }
    .mobile-position-monitor__empty small { margin-top: 3px; color: var(--ink-500); font-size: .66rem; }
    .mobile-position-monitor__list { border-top: 1px solid #edf1f6; }
    .mobile-position-monitor__list > a { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--ink-800); }
    .mobile-position-monitor__list > a + a { border-top: 1px solid #edf1f6; }
    .mobile-position-monitor__list span { min-width: 0; }
    .mobile-position-monitor__list strong, .mobile-position-monitor__list small { display: block; }
    .mobile-position-monitor__list strong { font-size: .72rem; }
    .mobile-position-monitor__list small { margin-top: 3px; color: var(--ink-500); font-size: .66rem; }

    .mobile-dashboard-links { overflow: hidden; margin-bottom: 2px; border: 1px solid #dfe6ef; border-radius: 18px; background: #fff; }
    .mobile-dashboard-links > a { min-height: 68px; display: grid; grid-template-columns: 24px minmax(0,1fr) 18px; align-items: center; gap: 10px; padding: 10px 14px; color: var(--ink-700); }
    .mobile-dashboard-links > a + a { border-top: 1px solid #edf1f6; }
    .mobile-dashboard-links > a > .icon:first-child { color: var(--brand); }
    .mobile-dashboard-links > a > .icon:last-child { color: var(--ink-400); }
    .mobile-dashboard-links strong, .mobile-dashboard-links small { display: block; }
    .mobile-dashboard-links strong { color: var(--ink-900); font-size: .72rem; }
    .mobile-dashboard-links small { margin-top: 3px; color: var(--ink-500); font-size: .59rem; }

    .mobile-sharing-summary { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid #dfe6ef; border-radius: 18px; background: #fff; }
    .mobile-sharing-summary span, .mobile-sharing-summary strong, .mobile-sharing-summary small { display: block; }
    .mobile-sharing-summary span { color: var(--ink-500); font-size: .66rem; font-weight: 650; }
    .mobile-sharing-summary strong { margin-top: 3px; color: var(--ink-900); font-size: .79rem; }
    .mobile-sharing-summary small { margin-top: 3px; color: var(--ink-500); font-size: .66rem; }
    .mobile-sharing-summary > a { min-height: 44px; display: inline-flex; align-items: center; gap: 3px; color: var(--brand); font-size: .68rem; font-weight: 700; white-space: nowrap; }

    .mobile-investor-last { padding: 17px 15px 15px; border: 1px solid #dfe6ef; border-radius: 20px; background: #fff; }
    .mobile-investor-last__grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); overflow: hidden; border: 1px solid #edf1f6; border-radius: 13px; background: #f8fafc; }
    .mobile-investor-last__grid > div { min-width: 0; padding: 12px; }
    .mobile-investor-last__grid > div + div { border-left: 1px solid #e5eaf1; }
    .mobile-investor-last__grid span, .mobile-investor-last__grid strong { display: block; }
    .mobile-investor-last__grid span { color: var(--ink-500); font-size: .64rem; }
    .mobile-investor-last__grid strong { overflow: hidden; margin-top: 5px; color: var(--ink-900); font-size: .9rem; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-investor-last > small { display: block; margin: 9px 2px 0; color: var(--ink-500); font-size: .66rem; }

    .mobile-date-backdrop { position: fixed; z-index: 79; inset: 0; display: block; background: rgba(7,16,31,.62); opacity: 0; pointer-events: none; transition: opacity 200ms ease; backdrop-filter: blur(4px); }
    .mobile-date-sheet { position: fixed; z-index: 80; left: 0; right: 0; bottom: -100dvh; display: block; max-height: 92dvh; overflow-y: auto; padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); border: 1px solid #dfe6ef; border-bottom: 0; border-radius: 26px 26px 0 0; background: #fff; box-shadow: 0 -24px 70px rgba(7,16,31,.24); transition: bottom 240ms cubic-bezier(.2,.75,.2,1); }
    .mobile-date-sheet::before { content: ''; width: 38px; height: 4px; display: block; margin: 0 auto 8px; border-radius: 99px; background: #d9e1eb; }
    .date-sheet-open .mobile-date-backdrop { opacity: 1; pointer-events: auto; }
    .date-sheet-open .mobile-date-sheet { bottom: 0; }
    .mobile-date-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
    .mobile-date-sheet__head small, .mobile-date-sheet__head strong { display: block; }
    .mobile-date-sheet__head small { color: var(--ink-500); font-size: .6rem; font-weight: 680; text-transform: uppercase; letter-spacing: .07em; }
    .mobile-date-sheet__head strong { margin-top: 2px; color: var(--ink-950); font-size: 1.05rem; }
    .mobile-date-sheet__head button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; color: var(--ink-600); background: #f1f5f9; box-shadow: none; }
    .mobile-date-presets { display: grid; }
    .mobile-date-presets[hidden], .mobile-calendar[hidden] { display: none !important; }
    .mobile-date-presets > a, .mobile-date-presets > button { width: 100%; min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding: 8px 3px; border: 0; border-top: 1px solid #edf1f6; border-radius: 0; color: var(--ink-800); background: #fff; box-shadow: none; font-size: .77rem; font-weight: 650; text-align: left; }
    .mobile-date-presets > a.on, .mobile-date-presets > button.on { color: var(--brand); }
    .mobile-date-presets > a:hover, .mobile-date-presets > button:hover { top: 0; background: #f8fafc; box-shadow: none; }
    .mobile-calendar__back { min-height: 44px; display: inline-flex; align-items: center; gap: 5px; margin: -2px 0 7px; padding: 0 4px; border: 0; color: var(--brand); background: transparent; box-shadow: none; font-size: .68rem; font-weight: 700; }
    .mobile-calendar__back .icon { rotate: 180deg; }
    .mobile-calendar__selection { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 9px; margin-bottom: 10px; }
    .mobile-calendar__selection > div { min-width: 0; padding: 9px 10px; border: 1px solid #dfe6ef; border-radius: 11px; background: #f8fafc; }
    .mobile-calendar__selection small, .mobile-calendar__selection strong { display: block; }
    .mobile-calendar__selection small { color: var(--ink-500); font-size: .55rem; }
    .mobile-calendar__selection strong { overflow: hidden; margin-top: 2px; color: var(--ink-900); font-size: .66rem; text-overflow: ellipsis; white-space: nowrap; }
    .mobile-calendar__selection > span { color: var(--ink-400); font-size: .74rem; }
    .mobile-calendar__month { display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; margin-bottom: 3px; }
    .mobile-calendar__month strong { color: var(--ink-900); font-size: .8rem; text-align: center; text-transform: capitalize; }
    .mobile-calendar__month button { width: 44px; height: 44px; display: grid; place-items: center; padding: 0; border: 0; color: var(--ink-600); background: transparent; box-shadow: none; }
    .mobile-calendar__month button:first-child .icon { rotate: 180deg; }
    .mobile-calendar__month button:disabled { color: #cbd5e1; opacity: .55; }
    .mobile-calendar__week, .mobile-calendar__grid { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); }
    .mobile-calendar__week span { height: 30px; display: grid; place-items: center; color: var(--ink-400); font-size: .56rem; font-weight: 700; }
    .mobile-calendar__grid { row-gap: 2px; }
    .mobile-calendar__spacer { min-height: 44px; }
    .mobile-calendar__grid button { width: 100%; min-width: 0; height: 44px; min-height: 44px; padding: 0; border: 0; border-radius: 0; color: var(--ink-800); background: #fff; box-shadow: none; font-size: .69rem; font-weight: 650; }
    .mobile-calendar__grid button.is-in-range { color: #0f5f77; background: #eaf5ff; }
    .mobile-calendar__grid button.is-start, .mobile-calendar__grid button.is-end { position: relative; z-index: 1; border-radius: 12px; color: #fff; background: #0f6b91; }
    .mobile-calendar__grid button:disabled { color: #cbd5e1; background: #fff; }
    .mobile-calendar__hint { margin: 8px 0 10px; color: var(--ink-500); font-size: .61rem; text-align: center; }
    .mobile-calendar form button { width: 100%; min-height: 50px; border-radius: 13px; }
    .mobile-calendar form button:disabled { color: #94a3b8; background: #e8edf3; box-shadow: none; cursor: default; }
    .mobile-brand span,
    .mobile-value-card__status,
    .mobile-value-card__foot > span,
    .mobile-value-card__foot > small,
    .mobile-range-trigger__copy small,
    .mobile-range-trigger__copy > span,
    .mobile-period-card__head > div > span,
    .mobile-period-card__comparison,
    .mobile-manager-card__status,
    .mobile-manager-card__head > div > span,
    .mobile-manager-card__comparison,
    .mobile-manager-metrics span,
    .mobile-manager-metrics small,
    .mobile-metric-grid span,
    .mobile-chart-note,
    .mobile-status-list small,
    .mobile-section-head span,
    .mobile-section-head > a,
    .mobile-empty-row small,
    .mobile-trade-row__main small,
    .mobile-dashboard-links small,
    .mobile-date-sheet__head small,
    .mobile-calendar__hint,
    .mobile-nav a,
    .mobile-nav button { font-size: .69rem; }
    .install-banner { display: none !important; }
}

@media (min-width: 861px) {
    .desktop-investor-dashboard { display: flex; flex-direction: column; }
    .desktop-investor-dashboard > .dashboard-intro { order: 1; }
    .desktop-investor-dashboard > .period-toolbar { order: 2; }
    .desktop-investor-dashboard > .performance-board { order: 3; }
    .desktop-investor-dashboard > .analysis-strip { order: 4; }
    .desktop-investor-dashboard > .dashboard-grid { order: 5; }
    .desktop-investor-dashboard > .investor-summary { order: 6; margin-top: 15px; }
}

@media (max-width: 360px) {
    .content { padding-inline: 10px; }
    .mobile-value-card, .mobile-period-card, .mobile-manager-card { padding-inline: 15px; }
    .mobile-period-card__head > div > strong { font-size: 1.78rem; }
    .mobile-metric-grid strong { font-size: .85rem; }
    .mobile-manager-metrics > div { padding-inline: 9px; }
    .mobile-manager-metrics strong { font-size: .82rem; }
    .mobile-nav a, .mobile-nav button { font-size: .56rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

@media print {
    .sidebar, .topbar, .mobile-nav, .mobile-sheet, .menu-backdrop, .page-actions { display: none !important; }
    .workspace { margin: 0; }
    .content { max-width: none; padding: 0; }
    .card, .hero-card, .stat-card { break-inside: avoid; box-shadow: none; }
}
