/* ==========================================================================
   聆析 LINGXI — 管理端
   Warm paper, ink, persimmon. Editorial typography + quiet technical detail.
   ========================================================================== */

:root {
  --paper: #f2efe7;
  --paper-deep: #e9e4d8;
  --paper-soft: #f7f5ef;
  --card: #fbfaf6;
  --card-hover: #ffffff;
  --ink: #171b1d;
  --ink-2: #3d4448;
  --ink-3: #5f686c;
  --muted: #8a918f;
  --faint: #b5b8b1;
  --line: #ddd8ca;
  --line-strong: #c9c2b1;
  --accent: #df5530;
  --accent-deep: #b93d1c;
  --accent-soft: #f8e4dc;
  --teal: #226e61;
  --teal-soft: #dcebe5;
  --amber: #a87312;
  --amber-soft: #f6ecd2;
  --danger: #b3402e;
  --danger-soft: #f8e1dc;
  --sidebar: #15191a;
  --sidebar-2: #1d2223;
  --lime: #d9ef83;
  --white: #fff;
  --shadow-sm: 0 1px 2px rgba(23, 27, 29, 0.04), 0 4px 14px rgba(23, 27, 29, 0.03);
  --shadow-md: 0 2px 6px rgba(23, 27, 29, 0.05), 0 18px 44px rgba(23, 27, 29, 0.08);
  --shadow-lg: 0 24px 80px rgba(15, 18, 19, 0.22);
  --radius: 16px;
  --radius-sm: 10px;
  --font-body: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", "JetBrains Mono", Consolas, "Liberation Mono", monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --sidebar-w: 236px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-booting {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--accent);
  color: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 10px;
  left: 10px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  transform: translateY(-160%);
  transition: transform 0.2s;
}
.skip-link:focus {
  transform: translateY(0);
}

/* ── Boot ──────────────────────────────────────────────── */
.boot-screen {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  background: var(--sidebar);
  color: #f6f2e8;
}
.boot-screen__name {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.14em;
}
.boot-screen .spinner {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  border-color: rgba(247, 243, 233, 0.18);
  border-top-color: var(--accent);
}
.boot-screen .brand__mark {
  width: 46px;
  height: 46px;
}

/* ── Icons ─────────────────────────────────────────────── */
[data-icon] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
[data-icon] svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}
[data-icon="logo"] svg {
  width: 24px;
  height: 24px;
}

/* ── Type helpers ──────────────────────────────────────── */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: uppercase;
}
.eyebrow--light {
  color: var(--lime);
}
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--muted);
}
.serif {
  font-family: var(--font-display);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Brand ─────────────────────────────────────────────── */
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
}
.brand__mark {
  width: 38px;
  height: 38px;
  flex: none;
  filter: drop-shadow(0 5px 12px rgba(223, 85, 48, 0.22));
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.brand__text strong {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.brand__text em {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.34em;
  opacity: 0.5;
}
.brand--light {
  color: #f7f3e9;
}

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 9px 15px;
  border: 1px solid var(--btn-border);
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.18s var(--ease), background 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn[disabled] {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}
.btn [data-icon] svg {
  width: 16px;
  height: 16px;
}
.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  box-shadow: 0 5px 16px rgba(223, 85, 48, 0.22);
}
.btn--primary:hover {
  --btn-bg: var(--accent-deep);
}
.btn--dark {
  --btn-bg: var(--ink);
  --btn-fg: #f7f3e9;
}
.btn--dark:hover {
  --btn-bg: #2b3234;
}
.btn--ghost {
  --btn-bg: transparent;
  --btn-border: var(--line);
  --btn-fg: var(--ink-2);
}
.btn--ghost:hover {
  --btn-bg: var(--white);
  --btn-border: var(--line-strong);
}
.btn--soft {
  --btn-bg: var(--paper-deep);
  --btn-fg: var(--ink);
}
.btn--soft:hover {
  --btn-bg: #e0dacb;
}
.btn--danger {
  --btn-bg: var(--danger-soft);
  --btn-fg: var(--danger);
}
.btn--danger:hover {
  --btn-bg: #f3d1c9;
}
.btn--block {
  width: 100%;
  min-height: 46px;
  font-size: 14px;
}
.btn--sm {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
}
.btn--lg {
  min-height: 46px;
  padding: 12px 20px;
  font-size: 14px;
}
.btn.is-loading {
  pointer-events: none;
  opacity: 0.75;
}
.btn.is-loading::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--ink-3);
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.icon-btn:hover {
  background: var(--white);
  border-color: var(--line-strong);
  color: var(--ink);
}
.icon-btn[data-icon] svg {
  width: 17px;
  height: 17px;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 0;
  background: transparent;
  padding: 2px;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
}
.text-btn:hover {
  color: var(--accent-deep);
}
.text-btn [data-icon] svg {
  width: 14px;
  height: 14px;
}

/* ── Fields ────────────────────────────────────────────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.field__label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-2);
  letter-spacing: 0.01em;
}
.field__hint {
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}
.field__control {
  position: relative;
  display: flex;
  align-items: center;
}
.field__icon {
  position: absolute;
  left: 13px;
  color: var(--muted);
  pointer-events: none;
}
.field__icon svg {
  width: 16px;
  height: 16px;
}
.field__action {
  position: absolute;
  right: 7px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}
.field__action:hover {
  background: var(--paper);
  color: var(--ink);
}
.field__action svg {
  width: 16px;
  height: 16px;
}
.field input,
.field textarea,
.field select,
.input {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  font-size: 13.5px;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
.field input::placeholder,
.field textarea::placeholder,
.input::placeholder {
  color: #a7aaa3;
}
.field input:hover,
.field textarea:hover,
.field select:hover,
.input:hover {
  border-color: var(--line-strong);
}
.field input:focus,
.field textarea:focus,
.field select:focus,
.input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(223, 85, 48, 0.11);
  background: #fff;
}
.field input.has-icon {
  padding-left: 40px;
}
.field textarea {
  min-height: 112px;
  resize: vertical;
  line-height: 1.7;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23636b6d' stroke-width='1.6'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 14px;
  padding-right: 36px;
  cursor: pointer;
}
.form-error {
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.5;
}
.form-success {
  padding: 9px 12px;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 12.5px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Switch */
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch__track {
  position: relative;
  width: 40px;
  height: 23px;
  flex: none;
  border-radius: 999px;
  background: #d4cfc1;
  transition: background 0.22s var(--ease);
}
.switch__track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.22s var(--ease);
}
.switch input:checked + .switch__track {
  background: var(--teal);
}
.switch input:checked + .switch__track::after {
  transform: translateX(17px);
}
.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.switch__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.switch__text strong {
  font-size: 13px;
  font-weight: 600;
}
.switch__text span {
  font-size: 11.5px;
  color: var(--muted);
}

/* ── Login ─────────────────────────────────────────────── */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  background: var(--paper);
}
.login-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 44px 52px 32px;
  background:
    radial-gradient(900px 600px at 85% 18%, rgba(223, 85, 48, 0.24), transparent 62%),
    radial-gradient(700px 500px at 8% 92%, rgba(217, 239, 131, 0.08), transparent 60%),
    var(--sidebar);
  color: #f6f2e8;
}
.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.32'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
}
.login-visual__grid {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(247, 243, 233, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(247, 243, 233, 0.05) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), transparent 76%);
  pointer-events: none;
}
.login-visual .brand {
  position: relative;
  z-index: 1;
}
.login-visual__copy {
  position: relative;
  z-index: 1;
  max-width: 580px;
  margin-top: clamp(70px, 13vh, 150px);
}
.login-visual__copy h1 {
  margin-top: 20px;
  font-family: var(--font-display);
  font-size: clamp(38px, 4.3vw, 64px);
  font-weight: 500;
  line-height: 1.16;
  letter-spacing: -0.015em;
}
.underline-mark {
  position: relative;
  color: var(--lime);
  white-space: nowrap;
}
.underline-mark::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 7px;
  background: var(--accent);
  opacity: 0.7;
  z-index: -1;
  transform: skewX(-12deg);
  border-radius: 2px;
}
.login-visual__lede {
  max-width: 470px;
  margin-top: 26px;
  color: rgba(246, 242, 232, 0.62);
  font-size: 14.5px;
  line-height: 1.85;
}
.insight-float {
  position: relative;
  z-index: 1;
  width: min(460px, 92%);
  margin: auto 0 34px auto;
  padding: 19px 20px 16px;
  border: 1px solid rgba(247, 243, 233, 0.14);
  border-radius: 14px;
  background: linear-gradient(155deg, rgba(247, 243, 233, 0.1), rgba(247, 243, 233, 0.035));
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
  transform: rotate(-1.1deg);
}
.insight-float__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}
.spark-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--lime);
  color: #1b2117;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.insight-float__time {
  color: rgba(247, 243, 233, 0.45);
  font-family: var(--font-mono);
  font-size: 10px;
}
.insight-float > p {
  color: rgba(247, 243, 233, 0.9);
  font-family: var(--font-display);
  font-size: 15.5px;
  line-height: 1.65;
}
.insight-float__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  color: rgba(247, 243, 233, 0.62);
  font-size: 11.5px;
}
.insight-float__row b {
  margin-left: auto;
  color: rgba(247, 243, 233, 0.85);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
}
.mini-check {
  width: 12px;
  height: 12px;
  border: 1px solid rgba(217, 239, 131, 0.55);
  border-radius: 3px;
  flex: none;
}
.waveform-lines {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  margin-top: 15px;
  opacity: 0.38;
}
.waveform-lines i {
  display: block;
  flex: 1;
  height: var(--h);
  min-height: 3px;
  border-radius: 2px;
  background: var(--lime);
}
.login-visual__footer {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid rgba(247, 243, 233, 0.1);
  color: rgba(247, 243, 233, 0.32);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
}
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background:
    radial-gradient(700px 500px at 100% 0%, rgba(223, 85, 48, 0.06), transparent 60%),
    var(--paper);
}
.login-panel__inner {
  width: min(392px, 100%);
  animation: rise 0.7s var(--ease) both;
}
.login-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 34px;
}
.login-mobile-brand strong {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.06em;
}
.login-panel h2 {
  margin-top: 14px;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.login-panel__hint {
  margin-top: 9px;
  color: var(--muted);
  font-size: 13.5px;
}
.login-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
  margin-top: 34px;
}
.login-form .btn {
  margin-top: 6px;
}
.demo-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 28px;
  padding: 14px 15px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.42);
}
.demo-hint strong {
  font-size: 12px;
}
.demo-hint p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
.login-panel__foot {
  margin-top: 44px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.8;
}

/* ── Shell ─────────────────────────────────────────────── */
.shell {
  min-height: 100vh;
  display: flex;
}
.sidebar {
  position: fixed;
  z-index: 40;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  padding: 26px 18px 18px;
  background:
    radial-gradient(420px 300px at 30% 0%, rgba(223, 85, 48, 0.12), transparent 70%),
    var(--sidebar);
  color: rgba(247, 243, 233, 0.72);
}
.sidebar__brand {
  padding: 0 6px;
}
.nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 42px;
}
.nav__item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  color: rgba(247, 243, 233, 0.55);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.18s, background 0.18s;
}
.nav__item:hover {
  color: rgba(247, 243, 233, 0.9);
  background: rgba(247, 243, 233, 0.05);
}
.nav__item.is-active {
  color: #fff;
  background: rgba(247, 243, 233, 0.08);
}
.nav__item.is-active::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
}
.nav__icon {
  color: inherit;
  opacity: 0.86;
}
.nav__icon svg {
  width: 17px;
  height: 17px;
}
.nav__badge {
  margin-left: auto;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  background: rgba(247, 243, 233, 0.08);
  color: rgba(247, 243, 233, 0.52);
  font-family: var(--font-mono);
  font-size: 9.5px;
}
.nav__dot {
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px rgba(217, 239, 131, 0.12);
}
.sidebar__bottom {
  margin-top: auto;
}
.sidebar__note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 4px 14px;
  padding: 11px 10px;
  border-top: 1px solid rgba(247, 243, 233, 0.08);
  border-bottom: 1px solid rgba(247, 243, 233, 0.08);
}
.sidebar__note strong {
  display: block;
  color: rgba(247, 243, 233, 0.68);
  font-size: 10.5px;
  font-weight: 500;
}
.sidebar__note span:not(.pulse-dot) {
  display: block;
  margin-top: 1px;
  color: rgba(247, 243, 233, 0.32);
  font-size: 9.5px;
}
.pulse-dot {
  position: relative;
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: var(--lime);
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(217, 239, 131, 0.32);
  animation: pulse 2.4s ease-out infinite;
}
.user-card {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: rgba(247, 243, 233, 0.72);
  text-align: left;
  transition: background 0.18s;
}
.user-card:hover {
  background: rgba(247, 243, 233, 0.06);
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}
.user-card__text {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.user-card__text strong {
  font-size: 11.5px;
  font-weight: 600;
  color: rgba(247, 243, 233, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-card__text em {
  margin-top: 2px;
  font-size: 9px;
  font-style: normal;
  color: rgba(247, 243, 233, 0.32);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-card__icon {
  margin-left: auto;
  opacity: 0.35;
}
.user-card__icon svg {
  width: 14px;
  height: 14px;
}

.workspace {
  width: calc(100% - var(--sidebar-w));
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 12px 34px;
  border-bottom: 1px solid rgba(221, 216, 202, 0.8);
  background: rgba(242, 239, 231, 0.86);
  backdrop-filter: blur(14px);
}
.topbar__crumb {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.topbar__title {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.topbar__actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.env-badge {
  padding: 4px 8px;
  border: 1px solid rgba(168, 115, 18, 0.2);
  border-radius: 5px;
  background: var(--amber-soft);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
}
.view {
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: 34px 34px 60px;
  animation: view-in 0.4s var(--ease) both;
}
.view:focus {
  outline: none;
}

/* ── Page head ─────────────────────────────────────────── */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 26px;
}
.page-head__eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.page-head__eyebrow::before {
  content: "";
  width: 16px;
  height: 1px;
  background: var(--accent);
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: clamp(30px, 3.3vw, 42px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.page-head__sub {
  max-width: 550px;
  margin-top: 9px;
  color: var(--ink-3);
  font-size: 13px;
  line-height: 1.7;
}
.page-head__actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  padding-bottom: 4px;
}
.page-head__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11.5px;
}
.page-head__meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.page-head__meta [data-icon] svg {
  width: 13px;
  height: 13px;
}

/* ── Cards / layout ────────────────────────────────────── */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.card--flush {
  overflow: hidden;
}
.card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 19px 21px 0;
}
.card__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
}
.card__title .num {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
}
.card__sub {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
}
.card__body {
  padding: 18px 21px 21px;
}
.card__foot {
  padding: 13px 21px;
  border-top: 1px solid var(--line);
}
.grid {
  display: grid;
  gap: 18px;
}
.stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── Stats ─────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.stat-card {
  position: relative;
  overflow: hidden;
  padding: 18px 19px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.stat-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.stat-card__label {
  color: var(--ink-3);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.stat-card__icon {
  width: 29px;
  height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-3);
}
.stat-card__icon svg {
  width: 15px;
  height: 15px;
}
.stat-card__value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 17px;
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.stat-card__value small {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--muted);
}
.stat-card__foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 10.5px;
}
.stat-card__foot strong {
  color: var(--teal);
  font-weight: 600;
}
.stat-card--ink {
  border-color: var(--ink);
  background: var(--ink);
  color: #f7f3e9;
}
.stat-card--ink .stat-card__label {
  color: rgba(247, 243, 233, 0.55);
}
.stat-card--ink .stat-card__icon {
  background: rgba(247, 243, 233, 0.08);
  color: var(--lime);
}
.stat-card--ink .stat-card__value small {
  color: rgba(247, 243, 233, 0.42);
}
.stat-card--ink .stat-card__foot {
  color: rgba(247, 243, 233, 0.42);
}
.stat-card--ink .stat-card__foot strong {
  color: var(--lime);
}
.stat-card__bar {
  position: absolute;
  right: 16px;
  bottom: 14px;
  display: flex;
  gap: 3px;
  height: 20px;
  opacity: 0.28;
  align-items: flex-end;
}
.stat-card--ink .stat-card__bar {
  opacity: 0.55;
}
.stat-card__bar i {
  width: 3px;
  height: var(--h);
  border-radius: 2px;
  background: var(--accent);
}
.stat-card--ink .stat-card__bar i {
  background: var(--lime);
}
.ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: conic-gradient(var(--teal) calc(var(--p) * 1%), var(--paper-deep) 0);
  position: relative;
  flex: none;
}
.ring::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: var(--card);
}

/* ── Overview ──────────────────────────────────────────── */
.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);
  gap: 18px;
  margin-bottom: 18px;
}
.recent-list {
  margin-top: 6px;
}
.recent-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 13px 21px;
  border-top: 1px solid var(--line);
  transition: background 0.16s;
}
.recent-row:first-child {
  border-top: 0;
}
.recent-row:hover {
  background: var(--white);
}
.date-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-soft);
  color: var(--ink-3);
}
.date-chip strong {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}
.date-chip span {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}
.recent-row__main {
  min-width: 0;
}
.recent-row__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.recent-row__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  overflow: hidden;
  white-space: nowrap;
}
.recent-row__meta i {
  width: 2px;
  height: 2px;
  flex: none;
  border-radius: 50%;
  background: var(--faint);
}
.recent-row__side {
  display: flex;
  align-items: center;
  gap: 12px;
}
.recent-row__duration {
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  white-space: nowrap;
}
.recent-row__arrow {
  color: var(--faint);
  transition: transform 0.18s, color 0.18s;
}
.recent-row:hover .recent-row__arrow {
  color: var(--accent);
  transform: translateX(3px);
}
.recent-row__arrow svg {
  width: 15px;
  height: 15px;
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 9px;
  height: 140px;
  margin-top: 18px;
  padding: 0 2px;
  background: repeating-linear-gradient(
    to top,
    transparent 0,
    transparent calc(25% - 1px),
    rgba(221, 216, 202, 0.5) calc(25% - 1px),
    rgba(221, 216, 202, 0.5) 25%
  );
}
.chart__col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  height: 100%;
}
.chart__bar {
  width: 100%;
  max-width: 30px;
  max-height: 76%;
  height: var(--h);
  min-height: 4px;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(to top, var(--accent), #e97855);
  transition: filter 0.18s;
  transform-origin: bottom;
  animation: grow-bar 0.7s var(--ease) both;
}
.chart__col:hover .chart__bar {
  filter: brightness(1.08);
}
.chart__col.is-today .chart__bar {
  background: linear-gradient(to top, var(--ink), #3c4547);
}
.chart__label {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  white-space: nowrap;
}
.chart__col.is-today .chart__label {
  color: var(--ink);
  font-weight: 600;
}
.chart__count {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
}
.chart-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 11px;
  color: var(--muted);
  font-size: 10px;
}
.topics-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}
.topic-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-soft);
  color: var(--ink-2);
  font-size: 10.5px;
  transition: border-color 0.16s, background 0.16s;
}
.topic-pill:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.topic-pill b {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
}
.bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 18px;
}
.insight-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(500px 280px at 100% 0%, rgba(223, 85, 48, 0.24), transparent 60%),
    var(--sidebar);
  color: #f4f0e5;
  box-shadow: var(--shadow-md);
}
.insight-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -70px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(247, 243, 233, 0.08);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(247, 243, 233, 0.025), 0 0 0 70px rgba(247, 243, 233, 0.018);
  pointer-events: none;
}
.insight-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.insight-card__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
}
.insight-card__label svg {
  width: 13px;
  height: 13px;
}
.insight-card__date {
  color: rgba(247, 243, 233, 0.36);
  font-family: var(--font-mono);
  font-size: 9px;
}
.insight-card blockquote {
  position: relative;
  z-index: 1;
  margin: 18px 0 0;
  font-family: var(--font-display);
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.insight-card__text {
  position: relative;
  z-index: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 12px;
  color: rgba(247, 243, 233, 0.54);
  font-size: 12px;
  line-height: 1.75;
}
.insight-card__foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 22px;
}
.insight-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(247, 243, 233, 0.82);
  font-size: 11px;
  font-weight: 600;
}
.insight-card__link:hover {
  color: var(--lime);
}
.insight-card__link svg {
  width: 14px;
  height: 14px;
}
.mini-device-list {
  margin-top: 14px;
}
.mini-device {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.mini-device:first-child {
  border-top: 0;
}
.mini-device__icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-3);
}
.mini-device__icon svg {
  width: 15px;
  height: 15px;
}
.mini-device__main {
  min-width: 0;
  flex: 1;
}
.mini-device__main strong {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mini-device__main span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
  flex: none;
}
.status-dot.is-online {
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-soft);
}
.status-dot.is-warn {
  background: var(--amber);
  box-shadow: 0 0 0 3px var(--amber-soft);
}

/* ── Badges / chips ────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink-3);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}
.badge--done {
  background: var(--teal-soft);
  color: var(--teal);
}
.badge--running {
  background: var(--amber-soft);
  color: var(--amber);
}
.badge--running::before {
  animation: blink 1.2s ease-in-out infinite;
}
.badge--failed {
  background: var(--danger-soft);
  color: var(--danger);
}
.badge--pending {
  background: var(--paper-deep);
  color: var(--ink-3);
}
.badge--recording {
  background: rgba(223, 85, 48, 0.12);
  color: var(--accent);
}
.badge--recording::before {
  animation: blink 1.2s ease-in-out infinite;
}
.badge--plain {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}
.badge--plain::before {
  display: none;
}
.provider-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}
.provider-chip svg {
  width: 11px;
  height: 11px;
}
.chip-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

/* ── Tables ────────────────────────────────────────────── */
.table-card {
  overflow: hidden;
}
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.toolbar__group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.search-box {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 240px;
}
.search-box [data-icon] {
  position: absolute;
  left: 12px;
  color: var(--muted);
}
.search-box [data-icon] svg {
  width: 15px;
  height: 15px;
}
.search-box input {
  width: 100%;
  min-height: 38px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card);
  font-size: 12.5px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.search-box input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(223, 85, 48, 0.1);
  background: #fff;
}
.filter-pills {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--paper-deep);
}
.filter-pill {
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: background 0.16s, color 0.16s;
}
.filter-pill:hover {
  color: var(--ink);
}
.filter-pill.is-active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(23, 27, 29, 0.08);
}
.select-mini {
  min-height: 38px;
  padding: 7px 30px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background-color: var(--card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23636b6d' stroke-width='1.6'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 13px;
  color: var(--ink-2);
  font-size: 11.5px;
  appearance: none;
  cursor: pointer;
}
.table-wrap {
  overflow-x: auto;
}
table.data {
  width: 100%;
  border-collapse: collapse;
}
table.data th {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
table.data th:first-child,
table.data td:first-child {
  padding-left: 21px;
}
table.data th:last-child,
table.data td:last-child {
  padding-right: 21px;
}
table.data td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}
table.data tbody tr:hover {
  background: var(--white);
}
table.data tbody tr:last-child td {
  border-bottom: 0;
}
.rec-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 250px;
}
.rec-cell__icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: 9px;
  background: var(--paper);
  color: var(--accent);
}
.rec-cell__icon svg {
  width: 15px;
  height: 15px;
}
.rec-cell__main {
  min-width: 0;
}
.rec-cell__title {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 380px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rec-cell__meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  white-space: nowrap;
}
.rec-cell__meta i {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--faint);
}
.table-device {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-3);
  font-size: 10.5px;
  white-space: nowrap;
}
.table-device [data-icon] {
  color: var(--muted);
}
.table-device [data-icon] svg {
  width: 13px;
  height: 13px;
}
.table-mono {
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  white-space: nowrap;
}
.table-sub {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 8.5px;
}
.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--faint);
}
.row-actions svg {
  width: 15px;
  height: 15px;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 21px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
}
.pagination__buttons {
  display: flex;
  gap: 5px;
}
.pagination button {
  min-width: 29px;
  height: 29px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--ink-3);
  font-size: 10.5px;
}
.pagination button:hover:not([disabled]) {
  background: var(--white);
  border-color: var(--line-strong);
}
.pagination button[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Empty / loading ───────────────────────────────────── */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 58px 24px;
  text-align: center;
}
.empty__art {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 44px;
  margin-bottom: 18px;
  opacity: 0.5;
}
.empty__art i {
  width: 3px;
  height: var(--h);
  border-radius: 2px;
  background: var(--ink-3);
}
.empty h3 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 500;
}
.empty p {
  max-width: 340px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}
.empty .btn {
  margin-top: 18px;
}
.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--paper-deep);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  animation: shimmer 1.5s infinite;
}
.skeleton-line {
  height: 11px;
  margin-bottom: 9px;
}
.skeleton-line:nth-child(2) {
  width: 88%;
}
.skeleton-line:nth-child(3) {
  width: 64%;
}
.loading-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 240px;
  color: var(--muted);
  font-size: 12px;
}
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner--sm {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

/* ── Recording detail ──────────────────────────────────── */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
}
.back-link:hover {
  color: var(--accent);
}
.back-link svg {
  width: 14px;
  height: 14px;
}
.detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}
.detail-head__main {
  min-width: 0;
}
.detail-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.detail-title__edit {
  width: 30px;
  height: 30px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--faint);
  opacity: 0;
  transition: opacity 0.16s, background 0.16s, color 0.16s;
}
.detail-title:hover .detail-title__edit,
.detail-title__edit:focus-visible {
  opacity: 1;
}
.detail-title__edit:hover {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
}
.detail-title__edit svg {
  width: 14px;
  height: 14px;
}
.detail-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 13px;
  color: var(--muted);
  font-size: 10.5px;
}
.detail-meta__item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.detail-meta__item svg {
  width: 13px;
  height: 13px;
}
.detail-meta__sep {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--faint);
}
.detail-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 6px;
}
.menu-wrap {
  position: relative;
}
.menu {
  position: absolute;
  z-index: 50;
  right: 0;
  top: calc(100% + 6px);
  min-width: 190px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  box-shadow: var(--shadow-md);
  animation: pop 0.14s var(--ease) both;
}
.menu button,
.menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-2);
  font-size: 11.5px;
  text-align: left;
}
.menu button:hover,
.menu a:hover {
  background: var(--paper);
  color: var(--ink);
}
.menu button [data-icon] svg,
.menu a [data-icon] svg {
  width: 14px;
  height: 14px;
}
.menu .is-danger {
  color: var(--danger);
}
.menu__sep {
  height: 1px;
  margin: 4px 5px;
  background: var(--line);
}
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.9fr);
  gap: 20px;
  align-items: start;
}
.transcript-card {
  overflow: hidden;
}
.transcript-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 17px 21px;
  border-bottom: 1px solid var(--line);
}
.transcript-head__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  font-weight: 650;
}
.transcript-head__title .count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--paper);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 500;
}
.transcript-head__stats {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 9px;
}
.transcript {
  padding: 4px 21px 16px;
}
.segment {
  display: grid;
  grid-template-columns: 50px 30px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(221, 216, 202, 0.6);
}
.segment:last-child {
  border-bottom: 0;
}
.segment__time {
  padding-top: 4px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: -0.02em;
}
.segment__avatar {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  background: hsl(var(--hue, 25) 50% 91%);
  color: hsl(var(--hue, 25) 42% 33%);
  font-size: 9.5px;
  font-weight: 650;
}
.segment__body {
  min-width: 0;
}
.segment__speaker {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 3px;
  color: var(--ink-3);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
}
.segment__speaker span {
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 400;
}
.segment__text {
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.85;
}
.segment:hover .segment__text {
  color: var(--ink);
}
.segment__empty {
  color: var(--faint);
  font-style: italic;
}
.analysis-rail {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.analysis-card {
  overflow: hidden;
}
.analysis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 19px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(223, 85, 48, 0.055), transparent 60%);
}
.analysis-head__title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
}
.analysis-head__title .spark {
  width: 23px;
  height: 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
}
.analysis-head__title .spark svg {
  width: 13px;
  height: 13px;
}
.analysis-body {
  padding: 18px 19px 20px;
}
.summary-overview {
  padding-left: 12px;
  border-left: 2px solid var(--accent);
  color: var(--ink-2);
  font-family: var(--font-display);
  font-size: 13.5px;
  line-height: 1.8;
}
.summary-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 14px;
}
.summary-topics span {
  padding: 3px 7px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink-3);
  font-size: 8.5px;
}
.analysis-section {
  margin-top: 20px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}
.analysis-section__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.analysis-section__title b {
  color: var(--faint);
  font-weight: 400;
}
.key-point {
  display: flex;
  gap: 9px;
  padding: 7px 0;
}
.key-point__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  flex: none;
  margin-top: 1px;
  border-radius: 4px;
  background: var(--paper);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8px;
}
.key-point strong {
  display: block;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--ink-2);
}
.key-point p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
}
.decision-list li {
  position: relative;
  padding: 6px 0 6px 15px;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.65;
}
.decision-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 6px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 9px;
}
.action-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.action-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
}
.action-check {
  width: 14px;
  height: 14px;
  flex: none;
  margin-top: 1px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.action-check:hover {
  border-color: var(--teal);
}
.action-item.is-checked .action-check {
  border-color: var(--teal);
  background: var(--teal)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='white' stroke-width='2.2'%3E%3Cpath d='m3.5 8.5 3 3 6-7'/%3E%3C/svg%3E")
    center / 10px no-repeat;
}
.action-item.is-checked .action-text {
  color: var(--faint);
  text-decoration: line-through;
}
.action-text {
  min-width: 0;
  font-size: 10.5px;
  line-height: 1.55;
  color: var(--ink-2);
}
.action-meta {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8.5px;
}
.action-meta b {
  color: var(--ink-3);
  font-weight: 600;
}
.action-meta i {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--faint);
}
.quote-list li {
  padding: 8px 0 8px 13px;
  border-left: 1px solid var(--line-strong);
  color: var(--ink-3);
  font-family: var(--font-display);
  font-size: 11px;
  line-height: 1.7;
}
.quote-list li + li {
  margin-top: 3px;
}
.risk-list li,
.follow-list li {
  position: relative;
  padding: 5px 0 5px 14px;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.65;
}
.risk-list li::before {
  content: "!";
  position: absolute;
  left: 0;
  top: 5px;
  width: 11px;
  height: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--amber-soft);
  color: var(--amber);
  font-family: var(--font-mono);
  font-size: 7px;
  font-weight: 700;
}
.follow-list li::before {
  content: "↗";
  position: absolute;
  left: 0;
  top: 5px;
  color: var(--teal);
  font-size: 9px;
}
.analysis-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 19px;
  border-top: 1px solid var(--line);
  background: var(--paper-soft);
  color: var(--faint);
  font-size: 8.5px;
}
.analysis-foot .provider-chip {
  border: 0;
  padding: 0;
}
.analysis-warning {
  margin: 0 0 14px;
  padding: 9px 10px;
  border: 1px solid rgba(168, 115, 18, 0.22);
  border-radius: 7px;
  background: var(--amber-soft);
  color: #7d5810;
  font-size: 9.5px;
  line-height: 1.6;
}
.analysis-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 42px 22px;
  text-align: center;
}
.analysis-state__icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 13px;
  border-radius: 12px;
  background: var(--paper);
  color: var(--accent);
}
.analysis-state__icon svg {
  width: 20px;
  height: 20px;
}
.analysis-state h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}
.analysis-state p {
  max-width: 260px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}
.analysis-state .btn {
  margin-top: 16px;
}
.skeleton-analysis {
  padding: 18px 19px 22px;
}
.skeleton-analysis .skeleton {
  height: 10px;
  margin-bottom: 9px;
}
.skeleton-analysis .skeleton:nth-child(2) {
  width: 92%;
}
.skeleton-analysis .skeleton:nth-child(3) {
  width: 78%;
}
.skeleton-analysis .skeleton:nth-child(4) {
  width: 60%;
  margin-top: 22px;
}
.skeleton-analysis .skeleton:nth-child(5) {
  width: 85%;
}
.skeleton-analysis .skeleton:nth-child(6) {
  width: 70%;
}

/* ── Devices ───────────────────────────────────────────── */
.device-summary {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding: 13px 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(251, 250, 246, 0.6);
}
.device-summary__item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
}
.device-summary__item b {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
}
.device-summary__divider {
  width: 1px;
  height: 22px;
  background: var(--line);
}
.device-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 15px;
}
.device-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, transform 0.18s var(--ease), box-shadow 0.18s;
}
.device-card:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.device-card.is-offline {
  background: rgba(251, 250, 246, 0.55);
}
.device-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.device-icon {
  width: 39px;
  height: 39px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper-soft);
  color: var(--ink-3);
}
.device-icon svg {
  width: 19px;
  height: 19px;
}
.device-card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.03em;
}
.device-card__name {
  margin-top: 15px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}
.device-card__model {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}
.device-card__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 13px;
}
.device-card__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 17px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.device-card__stat strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}
.device-card__stat span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 8.5px;
}
.device-card__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 15px;
}
.device-card__last {
  color: var(--faint);
  font-size: 8.5px;
}
.platform-icon[data-platform="windows"] {
  background: #e8eef7;
  color: #2e5a94;
}
.platform-icon[data-platform="ios"] {
  background: #eeeee9;
  color: #4e5356;
}
.platform-icon[data-platform="android"] {
  background: #e3f1e6;
  color: #3c7d4b;
}
.platform-icon[data-platform="web"] {
  background: var(--accent-soft);
  color: var(--accent-deep);
}
.battery {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 8.5px;
}
.battery svg {
  width: 13px;
  height: 13px;
}

/* ── Settings ──────────────────────────────────────────── */
.settings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 20px;
  align-items: start;
}
.settings-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.settings-card {
  overflow: hidden;
}
.settings-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid var(--line);
}
.settings-card__title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 650;
}
.settings-card__title .settings-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-3);
}
.settings-icon svg {
  width: 15px;
  height: 15px;
}
.settings-card__sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}
.settings-card__body {
  display: flex;
  flex-direction: column;
  gap: 19px;
  padding: 21px 22px 23px;
}
.settings-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 22px;
  border-top: 1px solid var(--line);
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 9.5px;
}
.settings-aside {
  position: sticky;
  top: 92px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.tip-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
}
.tip-card h4 {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 650;
}
.tip-card h4 svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}
.tip-card p,
.tip-card li {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}
.tip-card p {
  margin-top: 7px;
}
.tip-card ul {
  margin-top: 7px;
}
.tip-card li {
  position: relative;
  padding: 3px 0 3px 11px;
}
.tip-card li::before {
  content: "·";
  position: absolute;
  left: 1px;
  color: var(--accent);
}
.key-state {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 8.5px;
}
.key-state .status-dot {
  width: 5px;
  height: 5px;
}
.settings-note {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.65;
}
.prompt-wrap {
  position: relative;
}
.prompt-counter {
  position: absolute;
  right: 10px;
  bottom: 8px;
  color: var(--faint);
  font-family: var(--font-mono);
  font-size: 8px;
}
.settings-savebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow-sm);
}
.settings-savebar span {
  color: var(--muted);
  font-size: 10px;
}
.settings-savebar .form-actions {
  gap: 7px;
}

/* ── Modal ─────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(18, 22, 23, 0.48);
  backdrop-filter: blur(5px);
  animation: fade 0.18s ease both;
}
.modal {
  width: min(520px, 100%);
  max-height: min(88vh, 820px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.26s var(--ease) both;
}
.modal--wide {
  width: min(580px, 100%);
}
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 0;
}
.modal__head h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.25;
}
.modal__head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}
.modal__close {
  width: 30px;
  height: 30px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}
.modal__close:hover {
  background: var(--paper);
  color: var(--ink);
}
.modal__close svg {
  width: 16px;
  height: 16px;
}
.modal__body {
  padding: 18px 22px 22px;
}
.modal__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line);
  background: var(--paper-soft);
}
.modal__foot--split {
  justify-content: space-between;
}
.pair-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 6px 0 14px;
}
.pair-code span {
  width: 42px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(23, 27, 29, 0.05);
}
.pair-code i {
  width: 8px;
  height: 1px;
  background: var(--line-strong);
}
.pair-expiry {
  text-align: center;
  color: var(--muted);
  font-size: 10px;
}
.pair-expiry strong {
  color: var(--accent);
  font-family: var(--font-mono);
  font-weight: 500;
}
.pair-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 18px;
}
.pair-step {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
}
.pair-step b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
}
.pair-step strong {
  display: block;
  font-size: 9.5px;
  font-weight: 650;
}
.pair-step span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.5;
}
.copy-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}
.copy-row input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-soft);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 9.5px;
}
.pair-waiting {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  padding: 9px 10px;
  border-radius: 7px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 9.5px;
}
.pair-waiting .spinner--sm {
  border-color: rgba(34, 110, 97, 0.25);
  border-top-color: var(--teal);
}
.pair-success {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
  padding: 12px;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 11px;
}
.pair-success strong {
  display: block;
  font-size: 11.5px;
}
.pair-success span {
  display: block;
  margin-top: 2px;
  color: rgba(34, 110, 97, 0.72);
  font-size: 9px;
}
.confirm-body {
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.75;
}
.confirm-body strong {
  color: var(--ink);
}
.menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.menu-list button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-2);
  font-size: 12px;
  text-align: left;
}
.menu-list button:hover {
  background: var(--paper);
}
.menu-list button [data-icon] svg {
  width: 16px;
  height: 16px;
}
.menu-list button.is-danger {
  color: var(--danger);
}
.menu-list button small {
  margin-left: auto;
  color: var(--faint);
  font-size: 9px;
}

/* ── Toast ─────────────────────────────────────────────── */
.toast-root {
  position: fixed;
  z-index: 120;
  right: 22px;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  max-width: min(360px, calc(100vw - 36px));
  padding: 11px 13px;
  border: 1px solid rgba(247, 243, 233, 0.12);
  border-radius: 9px;
  background: var(--ink);
  color: #f7f3e9;
  box-shadow: var(--shadow-md);
  font-size: 11.5px;
  line-height: 1.55;
  pointer-events: auto;
  animation: toast-in 0.26s var(--ease) both;
}
.toast [data-icon] {
  color: var(--lime);
  margin-top: 1px;
}
.toast [data-icon] svg {
  width: 14px;
  height: 14px;
}
.toast--error {
  background: #4a211a;
}
.toast--error [data-icon] {
  color: #f1a18c;
}
.toast.is-leaving {
  animation: toast-out 0.2s ease both;
}

/* ── Misc ──────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--line);
}
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.grow { flex: 1; }
.text-right { text-align: right; }
.nowrap { white-space: nowrap; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pop {
  from { opacity: 0; transform: translateY(-4px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(6px) scale(0.98); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes pulse {
  0% { transform: scale(0.6); opacity: 0.8; }
  80%, 100% { transform: scale(1.7); opacity: 0; }
}
@keyframes blink {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}
@keyframes shimmer {
  100% { transform: translateX(100%); }
}
@keyframes grow-bar {
  from { transform: scaleY(0.15); opacity: 0.4; }
  to { transform: scaleY(1); opacity: 1; }
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1180px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .overview-grid,
  .bottom-grid {
    grid-template-columns: 1fr;
  }
  .device-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .settings-layout {
    grid-template-columns: 1fr;
  }
  .settings-aside {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 1020px) {
  .detail-layout {
    grid-template-columns: minmax(0, 1fr) 330px;
  }
  .login-visual {
    padding: 36px 36px 28px;
  }
  .login-visual__copy {
    margin-top: 70px;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-w: 0px;
  }
  .sidebar {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 64px;
    flex-direction: row;
    align-items: center;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(247, 243, 233, 0.1);
    background: rgba(21, 25, 26, 0.97);
    backdrop-filter: blur(16px);
  }
  .sidebar__brand,
  .sidebar__bottom {
    display: none;
  }
  .nav {
    width: 100%;
    flex-direction: row;
    justify-content: space-around;
    gap: 2px;
    margin: 0;
  }
  .nav__item {
    flex: 1;
    flex-direction: column;
    gap: 3px;
    padding: 6px 4px;
    font-size: 9px;
    text-align: center;
    border-radius: 8px;
  }
  .nav__item.is-active::before {
    display: none;
  }
  .nav__item.is-active {
    color: var(--lime);
    background: rgba(247, 243, 233, 0.07);
  }
  .nav__badge,
  .nav__dot {
    display: none;
  }
  .nav__icon svg {
    width: 18px;
    height: 18px;
  }
  .workspace {
    width: 100%;
    margin-left: 0;
    padding-bottom: 72px;
  }
  .topbar {
    padding: 10px 20px;
  }
  .view {
    padding: 24px 20px 40px;
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .analysis-rail {
    position: static;
    order: -1;
  }
  .login {
    grid-template-columns: 1fr;
  }
  .login-visual {
    display: none;
  }
  .login-panel {
    min-height: 100vh;
  }
  .login-mobile-brand {
    display: flex;
  }
  .device-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .topbar__crumb {
    display: none;
  }
  .topbar__title {
    font-size: 16px;
  }
  .topbar__actions .env-badge {
    display: none;
  }
  .topbar__actions .icon-btn {
    display: none;
  }
  .topbar__actions .btn {
    min-height: 34px;
    padding: 8px 11px;
    font-size: 11.5px;
  }
  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .page-head__actions {
    width: 100%;
  }
  .page-head__actions .btn {
    flex: 1;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .stat-card {
    padding: 14px;
  }
  .stat-card__value {
    margin-top: 13px;
    font-size: 30px;
  }
  .stat-card__foot {
    margin-top: 10px;
    font-size: 9.5px;
  }
  .stat-card__bar {
    display: none;
  }
  .recent-row {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 12px 15px;
  }
  .recent-row__side {
    display: none;
  }
  .date-chip {
    width: 40px;
    height: 40px;
  }
  .card__head {
    padding: 16px 15px 0;
  }
  .card__body {
    padding: 15px;
  }
  .card__foot {
    padding: 12px 15px;
  }
  .toolbar {
    align-items: stretch;
  }
  .toolbar__group {
    width: 100%;
  }
  .search-box {
    min-width: 0;
    flex: 1;
  }
  .filter-pills {
    width: 100%;
    overflow-x: auto;
  }
  .filter-pill {
    flex: 1;
    text-align: center;
  }
  .table-wrap {
    overflow: visible;
  }
  table.data,
  table.data tbody,
  table.data tr,
  table.data td {
    display: block;
    width: 100%;
  }
  table.data thead {
    display: none;
  }
  table.data tbody tr {
    position: relative;
    padding: 14px 15px;
    border-top: 1px solid var(--line);
  }
  table.data tbody tr:first-child {
    border-top: 0;
  }
  table.data td {
    padding: 0;
    border: 0;
  }
  table.data td:first-child {
    padding-left: 0;
  }
  table.data td.cell-hide {
    display: none;
  }
  table.data td.cell-side {
    position: absolute;
    top: 16px;
    right: 15px;
    width: auto;
  }
  .rec-cell {
    padding-right: 72px;
  }
  .rec-cell__title {
    max-width: 100%;
  }
  .pagination {
    padding: 12px 15px;
  }
  .detail-head {
    flex-direction: column;
    gap: 14px;
  }
  .detail-actions {
    width: 100%;
  }
  .detail-actions > .btn,
  .detail-actions > .menu-wrap {
    flex: 1;
  }
  .detail-actions .btn {
    width: 100%;
  }
  .segment {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
  }
  .segment__avatar {
    display: none;
  }
  .segment__time {
    padding-top: 2px;
  }
  .transcript {
    padding: 4px 15px 12px;
  }
  .transcript-head {
    padding: 14px 15px;
  }
  .transcript-head__stats span:last-child {
    display: none;
  }
  .analysis-head,
  .analysis-body,
  .analysis-foot {
    padding-left: 15px;
    padding-right: 15px;
  }
  .device-grid {
    grid-template-columns: 1fr;
  }
  .settings-card__head,
  .settings-card__body {
    padding-left: 16px;
    padding-right: 16px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .settings-aside {
    grid-template-columns: 1fr;
  }
  .settings-savebar {
    flex-direction: column;
    align-items: stretch;
  }
  .settings-savebar .form-actions {
    justify-content: flex-end;
  }
  .pair-code span {
    width: 35px;
    height: 46px;
    font-size: 20px;
  }
  .pair-steps {
    grid-template-columns: 1fr;
  }
  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    border-bottom: 0;
    animation: sheet-in 0.28s var(--ease) both;
  }
  .modal__head {
    padding: 18px 18px 0;
  }
  .modal__body {
    padding: 16px 18px 20px;
  }
  .modal__foot {
    padding: 12px 18px calc(14px + env(safe-area-inset-bottom));
  }
  .toast-root {
    right: 12px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 12px;
    align-items: stretch;
  }
  .toast {
    max-width: none;
  }
  .insight-card {
    padding: 19px;
  }
  .insight-card blockquote {
    font-size: 19px;
  }
  .login-panel {
    padding: 30px 22px;
  }
  .login-form {
    margin-top: 26px;
  }
  .login-panel__foot {
    margin-top: 32px;
  }
}

@keyframes sheet-in {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
