/* ============================================================================
   ADNOC Elevation — design system
   ========================================================================== */

:root {
  /* brand */
  --brand: #0047BA;
  --brand-deep: #0B2F6B;
  --brand-ink: #003A99;
  --brand-050: #EBF1FF;
  --brand-100: #D9E6FF;
  --stripe: linear-gradient(90deg, #E4002B 0 20%, #FF8200 20% 40%, #FFB81C 40% 60%, #00B140 60% 80%, #0047BA 80% 100%);

  /* light surfaces */
  --bg: #F2F5FA;
  --surface: #FFFFFF;
  --surface-2: #F7F9FD;
  --ink: #0B1B33;
  --ink-2: #33415C;
  --muted: #5C6B85;
  --line: #E3E9F2;
  --line-strong: #CBD6E4;

  /* semantic */
  --success: #0E9F6E;  --success-bg: #E4F7EF;
  --warn: #B45309;     --warn-bg: #FDF1DF;
  --danger: #D92D20;   --danger-bg: #FDEBE9;
  --info: #0B63C5;     --info-bg: #E8F1FC;

  --sev-low: #64748B;      --sev-low-bg: #EEF2F6;
  --sev-medium: #B45309;   --sev-medium-bg: #FDF1DF;
  --sev-high: #C2410C;     --sev-high-bg: #FEEADD;
  --sev-critical: #D92D20; --sev-critical-bg: #FDEBE9;

  --radius: 16px;
  --radius-s: 12px;
  --shadow-1: 0 1px 2px rgba(11, 27, 51, .05), 0 1px 6px rgba(11, 27, 51, .05);
  --shadow-2: 0 4px 10px rgba(11, 27, 51, .06), 0 14px 34px rgba(11, 27, 51, .10);
  --tabbar-h: 62px;

  color-scheme: light;
}

/* Dark theme is opt-in (Tools → Appearance). The app defaults to light
   regardless of the OS setting; "Auto" re-enables OS following via JS. */
:root[data-theme="dark"] {
    --bg: #0B1220;
    --surface: #111B2E;
    --surface-2: #16223A;
    --ink: #E8EEF8;
    --ink-2: #C0CCE0;
    --muted: #8B99B4;
    --line: #1F2C46;
    --line-strong: #2C3C5C;
    --brand-050: #14213B;
    --brand-100: #1A2B4E;
    --brand-ink: #7EA6FF;
    --success: #34D399; --warn: #F0A32F; --danger: #F87171; --info: #5EA0FF;
    --success-bg: #0E2E23; --warn-bg: #33230C; --danger-bg: #391512; --info-bg: #10263F;
    --sev-low: #94A3B8;      --sev-low-bg: #1C2739;
    --sev-medium: #F5A623;   --sev-medium-bg: #33230C;
    --sev-high: #FB8B4B;     --sev-high-bg: #371D0E;
    --sev-critical: #F97066; --sev-critical-bg: #391512;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-2: 0 10px 30px rgba(0, 0, 0, .5);
    color-scheme: dark;
}

/* ---------- reset ---------- */

*, *::before, *::after { box-sizing: border-box; }
/* The root sits behind the scroll. Painting it the header blue means an overscroll
   pull at the top reveals blue that blends into the sticky app bar (looks like the
   header stretches) instead of a jarring grey gap. Body keeps the light content bg. */
html { -webkit-text-size-adjust: 100%; background: var(--brand-deep); }
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  overscroll-behavior-x: none;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92em; letter-spacing: .01em; }

:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

.ic { width: 20px; height: 20px; flex: none; }
.ic.big { width: 46px; height: 46px; opacity: .5; }

/* ---------- app layout ---------- */

.app { min-height: 100dvh; }
.side-nav { display: none; }
.frame { display: flex; flex-direction: column; min-height: 100dvh; }

.appbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--brand-deep) 96%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  color: #fff;
  padding-top: env(safe-area-inset-top);
}
.appbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 18px;
  max-width: 760px; margin: 0 auto; width: 100%;
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-text { min-width: 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 9px;
  background: #fff;
  display: grid; place-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.brand-mark img { width: 26px; height: 26px; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-text strong { font-size: 15px; letter-spacing: .14em; }
.brand-text span { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; opacity: .78; }
.appbar-tag {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  opacity: .75; font-weight: 600;
  white-space: nowrap; min-width: 0;
  overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 400px) { .appbar-tag { display: none; } }
.brand-stripe { height: 3px; background: var(--stripe); }

.view {
  flex: 1;
  width: 100%;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 18px);
}
.page, .wizard { max-width: 640px; margin: 0 auto; padding: 18px 18px 30px; }
/* Cap page content at the viewport width so nothing can cause horizontal scroll
   (the "wobble"). overflow-x: clip does not create a scroll container, so the
   sticky app bar and vertical scrolling are unaffected. */
.page { overflow-x: clip; }

/* bottom tab bar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; align-items: stretch; justify-content: space-around;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding: 0 8px env(safe-area-inset-bottom);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .02em;
  border-radius: 12px; margin: 6px 2px;
}
.tab .ic { width: 22px; height: 22px; }
.tab.on { color: var(--brand-ink); }
.tab.on .ic { color: var(--brand); }
.tab-fab {
  align-self: center;
  width: 54px; height: 54px; border-radius: 18px;
  background: linear-gradient(160deg, #1D5FD6, var(--brand-deep));
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(0, 71, 186, .38);
  margin: 0 6px; transform: translateY(-10px);
  transition: transform .15s ease;
}
.tab-fab:active { transform: translateY(-8px) scale(.96); }
.tab-fab .ic { width: 24px; height: 24px; }

/* ---------- desktop: sidebar layout ---------- */

@media (min-width: 1024px) {
  .app { display: grid; grid-template-columns: 264px 1fr; }
  .appbar, .tabbar { display: none; }
  .view { padding-bottom: 40px; }
  .page, .wizard { max-width: 720px; padding-top: 34px; }

  .side-nav {
    display: flex; flex-direction: column; gap: 6px;
    position: sticky; top: 0; height: 100dvh;
    padding: 22px 16px;
    background: var(--brand-deep);
    background-image: linear-gradient(180deg, rgba(255,255,255,.05), transparent 30%);
    color: #fff;
  }
  .side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 10px 20px; }
  .side-brand .brand-mark { width: 40px; height: 40px; border-radius: 11px; }
  .side-brand strong { display: block; letter-spacing: .14em; font-size: 16px; }
  .side-brand span { font-size: 11px; letter-spacing: .26em; text-transform: uppercase; opacity: .75; }
  .side-cta {
    display: flex; align-items: center; gap: 10px; justify-content: center;
    background: #fff; color: var(--brand-deep); font-weight: 700;
    border-radius: 12px; padding: 12px; margin: 0 4px 18px;
    box-shadow: var(--shadow-1);
    transition: transform .12s ease;
  }
  .side-cta:hover { transform: translateY(-1px); }
  .side-cta.on { outline: 2px solid rgba(255,255,255,.5); }
  .side-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px; margin: 0 4px; border-radius: 11px;
    color: rgba(255, 255, 255, .78); font-weight: 600; font-size: 14.5px;
  }
  .side-link:hover { background: rgba(255, 255, 255, .08); color: #fff; }
  .side-link.on { background: rgba(255, 255, 255, .14); color: #fff; }
  .side-foot { margin-top: auto; padding: 12px; font-size: 12px; line-height: 1.5; color: rgba(255,255,255,.55); }
}

/* ---------- generic components ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.pad { padding: 16px; }
.card-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.card-title .ic { color: var(--brand-ink); }

.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-s { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-s);
  padding: 12px 18px; font-weight: 700; font-size: 14.5px;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.985); }
.btn.primary {
  background: linear-gradient(160deg, #1257CE, var(--brand-ink));
  color: #fff; box-shadow: 0 6px 16px rgba(0, 71, 186, .28);
}
.btn.primary:hover { box-shadow: 0 8px 22px rgba(0, 71, 186, .36); }
.btn.primary:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.btn.ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink-2); }
.btn.ghost:hover { border-color: var(--brand); color: var(--brand-ink); }
.btn.ghost.danger { color: var(--danger); }
.btn.ghost.danger:hover { border-color: var(--danger); }
.btn.danger-solid { background: var(--danger); color: #fff; }
.btn.wide { width: 100%; }
.btn.small { padding: 8px 13px; font-size: 13px; align-self: flex-start; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center; color: var(--muted);
  border: 1px solid transparent;
  transition: background .12s ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.icon-btn.active { color: var(--warn); background: var(--warn-bg); }

.link { color: var(--brand-ink); font-weight: 600; font-size: 13.5px; display: inline-flex; align-items: center; gap: 2px; }
.link .ic { width: 15px; height: 15px; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .03em;
  padding: 3.5px 9px; border-radius: 999px; white-space: nowrap;
}
.badge .ic { width: 13px; height: 13px; }
.badge.plain { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.sev-low { background: var(--sev-low-bg); color: var(--sev-low); }
.sev-medium { background: var(--sev-medium-bg); color: var(--sev-medium); }
.sev-high { background: var(--sev-high-bg); color: var(--sev-high); }
.sev-critical { background: var(--sev-critical-bg); color: var(--sev-critical); }
.st-submitted, .st-routed { background: var(--info-bg); color: var(--info); }
.st-acknowledged, .st-in_progress { background: var(--warn-bg); color: var(--warn); }
.st-resolved { background: var(--success-bg); color: var(--success); }

.seg-btn.sev-low, .seg-btn.sev-medium, .seg-btn.sev-high, .seg-btn.sev-critical { background: transparent; color: var(--muted); }

.hint { font-size: 13px; color: var(--muted); line-height: 1.5; }
.hint.center { text-align: center; }
.hint .mono { background: var(--surface-2); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
.ok-line .ic { color: var(--success); vertical-align: -4px; }
.warn-line .ic { color: var(--warn); vertical-align: -4px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.req { color: var(--danger); font-weight: 600; font-size: 11.5px; }
.opt { color: var(--muted); font-weight: 500; font-size: 11.5px; }

/* fields */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .label-row label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.field input[type="text"], .field input[type="search"], .field input:not([type]), .field select, .field textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-s);
  padding: 11px 13px;
  font-size: 15px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.field :is(input, select, textarea):focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
  background: var(--surface);
}
.field textarea { resize: vertical; min-height: 64px; }
.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}
.field-2col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }

/* segmented control */
.seg {
  display: flex; gap: 4px; padding: 4px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-s);
}
.seg-btn {
  flex: 1; padding: 8px 6px; border-radius: 9px;
  font-size: 13px; font-weight: 700; color: var(--muted);
  transition: background .12s ease, color .12s ease, box-shadow .12s ease;
}
.seg-btn.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.seg-btn.sev-low.on { color: var(--sev-low); }
.seg-btn.sev-medium.on { color: var(--sev-medium); }
.seg-btn.sev-high.on { color: var(--sev-high); }
.seg-btn.sev-critical.on { color: var(--sev-critical); }
.wide-seg { margin: 12px 0; }

/* chips */
.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 13.5px; font-weight: 600; color: var(--ink-2);
  transition: all .12s ease;
}
.chip.on { background: var(--brand-050); border-color: var(--brand); color: var(--brand-ink); }

/* spinner & skeletons */
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-top-color: var(--brand);
  animation: spin .8s linear infinite;
  margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sk-block {
  height: 84px; border-radius: var(--radius);
  background: linear-gradient(100deg, var(--surface) 40%, var(--surface-2) 50%, var(--surface) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border: 1px solid var(--line);
}
.sk-block.short { height: 52px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* toasts */
.toasts {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 16px);
  transform: translateX(-50%);
  z-index: 90; width: min(92vw, 420px); pointer-events: none;
}
@media (min-width: 1024px) { .toasts { bottom: 26px; } }
.toast {
  display: flex; align-items: center; gap: 8px; justify-content: center;
  background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 12px;
  font-size: 14px; font-weight: 600; text-align: center;
  box-shadow: var(--shadow-2);
  opacity: 0; transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast .ic { width: 16px; height: 16px; }
.toast.show { opacity: 1; transform: none; }
.toast-success { background: var(--success); color: #fff; }
.toast-warn { background: var(--warn); color: #fff; }
.toast-danger { background: var(--danger); color: #fff; }

/* sheet */
.sheet-host { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.sheet-host.open { pointer-events: auto; }
.scrim {
  position: absolute; inset: 0;
  background: rgba(6, 13, 26, .5);
  opacity: 0; transition: opacity .2s ease;
}
.sheet-host.open .scrim { opacity: 1; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0;
  margin: 0 auto; max-width: 560px;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  box-shadow: var(--shadow-2);
  transform: translateY(100%);
  transition: transform .24s cubic-bezier(.2, .8, .25, 1);
  max-height: 88dvh; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom);
}
.sheet-host.open .sheet { transform: none; }
@media (min-width: 700px) {
  .sheet { bottom: auto; top: 50%; border-radius: 20px; transform: translateY(-46%); opacity: 0; transition: opacity .18s ease, transform .18s ease; }
  .sheet-host.open .sheet { opacity: 1; transform: translateY(-50%); }
  .sheet-grip { display: none; }
}
.sheet-grip { width: 42px; height: 4px; border-radius: 4px; background: var(--line-strong); margin: 10px auto 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px 4px; }
.sheet-head h2 { font-size: 17px; }
.sheet-body { padding: 10px 18px 18px; overflow-y: auto; }
.sheet-actions { display: flex; gap: 10px; padding: 0 18px 18px; }
.sheet-actions .btn { flex: 1; }

/* ---------- home ---------- */

.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.page-head h1 { font-size: 23px; font-weight: 800; letter-spacing: -.01em; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--brand-050); color: var(--brand-ink);
  display: grid; place-items: center; border: 1px solid var(--brand-100);
}

.status-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.s-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1px solid var(--line);
  padding: 6px 11px; border-radius: 999px;
}
.s-chip .ic { width: 14px; height: 14px; }
.s-chip.ok { color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, var(--line)); background: var(--success-bg); }
.s-chip.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, var(--line)); background: var(--warn-bg); }

.cta-card {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  background: linear-gradient(135deg, #1049B8 0%, var(--brand-deep) 85%);
  color: #fff; border-radius: 18px; padding: 18px;
  box-shadow: 0 10px 26px rgba(0, 61, 165, .32);
  transition: transform .14s ease, box-shadow .14s ease;
  position: relative; overflow: hidden;
}
.cta-card::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(420px 140px at 88% -20%, rgba(255,255,255,.22), transparent 60%);
  pointer-events: none;
}
.cta-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(0, 61, 165, .4); }
.cta-icon {
  width: 52px; height: 52px; border-radius: 15px; flex: none;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  display: grid; place-items: center;
}
.cta-icon .ic { width: 26px; height: 26px; }
.cta-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cta-text strong { font-size: 17px; font-weight: 800; }
.cta-text span { font-size: 13px; opacity: .85; }

.stat-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0 6px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 14px; box-shadow: var(--shadow-1);
}
.stat strong { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat.hot strong { color: var(--danger); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0 10px; }
.section-head h2 { font-size: 16.5px; font-weight: 800; }

.report-list { display: flex; flex-direction: column; gap: 10px; }
.report-card {
  display: flex; gap: 12px; padding: 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.report-card:hover { transform: translateY(-1px); border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.rc-thumb {
  width: 74px; height: 74px; flex: none; border-radius: 12px; overflow: hidden;
  background: var(--brand-050); color: var(--brand-ink);
  display: grid; place-items: center;
  border: 1px solid var(--line);
}
.rc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rc-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.rc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.rc-title { font-size: 14.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); font-weight: 600; }
.rc-meta span { display: inline-flex; align-items: center; gap: 4px; }
.rc-meta .ic { width: 13px; height: 13px; }
.rc-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }
.rc-time { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.rc-time .ic { width: 13px; height: 13px; }

.empty {
  text-align: center; padding: 42px 20px; color: var(--muted);
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.empty .ic.big { margin: 0 auto 10px; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }
.empty p { font-size: 13.5px; max-width: 380px; margin: 0 auto; }

/* search */
.search-box {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--line-strong);
  border-radius: var(--radius-s); padding: 0 13px;
  color: var(--muted);
}
.search-box input { flex: 1; border: 0; background: none; padding: 12px 0; font-size: 15px; }
.search-box input:focus { outline: none; }
.search-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }

/* ---------- wizard ---------- */

.wizard-top { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.wizard-progress { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; }
.wz-node { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 52px; }
.wz-dot {
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
  background: var(--surface-2); color: var(--muted);
  border: 1.6px solid var(--line-strong);
  transition: all .18s ease;
}
.wz-dot .ic { width: 14px; height: 14px; }
.wz-node.active .wz-dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.wz-node.done .wz-dot { background: var(--success); border-color: var(--success); color: #fff; }
.wz-name { font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.wz-node.active .wz-name { color: var(--brand-ink); }
.wz-line { width: 18px; height: 2px; background: var(--line-strong); border-radius: 2px; margin-bottom: 16px; }

.wizard-body { min-height: 300px; }
.wizard-foot {
  display: flex; gap: 10px; margin-top: 18px;
  position: sticky; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 10px);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px;
  box-shadow: var(--shadow-2);
  z-index: 5;
}
@media (min-width: 1024px) { .wizard-foot { bottom: 12px; } }
.wizard-foot .btn { flex: 1; }

/* viewfinder */
.viewfinder {
  position: relative; border-radius: 20px; overflow: hidden;
  background: #0c1017; aspect-ratio: 3 / 4; max-height: 58dvh;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
  display: grid; place-items: center;
  width: 100%;
}
.viewfinder video, .viewfinder img { width: 100%; height: 100%; object-fit: cover; }
.viewfinder.has-photo { aspect-ratio: auto; max-height: 58dvh; background: #0c1017; }
.viewfinder.has-photo img { object-fit: contain; max-height: 58dvh; }
.vf-grid {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px) 0 0 / 100% 33.4%,
    linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px) 0 0 / 33.4% 100%;
  mask-image: radial-gradient(120% 100% at 50% 50%, #000 60%, transparent);
}
.vf-state, .vf-fallback {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  color: #c7d2e4; text-align: center; padding: 24px;
  background: linear-gradient(180deg, #10151d, #0a0e14);
}
.vf-fallback h3 { color: #fff; }
.vf-fallback p { font-size: 13.5px; max-width: 300px; color: #97a5bd; }

.capture-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 10px 6px; gap: 6px;
}
.cap-side {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  color: var(--muted); font-size: 11.5px; font-weight: 700;
  width: 74px; padding: 6px 0; border-radius: 12px; cursor: pointer;
}
.cap-side:hover { color: var(--ink); background: var(--surface-2); }
.cap-side.active { color: var(--warn); }
.cap-side.ghosted { visibility: hidden; }
.shutter {
  width: 74px; height: 74px; border-radius: 50%;
  border: 4px solid var(--brand);
  display: grid; place-items: center;
  background: transparent;
  transition: transform .1s ease;
}
.shutter span {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(160deg, #1D5FD6, var(--brand-deep));
  box-shadow: 0 4px 14px rgba(0, 71, 186, .45);
  transition: transform .1s ease;
}
.shutter:active span { transform: scale(.88); }
.shutter:disabled { border-color: var(--line-strong); }
.shutter:disabled span { background: var(--line-strong); box-shadow: none; }

/* location step */
.row-i { display: flex; align-items: center; gap: 12px; }
.row-i strong { display: block; font-size: 14.5px; }
.row-i small { color: var(--muted); font-size: 12.5px; }
.row-i > .ic { color: var(--brand-ink); }
.dot-pulse {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  background: var(--warn);
  animation: pulse 1.6s ease-in-out infinite;
}
.dot-pulse.ok { background: var(--success); }
.dot-pulse.off { background: var(--line-strong); animation: none; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 35%, transparent); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

.tag-scan {
  display: flex; align-items: center; gap: 13px; width: 100%; text-align: left;
  background: linear-gradient(135deg, var(--brand-050), color-mix(in srgb, var(--brand-050) 55%, var(--surface)));
  border: 1.4px solid color-mix(in srgb, var(--brand) 45%, var(--line));
  color: var(--brand-ink);
  border-radius: var(--radius); padding: 14px 16px;
  transition: transform .12s ease, box-shadow .12s ease;
}
.tag-scan:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.tag-scan > .ic:first-child { width: 30px; height: 30px; }
.tag-scan span { flex: 1; font-size: 13px; line-height: 1.35; color: var(--ink-2); }
.tag-scan strong { color: var(--brand-ink); font-size: 14.5px; }

.floor-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 7px; max-height: 216px; overflow-y: auto;
  padding: 4px; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface-2);
  scroll-behavior: smooth;
}
.floor-chip {
  padding: 11px 0; border-radius: 10px; text-align: center;
  background: var(--surface); border: 1px solid var(--line-strong);
  font-weight: 700; font-size: 14px; color: var(--ink-2);
  transition: all .1s ease;
}
.floor-chip:hover { border-color: var(--brand); color: var(--brand-ink); }
.floor-chip.suggest {
  border-color: var(--brand); border-style: dashed; color: var(--brand-ink);
  background: var(--brand-050);
  animation: suggest-pulse 1.8s ease-in-out infinite;
}
@keyframes suggest-pulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 25%, transparent); }
  50% { box-shadow: 0 0 0 5px transparent; }
}
.floor-chip.on {
  background: var(--brand); border-color: var(--brand); color: #fff;
  box-shadow: 0 4px 10px rgba(0, 71, 186, .35);
}
.assist-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700; color: var(--brand-ink);
  background: var(--brand-050); border: 1px solid var(--brand-100);
  border-radius: 999px; padding: 3px 9px;
}
.assist-pill .ic { width: 13px; height: 13px; }
.assist-note { font-size: 12.5px; color: var(--ink-2); background: var(--brand-050); border-radius: 9px; padding: 8px 11px; margin: 2px 0 6px; }
.assist-note.muted { background: var(--surface-2); color: var(--muted); }

.confirm-strip {
  display: flex; align-items: center; gap: 10px;
  background: var(--success-bg); color: var(--success);
  border: 1px solid color-mix(in srgb, var(--success) 30%, transparent);
  border-radius: var(--radius-s); padding: 11px 14px;
  font-size: 13.5px;
}
.confirm-strip.tag { background: var(--brand-050); color: var(--brand-ink); border-color: var(--brand-100); }
.confirm-strip span { color: var(--ink-2); }
.confirm-strip strong { color: inherit; }

/* scan sheet */
.scan-frame {
  position: relative; border-radius: 18px; overflow: hidden;
  aspect-ratio: 1; background: #0c1017; display: grid; place-items: center;
}
.scan-frame video { width: 100%; height: 100%; object-fit: cover; }
.scan-reticle { position: absolute; inset: 14%; pointer-events: none; }
.scan-reticle i {
  position: absolute; width: 34px; height: 34px;
  border: 3.5px solid #fff; border-radius: 3px; opacity: .95;
}
.scan-reticle i:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-top-left-radius: 12px; }
.scan-reticle i:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-top-right-radius: 12px; }
.scan-reticle i:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-bottom-left-radius: 12px; }
.scan-reticle i:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-bottom-right-radius: 12px; }
.scan-beam {
  position: absolute; left: 6%; right: 6%; top: 0; height: 2.5px;
  background: linear-gradient(90deg, transparent, #6EE7B7, transparent);
  animation: beam 2.2s ease-in-out infinite;
}
@keyframes beam { 0%, 100% { top: 4%; } 50% { top: 94%; } }

/* analysis step */
.analyze-hero { position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-2); }
.analyze-hero img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.analyze-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 14, 24, .25), rgba(8, 14, 24, .78));
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  color: #fff; text-align: center;
}
.analyze-overlay small { color: #B9C6DC; }
.ai-orb {
  width: 46px; height: 46px; border-radius: 50%;
  background: conic-gradient(from 0deg, #5EA0FF, #9F7CFF, #5EDFFF, #5EA0FF);
  animation: spin 1.6s linear infinite;
  position: relative;
}
.ai-orb::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: rgba(8, 14, 24, .85); }

.analyze-thumb-row { display: flex; gap: 12px; align-items: flex-start; }
.analyze-thumb-row img { width: 86px; height: 86px; object-fit: cover; border-radius: 14px; border: 1px solid var(--line); flex: none; }
.src-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 800; border-radius: 999px; padding: 4.5px 11px; margin-bottom: 5px;
}
.src-pill .ic { width: 14px; height: 14px; }
.src-pill.ai { background: linear-gradient(120deg, #EAE4FF, #DFF0FF); color: #4C36B8; }
:root[data-theme="dark"] .src-pill.ai { background: linear-gradient(120deg, #251d47, #12304d); color: #B4A5F5; }
.src-pill.heuristic { background: var(--warn-bg); color: var(--warn); }

.banner {
  display: flex; gap: 10px; align-items: center;
  border-radius: var(--radius-s); padding: 11px 14px; font-size: 13.5px;
}
.banner.danger { background: var(--danger-bg); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 25%, transparent); }
.banner span { color: var(--ink-2); }
.banner strong { color: inherit; }

.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.cat-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 11px 6px; border-radius: 12px;
  border: 1px solid var(--line-strong); background: var(--surface);
  font-size: 11.5px; font-weight: 700; color: var(--ink-2); text-align: center;
  transition: all .1s ease; line-height: 1.15;
}
.cat-tile .ic { width: 21px; height: 21px; color: var(--muted); }
.cat-tile:hover { border-color: var(--brand); }
.cat-tile.on { background: var(--brand-050); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 1px var(--brand) inset; }
.cat-tile.on .ic { color: var(--brand); }

.route-line { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); margin-top: 8px; }
.route-line .ic { width: 15px; height: 15px; color: var(--brand-ink); }
.route-line strong { color: var(--ink); }

.rec-box {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--info-bg); border-radius: var(--radius-s); padding: 11px 13px;
  font-size: 13px; color: var(--ink-2);
}
.rec-box .ic { color: var(--info); width: 17px; height: 17px; margin-top: 1px; }

/* review step */
.review-photo { width: 100%; aspect-ratio: 16/8; object-fit: cover; }
.review-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.review-title h3 { font-size: 17px; line-height: 1.3; }
.review-desc { font-size: 13.5px; color: var(--ink-2); }
.kv-grid { display: grid; gap: 12px; }
.kv { display: flex; gap: 10px; align-items: flex-start; }
.kv > .ic { color: var(--brand-ink); margin-top: 2px; width: 18px; height: 18px; }
.kv small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.kv strong { font-size: 14px; }
.src-line { text-transform: none !important; letter-spacing: 0 !important; font-weight: 600 !important; color: var(--success) !important; }

/* success */
.success { text-align: center; padding: 44px 16px 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.success-ring {
  width: 92px; height: 92px; border-radius: 50%;
  background: var(--success-bg); color: var(--success);
  display: grid; place-items: center;
  animation: pop .4s cubic-bezier(.2, 1.4, .4, 1);
  border: 2px solid color-mix(in srgb, var(--success) 35%, transparent);
}
.success-ring .ic { width: 42px; height: 42px; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
.success h2 { font-size: 22px; }
.success-id { font-size: 16px; font-weight: 700; color: var(--brand-ink); background: var(--brand-050); padding: 5px 14px; border-radius: 999px; }
.success-sub { color: var(--muted); font-size: 14px; line-height: 1.5; }
.calib-note {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 12.5px; color: var(--brand-ink);
  background: var(--brand-050); border-radius: 999px; padding: 7px 14px;
}
.calib-note .ic { width: 15px; height: 15px; }

/* ---------- detail ---------- */

.detail-head { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 14px; }
.detail-title { font-size: 19px; line-height: 1.25; }
.detail-photo img { width: 100%; max-height: 320px; object-fit: cover; }
.detail { display: flex; flex-direction: column; gap: 12px; }
.detail-badges { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 10px; }
.detail-desc { font-size: 14.5px; color: var(--ink-2); }
.detail-notes { font-size: 13.5px; color: var(--muted); margin-top: 8px; }
.loc-card { display: flex; gap: 16px; align-items: center; }
.tower { width: 46px; height: 82px; flex: none; }

.timeline { display: flex; flex-direction: column; margin-top: 6px; }
.tl-row { display: flex; gap: 12px; }
.tl-rail { display: flex; flex-direction: column; align-items: center; }
.tl-dot {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 2px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; color: #fff;
}
.tl-dot .ic { width: 12px; height: 12px; }
.tl-bar { width: 2px; flex: 1; min-height: 22px; background: var(--line-strong); margin: 3px 0; }
.tl-row.done .tl-dot { background: var(--success); border-color: var(--success); }
.tl-row.done .tl-bar { background: var(--success); }
.tl-row.current .tl-dot { box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 20%, transparent); }
.tl-body { padding-bottom: 16px; }
.tl-body strong { display: block; font-size: 14px; }
.tl-body small { color: var(--muted); font-size: 12.5px; }
.tl-note { display: block; }
.tl-row:not(.done) .tl-body strong { color: var(--muted); font-weight: 600; }

/* ---------- tools ---------- */

.page > section { margin-bottom: 14px; }
.switch-row { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 4px 0; }
.switch-row > div { flex: 1; }
.switch-row strong { font-size: 14.5px; display: block; }
.switch-row small { color: var(--muted); font-size: 12.5px; }
.switch-row input { display: none; }
.switch {
  width: 46px; height: 27px; border-radius: 999px; flex: none;
  background: var(--line-strong); position: relative;
  transition: background .16s ease;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 21px; height: 21px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
  transition: transform .16s ease;
}
.switch-row input:checked + .switch { background: var(--success); }
.switch-row input:checked + .switch::after { transform: translateX(19px); }

.calib-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.calib-row strong { font-size: 14px; display: block; }
.calib-row small { color: var(--muted); font-size: 12.5px; }

.qr-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0 2px; }
.qr-url { color: var(--muted); word-break: break-all; text-align: center; font-size: 11px !important; }

/* physical tag card */
.tag-card {
  width: 250px; background: #fff; color: #0B1B33;
  border: 1.6px solid #0B2F6B; border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-1);
}
.tag-stripe { height: 5px; background: var(--stripe); }
.tag-head { display: flex; align-items: center; gap: 10px; padding: 9px 13px 5px; }
.tag-logo { height: 44px; width: auto; flex: none; }
.tag-head-text { display: flex; flex-direction: column; gap: 1px; }
.tag-brand { font-size: 12px; letter-spacing: .13em; color: #0B2F6B; }
.tag-brand b { font-weight: 800; }
.tag-scan-hint { font-size: 9.5px; letter-spacing: .06em; text-transform: uppercase; color: #5C6B85; }
.tag-body { display: flex; align-items: center; gap: 10px; padding: 4px 13px 8px; }
.tag-qr { flex: none; border: 1px solid #E3E9F2; border-radius: 8px; overflow: hidden; }
.tag-loc { display: flex; flex-direction: column; align-items: center; flex: 1; }
.tag-floor { font-size: 44px; font-weight: 800; line-height: 1; color: #0B2F6B; letter-spacing: -.02em; }
.tag-floor-word { font-size: 10px; letter-spacing: .34em; color: #5C6B85; margin-top: 2px; }
.tag-zone { margin-top: 6px; font-size: 11px; font-weight: 800; color: #0047BA; background: #EBF1FF; border-radius: 999px; padding: 2px 10px; letter-spacing: .08em; white-space: nowrap; }
.tag-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 13px; border-top: 1px solid #E3E9F2;
  font-size: 10px; color: #5C6B85; letter-spacing: .03em;
}

.install-steps { margin: 4px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }

/* ---------- print (tag sheets) ---------- */

.print-host { display: none; }
@media print {
  body * { visibility: hidden; }
  .print-host, .print-host * { visibility: visible; }
  .print-host { display: block; position: absolute; inset: 0; }
  .print-sheet {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8mm;
    padding: 10mm;
  }
  .tag-card.print { break-inside: avoid; width: 100%; box-shadow: none; }
}

/* ---------- login gate ---------- */

body[data-auth="out"] .appbar,
body[data-auth="out"] .tabbar,
body[data-auth="out"] .side-nav { display: none !important; }
body[data-auth="out"] .app { display: block; }
body[data-auth="out"] .view { padding: 0; }

.login {
  min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  padding-top: max(24px, env(safe-area-inset-top));
  background: radial-gradient(130% 80% at 50% -10%, var(--brand-050), var(--bg) 60%);
}
.login-card {
  width: 100%; max-width: 430px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.login-card.shake { animation: shake .4s; }
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}
.login-head {
  text-align: center; padding: 32px 24px 20px;
  background: linear-gradient(180deg, var(--brand-050), var(--surface));
  border-bottom: 1px solid var(--line);
}
.login-logo {
  width: 62px; height: 62px; margin: 0 auto 14px;
  background: #fff; border: 1px solid var(--brand-100); border-radius: 16px;
  display: grid; place-items: center; box-shadow: var(--shadow-1);
}
.login-logo img { width: 42px; height: 42px; }
.login-title { display: flex; align-items: center; gap: 9px; justify-content: center; }
.login-title strong { font-size: 21px; letter-spacing: .12em; color: var(--brand-deep); }
.login-title span { font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--brand-ink); }
.login-sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; letter-spacing: .03em; }

.login-body { padding: 22px 24px 18px; display: flex; flex-direction: column; gap: 14px; }
.login-body h2 { font-size: 15.5px; font-weight: 700; text-align: center; color: var(--ink-2); }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon > .ic:first-child { position: absolute; left: 12px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.input-icon input { width: 100%; padding-left: 40px; }
.pass-toggle {
  position: absolute; right: 7px; width: 32px; height: 32px;
  display: grid; place-items: center; color: var(--muted); border-radius: 8px;
}
.pass-toggle:hover { color: var(--ink); background: var(--surface-2); }
.login-or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.login-or::before, .login-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-error {
  background: var(--danger-bg); color: var(--danger);
  border-radius: 10px; padding: 9px 12px;
  font-size: 13px; font-weight: 600; text-align: center;
}
.login-hint { text-align: center; font-size: 12.5px; color: var(--muted); }
.linkish { color: var(--brand-ink); font-weight: 700; text-decoration: underline; }
.login-foot { text-align: center; }
.login-foot .brand-stripe { height: 3px; }
.login-foot span { display: block; padding: 11px; font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }

/* ---------- misc controls added later ---------- */

.card-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.assist-actions { display: flex; align-items: center; gap: 8px; }
.mini-btn {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  display: grid; place-items: center; color: var(--muted);
  border: 1px solid var(--line-strong); background: var(--surface);
  transition: color .12s ease, border-color .12s ease;
}
.mini-btn:hover { color: var(--brand-ink); border-color: var(--brand); }
.mini-btn .ic { width: 16px; height: 16px; }
.mini-btn.spinning .ic { animation: spin .8s linear infinite; }

.alt-reading {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--ink-2);
  background: var(--brand-050); border: 1px solid var(--brand-100);
  border-radius: 10px; padding: 9px 12px;
}
.alt-reading .ic { color: var(--brand-ink); width: 17px; height: 17px; flex: none; }
.alt-reading strong { color: var(--ink); }
.alt-reading.muted { background: var(--surface-2); border-color: var(--line); color: var(--muted); }
.alt-reading.muted .ic { color: var(--muted); }

.account-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.account-id { display: flex; align-items: center; gap: 11px; min-width: 0; }
.account-avatar {
  width: 40px; height: 40px; border-radius: 50%; flex: none;
  background: var(--brand-050); color: var(--brand-ink);
  display: grid; place-items: center; border: 1px solid var(--brand-100);
}
.account-id strong { font-size: 14px; display: block; word-break: break-all; }
.account-id small { color: var(--muted); font-size: 12px; }

/* ---------- motion & a11y ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; }
}
