.preferences { display:flex; align-items:center; flex-wrap:wrap; gap:8px; }
.preferences select { min-height:32px; padding-block:4px; }
#overview { min-width:0; }
.overview-tools { display:flex; justify-content:flex-end; padding:14px 0; }
.portal-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:16px; }
.portal-kpi { min-width:0; padding:18px 20px; display:flex; flex-direction:column; gap:12px; }
.portal-kpi h2 { color:var(--sp-muted); font-size:13px; font-weight:500; }
.portal-kpi strong { font-size:clamp(18px,1.9vw,29px); font-weight:650; letter-spacing:-.035em; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.portal-kpi footer { display:flex; justify-content:space-between; gap:6px; flex-wrap:wrap; font-size:12px; border-top:1px solid var(--sp-border); padding-top:10px; margin-top:auto; color:var(--sp-muted); }
.portal-kpi footer b { color:var(--sp-ink-2); }
.portal-kpi.balance { border-top:3px solid var(--sp-saffron); padding-top:16px; }
.portal-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:16px; margin-bottom:16px; }
.portal-section { padding:20px; }
.chart-head { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.chart-head p { color:var(--sp-muted); font-size:12px; }
.keys { display:flex; gap:14px; font-size:12px; }.keys span { display:inline-flex; align-items:center; gap:6px; }
.keys i,.mix i { width:8px; height:8px; border-radius:50%; display:inline-block; }
.receipts { color:var(--sp-saffron); }.payouts { color:var(--sp-pix); }
.portal-plot { margin:16px 0 0; display:grid; grid-template-columns:48px minmax(0,1fr); height:184px; }
.scale { display:flex; flex-direction:column; justify-content:space-between; font-size:10px; color:var(--sp-muted); }
.plot-area { position:relative; background:repeating-linear-gradient(to top,var(--sp-grid-line) 0 1px,transparent 1px 25%); }
.plot-area svg { width:100%; height:100%; display:block; }
.plot-area output { position:absolute; top:4px; right:4px; max-width:100%; padding:6px 10px; border-radius:7px; background:var(--sp-tooltip-bg); color:var(--sp-tooltip-text); font-size:12px; pointer-events:none; }
.chart-axis { margin-left:48px; display:flex; justify-content:space-between; font-size:11px; color:var(--sp-muted); }
.mix { display:grid; gap:10px; margin-top:20px; }.mix-row { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px 10px; align-items:center; font-size:13px; }
.track { grid-column:1/-1; border-radius:8px; height:5px; overflow:hidden; background:var(--sp-surface-hover); }.track i { display:block; height:100%; border-radius:5px; }
#activity { margin-top:18px; } #activity-filters { display:flex; padding:18px 20px; gap:12px; align-items:end; flex-wrap:wrap; }
#activity-filters label { display:grid; gap:4px; color:var(--sp-muted); font-size:12px; } #activity-filters input { min-height:36px; border:1px solid var(--sp-border); border-radius:8px; padding:6px 10px; background:var(--sp-surface-sub); color:var(--sp-ink); width:min(300px,100%); }
.action { padding:8px 16px; border-radius:8px; color:#1a0e02; background:var(--sp-saffron); font-weight:600; }
.empty { padding:20px; color:var(--sp-muted); }.pager a { padding:4px 10px; color:var(--sp-saffron-deep); }
.order-link { font:12px ui-monospace,monospace; text-decoration:underline; text-underline-offset:3px; }.positive { color:var(--sp-pix); }.negative { color:var(--sp-danger); }
#order-dialog dd { overflow-wrap:anywhere; }.login-side .login-tools { flex-wrap:wrap; }
#enrollment { display:block; max-width:100%; height:auto; margin:0 auto 20px; image-rendering:pixelated; }
#back-login { display:block; margin:14px auto 0; color:var(--sp-muted); } #otp { letter-spacing:.24em; font-variant-numeric:tabular-nums; }
@media(max-width:1140px) { .portal-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }.portal-grid { grid-template-columns:minmax(0,1.65fr) minmax(0,1fr); } }
@media(max-width:780px) { .portal-grid { grid-template-columns:1fr; }.portal-kpis,.portal-grid { gap:10px; }
  .utility .preferences { order:4; flex-basis:100%; }.utility .theme-picker { order:0; flex:1; }
  .login-tools .preferences { flex-wrap:wrap-reverse; justify-content:flex-end; } }
@media(max-width:480px) { .portal-kpi,.portal-section { padding:13px; }.portal-kpi.balance { padding-top:11px; }.portal-kpi footer { display:grid; }.preferences { gap:4px; }
  .utility .preferences .theme-picker { flex:1 1 auto; }.login-tools .preferences { width:100%; }.chart-axis { margin-left:32px; }.portal-plot { grid-template-columns:32px minmax(0,1fr); height:145px; } }

.kpi-value { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; }
.kpi-spark { width:60px; height:24px; flex:none; }
@media(max-width:480px) { .kpi-spark { width:44px; height:18px; } }

#developer { margin-top:16px; }
#developer .chart-head a { color:var(--sp-saffron-deep); text-decoration:underline; }
#developer dd { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; min-width:0; }
#whitelist-form { display:grid; gap:8px; margin-top:24px; max-width:550px; }
#whitelist-form label { margin-top:8px; }
#whitelist-form textarea,#whitelist-form input,#signing-key { padding:8px; border:1px solid var(--sp-border); border-radius:6px; background:var(--sp-surface-sub); color:var(--sp-ink); font:inherit; }
#whitelist-form textarea { min-width:0; resize:vertical; }
#whitelist-otp { max-width:12em; }
#whitelist-form .action { justify-self:start; }
#signing-key { width:32ch; max-width:100%; }
