/* Nation app look: tokens and shell from the Nation demo kit (ryze-ecomm globals.css), cards from the analytics mockup.
   Shared by the gallery and the dashboard. */
:root {
  --frame: #1a1a1a; --sheet: #fbfbfa; --depth: #f5f6f5;
  --fg1: #1c1c1c; --fg2: #4a4844; --fg3: #8a8680;
  --accent: #c9663a; --acc: #0b6b4f; --bad: #b91c1c;
  --border: rgba(28, 28, 28, 0.09); --border-t: rgba(28, 28, 28, 0.06);
  --frame-fg1: #e3e3e3; --frame-fg2: #b0b0ab; --frame-fg3: #808080;
  --shadow-raised: inset 0 1px 0 rgba(255,255,255,.9), 0 0 0 .5px var(--border), 0 1px 2px rgba(28,28,28,.06), 0 2px 5px -3px rgba(28,28,28,.1);
  --shadow-solid: inset 0 1px 0 rgba(255,255,255,.28), 0 1px 2px rgba(28,28,28,.16), 0 2px 6px -3px rgba(28,28,28,.24);
  --shadow-frame-active: inset 0 1px 0 rgba(255,255,255,.1), inset 0 0 0 .5px rgba(255,255,255,.07), 0 1px 2px rgba(0,0,0,.45), 0 2px 6px -2px rgba(0,0,0,.35);
  --shadow-card: 0 1px 1px rgba(15,23,42,.04), 0 2px 4px -1px rgba(15,23,42,.05), 0 10px 22px -8px rgba(15,23,42,.10), 0 28px 48px -24px rgba(15,23,42,.16);
  --ease-paper: cubic-bezier(0.16, 1, 0.3, 1);
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: "Plus Jakarta Sans", system-ui, sans-serif; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; color: var(--fg1); background: var(--frame); font-size: 13px; line-height: 1.5; }
i.ph, i.ph-bold { line-height: 1; display: inline-block; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 9px; border: 0; font: 500 12.5px/1 "Plus Jakarta Sans", sans-serif; white-space: nowrap; cursor: pointer; color: var(--fg1); background: linear-gradient(180deg, #fff, #f7f8f7); box-shadow: var(--shadow-raised); text-decoration: none; }
.btn i { font-size: 14px; color: var(--fg2); }
.btn .ph-caret-down { font-size: 11px; color: var(--fg3); margin-left: 2px; }
.btn.primary { color: #fff; background: linear-gradient(180deg, #2b2c2b, #161716); box-shadow: var(--shadow-solid); }
.btn.primary i { color: #fff; }
.btn.danger { color: #fff; background: linear-gradient(180deg, #c8382f, #a92a22); box-shadow: var(--shadow-solid); }
.btn[disabled] { opacity: .45; cursor: default; }
.btn:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

/* ---------- shell ---------- */
.frame { position: fixed; inset: 0; background: var(--frame); display: flex; }
.sidebar { width: 228px; flex: none; padding: 10px 8px 8px 10px; display: flex; flex-direction: column; color: var(--frame-fg1); overflow-y: auto; }
.store-sw { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 6px; font-size: 13px; font-weight: 500; }
.store-sw .av { width: 20px; height: 20px; border-radius: 6px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 11px; font-weight: 650; }
.store-sw .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-sw i { color: var(--frame-fg2); font-size: 14px; }
.nav { margin-top: 8px; display: flex; flex-direction: column; gap: 1px; }
.nav .grp { font-size: 12px; color: var(--frame-fg3); padding: 14px 8px 4px; }
.nav a { display: flex; align-items: center; gap: 10px; height: 28px; padding: 0 8px; border-radius: 8px; font-size: 13px; color: var(--frame-fg1); text-decoration: none; cursor: pointer; }
.nav a:hover { background: rgba(255,255,255,.04); }
.nav a i { font-size: 18px; color: var(--frame-fg2); width: 20px; text-align: center; }
.nav a.cur { background: linear-gradient(180deg, #3a3b3a, #2d2e2d); box-shadow: var(--shadow-frame-active); color: #fff; }
.nav a.cur i { color: #fff; }
.nav a.subl { padding-left: 38px; color: var(--frame-fg2); font-size: 12.5px; height: 26px; }
.sidebar .foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
.sidebar .acct { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 6px; font-size: 13px; }
.sidebar .acct .av { width: 22px; height: 22px; border-radius: 99px; background: #f1f1ef; color: var(--fg1); display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.sheet { flex: 1; min-width: 0; margin: 8px 8px 8px 0; border-radius: 14px; background: var(--sheet); overflow: hidden; display: flex; flex-direction: column; }
.sheet.solo { margin: 8px; }
.page-head { height: 56px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 28px; font-size: 15px; font-weight: 600; }
.page-head > i { font-size: 16px; color: var(--fg2); }
.page-head .right { margin-left: auto; display: flex; gap: 8px; }
.page-body { flex: 1; min-height: 0; overflow-y: auto; padding: 0 28px 32px; }

/* ---------- cards and figures ---------- */
.dcard { background: #fff; border-radius: 10px; border: 1px solid #e2e2e0; box-shadow: var(--shadow-card); overflow: hidden; position: relative; display: flex; flex-direction: column; animation: pop-in 520ms var(--ease-paper) both; }
@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(.985); } }
.delta { display: inline-flex; align-items: center; gap: 3px; font: 500 11.5px var(--mono); color: var(--acc); white-space: nowrap; }
.delta i { font-size: 10px; }
.delta.neg { color: var(--bad); }
.delta.flat { color: #8f8f8f; }
.notice { max-width: 560px; margin: 40px auto; padding: 22px 24px; border-radius: 10px; background: #fff; border: 1px solid #e2e2e0; box-shadow: var(--shadow-card); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.notice b { font-size: 14px; font-weight: 600; }
.notice ul { padding-left: 18px; color: var(--fg2); font: 400 12px var(--mono); display: flex; flex-direction: column; gap: 4px; }

/* first paint only: cards pop in, lines draw (drawIn), dashed comparisons fade in */
.fade { animation: fade .6s ease .35s both; }
.fade.late { animation-delay: 1.8s; }
@keyframes fade { from { opacity: 0; } }
body.settled .dcard, body.settled .fade, body.settled .fill, body.settled .bar i { animation: none; }

@media (max-width: 760px) {
  .sidebar { display: none; }
  .sheet, .sheet.solo { margin: 0; border-radius: 0; }
  .page-head { padding: 0 16px; }
  .page-body { padding: 0 16px 24px; }
}
