/* ============================================================
   Korevra SureDesk — design system
   Warm-paper light ops theme (default) + deep navy dark theme.
   DM Sans body · Fraunces display. Motif: the clock.
   ============================================================ */

:root {
  /* ink + surfaces (light) */
  --paper: #f5f1e9;
  --surface: #fffdf8;
  --surface2: #efe9dd;
  --ink: #16283c;
  --ink2: #4c5c6b;
  --ink3: #7d8894;
  --line: #e0d8c8;
  --line2: #ece5d7;

  /* brand */
  --navy: #0d2b4e;
  --accent: #157f7f;
  --accent-ink: #0f6666;
  --accent-soft: #d9ecea;
  --gold: #b3821f;
  --gold-soft: #f3e7cb;

  /* signals */
  --good: #1e7f52;
  --good-soft: #dcefe2;
  --warn: #b06a10;
  --warn-soft: #f7e8cf;
  --bad: #b03a2e;
  --bad-soft: #f6ded9;
  --info: #2b6cb0;
  --info-soft: #dde9f5;

  --shadow: 0 1px 2px rgba(22, 30, 40, .06), 0 6px 24px -12px rgba(22, 30, 40, .18);
  --shadow-lg: 0 24px 60px -24px rgba(13, 28, 46, .35);
  --r: 12px;
  --r-lg: 18px;
  --font: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Fraunces", Georgia, serif;
}

[data-theme="dark"] {
  --paper: #0b1826;
  --surface: #122234;
  --surface2: #0e1c2c;
  --ink: #e9eef3;
  --ink2: #a8b6c2;
  --ink3: #71828f;
  --line: #23384d;
  --line2: #1b2e41;
  --accent: #2ba3a0;
  --accent-ink: #4fc4c0;
  --accent-soft: #123a42;
  --gold: #d4a843;
  --gold-soft: #35301c;
  --good: #3aa76e;
  --good-soft: #14352a;
  --warn: #d99a3d;
  --warn-soft: #3a2f18;
  --bad: #d96459;
  --bad-soft: #3d201d;
  --info: #5f96d6;
  --info-soft: #1a2c42;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px -12px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-weight: 650; letter-spacing: -.01em; }
a { color: var(--accent-ink); text-decoration: none; }
button { font-family: inherit; font-size: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea {
  font-family: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 9px; padding: 9px 12px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
label { font-size: 12.5px; font-weight: 600; color: var(--ink2); display: block; margin: 12px 0 5px; }
.ic { vertical-align: -3px; flex: none; }

/* ---------------- logo ---------------- */
.logo-bg { fill: var(--navy); }
[data-theme="dark"] .logo-bg { fill: var(--accent); }
.logo-ring { stroke: #e8b64c; }
.logo-hand { stroke: #fffdf8; }
[data-theme="dark"] .logo-hand { stroke: #0b1826; }

/* ---------------- shell layout ---------------- */
#app { min-height: 100vh; }
.shell { display: flex; min-height: 100vh; }
.side {
  width: 232px; flex: none; display: flex; flex-direction: column;
  background: var(--navy); color: #dce7f2; position: sticky; top: 0; height: 100vh;
  padding: 18px 12px 12px;
}
[data-theme="dark"] .side { background: #0a1520; }
.side-brand { display: flex; align-items: center; gap: 9px; color: #fff; font-weight: 700; font-size: 16px; padding: 2px 8px 14px; font-family: var(--display); }
.side-portal { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #8fb3c9; padding: 10px 8px; border-top: 1px solid rgba(255,255,255,.08); }
.side-nav { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.snav {
  display: flex; align-items: center; gap: 10px; color: #b9cbdb;
  padding: 9px 10px; border-radius: 9px; font-size: 13.5px; font-weight: 500;
}
.snav:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.snav.active { background: var(--accent); color: #fff; font-weight: 600; }
.snav-n { margin-left: auto; background: rgba(255,255,255,.16); border-radius: 20px; font-size: 11px; padding: 1px 8px; font-weight: 700; }
.snav.active .snav-n { background: rgba(255,255,255,.25); }
.side-foot { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.sfbtn { display: flex; align-items: center; gap: 8px; color: #9db4c6; font-size: 12.5px; padding: 7px 10px; border-radius: 8px; }
.sfbtn:hover { background: rgba(255,255,255,.07); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 26px; border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: blur(8px); position: sticky; top: 0; z-index: 30;
}
.tb-left { display: flex; align-items: center; gap: 10px; font-weight: 650; }
.tb-right { display: flex; align-items: center; gap: 16px; }
.tb-clock { font-size: 12.5px; color: var(--ink2); display: flex; align-items: center; gap: 6px; }
.tb-clock b { font-weight: 600; font-variant-numeric: tabular-nums; }
.tb-user { display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px 8px; border-radius: 10px; }
.tb-user:hover { background: var(--surface2); }
.tb-user-n { display: flex; flex-direction: column; line-height: 1.15; font-size: 13px; font-weight: 600; }
.tb-user-n i { font-style: normal; font-weight: 500; font-size: 11px; color: var(--ink3); }
.content { padding: 24px 26px 60px; max-width: 1340px; width: 100%; margin: 0 auto; }

/* ---------------- common blocks ---------------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h2 { font-size: 22px; font-family: var(--display); font-weight: 600; }
.page-head p { color: var(--ink2); font-size: 13px; margin-top: 3px; max-width: 640px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); padding: 18px; }
.card h3 { font-size: 15px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card h3 .ic { color: var(--accent); }
.card-sub { font-size: 12.5px; color: var(--ink2); margin: -8px 0 12px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g23 { grid-template-columns: 2fr 3fr; }
.g32 { grid-template-columns: 3fr 2fr; }
@media (max-width: 1100px) { .g4 { grid-template-columns: 1fr 1fr; } .g3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) { .g2, .g3, .g4, .g23, .g32 { grid-template-columns: 1fr; } }
.mt { margin-top: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.muted { color: var(--ink2); font-size: 12.5px; }
.small { font-size: 12px; }
.t-good { color: var(--good); } .t-bad { color: var(--bad); } .t-warn { color: var(--warn); } .t-info { color: var(--info); }
.num { font-variant-numeric: tabular-nums; }

/* KPI */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ink3); }
.kpi-value { font-size: 26px; font-weight: 700; font-family: var(--display); margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: 12px; color: var(--ink2); margin-top: 3px; }
.kpi.tone-bad .kpi-value { color: var(--bad); }
.kpi.tone-warn .kpi-value { color: var(--warn); }
.kpi.tone-good .kpi-value { color: var(--good); }
.kpi.tone-accent .kpi-value { color: var(--accent-ink); }
.kpi.tone-gold .kpi-value { color: var(--gold); }

/* badges */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 2.5px 9px; border-radius: 20px;
  text-transform: capitalize; white-space: nowrap;
  background: var(--surface2); color: var(--ink2); border: 1px solid var(--line);
}
.badge.tone-good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.badge.tone-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.badge.tone-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.badge.tone-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.tone-accent { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.badge.tone-gold { background: var(--gold-soft); color: var(--gold); border-color: transparent; }

/* avatar */
.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; color: #fff;
  font-size: 11px; font-weight: 700; flex: none; vertical-align: middle;
}
.avatar.ai { background: var(--accent); }
.avatar.sys { background: var(--ink3); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--line);
  padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 13.5px;
  box-shadow: var(--shadow); white-space: nowrap;
}
.btn:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.07); color: #fff; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { box-shadow: none; background: transparent; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.iconbtn { padding: 6px; border-radius: 8px; color: var(--ink2); display: inline-flex; }
.iconbtn:hover { background: var(--surface2); color: var(--ink); }
.linkbtn { color: var(--accent-ink); font-weight: 600; font-size: 12.5px; }
.linkbtn:hover { text-decoration: underline; }

/* table */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); box-shadow: var(--shadow); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink3); padding: 10px 14px;
  border-bottom: 1px solid var(--line); background: var(--surface2); white-space: nowrap;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .rowlink { cursor: pointer; }
.tbl .rowlink:hover { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.tbl .rowlink:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tbl td .avatar { width: 24px; height: 24px; font-size: 10px; margin-right: 6px; }

/* clock chip */
.clockchip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px;
  background: var(--surface2); border: 1px solid var(--line); white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.clockchip i { font-style: normal; font-weight: 500; color: var(--ink2); }
.clockchip.cd-ok { background: var(--good-soft); color: var(--good); border-color: transparent; }
.clockchip.cd-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.clockchip.cd-bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .65; } }

/* ring */
.ring { position: relative; display: inline-block; }
.ring svg { display: block; }
.ring-bg { fill: none; stroke: var(--line); }
.ring-fg { fill: none; stroke-linecap: round; transition: stroke-dasharray .6s ease; }
.ring.tone-accent .ring-fg { stroke: var(--accent); }
.ring.tone-gold .ring-fg { stroke: var(--gold); }
.ring.tone-good .ring-fg { stroke: var(--good); }
.ring.tone-warn .ring-fg { stroke: var(--warn); }
.ring.tone-bad .ring-fg { stroke: var(--bad); }
.ring-in { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-in b { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ring-in i { font-style: normal; font-size: 9.5px; color: var(--ink3); text-transform: uppercase; letter-spacing: .05em; max-width: 80%; }

/* spark */
.spark-line { fill: none; stroke-width: 2; stroke-linecap: round; }
.spark-fill { opacity: .12; }
.spark.tone-accent .spark-line { stroke: var(--accent); } .spark.tone-accent .spark-fill { fill: var(--accent); }
.spark.tone-gold .spark-line { stroke: var(--gold); } .spark.tone-gold .spark-fill { fill: var(--gold); }
.spark.tone-bad .spark-line { stroke: var(--bad); } .spark.tone-bad .spark-fill { fill: var(--bad); }
.spark.tone-good .spark-line { stroke: var(--good); } .spark.tone-good .spark-fill { fill: var(--good); }

/* bars */
.bars { display: flex; flex-direction: column; gap: 9px; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 1.3fr) 3fr auto; align-items: center; gap: 10px; font-size: 12.5px; }
.bar-label { color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 9px; border-radius: 6px; background: var(--surface2); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 6px; }
.bar-fill.tone-accent { background: var(--accent); }
.bar-fill.tone-gold { background: var(--gold); }
.bar-fill.tone-bad { background: var(--bad); }
.bar-fill.tone-warn { background: var(--warn); }
.bar-fill.tone-good { background: var(--good); }
.bar-fill.tone-info { background: var(--info); }
.bar-val { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* donut */
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut-seg { fill: none; }
.donut-seg.tone-accent { stroke: var(--accent); } .donut-seg.tone-gold { stroke: var(--gold); }
.donut-seg.tone-info { stroke: var(--info); } .donut-seg.tone-good { stroke: var(--good); }
.donut-seg.tone-bad { stroke: var(--bad); } .donut-seg.tone-base { stroke: var(--ink3); }
.donut-seg.tone-warn { stroke: var(--warn); }
.donut-legend { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; }
.lg-row { display: flex; align-items: center; gap: 8px; color: var(--ink2); }
.lg-row b { color: var(--ink); margin-left: auto; padding-left: 14px; font-variant-numeric: tabular-nums; }
.lg-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.lg-dot.tone-accent { background: var(--accent); } .lg-dot.tone-gold { background: var(--gold); }
.lg-dot.tone-info { background: var(--info); } .lg-dot.tone-good { background: var(--good); }
.lg-dot.tone-bad { background: var(--bad); } .lg-dot.tone-base { background: var(--ink3); }
.lg-dot.tone-warn { background: var(--warn); }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 9px 14px; font-weight: 600; font-size: 13.5px; color: var(--ink2); border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--accent-ink); border-color: var(--accent); }
.tab-n { background: var(--surface2); border-radius: 12px; padding: 1px 7px; font-size: 11px; }
.tab.active .tab-n { background: var(--accent-soft); }

/* modal + drawer */
.modal-back { position: fixed; inset: 0; background: rgba(10, 20, 32, .5); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); width: 100%; max-width: 640px; max-height: 88vh; display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 10px; }
.modal-head h3 { font-size: 17px; font-family: var(--display); }
.modal-body { padding: 6px 20px 18px; overflow-y: auto; }
.modal-foot { padding: 12px 20px 16px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line2); }
.drawer-back { position: fixed; inset: 0; background: rgba(10, 20, 32, .4); z-index: 100; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(560px, 94vw); background: var(--surface); box-shadow: var(--shadow-lg); overflow-y: auto; padding: 22px; transform: translateX(30px); opacity: 0; transition: all .25s ease; }
.drawer-back.open .drawer { transform: none; opacity: 1; }

/* toasts */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--navy); color: #fff; font-size: 13px; font-weight: 600; padding: 10px 18px; border-radius: 12px; box-shadow: var(--shadow-lg); animation: rise .3s ease; max-width: 90vw; }
.toast.bad { background: var(--bad); }
.toast.good { background: var(--good); }
.toast.out { opacity: 0; transition: opacity .4s; }
@keyframes rise { from { transform: translateY(12px); opacity: 0; } }

/* empty */
.empty { text-align: center; color: var(--ink3); padding: 26px 10px; }
.empty p { margin-top: 6px; font-size: 13px; }

/* persona list */
.persona-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 640px) { .persona-list { grid-template-columns: 1fr; } }
.persona { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); text-align: left; background: var(--surface); }
.persona:hover { border-color: var(--accent); }
.persona.active { background: var(--accent-soft); border-color: var(--accent); }
.persona span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.persona b { font-size: 13px; }
.persona i { font-style: normal; font-size: 11px; color: var(--ink2); }

/* chat */
.chat { display: flex; flex-direction: column; gap: 8px; padding: 14px; background: #e5ddd3; border-radius: var(--r); }
[data-theme="dark"] .chat { background: #0e1a28; }
.msg { max-width: 78%; background: #fff; border-radius: 10px; padding: 7px 10px 5px; box-shadow: 0 1px 1px rgba(0,0,0,.08); position: relative; font-size: 13.5px; }
[data-theme="dark"] .msg { background: #1c2c3e; }
.msg.mine { align-self: flex-end; background: #d7f2d0; }
[data-theme="dark"] .msg.mine { background: #14402e; }
.msg.ai { border-left: 3px solid var(--accent); }
.msg-who { font-size: 11px; font-weight: 700; color: var(--accent-ink); margin-bottom: 2px; }
.msg-t { font-size: 10px; color: var(--ink3); text-align: right; margin-top: 2px; }
.msg-voice { display: flex; align-items: center; gap: 7px; padding: 5px 0; color: var(--ink2); font-size: 11px; }
.vwave { display: inline-flex; align-items: center; gap: 2px; }
.vwave i { display: block; width: 2.5px; border-radius: 2px; background: var(--accent); height: 6px; }
.vwave i:nth-child(2n) { height: 12px; } .vwave i:nth-child(3n) { height: 9px; } .vwave i:nth-child(5n) { height: 15px; }

/* journal timeline */
.timeline { position: relative; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; font-size: 13px; }
.tl-item::before { content: ""; position: absolute; left: -20.5px; top: 5px; width: 9px; height: 9px; border-radius: 50%; background: var(--ink3); border: 2px solid var(--surface); }
.tl-item.k-created::before { background: var(--accent); }
.tl-item.k-state::before { background: var(--info); }
.tl-item.k-resolution::before, .tl-item.k-csat::before { background: var(--good); }
.tl-item.k-obligation::before, .tl-item.k-submission::before { background: var(--gold); }
.tl-item.k-weather::before { background: var(--warn); }
.tl-item.k-ai::before { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-item.k-pause::before { background: var(--warn); }
.tl-meta { font-size: 11px; color: var(--ink3); margin-top: 1px; }

/* landing */
.landing { max-width: 1240px; margin: 0 auto; padding: 44px 26px 40px; }
.land-hero { margin-bottom: 30px; }
.land-brand { display: flex; align-items: center; gap: 16px; }
.land-brand h1 { font-family: var(--display); font-size: 34px; font-weight: 500; }
.land-brand h1 b { font-weight: 750; }
.land-strap { color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.land-sub { max-width: 760px; color: var(--ink2); margin-top: 14px; font-size: 15px; }
.land-live { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 18px; font-size: 13px; color: var(--ink2); }
.land-live b { font-weight: 750; color: var(--ink); }
.land-live .t-bad b { color: var(--bad); }
.land-tour { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 18px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.lt-label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--accent-ink); display: flex; align-items: center; gap: 5px; margin-right: 4px; }
.lt-step { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--ink); padding: 6px 11px; border-radius: 20px; background: var(--surface2); border: 1px solid var(--line); white-space: nowrap; }
.lt-step:hover { border-color: var(--accent); color: var(--accent-ink); }
.lt-step b { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10.5px; }
.lt-sep { color: var(--ink3); display: inline-flex; }
.land-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 14px; }
.land-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px; color: var(--ink); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px; transition: transform .15s ease, box-shadow .15s ease;
}
.land-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.lc-head { display: flex; align-items: center; justify-content: space-between; color: var(--accent-ink); }
.lc-tag { font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--ink3); }
.land-card h3 { font-size: 16.5px; font-family: var(--display); }
.land-card p { font-size: 12.5px; color: var(--ink2); flex: 1; }
.lc-foot { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--ink3); font-weight: 600; }
.lc-foot .ic { color: var(--accent); }
.land-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 30px; font-size: 12px; color: var(--ink3); }

/* phone frame (mobile portal + requester) */
.phone {
  width: 384px; max-width: 96vw; margin: 0 auto; background: var(--surface);
  border-radius: 34px; border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  overflow: hidden; display: flex; flex-direction: column; height: 760px; max-height: 84vh; position: relative;
}
.phone-notch { height: 26px; display: flex; align-items: center; justify-content: center; }
.phone-notch::after { content: ""; width: 90px; height: 8px; border-radius: 6px; background: var(--line); }
.phone-body { flex: 1; overflow-y: auto; min-height: 0; }
.phone-tabs { display: flex; border-top: 1px solid var(--line); background: var(--surface); }
.ptab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 2px 10px; font-size: 10px; font-weight: 600; color: var(--ink3); }
.ptab.active { color: var(--accent-ink); }
.phone-row { display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; align-items: flex-start; }

/* status page */
.portal-status { min-height: 100vh; background: var(--paper); }
.status-wrap { max-width: 860px; margin: 0 auto; padding: 40px 22px 60px; }
.status-hero { text-align: center; margin-bottom: 26px; }
.status-hero h1 { font-family: var(--display); font-size: 26px; }
.status-banner { border-radius: var(--r-lg); padding: 16px 20px; font-weight: 650; display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.status-banner.ok { background: var(--good-soft); color: var(--good); }
.status-banner.warn { background: var(--warn-soft); color: var(--warn); }
.svc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 4px; border-bottom: 1px solid var(--line2); }
.svc-row:last-child { border-bottom: 0; }
.svc-note { font-size: 12px; color: var(--ink2); margin-top: 2px; }

/* misc */
.pill-row { display: flex; gap: 6px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
pre.report {
  font-family: ui-monospace, Consolas, monospace; font-size: 12px; line-height: 1.55;
  background: var(--surface2); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px; white-space: pre-wrap; word-break: break-word; max-height: 480px; overflow-y: auto;
}
.checklist { display: flex; flex-direction: column; gap: 7px; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.check-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
.check-row.done { color: var(--ink3); text-decoration: line-through; }
.gate { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.gate.done { border-color: var(--good); background: var(--good-soft); }
.gate b { font-size: 13px; display: block; }
.gate i { font-style: normal; font-size: 11.5px; color: var(--ink2); }
.gate .ic { margin-top: 2px; color: var(--good); }
.gate.pending .ic { color: var(--warn); }

.searchbox { position: relative; max-width: 420px; flex: 1; }
.searchbox .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink3); }
.searchbox input { padding-left: 36px; }

/* responsive */
@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .side { width: 100%; height: auto; position: static; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px; padding: 10px; }
  .side-brand { padding: 0 8px; }
  .side-portal { border: 0; padding: 0 8px; }
  .side-nav { flex-direction: row; overflow-x: auto; flex: 1 1 100%; order: 3; }
  .snav { white-space: nowrap; }
  .side-foot { border: 0; flex-direction: row; margin-left: auto; padding: 0; }
  .content { padding: 16px 14px 50px; }
  .topbar { padding: 10px 14px; }
  .tb-user-n i { display: none; }
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }
::-webkit-scrollbar-track { background: transparent; }
