/* ─────────────────────────────────────────────────────────────
   橋本商会ポータル — Design tokens & globals
   ───────────────────────────────────────────────────────────── */

:root {
  /* Background & surfaces — warm-leaning neutral */
  --bg: oklch(0.985 0.004 90);
  --bg-deep: oklch(0.965 0.006 85);
  --surface: #ffffff;
  --surface-2: oklch(0.975 0.005 85);
  --surface-3: oklch(0.955 0.008 85);

  /* Borders & dividers */
  --border: oklch(0.91 0.008 85);
  --border-strong: oklch(0.84 0.01 85);
  --divider: oklch(0.94 0.006 85);

  /* Text */
  --text: oklch(0.22 0.018 255);
  --text-2: oklch(0.42 0.016 255);
  --text-3: oklch(0.58 0.012 255);
  --text-4: oklch(0.72 0.008 255);

  /* Primary — deep navy (Variant A: modern operations) */
  --primary: oklch(0.36 0.13 255);
  --primary-hover: oklch(0.30 0.14 255);
  --primary-soft: oklch(0.95 0.025 255);
  --primary-soft-2: oklch(0.90 0.045 255);
  --on-primary: #ffffff;

  /* Brand teal accent (used in Variant B) */
  --accent: oklch(0.72 0.10 195);
  --accent-strong: oklch(0.60 0.11 195);
  --accent-soft: oklch(0.95 0.04 195);
  --accent-fg: oklch(0.32 0.10 195);

  /* Semantic */
  --success: oklch(0.55 0.13 155);
  --success-soft: oklch(0.94 0.04 155);
  --warning: oklch(0.72 0.15 75);
  --warning-soft: oklch(0.95 0.06 75);
  --danger: oklch(0.58 0.18 28);
  --danger-soft: oklch(0.95 0.05 28);
  --info: oklch(0.62 0.12 240);

  /* Type */
  --font-sans: "Noto Sans JP", -apple-system, "Hiragino Sans", "Yu Gothic UI", sans-serif;
  --font-num: "Inter", "Noto Sans JP", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, monospace;

  /* Density */
  --row-pad-y: 14px;
  --row-pad-x: 16px;
  --card-pad: 16px;
  --gap: 12px;

  /* Radii */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
}

[data-density="compact"] {
  --row-pad-y: 10px;
  --row-pad-x: 14px;
  --card-pad: 12px;
  --gap: 8px;
}

[data-font="biz"] {
  --font-sans: "BIZ UDPGothic", "Noto Sans JP", system-ui, sans-serif;
}
[data-font="zen"] {
  --font-sans: "Zen Kaku Gothic New", "Noto Sans JP", system-ui, sans-serif;
}

[data-primary="teal"] {
  --primary: oklch(0.42 0.10 200);
  --primary-hover: oklch(0.36 0.11 200);
  --primary-soft: oklch(0.94 0.025 200);
  --primary-soft-2: oklch(0.88 0.05 200);
}
[data-primary="forest"] {
  --primary: oklch(0.38 0.09 155);
  --primary-hover: oklch(0.32 0.10 155);
  --primary-soft: oklch(0.94 0.025 155);
  --primary-soft-2: oklch(0.88 0.045 155);
}
[data-primary="charcoal"] {
  --primary: oklch(0.30 0.015 255);
  --primary-hover: oklch(0.22 0.015 255);
  --primary-soft: oklch(0.94 0.005 255);
  --primary-soft-2: oklch(0.88 0.008 255);
}

/* ───── Variant B: Hashimoto Brand (Black + Teal) ───── */
[data-variant="brand"] {
  --bg: #ffffff;
  --bg-deep: oklch(0.97 0.003 230);
  --surface: #ffffff;
  --surface-2: oklch(0.975 0.003 230);
  --surface-3: oklch(0.95 0.005 230);

  --border: oklch(0.90 0.005 230);
  --border-strong: oklch(0.82 0.006 230);
  --divider: oklch(0.94 0.004 230);

  --text: #0b0d10;
  --text-2: oklch(0.34 0.008 230);
  --text-3: oklch(0.52 0.008 230);
  --text-4: oklch(0.68 0.006 230);

  --primary: #0b0d10;
  --primary-hover: #000000;
  --primary-soft: oklch(0.96 0.005 230);
  --primary-soft-2: oklch(0.92 0.006 230);
  --on-primary: #ffffff;

  /* Teal stays as decisive accent */
  --accent: #2BB0AC;
  --accent-strong: #1B8F8B;
  --accent-soft: oklch(0.95 0.04 195);
  --accent-fg: #1B7773;
}

/* Brand variant — typographic flavor */
[data-variant="brand"] {
  --font-display: "Helvetica Neue", "Inter", "Arial Black", sans-serif;
}

[data-variant="brand"] .brand-name { font-weight: 800; letter-spacing: 0.04em; }
[data-variant="brand"] .appbar h1 {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 28px;
}
[data-variant="brand"] .stat .v {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.03em;
}
[data-variant="brand"] .casekey-big {
  font-family: var(--font-mono);
  font-weight: 700;
}
[data-variant="brand"] .badge.intake { background: oklch(0.94 0.03 195); color: var(--accent-fg); }
[data-variant="brand"] .badge.intake .dot { background: var(--accent-strong); }
[data-variant="brand"] .chip.on {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--on-primary);
}
[data-variant="brand"] .filter-chip.on {
  background: var(--accent);
  color: var(--on-primary);
  border-color: var(--accent);
}
[data-variant="brand"] .btn.primary {
  box-shadow: 0 0 0 0 transparent, 0 4px 12px rgba(0,0,0,0.18);
  border-radius: 10px;
}
[data-variant="brand"] .btn { border-radius: 10px; }
[data-variant="brand"] .card { border-radius: 12px; }
[data-variant="brand"] .field { border-radius: 8px; }
[data-variant="brand"] .stat.accent {
  background: var(--primary);
}
[data-variant="brand"] .mic {
  background: var(--primary);
  box-shadow: 0 0 0 6px var(--surface-3),
              0 10px 30px rgba(0,0,0,0.22);
}
[data-variant="brand"] .mic.recording {
  background: var(--accent-strong);
  box-shadow: 0 0 0 6px var(--accent-soft),
              0 10px 30px oklch(0.50 0.10 195 / 0.30);
  animation: mic-pulse-brand 1.4s ease-in-out infinite;
}
@keyframes mic-pulse-brand {
  0%, 100% { box-shadow: 0 0 0 6px var(--accent-soft), 0 10px 30px oklch(0.50 0.10 195 / 0.30), 0 0 0 6px oklch(0.50 0.10 195 / 0.22); }
  50% { box-shadow: 0 0 0 6px var(--accent-soft), 0 10px 30px oklch(0.50 0.10 195 / 0.30), 0 0 0 18px oklch(0.50 0.10 195 / 0); }
}
[data-variant="brand"] .waveform.active .bar { background: var(--accent-strong); }
[data-variant="brand"] .tab-fab {
  background: var(--primary);
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.24), inset 0 0 0 1px rgba(255,255,255,0.06);
}
[data-variant="brand"] .field.ai-just-filled { animation: ai-fill-brand 0.6s ease both; }
@keyframes ai-fill-brand {
  0% { background: var(--accent-soft); transform: translateY(-2px); opacity: 0; }
  60% { background: var(--accent-soft); }
  100% { background: var(--surface); transform: translateY(0); opacity: 1; }
}

/* The hero "Always the best service." block — brand-only */
.hero-tagline {
  font-family: var(--font-display, "Helvetica Neue", Inter, sans-serif);
  font-weight: 900;
  font-size: 38px;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0;
}
.hero-tagline .accent { color: var(--accent-strong); }
.hero-sub {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-top: 8px;
}

/* ───── Resets ───── */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; font-family: var(--font-sans);
  color: var(--text); background: var(--bg);
  font-feature-settings: "palt" 1;
  font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.num, .mono { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }

/* ───── App stage ───── */
.stage {
  min-height: 100vh; display: grid; place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(1100px 700px at 80% -10%, oklch(0.95 0.04 255 / 0.5), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, oklch(0.95 0.02 85 / 0.7), transparent 60%),
    var(--bg-deep);
}

/* モバイル端末・PWA standalone モード用: iPhone フレームを外して全画面表示 */
.stage-fullscreen {
  min-height: 100dvh;
  display: block;
  padding: 0;
  background: var(--bg);
}
.fullscreen-shell {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  background: var(--bg);
  /* iOS safe-area + ノッチ対応 */
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
  overflow: hidden;
}
.fullscreen-shell > .screen { flex: 1; min-height: 0; }

/* ───── Screen scaffolding (inside iPhone) ───── */
.screen {
  display: flex; flex-direction: column; height: 100%;
  background: var(--bg);
  color: var(--text);
}
.screen-scroll {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.screen-scroll::-webkit-scrollbar { width: 4px; }
.screen-scroll::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

/* ───── Top app bar (per-screen) ───── */
.appbar {
  padding: 8px 16px 12px;
  background: var(--bg);
  position: relative;
}
.appbar-row { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.appbar h1 {
  margin: 6px 0 0; font-size: 24px; font-weight: 700; letter-spacing: -0.01em;
}
.appbar .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.appbar .icon-btn {
  width: 40px; height: 40px; border-radius: 12px;
  display: inline-grid; place-items: center;
  color: var(--text);
}
.appbar .icon-btn:active { background: var(--surface-3); }
.appbar.brand .brand-wrap {
  display: flex; align-items: center; gap: 10px;
}
.brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--primary);
  color: var(--on-primary);
  display: grid; place-items: center;
  font-weight: 800; font-size: 14px; letter-spacing: -0.02em;
}
.brand-name { font-weight: 700; font-size: 15px; letter-spacing: 0.02em; }
.brand-sub { font-size: 11px; color: var(--text-3); font-weight: 500; }

/* ───── Cards & sections ───── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--card-pad);
}
.card.flat { border-color: var(--divider); }
.section { padding: 0 16px; }
.section + .section { margin-top: 18px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin: 0 4px 8px;
}
.section-head h2 {
  margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  color: var(--text-3); text-transform: uppercase;
}
.section-head .more { font-size: 12px; color: var(--primary); font-weight: 600; }

/* ───── Buttons ───── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 18px; border-radius: 12px;
  font-weight: 600; font-size: 15px;
  background: var(--surface-2); color: var(--text);
  border: 1px solid var(--border);
  transition: transform .05s ease, background .15s ease;
}
.btn:active { transform: scale(0.98); }
.btn.primary {
  background: var(--primary); color: var(--on-primary); border-color: transparent;
  box-shadow: 0 1px 0 oklch(0.30 0.13 255 / 0.5), 0 4px 12px oklch(0.36 0.13 255 / 0.18);
}
.btn.primary:active { background: var(--primary-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--primary); }
.btn.danger { color: var(--danger); }
.btn.lg { height: 54px; font-size: 16px; }
.btn.block { width: 100%; }

/* Bottom sticky CTA */
.sticky-cta {
  position: sticky; bottom: 0; left: 0; right: 0;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(to top, var(--bg) 70%, transparent);
  z-index: 5;
}

/* ───── Form fields ───── */
.field {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 14px;
  display: flex; flex-direction: column; gap: 2px;
  position: relative;
  transition: border-color .15s ease, background .15s ease;
}
.field.low {
  border-color: oklch(0.78 0.13 75);
  background: linear-gradient(0deg, var(--warning-soft), var(--warning-soft)), var(--surface);
}
.field.empty {
  border-style: dashed;
  border-color: var(--border-strong);
  background: var(--surface-2);
}
.field-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-3); font-weight: 600; letter-spacing: 0.04em;
}
.field-label .req { color: var(--danger); }
.field-value { font-size: 16px; font-weight: 500; color: var(--text); line-height: 1.3; }
.field-value.placeholder { color: var(--text-4); font-weight: 400; }
.field input, .field textarea {
  border: none; outline: none; background: transparent;
  font-size: 16px; color: var(--text); padding: 0;
  width: 100%; resize: none;
}
.field .ai-pill {
  position: absolute; top: 8px; right: 10px;
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em;
  padding: 3px 6px; border-radius: 4px;
  background: var(--primary-soft); color: var(--primary);
  display: inline-flex; align-items: center; gap: 3px;
}
.field.low .ai-pill { background: oklch(0.92 0.08 75); color: oklch(0.45 0.13 60); }

/* Chip / multi-select */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; font-weight: 500; color: var(--text-2);
}
.chip.on {
  background: var(--primary-soft);
  border-color: oklch(0.70 0.10 255);
  color: var(--primary);
  font-weight: 600;
}
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Pill radio */
.pill-row {
  display: flex; gap: 0; padding: 4px;
  background: var(--surface-3); border-radius: 12px;
}
.pill-row > button {
  flex: 1; height: 36px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
}
.pill-row > button.on {
  background: var(--surface); color: var(--text);
  box-shadow: 0 1px 2px oklch(0 0 0 / 0.06), 0 1px 0 oklch(0 0 0 / 0.04);
}

/* ───── Status badge ───── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 999px; }
.badge.intake { background: var(--primary-soft); color: var(--primary); }
.badge.intake .dot { background: var(--primary); }
.badge.progress { background: var(--warning-soft); color: oklch(0.45 0.13 60); }
.badge.progress .dot { background: var(--warning); }
.badge.delivery { background: oklch(0.94 0.04 240); color: oklch(0.40 0.15 240); }
.badge.delivery .dot { background: oklch(0.55 0.15 240); }
.badge.done { background: var(--success-soft); color: oklch(0.40 0.13 155); }
.badge.done .dot { background: var(--success); }
.badge.cancel { background: var(--surface-3); color: var(--text-3); }
.badge.cancel .dot { background: var(--text-4); }

/* ───── Case Key (monospace) ───── */
.casekey {
  font-family: var(--font-mono);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.casekey-big {
  font-size: 28px; font-weight: 700; letter-spacing: 0.01em;
  color: var(--text);
  white-space: nowrap;
}

/* ───── List row ───── */
.list { background: var(--surface); border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--border); }
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: var(--row-pad-y) var(--row-pad-x);
  border-bottom: 1px solid var(--divider);
  background: var(--surface);
  text-align: left; width: 100%;
}
.list-row:last-child { border-bottom: none; }
.list-row:active { background: var(--surface-3); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .title { font-size: 15px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row .meta { font-size: 12px; color: var(--text-3); margin-top: 2px; display: flex; gap: 8px; align-items: center; }
.list-row .meta .sep { width: 3px; height: 3px; border-radius: 999px; background: var(--text-4); display: inline-block; }
.list-row .key { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }

/* ───── Stat tiles ───── */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: 14px;
  display: flex; flex-direction: column; gap: 4px;
}
.stat .label { font-size: 11px; color: var(--text-3); font-weight: 600; letter-spacing: 0.04em; }
.stat .v { font-family: var(--font-num); font-size: 28px; font-weight: 700; color: var(--text); letter-spacing: -0.02em; line-height: 1.1; }
.stat .sub { font-size: 11px; color: var(--text-3); }
.stat.accent { background: var(--primary); color: var(--on-primary); border-color: transparent; }
.stat.accent .label, .stat.accent .v, .stat.accent .sub { color: var(--on-primary); }
.stat.accent .label { opacity: 0.7; }
.stat.accent .sub { opacity: 0.8; }

/* ───── Mic button ───── */
.mic-wrap {
  display: flex; flex-direction: column; align-items: center;
  gap: 16px; padding: 6px 0;
}
.mic {
  width: 96px; height: 96px; border-radius: 999px;
  background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center;
  box-shadow:
    0 1px 0 oklch(0.30 0.13 255 / 0.5),
    0 10px 30px oklch(0.36 0.13 255 / 0.30),
    0 0 0 6px oklch(0.95 0.03 255);
  position: relative;
  transition: transform .12s ease;
}
.mic:active { transform: scale(0.96); }
.mic.recording {
  background: var(--danger);
  box-shadow:
    0 1px 0 oklch(0.45 0.18 28 / 0.4),
    0 10px 30px oklch(0.58 0.18 28 / 0.40),
    0 0 0 6px oklch(0.96 0.04 28);
  animation: mic-pulse 1.4s ease-in-out infinite;
}
@keyframes mic-pulse {
  0%, 100% { box-shadow: 0 1px 0 oklch(0.45 0.18 28 / 0.4), 0 10px 30px oklch(0.58 0.18 28 / 0.40), 0 0 0 6px oklch(0.96 0.04 28), 0 0 0 6px oklch(0.58 0.18 28 / 0.18); }
  50% { box-shadow: 0 1px 0 oklch(0.45 0.18 28 / 0.4), 0 10px 30px oklch(0.58 0.18 28 / 0.40), 0 0 0 6px oklch(0.96 0.04 28), 0 0 0 18px oklch(0.58 0.18 28 / 0.0); }
}

.waveform {
  display: flex; align-items: center; gap: 4px;
  height: 28px;
}
.waveform .bar {
  width: 4px; border-radius: 2px;
  background: var(--text-4);
  transition: height 0.12s ease, background 0.2s ease;
}
.waveform.active .bar { background: var(--danger); }

.mic-hint {
  font-size: 12px; color: var(--text-3); text-align: center;
  line-height: 1.5;
}
.mic-hint strong { color: var(--text-2); font-weight: 600; }

/* ───── Step indicator (case detail) ───── */
.stepper {
  display: flex; align-items: center;
  padding: 4px 0;
}
.stepper .node {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-3); font-weight: 600;
  position: relative;
}
.stepper .node.cur { color: var(--primary); }
.stepper .node.done { color: var(--text-2); }
.stepper .node.cur .dot { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.stepper .node.done .dot { background: var(--success); border-color: var(--success); color: var(--on-primary); }
.stepper .dot {
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--surface); border: 2px solid var(--border-strong);
  display: grid; place-items: center;
  font-family: var(--font-num); font-size: 12px; font-weight: 700;
  color: var(--text-3);
  z-index: 1;
}
.stepper .conn {
  flex: 1; height: 2px; background: var(--border); margin: 0 -8px; align-self: flex-start; margin-top: 13px;
}
.stepper .conn.done { background: var(--success); }

/* ───── Sheet / overlay ───── */
.scrim {
  position: absolute; inset: 0; background: oklch(0 0 0 / 0.4);
  z-index: 80; opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.scrim.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 90;
  background: var(--surface);
  border-top-left-radius: 20px; border-top-right-radius: 20px;
  transform: translateY(100%); transition: transform .28s cubic-bezier(0.2, 0.8, 0.2, 1);
  max-height: 80%; overflow-y: auto;
  box-shadow: 0 -10px 30px oklch(0 0 0 / 0.12);
}
.sheet.show { transform: translateY(0); }
.sheet-handle {
  width: 36px; height: 4px; border-radius: 999px; background: var(--border-strong);
  margin: 8px auto 4px;
}
.sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px 12px;
}
.sheet-title { font-size: 15px; font-weight: 700; }
.sheet-body { padding: 4px 16px 20px; }

/* ───── Tab bar (bottom) ───── */
.tabbar {
  display: flex; align-items: stretch;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 6px 12px calc(8px + env(safe-area-inset-bottom, 0));
  gap: 4px;
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 6px 4px; border-radius: 10px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--text-3);
}
.tab.on { color: var(--primary); }
.tab .ico { width: 24px; height: 24px; }
.tab-fab {
  width: 52px; height: 52px; border-radius: 16px;
  background: var(--primary); color: var(--on-primary);
  display: grid; place-items: center;
  margin: -10px 4px 0;
  box-shadow: 0 8px 18px oklch(0.36 0.13 255 / 0.30), 0 1px 0 oklch(0.30 0.13 255 / 0.5);
}

/* ───── Notification card ───── */
.notif {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface);
}
.notif .ico-wrap {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; flex-shrink: 0;
}
.notif .label { font-size: 13px; font-weight: 600; color: var(--text); }
.notif .meta { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.notif .check {
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 999px;
  background: var(--success); color: white;
  display: grid; place-items: center;
}

/* ───── Filter chip row ───── */
.filter-row {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 4px 16px 8px;
  -ms-overflow-style: none; scrollbar-width: none;
}
.filter-row::-webkit-scrollbar { display: none; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text-2);
  white-space: nowrap;
}
.filter-chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }

/* ───── Misc utilities ───── */
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.muted { color: var(--text-3); }
.text-xs { font-size: 11px; }
.text-sm { font-size: 13px; }
.bold { font-weight: 700; }
.tiny { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }

.divider { height: 1px; background: var(--divider); margin: 12px 0; }

.kbd-helper {
  font-size: 11px; padding: 4px 8px; border-radius: 4px;
  background: var(--surface-3); color: var(--text-3);
  font-family: var(--font-mono);
}

/* Animate fade-in for AI-filled fields */
@keyframes ai-fill {
  0% { opacity: 0; transform: translateY(-2px); background: var(--primary-soft); }
  60% { background: var(--primary-soft); }
  100% { opacity: 1; transform: translateY(0); background: var(--surface); }
}
.field.ai-just-filled .field-value { animation: ai-fill 0.5s ease both; }
.field.ai-just-filled { animation: ai-fill 0.6s ease both; }

/* Toast */
.toast {
  position: absolute; left: 50%; bottom: 88px; transform: translateX(-50%);
  background: var(--text); color: var(--bg);
  padding: 10px 16px; border-radius: 999px;
  font-size: 13px; font-weight: 500;
  z-index: 95;
  box-shadow: 0 8px 24px oklch(0 0 0 / 0.2);
  opacity: 0; transition: opacity .2s ease, transform .25s ease;
  transform: translate(-50%, 10px);
  pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%); }

/* Progress ring for case key copy */
.copy-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11px; color: var(--text-3); font-weight: 600;
  padding: 4px 10px; border-radius: 999px; background: var(--surface-3);
  border: 1px solid var(--border);
}
