:root {
  --bg: #09090b;
  --card: #111114;
  --card-2: #18181c;
  --surface: #111114;
  --surface-border: rgba(255, 255, 255, 0.07);
  --sep: rgba(255, 255, 255, 0.07);
  --nav-glass: rgba(9, 9, 11, 0.88);
  --text: #fafafa;
  --text-2: #a1a1aa;
  --text-3: #71717a;
  --green: #30D158;
  --red: #FF453A;
  --orange: #FF9F0A;
  --cyan: #64D2FF;
  --blue: #0A84FF;
  --yellow: #FFD60A;
  --purple: #BF5AF2;
  --accent: #30D158;
  --accent-rgb: 48, 209, 88;
  --radius-card: 16px;
  --radius-sm: 10px;
  --radius-pill: 9px;
  --avatar-radius: 8px;
  --chart-h: 170px;
  --text-base: 14px;
  --hero-size: 38px;
  --spring-bounce: cubic-bezier(0.22, 1, 0.36, 1);
  --spring-fluid: cubic-bezier(0.22, 1, 0.36, 1);
  --spring-snappy: cubic-bezier(0.22, 1, 0.36, 1);
  --anim-dur: 200ms;
  --glass-blur: 32px;
  --glass-sat: 200%;
  --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.085) 0%, rgba(255, 255, 255, 0.022) 48%, rgba(255, 255, 255, 0.045) 100%);
  --glass-card-bg: rgba(24, 24, 30, 0.58);
  --glass-rim: inset 0 1px 0.5px 0 rgba(255, 255, 255, 0.24), inset 0 -0.5px 0 0 rgba(255, 255, 255, 0.08), inset 0 0 0 0.5px rgba(255, 255, 255, 0.09);
  --glass-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.48);
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  --font-text: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
}

/* Glass Material Modes */
html[data-glass="liquid"] {
  --glass-blur: 32px;
  --glass-sat: 210%;
  --glass-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.095) 0%, rgba(255, 255, 255, 0.025) 48%, rgba(255, 255, 255, 0.05) 100%);
  --glass-card-bg: rgba(18, 20, 26, 0.54);
  --glass-rim: inset 0 1px 0.5px 0 rgba(255, 255, 255, 0.26), inset 0 -0.5px 0 0 rgba(255, 255, 255, 0.08), inset 0 0 0 0.5px rgba(255, 255, 255, 0.09);
  --glass-shadow: 0 16px 38px -10px rgba(0, 0, 0, 0.54);
}

html[data-glass="frosted"] {
  --glass-blur: 22px;
  --glass-sat: 150%;
  --glass-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.015) 100%);
  --glass-card-bg: rgba(17, 17, 21, 0.76);
  --glass-rim: inset 0 1px 0 0 rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.38);
}

html[data-glass="solid"] {
  --glass-blur: 0px;
  --glass-sat: 100%;
  --glass-bg: none;
  --glass-card-bg: var(--card);
  --glass-rim: none;
  --glass-shadow: none;
}

/* Animation Feel Presets */
html[data-anim="fluid"] { --anim-dur: 280ms; }
html[data-anim="snappy"] { --anim-dur: 190ms; }
html[data-anim="subtle"] { --anim-dur: 150ms; }

/* Surface Themes */
html[data-surface="phantom"] {
  --bg: #121215;
  --card: #1b1b20;
  --card-2: #24242b;
  --surface: #1b1b20;
  --surface-border: rgba(255, 255, 255, 0.08);
  --sep: rgba(255, 255, 255, 0.08);
  --nav-glass: rgba(18, 18, 21, 0.86);
}

html[data-surface="obsidian"] {
  --bg: #09090b;
  --card: #111114;
  --card-2: #18181c;
  --surface: #111114;
  --surface-border: rgba(255, 255, 255, 0.07);
  --sep: rgba(255, 255, 255, 0.07);
  --nav-glass: rgba(9, 9, 11, 0.88);
}

html[data-surface="oled"] {
  --bg: #000000;
  --card: #0a0a0c;
  --card-2: #141417;
  --surface: #0a0a0c;
  --surface-border: rgba(255, 255, 255, 0.08);
  --sep: rgba(255, 255, 255, 0.08);
  --nav-glass: rgba(0, 0, 0, 0.9);
}

html[data-surface="midnight"] {
  --bg: #070b14;
  --card: #0e1424;
  --card-2: #161f33;
  --surface: #0e1424;
  --surface-border: rgba(148, 163, 184, 0.13);
  --sep: rgba(148, 163, 184, 0.13);
  --nav-glass: rgba(7, 11, 20, 0.88);
}

html[data-surface="graphite"] {
  --bg: #111214;
  --card: #191b1f;
  --card-2: #22252b;
  --surface: #191b1f;
  --surface-border: rgba(255, 255, 255, 0.09);
  --sep: rgba(255, 255, 255, 0.09);
  --nav-glass: rgba(17, 18, 20, 0.9);
}

/* Apple System Accent Palette */
html[data-theme="emerald"] { --accent: #30D158; --accent-rgb: 48, 209, 88; }
html[data-theme="cruise"] { --accent: #0A84FF; --accent-rgb: 10, 132, 255; }
html[data-theme="sunset"] { --accent: #FF9F0A; --accent-rgb: 255, 159, 10; }
html[data-theme="indigo"] { --accent: #AB9FF2; --accent-rgb: 171, 159, 242; }
html[data-theme="rose"] { --accent: #FF375F; --accent-rgb: 255, 55, 95; }
html[data-theme="violet"] { --accent: #E5E5EA; --accent-rgb: 229, 229, 234; }

/* Corner Radii */
html[data-radius="sharp"] { --radius-card: 6px; --radius-sm: 5px; --radius-pill: 4px; }
html[data-radius="balanced"] { --radius-card: 16px; --radius-sm: 10px; --radius-pill: 9px; }
html[data-radius="rounded"] { --radius-card: 22px; --radius-sm: 14px; --radius-pill: 12px; }

/* Avatar Shape */
html[data-avatar-shape="square"] { --avatar-radius: 7px; }
html[data-avatar-shape="circle"] { --avatar-radius: 999px; }

/* Font Scale */
html[data-font-scale="sm"] { --text-base: 13px; --hero-size: 34px; }
html[data-font-scale="md"] { --text-base: 14px; --hero-size: 38px; }
html[data-font-scale="lg"] { --text-base: 15.5px; --hero-size: 42px; }

/* Chart Height */
html[data-chart-height="compact"] { --chart-h: 132px; }
html[data-chart-height="standard"] { --chart-h: 170px; }
html[data-chart-height="tall"] { --chart-h: 226px; }

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-text);
  font-size: var(--text-base);
  line-height: 1.45;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.num {
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

.app-shell {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  max-width: 600px;
  margin: 0 auto;
}

.sidebar {
  display: none;
}

.app-main-col {
  min-width: 0;
  padding-top: env(safe-area-inset-top);
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--nav-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--sep);
}

.nav-left {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.icon-btn {
  min-width: 38px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  padding: 0;
  position: relative;
  border-radius: var(--radius-sm);
  transition: color 140ms ease, background 140ms ease;
}

.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.avatar-btn {
  min-width: 38px;
  min-height: 38px;
}

.avatar-btn span {
  width: 28px;
  height: 28px;
  border-radius: var(--avatar-radius);
  background: var(--card-2);
  border: 1px solid var(--sep);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.01em;
}

.nav-title-btn {
  min-height: 40px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--font-text);
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}

.nav-title-btn .chev {
  color: var(--text-3);
}

.nav-actions {
  display: flex;
  align-items: center;
}

.nav-actions .icon-btn {
  min-width: 34px;
}

.icon-btn.is-active {
  color: var(--accent);
}

.bell-dot {
  position: absolute;
  top: 9px;
  right: 9px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--red);
}

.offline-banner {
  background: rgba(239, 68, 68, 0.14);
  border-bottom: 1px solid rgba(239, 68, 68, 0.35);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  padding: 10px 16px;
  text-align: center;
}

.offline-banner.auth-needed {
  background: var(--card);
  border-bottom: 1px solid rgba(245, 158, 11, 0.45);
}

.offline-banner-msg {
  margin-bottom: 8px;
}

.token-feedback {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 500;
  text-align: left;
}

.offline-banner .token-feedback {
  max-width: 480px;
  margin: 6px auto 0;
}

.card .token-feedback.err { color: var(--red); }
.card .token-feedback.ok { color: var(--green); }

.offline-token-row,
.token-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.offline-token-row {
  max-width: 480px;
  margin: 0 auto;
}

.offline-token-row .text-input,
.token-input-row .text-input {
  flex: 1;
  min-width: 0;
  font-size: 14px;
}

.main-content {
  padding: 0 16px 24px;
}

.tab-view {
  display: none;
}

.tab-view.active {
  display: block;
  animation: tabFadeIn 150ms ease;
}

@keyframes tabFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Skeleton */
.skeleton-stack {
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skel {
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: 10px;
  animation: skelPulse 1.2s ease-in-out infinite alternate;
}

.skel-hero { height: 76px; }
.skel-chart { height: 170px; }
.skel-screen { height: 160px; }

@keyframes skelPulse {
  from { opacity: 0.45; }
  to { opacity: 0.9; }
}

/* Minimal Home Header & Hero */
.home-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 12px;
}

.home-owner-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  color: var(--text-2);
}

.home-owner-tag {
  font-weight: 500;
  color: var(--text-2);
}

.meta-sep {
  color: var(--text-3);
}

.sync-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  cursor: pointer;
}

.icon-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 28px;
  min-height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--sep);
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.icon-chip-btn.wide {
  padding: 0 10px;
}

.hero-card {
  margin: 10px 0 10px;
  padding: 15px 16px 14px;
  border-radius: var(--radius-card);
  border: 1px solid var(--sep);
  background: linear-gradient(155deg, rgba(var(--accent-rgb), 0.06) 0%, var(--card) 52%);
}

.hero-block {
  padding: 0;
}

.hero-eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
}

.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--sep);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-2);
}

.mode-badge.live {
  border-color: rgba(var(--accent-rgb), 0.35);
  color: var(--text);
}

.mode-badge.paper {
  border-color: rgba(245, 158, 11, 0.32);
  color: var(--orange);
}

.hero-top-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hero-balance {
  font-family: var(--font-display);
  font-size: var(--hero-size);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.06;
  color: var(--text);
  display: inline-flex;
  align-items: baseline;
}

.odo-col {
  display: inline-block;
  overflow: hidden;
  height: 1.1em;
  line-height: 1.1em;
}

.odo-strip {
  display: flex;
  flex-direction: column;
  transition: transform 480ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .odo-strip { transition: none; }
}

.hero-sub-row {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
}

.hero-delta {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(48, 209, 88, 0.16);
  border: 1px solid rgba(48, 209, 88, 0.25);
  color: var(--green);
  font-weight: 600;
  font-size: 12px;
}

.hero-delta.neg {
  background: rgba(255, 69, 58, 0.16);
  border-color: rgba(255, 69, 58, 0.28);
  color: var(--red);
}

.hero-sub-label {
  color: var(--text-3);
}

.mult-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
}

.halt-banner {
  margin: 10px 0 4px;
  padding: 8px 12px;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--orange);
  font-size: 12.5px;
  font-weight: 500;
}

/* Charts & Range Bar */
.chart-card {
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: var(--radius-card);
  padding: 6px 12px 0;
  overflow: hidden;
}

.chart-wrap {
  width: 100%;
  height: var(--chart-h);
  margin-top: 2px;
}

.chart-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.range-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  border-top: 1px solid var(--sep);
  margin: 4px -12px 0;
}

.range-btn {
  min-height: 36px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: color 140ms ease, border-color 140ms ease;
}

.range-btn.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

/* Unified Hairline Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--sep);
  border: 1px solid var(--sep);
  border-radius: var(--radius-card);
  overflow: hidden;
  margin-bottom: 0;
}

@media (min-width: 520px) {
  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.stat-cell {
  background: var(--card);
  border: 0;
  padding: 10px 12px;
  min-width: 0;
  text-align: left;
  font-family: var(--font-text);
  color: var(--text);
}

button.stat-btn {
  cursor: pointer;
}

.stat-tile {
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: 8px;
  padding: 9px 11px;
  min-width: 0;
}

.stat-lbl {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-val {
  margin-top: 3px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-val.warn { color: var(--orange); }
.stat-val.ok { color: var(--green); }
.stat-val.neg { color: var(--red); }

/* Risk Guard Strip */
.risk-strip {
  width: 100%;
  min-height: 38px;
  margin: 0;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--sep);
  background: var(--card);
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-text);
  font-size: 11.5px;
  cursor: pointer;
  text-align: left;
}

.risk-strip-left {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  overflow: hidden;
}

.guardrails-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.guardrails-cta {
  color: var(--text-3);
  font-weight: 500;
  flex-shrink: 0;
  font-size: 11.5px;
}

/* Single-Row Quick Controls */
.quick-actions-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
}

.quick-pill {
  min-width: 0;
  min-height: 38px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--sep);
  background: var(--card);
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-pill:hover {
  color: var(--text);
}

.quick-pill.primary {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.4);
  color: var(--accent);
}

.quick-pill:disabled {
  opacity: 0.5;
  cursor: wait;
}

/* Execution Feed (Collapsible) */
.screen-card {
  background: var(--card);
  border-radius: var(--radius-card);
  overflow: hidden;
  border: 1px solid var(--sep);
  margin: 0;
}

.screen-toggle-hdr {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  background: transparent;
  border: 0;
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 12.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  text-align: left;
}

.screen-toggle-left {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.screen-toggle-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.screen-collapsible-body {
  border-top: 1px solid var(--sep);
}

.screen-frame-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  overflow: hidden;
  cursor: pointer;
}

.screen-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 150ms linear;
}

.screen-img.active {
  opacity: 1;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  display: inline-block;
  flex-shrink: 0;
}

.dot.red { background: var(--red); }
.dot.green { background: var(--green); }
.dot.orange { background: var(--orange); }
.dot.grey { background: var(--text-3); }

.dot.pulse {
  animation: dotPulse 2.2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.screen-footer {
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.screen-footer-text {
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.screen-checks {
  display: inline-flex;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  flex-shrink: 0;
}

.chk-pill {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--card-2);
  color: var(--text-2);
}

.chk-pill.ok { color: var(--green); }
.chk-pill.fail { color: var(--red); }

/* Sections & Carousels */
.section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 8px;
}

.section-hdr.top-pad {
  margin-top: 12px;
}

.section-hdr h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-2);
}

.page-title {
  margin: 0;
  padding: 12px 0 8px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.text-link-btn {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}

.text-link-btn:hover {
  color: var(--text);
}

.compact-link {
  min-height: 28px;
  padding: 0 4px;
  font-size: 12.5px;
}

.bot-carousel {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
}

.bot-carousel::-webkit-scrollbar { display: none; }

.bot-mini-card {
  flex: 0 0 196px;
  scroll-snap-align: start;
  background: var(--card);
  border-radius: 10px;
  padding: 11px 12px;
  border: 1px solid var(--sep);
  cursor: pointer;
}

.bot-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.bot-name {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-weight: 600;
  font-size: 13.5px;
}

.bot-sub {
  color: var(--text-2);
  font-size: 12px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pill-mono {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--card-2);
  border: 1px solid var(--sep);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-2);
}

.pill-mono.red {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.08);
}

.pill-mono.green {
  color: var(--green);
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.08);
}

.pill-mono.warn {
  color: var(--orange);
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.08);
}

.layer-strips {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  margin: 6px 0;
}

.layer-strip {
  height: 3px;
  border-radius: 2px;
  background: var(--card-2);
}

.layer-strip.ok { background: var(--green); }
.layer-strip.fail { background: var(--red); }

.strike-red {
  text-decoration: line-through;
  text-decoration-color: var(--red);
  color: var(--text-3);
}

/* Lists & Cards */
.list-card,
.card {
  background: var(--card);
  border-radius: var(--radius-card);
  border: 1px solid var(--sep);
  overflow: hidden;
}

.card {
  padding: 13px 14px;
}

.stack-12 {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.list-row {
  min-height: 54px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--sep);
  cursor: pointer;
}

.list-row:last-child {
  border-bottom: 0;
}

.row-main {
  min-width: 0;
  flex: 1;
}

.row-title {
  font-weight: 500;
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-sub {
  color: var(--text-3);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-right {
  text-align: right;
  flex-shrink: 0;
}

.row-val {
  font-weight: 600;
  font-size: 13px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--sep);
  background: var(--card-2);
  color: var(--text-2);
  text-decoration: none;
  font-size: 11.5px;
  font-weight: 500;
  flex-shrink: 0;
}

.empty-card {
  background: var(--card);
  border-radius: 10px;
  border: 1px solid var(--sep);
  padding: 20px 14px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

/* Drilldowns: Audit & Coin */
.subpage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 0;
}

.back-btn {
  min-height: 36px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
}

.subpage-title {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.audit-orb-wrap {
  position: relative;
  height: 196px;
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audit-beam {
  position: absolute;
  width: 1.5px;
  height: 84px;
  top: 50%;
  left: 50%;
  transform-origin: bottom center;
  background: var(--accent);
  opacity: 0.45;
  animation: auditSweep 4s linear infinite;
}

@keyframes auditSweep {
  from { transform: translate(-50%, -100%) rotate(0deg); }
  to { transform: translate(-50%, -100%) rotate(360deg); }
}

.audit-center {
  width: 62px;
  height: 62px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--sep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 13px;
  z-index: 2;
}

.audit-disc {
  position: absolute;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--sep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}

.audit-disc.ok { color: var(--green); border-color: rgba(16, 185, 129, 0.45); }
.audit-disc.fail { color: var(--red); border-color: rgba(239, 68, 68, 0.45); }

.coin-price-lg {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.metric-tile {
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: 8px;
  padding: 9px 10px;
}

.metric-lbl {
  color: var(--text-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-val {
  margin-top: 3px;
  font-weight: 600;
  font-size: 14px;
}

/* Buttons & Inputs */
.primary-btn,
.secondary-btn,
.danger-btn {
  width: 100%;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-family: var(--font-text);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.primary-btn.compact,
.secondary-btn.compact {
  width: auto;
  flex: 0 0 auto;
  padding: 0 12px;
  min-height: 36px;
}

.primary-btn {
  background: var(--text);
  color: var(--bg);
}

.secondary-btn {
  background: var(--card-2);
  border-color: var(--sep);
  color: var(--text);
}

.danger-btn {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--red);
}

.primary-btn:disabled,
.secondary-btn:disabled,
.danger-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.row-gap {
  display: flex;
  gap: 8px;
}

.text-input,
.search-input,
.select-input {
  width: 100%;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--sep);
  background: var(--bg);
  color: var(--text);
  padding: 7px 11px;
  font-family: var(--font-text);
  font-size: 13.5px;
}

.setting-item {
  padding: 11px 13px;
  border-bottom: 1px solid var(--sep);
}

.setting-item:last-child { border-bottom: 0; }

.setting-hdr {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.setting-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.setting-controls input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}

.setting-num {
  width: 78px;
  min-height: 34px;
  border-radius: 6px;
  border: 1px solid var(--sep);
  background: var(--bg);
  color: var(--text);
  padding: 4px 8px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* Floating Apple Liquid Glass Tabbar (Mobile) */
.tabbar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: calc(10px + env(safe-area-inset-bottom));
  z-index: 30;
  height: 60px;
  padding: 4px 6px;
  border-radius: 999px;
  background: var(--glass-bg), var(--nav-glass);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 2px;
}

.tab-btn {
  flex: 1;
  min-width: 0;
  height: 50px;
  padding: 0 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-family: var(--font-text);
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 240ms var(--spring-bounce), background 220ms ease, color 180ms ease, box-shadow 220ms ease;
}

.tab-btn svg {
  transition: transform 260ms var(--spring-bounce), color 180ms ease;
}

.tab-btn:active {
  transform: scale(0.92);
}

.tab-btn.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tab-btn.active svg {
  color: var(--accent);
  transform: translateY(-1px) scale(1.06);
}

/* Modals & Sheets */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 14px;
}

.sheet {
  width: 100%;
  max-width: 540px;
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: 14px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 82dvh;
  overflow-y: auto;
}

.sheet.tall { min-height: 55dvh; }

.sheet-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sheet h3 { margin: 0; font-size: 16px; font-weight: 600; }

.preset-row {
  display: flex;
  gap: 8px;
}

.preset-pct-btn {
  flex: 1;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid var(--sep);
  background: var(--card-2);
  color: var(--text);
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
}

.preset-pct-btn.active {
  border-color: var(--red);
  color: var(--red);
}

.fullscreen-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.fullscreen-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fs-img {
  width: 100%;
  max-height: 80dvh;
  object-fit: contain;
  border-radius: 10px;
}

.muted { color: var(--text-2); margin: 0; font-size: 13px; }
.form-error { color: var(--red); font-size: 12.5px; }

.toast {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-2);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  z-index: 80;
  max-width: calc(100vw - 32px);
  text-align: center;
}

/* Pipeline, Filters, Settings Accordion */
.pipeline-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 12px;
}

.pipeline-strip::-webkit-scrollbar { display: none; }

.pipe-step {
  flex: 1 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  background: var(--glass-bg), var(--glass-card-bg);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: transform 150ms var(--spring-bounce), border-color 180ms ease, color 160ms ease;
}

.pipe-step:hover {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.pipe-step:active {
  transform: scale(0.98);
}

.filter-row {
  display: flex;
  gap: 6px;
  margin: 2px 0 12px;
}

.filter-pill {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--sep);
  background: var(--card);
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.filter-pill.active {
  background: var(--card-2);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--text);
}

.optimizer-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.settings-search-wrap {
  position: sticky;
  top: 50px;
  z-index: 10;
  background: var(--bg);
  padding: 4px 0;
}

.settings-group {
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: 10px;
  overflow: hidden;
}

.settings-group-summary {
  list-style: none;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.settings-group-summary::-webkit-details-marker {
  display: none;
}

.settings-group-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.settings-group-title strong {
  font-size: 14px;
  font-weight: 600;
}

.settings-group-sub {
  font-size: 11.5px;
  color: var(--text-3);
}

.settings-group-right {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.settings-chev {
  color: var(--text-3);
  font-size: 15px;
  transition: transform 150ms ease;
}

.settings-group[open] .settings-chev {
  transform: rotate(90deg);
}

.settings-group-body {
  border-top: 1px solid var(--sep);
}

.setting-hint {
  color: var(--text-3);
  font-size: 11.5px;
  line-height: 1.35;
  margin-bottom: 7px;
}

.pos-sell-btn {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  font-family: var(--font-text);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

/* Copy Picks */
.copy-trader-card {
  padding: 12px 0;
  border-top: 1px solid var(--sep);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.copy-trader-card:first-child {
  border-top: 0;
  padding-top: 4px;
}

.copy-trader-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.copy-trader-id {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.copy-handle-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.copy-handle-link {
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}

.copy-metrics-row,
.copy-tokens-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.token-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--bg);
  border: 1px solid var(--sep);
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-2);
}

.copy-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.copy-toggle-lbl {
  font-size: 11.5px;
  color: var(--text-2);
  font-weight: 500;
}

.ios-switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.ios-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ios-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: background 220ms ease, border-color 220ms ease;
}

.ios-slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 2px;
  top: 2px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.38);
  transition: transform 240ms var(--spring-bounce), width 160ms ease;
}

.ios-switch:active .ios-slider::before {
  width: 22px;
}

.ios-switch input:checked + .ios-slider {
  background: #30D158;
  border-color: rgba(48, 209, 88, 0.8);
}

.ios-switch input:checked + .ios-slider::before {
  transform: translateX(18px);
}

.ios-switch.capped {
  opacity: 0.45;
}

.copy-signals-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--sep);
  padding-top: 10px;
}

.copy-signal-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0;
  border-top: 1px solid var(--sep);
  font-size: 12px;
}

.copy-signal-row:first-child {
  border-top: 0;
}

.signal-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  background: var(--card-2);
  color: var(--text-2);
}

.signal-status.copied { color: var(--green); }
.signal-status.pending_delay { color: var(--orange); }
.signal-status.skipped { color: var(--red); }
.signal-status.exited { color: var(--cyan); }

/* Minimal Private-Desk Check-in Overlay */
.welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--bg);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: calc(24px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom));
  opacity: 1;
  transition: opacity 0.16s ease;
}

.welcome-screen.leaving {
  opacity: 0;
}

.welcome-inner {
  max-width: 390px;
  width: 100%;
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}

.welcome-topbar {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
}

.welcome-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.welcome-monogram {
  width: 30px;
  height: 30px;
  border-radius: var(--avatar-radius);
  background: var(--card);
  border: 1px solid var(--sep);
  color: var(--text);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.welcome-greeting {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
}

.welcome-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 6px;
  background: var(--card);
  border: 1px solid var(--sep);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-2);
}

.welcome-checkin-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.welcome-balance-lg {
  margin: 0;
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
  color: var(--text);
}

.welcome-delta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.welcome-meta-strip {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid var(--sep);
  background: var(--card);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.45;
}

.welcome-note {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-3);
}

.welcome-auth-box {
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.welcome-auth-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.welcome-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 6px;
}

.welcome-cta {
  min-height: 44px;
  font-size: 14px;
  font-weight: 600;
}

.welcome-secondary-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

/* Themes, Segmented Controls, Presets & Personalize Studio */
.theme-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.theme-row.six-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theme-pill {
  min-width: 0;
  min-height: 36px;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--sep);
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.theme-pill.active {
  background: var(--card-2);
  border-color: rgba(var(--accent-rgb), 0.55);
  color: var(--text);
}

.theme-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.theme-dot.emerald { background: #30D158; }
.theme-dot.cruise { background: #0A84FF; }
.theme-dot.sunset { background: #FF9F0A; }
.theme-dot.indigo { background: #AB9FF2; }
.theme-dot.rose { background: #FF375F; }
.theme-dot.violet { background: #E5E5EA; }

.surface-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.surface-swatch {
  min-width: 0;
  padding: 7px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--sep);
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 10.5px;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.surface-swatch.active {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: var(--card-2);
  color: var(--text);
}

.swatch-preview {
  width: 100%;
  height: 20px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.swatch-obsidian { background: linear-gradient(135deg, #09090b 55%, #18181c 55%); }
.swatch-oled { background: linear-gradient(135deg, #000000 55%, #121215 55%); }
.swatch-midnight { background: linear-gradient(135deg, #070b14 55%, #161f33 55%); }
.swatch-graphite { background: linear-gradient(135deg, #111214 55%, #22252b 55%); }

.seg-control {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.08);
  gap: 2px;
  max-width: 100%;
}

.seg-btn {
  min-height: 28px;
  padding: 4px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.seg-btn.active {
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24), 0 3px 10px rgba(0, 0, 0, 0.32);
  color: var(--text);
}

.pref-lbl {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.pref-toggles-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--sep);
  padding-top: 2px;
}

.pref-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--sep);
}

.pref-row:first-child { border-top: 0; }

.pref-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

.pref-sub {
  font-size: 12px;
  color: var(--text-3);
}

.welcome-pref-row {
  border-top: 0;
  padding: 4px 2px 0;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.preset-card {
  min-width: 0;
  padding: 9px 8px;
  border-radius: 8px;
  border: 1px solid var(--sep);
  background: var(--bg);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.preset-card.active {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.45);
}

.preset-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.preset-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--text-3);
}

.settings-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-toolbar .search-input {
  flex: 1;
  min-width: 0;
}

/* Density & Reduced Motion */
html[data-density="compact"] .hero-balance { font-size: 34px; }
html[data-density="compact"] .stat-cell { padding: 8px 10px; }
html[data-density="compact"] .card { padding: 10px 12px; }
html[data-density="compact"] .list-row { min-height: 46px; padding: 7px 11px; }

html[data-motion="reduced"] .dot.pulse,
html[data-motion="reduced"] .tab-view.active { animation: none !important; }
html[data-motion="reduced"] .odo-strip,
html[data-motion="reduced"] .welcome-screen { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  .dot.pulse,
  .tab-view.active { animation: none; }
}

.bots-health-bar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.watch-btn {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid var(--sep);
  background: var(--card-2);
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.watch-btn.active {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--accent);
}

.sim-scenario-seg {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sim-scenario-seg .seg-btn {
  padding: 4px;
  font-size: 11.5px;
  white-space: nowrap;
}

.sim-slider-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sim-slider-group .s-range { width: 100%; }

.sim-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.sim-bar-track {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--sep);
  overflow: hidden;
}

.sim-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--green);
  transition: width 160ms ease;
}

.sim-bar-fill.neg { background: var(--red); }

.sim-streak-box {
  padding: 10px 11px;
  border-radius: 8px;
  background: var(--bg);
  border: 1px solid var(--sep);
}

.threat-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.threat-bar-track {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
}

.threat-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.threat-bar-fill.red { background: var(--red); }
.threat-bar-fill.orange { background: var(--orange); }
.threat-bar-fill.purple { background: var(--text-2); }
.threat-bar-fill.cyan { background: var(--cyan); }

.watchlist-row,
.note-row,
.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid var(--sep);
}

.watchlist-row:first-child,
.note-row:first-child,
.report-row:first-child { border-top: 0; }

.watchlist-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.mini-act-btn {
  min-height: 26px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid var(--sep);
  background: var(--card-2);
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 11px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.mini-act-btn.danger {
  color: var(--red);
  border-color: rgba(239, 68, 68, 0.3);
}

.report-body {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
  overflow-y: auto;
  word-break: break-word;
}

.report-body h1,
.report-body h2,
.report-body h3 {
  color: var(--text);
  margin: 12px 0 6px;
  font-size: 14.5px;
}

.report-body h1:first-child,
.report-body h2:first-child { margin-top: 0; }

.report-body ul {
  margin: 4px 0 10px;
  padding-left: 18px;
}

.report-body code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text);
  background: var(--card-2);
  padding: 1px 5px;
  border-radius: 4px;
}

.quick-jumps-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.quick-jump-btn {
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid var(--sep);
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.account-subtabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  margin-bottom: 12px;
}

.account-subtabs .seg-btn {
  min-height: 32px;
  font-size: 12.5px;
}

.tools-jump-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 10px;
  scrollbar-width: none;
}

.tools-jump-bar::-webkit-scrollbar { display: none; }

.jump-pill {
  flex-shrink: 0;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  border: 1px solid var(--sep);
  background: var(--card);
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.jump-pill.active {
  background: var(--card-2);
  border-color: rgba(var(--accent-rgb), 0.45);
  color: var(--text);
}

.risk-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--sep);
  border: 1px solid var(--sep);
  border-radius: 8px;
  overflow: hidden;
}

.risk-summary-cell {
  background: var(--bg);
  padding: 8px 10px;
}

/* Curated Intuitive Settings Layout (v15) */
.preset-list-v15 {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preset-row-card {
  width: 100%;
  padding: 11px 12px;
  border-radius: 8px;
  border: 1px solid var(--sep);
  background: var(--bg);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 140ms ease, background 140ms ease;
}

.preset-row-card.active {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.5);
}

.preset-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.preset-row-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13.5px;
  font-weight: 600;
}

.preset-rec-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(var(--accent-rgb), 0.14);
  color: var(--accent);
}

.preset-row-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.4;
}

.curated-list {
  display: flex;
  flex-direction: column;
}

.curated-setting-row {
  padding: 11px 0;
  border-top: 1px solid var(--sep);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.curated-setting-row:first-child {
  border-top: 0;
  padding-top: 2px;
}

.curated-setting-row:last-child {
  padding-bottom: 2px;
}

.curated-setting-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.curated-setting-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

.curated-setting-desc {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.35;
}

.curated-range {
  width: 100%;
  margin: 2px 0 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.adv-drawer {
  background: var(--card);
  border: 1px solid var(--sep);
  border-radius: 10px;
  overflow: hidden;
}

.adv-drawer-summary {
  list-style: none;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.adv-drawer-summary::-webkit-details-marker {
  display: none;
}

.adv-drawer[open] .settings-chev {
  transform: rotate(90deg);
}

.adv-drawer-body {
  padding: 0 12px 12px;
  border-top: 1px solid var(--sep);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.curated-val-badge {
  white-space: nowrap;
  flex-shrink: 0;
}


/* Responsive App Shell, Home Widgets & Personalize Studio (v16) */
.stack-14 {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wrap-row {
  flex-wrap: wrap;
}

.mono-short {
  max-width: 112px;
  text-transform: uppercase;
  font-family: var(--font-mono);
  text-align: center;
}

.select-compact {
  width: auto;
  min-width: 132px;
  min-height: 34px;
  padding: 5px 10px;
  font-size: 12.5px;
}

.home-widgets-host {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.home-widget {
  display: flex;
  flex-direction: column;
}

.home-widget .section-hdr {
  margin: 4px 0 8px;
}

.home-customize-footer {
  display: flex;
  justify-content: center;
  padding: 14px 0 4px;
}

.tools-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Personalize Studio Sections */
.pref-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-top: 12px;
  border-top: 1px solid var(--sep);
}

.pref-sec-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-3);
}

.widget-builder-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--sep);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
}

.widget-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-top: 1px solid var(--sep);
}

.widget-row:first-child {
  border-top: 0;
}

.widget-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.widget-row-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}

.widget-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.widget-move-btn {
  min-width: 28px;
  min-height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  border: 1px solid var(--sep);
  background: var(--card-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.widget-move-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Font Scale Refinements */
html[data-font-scale="sm"] .row-title,
html[data-font-scale="sm"] .curated-setting-name,
html[data-font-scale="sm"] .pref-title { font-size: 12.5px; }
html[data-font-scale="sm"] .page-title { font-size: 19px; }

html[data-font-scale="lg"] .row-title,
html[data-font-scale="lg"] .curated-setting-name,
html[data-font-scale="lg"] .pref-title { font-size: 15px; }
html[data-font-scale="lg"] .row-sub,
html[data-font-scale="lg"] .curated-setting-desc,
html[data-font-scale="lg"] .muted { font-size: 13.5px; }
html[data-font-scale="lg"] .page-title { font-size: 24px; }

/* Spacious Density */
html[data-density="spacious"] .hero-card { padding: 18px 20px; }
html[data-density="spacious"] .stat-cell { padding: 13px 15px; }
html[data-density="spacious"] .card { padding: 16px 18px; }
html[data-density="spacious"] .list-row { min-height: 60px; padding: 12px 15px; }
html[data-density="spacious"] .home-widgets-host { gap: 16px; }

html[data-density="compact"] .hero-card { padding: 11px 13px; }
html[data-density="compact"] .home-widgets-host { gap: 8px; }

/* Radii Sync Across Existing Surfaces */
.bot-mini-card,
.empty-card,
.adv-drawer,
.settings-group { border-radius: var(--radius-card); }
.text-input,
.search-input,
.select-input,
.preset-row-card,
.quick-jump-btn { border-radius: var(--radius-sm); }

/* Sidebar Styles */
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 2px 4px;
}

.sidebar-brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-sub {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--sep);
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-nav-btn {
  width: 100%;
  min-height: 38px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.side-nav-btn:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.side-nav-btn.active {
  background: var(--card-2);
  border-color: rgba(var(--accent-rgb), 0.35);
  color: var(--text);
}

.side-nav-btn.active svg {
  color: var(--accent);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--sep);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.side-util-btn {
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--sep);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  cursor: pointer;
}

.side-util-btn:hover {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.kbd-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  background: var(--bg);
  border: 1px solid var(--sep);
  color: var(--text-3);
}

.side-sync-meta {
  padding: 4px 2px 0;
  font-family: var(--font-mono);
  font-size: 11px;
}

.settings-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Responsive Desktop Layout (>= 768px) */
@media (min-width: 768px) {
  .app-shell {
    max-width: 1280px;
    display: grid;
    grid-template-columns: 236px minmax(0, 1fr);
    min-height: 100dvh;
    border-left: 1px solid var(--sep);
    border-right: 1px solid var(--sep);
  }

  .sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 18px 14px;
    border-right: 1px solid var(--sep);
    background: var(--card);
    overflow-y: auto;
  }

  .app-main-col {
    padding-bottom: 32px;
  }

  .navbar {
    height: 56px;
    padding: 0 24px;
  }

  .navbar .avatar-btn {
    display: none;
  }

  .main-content {
    padding: 8px 24px 36px;
  }

  .tabbar {
    display: none;
  }

  .tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
  }

  #radar-notes-card {
    grid-column: 1 / -1;
  }

  #bots-full-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .settings-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: start;
  }

  .settings-cards-grid > .span-full {
    grid-column: 1 / -1;
  }

  .theme-row.six-up {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .modal-backdrop {
    align-items: center;
    padding: 24px;
  }

  .sheet {
    max-width: 560px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.58);
  }
}


/* =========================================================================
   Apple Liquid Glass Material System & Spring Physics Animations (v17)
   ========================================================================= */

/* Ambient Refractive Depth Mesh */
.liquid-ambient-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  opacity: 0.48;
  transition: opacity 320ms ease;
}

html[data-glass="solid"] .liquid-ambient-bg {
  opacity: 0;
}

.liquid-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(88px);
  will-change: transform;
}

.liquid-orb.orb-1 {
  width: min(72vw, 460px);
  height: min(72vw, 460px);
  top: -12%;
  left: -8%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.16) 0%, transparent 72%);
  animation: orbFloatA 34s ease-in-out infinite alternate;
}

.liquid-orb.orb-2 {
  width: min(68vw, 420px);
  height: min(68vw, 420px);
  top: 28%;
  right: -14%;
  background: radial-gradient(circle, rgba(171, 159, 242, 0.11) 0%, transparent 72%);
  animation: orbFloatB 38s ease-in-out infinite alternate;
}

.liquid-orb.orb-3 {
  width: min(64vw, 380px);
  height: min(64vw, 380px);
  bottom: -14%;
  left: 18%;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.1) 0%, rgba(168, 85, 247, 0.06) 45%, transparent 74%);
  animation: orbFloatA 42s ease-in-out infinite alternate-reverse;
}

@keyframes orbFloatA {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(26px, 18px, 0) scale(1.06); }
  100% { transform: translate3d(-18px, 32px, 0) scale(0.96); }
}

@keyframes orbFloatB {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-28px, -16px, 0) scale(1.08); }
  100% { transform: translate3d(14px, 22px, 0) scale(0.95); }
}

/* Navbar Liquid Glass & Dynamic Island Pill */
.navbar {
  background: var(--glass-bg), var(--nav-glass);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  gap: 8px;
}

.nav-title-btn {
  max-width: 126px;
  white-space: nowrap;
  overflow: hidden;
}

.nav-title-btn span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-dynamic-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  max-width: 146px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.1) 0%, rgba(18, 19, 25, 0.72) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 6px 18px rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  flex-shrink: 1;
  transition: transform 240ms var(--spring-bounce), border-color 180ms ease, box-shadow 220ms ease;
}

.nav-dynamic-pill:hover {
  transform: scale(1.04);
  border-color: rgba(var(--accent-rgb), 0.45);
}

.nav-dynamic-pill:active {
  transform: scale(0.94);
}

@media (max-width: 420px) {
  .navbar {
    padding: 0 10px;
    gap: 4px;
  }
  .nav-actions .icon-btn {
    min-width: 28px;
    min-height: 32px;
  }
  .nav-title-btn {
    max-width: 88px;
    font-size: 13.5px;
  }
  .nav-title-btn .chev {
    display: none;
  }
  .nav-dynamic-pill {
    padding: 0 8px;
    font-size: 10.5px;
    max-width: 100px;
  }
}

/* Liquid Glass Cards, Controls & Specular Reflections */
.card,
.list-card,
.hero-card,
.chart-card,
.screen-card,
.bot-mini-card,
.risk-strip,
.quick-pill,
.stat-tile,
.adv-drawer,
.settings-group {
  background: var(--glass-bg), var(--glass-card-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow: var(--glass-rim), var(--glass-shadow);
  transition: border-color 200ms ease, transform 240ms var(--spring-bounce), box-shadow 220ms ease;
}

.hero-card {
  background: radial-gradient(circle at 12% 0%, rgba(var(--accent-rgb), 0.16), transparent 58%), var(--glass-bg), var(--glass-card-bg);
  overflow: hidden;
}

.card,
.hero-card,
.bot-mini-card,
.preset-row-card {
  position: relative;
  overflow: hidden;
}

.card::before,
.hero-card::before,
.bot-mini-card::before,
.preset-row-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, 0.1), transparent 65%);
  transition: opacity 240ms ease;
  z-index: 0;
}

.card > *,
.hero-card > *,
.bot-mini-card > *,
.preset-row-card > * {
  position: relative;
  z-index: 1;
}

.card:hover::before,
.hero-card:hover::before,
.bot-mini-card:hover::before,
.preset-row-card:hover::before {
  opacity: 1;
}

html[data-glass="solid"] .card,
html[data-glass="solid"] .list-card,
html[data-glass="solid"] .hero-card,
html[data-glass="solid"] .chart-card,
html[data-glass="solid"] .screen-card,
html[data-glass="solid"] .bot-mini-card,
html[data-glass="solid"] .risk-strip,
html[data-glass="solid"] .quick-pill,
html[data-glass="solid"] .stat-tile,
html[data-glass="solid"] .adv-drawer,
html[data-glass="solid"] .settings-group,
html[data-glass="solid"] .sheet,
html[data-glass="solid"] .navbar,
html[data-glass="solid"] .tabbar,
html[data-glass="solid"] .sidebar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: var(--card);
}

html[data-glass="solid"] .card::before,
html[data-glass="solid"] .hero-card::before,
html[data-glass="solid"] .bot-mini-card::before,
html[data-glass="solid"] .preset-row-card::before {
  display: none;
}

/* Modal & Sheet Liquid Glass + Spring Animations */
.modal-backdrop:not(.hidden) {
  background: rgba(0, 0, 0, 0.56);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: backdropFadeIn 200ms ease both;
}

.sheet {
  background: var(--glass-bg), rgba(16, 17, 22, 0.84);
  backdrop-filter: blur(36px) saturate(190%);
  -webkit-backdrop-filter: blur(36px) saturate(190%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: var(--glass-rim), 0 28px 68px rgba(0, 0, 0, 0.65);
}

.modal-backdrop:not(.hidden) .sheet {
  animation: sheetSpringUp var(--anim-dur) var(--spring-fluid) both;
}

@keyframes backdropFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes sheetSpringUp {
  0% {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Subtle Critically-Damped Apple Content Choreography */
@keyframes appleSpringIn {
  0% {
    opacity: 0;
    transform: translateY(6px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-view.active .hero-card,
.tab-view.active #simple-wallet-hero,
.tab-view.active #simple-holdings-card,
.tab-view.active #home-widgets-host > .home-widget,
.tab-view.active .tools-grid > .card,
.tab-view.active #bots-full-list > *,
.tab-view.active .settings-cards-grid > * {
  animation: appleSpringIn var(--anim-dur) var(--spring-fluid) both;
}

.tab-view.active #home-widgets-host > .home-widget:nth-child(1),
.tab-view.active .tools-grid > .card:nth-child(1),
.tab-view.active #bots-full-list > *:nth-child(1),
.tab-view.active .settings-cards-grid > *:nth-child(1) { animation-delay: 0ms; }
.tab-view.active #home-widgets-host > .home-widget:nth-child(2),
.tab-view.active .tools-grid > .card:nth-child(2),
.tab-view.active #bots-full-list > *:nth-child(2),
.tab-view.active .settings-cards-grid > *:nth-child(2) { animation-delay: 18ms; }
.tab-view.active #home-widgets-host > .home-widget:nth-child(3),
.tab-view.active .tools-grid > .card:nth-child(3),
.tab-view.active #bots-full-list > *:nth-child(3),
.tab-view.active .settings-cards-grid > *:nth-child(3) { animation-delay: 36ms; }
.tab-view.active #home-widgets-host > .home-widget:nth-child(4),
.tab-view.active .tools-grid > .card:nth-child(4),
.tab-view.active #bots-full-list > *:nth-child(4),
.tab-view.active .settings-cards-grid > *:nth-child(4) { animation-delay: 54ms; }
.tab-view.active #home-widgets-host > .home-widget:nth-child(5),
.tab-view.active .tools-grid > .card:nth-child(5),
.tab-view.active #bots-full-list > *:nth-child(5),
.tab-view.active .settings-cards-grid > *:nth-child(5) { animation-delay: 72ms; }
.tab-view.active #home-widgets-host > .home-widget:nth-child(6),
.tab-view.active .settings-cards-grid > *:nth-child(6) { animation-delay: 90ms; }
.tab-view.active #home-widgets-host > .home-widget:nth-child(7),
.tab-view.active .settings-cards-grid > *:nth-child(7) { animation-delay: 108ms; }

/* Subtle Tactile Press Physics */
.primary-btn,
.secondary-btn,
.danger-btn,
.quick-pill,
.stat-btn,
.theme-pill,
.surface-swatch,
.seg-btn,
.preset-row-card,
.side-nav-btn,
.jump-pill,
.icon-chip-btn {
  transition: transform 150ms var(--spring-bounce), opacity 140ms ease, background 180ms ease, border-color 180ms ease, color 160ms ease, box-shadow 200ms ease;
}

.primary-btn:active:not(:disabled),
.secondary-btn:active:not(:disabled),
.danger-btn:active:not(:disabled),
.quick-pill:active:not(:disabled),
.stat-btn:active,
.theme-pill:active,
.surface-swatch:active,
.seg-btn:active,
.preset-row-card:active,
.side-nav-btn:active,
.jump-pill:active,
.icon-chip-btn:active {
  transform: scale(0.982);
  opacity: 0.9;
}

/* Desktop Sidebar Glass Upgrade */
@media (min-width: 768px) {
  .app-shell {
    border-left-color: rgba(255, 255, 255, 0.08);
    border-right-color: rgba(255, 255, 255, 0.08);
  }
  .sidebar {
    background: var(--glass-bg), rgba(14, 15, 20, 0.56);
    backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.06);
  }
  .tabbar {
    display: none;
  }
}

/* Subtle Mode & Reduced Motion Accessibility */
html[data-anim="subtle"] .tab-view.active .hero-card,
html[data-anim="subtle"] .tab-view.active #home-widgets-host > .home-widget,
html[data-anim="subtle"] .tab-view.active .tools-grid > .card,
html[data-anim="subtle"] .tab-view.active #bots-full-list > *,
html[data-anim="subtle"] .tab-view.active .settings-cards-grid > * {
  animation-delay: 0ms !important;
}

html[data-motion="reduced"] .liquid-orb,
html[data-motion="reduced"] .tab-view.active .hero-card,
html[data-motion="reduced"] .tab-view.active #home-widgets-host > .home-widget,
html[data-motion="reduced"] .tab-view.active .tools-grid > .card,
html[data-motion="reduced"] .tab-view.active #bots-full-list > *,
html[data-motion="reduced"] .tab-view.active .settings-cards-grid > *,
html[data-motion="reduced"] .modal-backdrop:not(.hidden),
html[data-motion="reduced"] .modal-backdrop:not(.hidden) .sheet {
  animation: none !important;
  filter: none !important;
  transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .liquid-orb,
  .tab-view.active .hero-card,
  .tab-view.active #home-widgets-host > .home-widget,
  .tab-view.active .tools-grid > .card,
  .tab-view.active #bots-full-list > *,
  .tab-view.active .settings-cards-grid > *,
  .modal-backdrop:not(.hidden),
  .modal-backdrop:not(.hidden) .sheet {
    animation: none !important;
    filter: none !important;
  }
}


/* Apple Ecosystem Inset Grouped Lists, App Icon Preview & Spotlight (v18) */
.sf-icon {
  flex-shrink: 0;
}

.stack-4 {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spotlight-bar {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.spotlight-icon {
  position: absolute;
  left: 11px;
  color: var(--text-3);
  pointer-events: none;
}

.spotlight-input {
  padding-left: 34px;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.16);
}

.apple-list {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.apple-row {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-top: 1px solid var(--sep);
  background: transparent;
  color: var(--text);
  font-family: var(--font-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, transform 220ms var(--spring-bounce);
}

.apple-row.static {
  cursor: default;
}

.apple-row:first-child {
  border-top: 0;
}

.apple-row:not(.static):hover {
  background: rgba(255, 255, 255, 0.05);
}

.apple-row:not(.static):active {
  background: rgba(255, 255, 255, 0.08);
  transform: scale(0.99);
}

.apple-row-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.apple-row-icon {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.apple-row-icon.icon-blue { background: linear-gradient(155deg, #0A84FF, #0066CC); }
.apple-row-icon.icon-green { background: linear-gradient(155deg, #30D158, #248A3D); }
.apple-row-icon.icon-red { background: linear-gradient(155deg, #FF453A, #D70015); }
.apple-row-icon.icon-indigo { background: linear-gradient(155deg, #5E5CE6, #3634A3); }

.apple-row-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.apple-row-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

.apple-row-sub {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.apple-chev {
  color: var(--text-3);
  font-size: 16px;
  flex-shrink: 0;
}

.apple-install-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
}

.apple-app-icon-preview {
  width: 64px;
  height: 64px;
  border-radius: 15px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  flex-shrink: 0;
}

.apple-steps-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.apple-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--sep);
  background: rgba(255, 255, 255, 0.025);
  font-size: 13px;
  color: var(--text-2);
}

.apple-step-num {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.18);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}


/* =========================================================================
   Simple vs Advanced Sections & Phantom Wallet Interface (v19)
   ========================================================================= */
.swatch-phantom {
  background: linear-gradient(135deg, #121215 55%, #24242b 55%);
}

.desk-mode-bar {
  display: flex;
  justify-content: center;
  padding: 12px 0 4px;
}

.desk-mode-seg {
  width: 230px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.side-mode-seg {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Section Scoping */
html[data-desk-mode="simple"] .advanced-only {
  display: none !important;
}

html[data-desk-mode="simple"] #home-widgets-host > .home-widget:not([data-widget="chart"]):not([data-widget="activity"]) {
  display: none !important;
}

html[data-desk-mode="advanced"] .simple-only {
  display: none !important;
}

/* Phantom Wallet Centered Simple Hero */
.phantom-hero {
  padding: 18px 14px 16px;
  text-align: center;
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: radial-gradient(circle at 50% -10%, rgba(var(--accent-rgb), 0.16), transparent 62%), var(--glass-bg), var(--glass-card-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  box-shadow: var(--glass-rim), var(--glass-shadow);
  margin: 6px 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.phantom-balance {
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.038em;
  line-height: 1.04;
  color: var(--text);
  margin-top: 2px;
}

.phantom-delta-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.phantom-pnl-usd {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green);
}

.phantom-pnl-usd.neg {
  color: var(--red);
}

.phantom-actions {
  width: 100%;
  max-width: 360px;
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.phantom-act-btn {
  border: 0;
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-family: var(--font-text);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 150ms var(--spring-bounce), color 160ms ease, opacity 140ms ease;
}

.phantom-act-tile {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(var(--accent-rgb), 0.14);
  border: 1px solid rgba(var(--accent-rgb), 0.24);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 180ms ease, border-color 180ms ease, transform 150ms var(--spring-bounce);
}

.phantom-act-btn:hover {
  color: var(--text);
}

.phantom-act-btn:hover .phantom-act-tile {
  background: rgba(var(--accent-rgb), 0.22);
  border-color: rgba(var(--accent-rgb), 0.42);
}

.phantom-act-btn:active {
  transform: scale(0.96);
  opacity: 0.9;
}

.phantom-act-btn.is-paused .phantom-act-tile {
  background: rgba(255, 159, 10, 0.18);
  border-color: rgba(255, 159, 10, 0.35);
  color: var(--orange);
}

/* Phantom Holdings Card & Asset Rows */
.phantom-holdings-card {
  margin-bottom: 10px;
}

.phantom-asset-list {
  display: flex;
  flex-direction: column;
  margin: 0 -14px -13px;
  border-top: 1px solid var(--sep);
}

.phantom-asset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--sep);
  background: transparent;
  cursor: pointer;
  transition: background 150ms ease;
}

.phantom-asset-row:first-child {
  border-top: 0;
}

.phantom-asset-row:hover {
  background: rgba(255, 255, 255, 0.035);
}

.phantom-asset-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  flex: 1;
}

.phantom-token-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.16);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.phantom-token-icon.cash {
  background: rgba(10, 132, 255, 0.16);
  border-color: rgba(10, 132, 255, 0.3);
  color: var(--blue);
}

.phantom-asset-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.phantom-asset-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phantom-asset-sub {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phantom-asset-right {
  text-align: right;
  flex-shrink: 0;
}

.phantom-asset-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.phantom-asset-pnl {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
}

.phantom-asset-pnl.ok { color: var(--green); }
.phantom-asset-pnl.neg { color: var(--red); }

/* Simple -> Advanced Bridge Row */
.simple-adv-bridge {
  width: 100%;
  min-height: 42px;
  margin-bottom: 10px;
  padding: 9px 14px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--glass-bg), var(--glass-card-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-text);
  font-size: 12px;
  cursor: pointer;
  transition: transform 150ms var(--spring-bounce), border-color 180ms ease;
}

.simple-adv-bridge:hover {
  color: var(--text);
  border-color: rgba(var(--accent-rgb), 0.35);
}

.simple-adv-bridge:active {
  transform: scale(0.985);
}

/* Soften Tabbar Tap Motion & Subtle Mode */
.tab-btn {
  transition: transform 160ms var(--spring-bounce), background 200ms ease, color 160ms ease, box-shadow 200ms ease;
}

.tab-btn svg {
  transition: transform 180ms var(--spring-bounce), color 160ms ease;
}

.tab-btn:active {
  transform: scale(0.96);
}

.tab-btn.active svg {
  transform: translateY(-0.5px) scale(1.03);
}

@media (min-width: 768px) {
  .desk-mode-bar {
    display: none;
  }
}


/* Phantom Wallet Top Chip, Mini Stats, Activity Polish & Settings Mode Card (v20) */
.phantom-hero {
  margin-top: 12px;
}

.phantom-top-row {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 7px;
}

.phantom-wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, transform 150ms var(--spring-bounce);
}

.phantom-wallet-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.phantom-wallet-chip:active {
  transform: scale(0.97);
}

.phantom-mini-stats {
  width: 100%;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.phantom-mini-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0;
}

.phantom-mini-val {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Settings Prominent Experience Mode Card */
.settings-mode-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 12px;
  padding: 13px 14px;
}

.settings-mode-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 180px;
}

.settings-mode-copy strong {
  font-size: 14px;
  font-weight: 600;
}

.settings-mode-copy .muted {
  font-size: 12px;
}

/* Activity Summary Strip, Date Headers & Icon Badges */
.activity-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.act-date-hdr {
  padding: 8px 12px 5px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--sep);
}

.act-date-hdr:first-child {
  border-top: 0;
}

.list-row {
  gap: 11px;
}

.row-badge {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-2);
}

.row-badge.ok {
  background: rgba(48, 209, 88, 0.14);
  border-color: rgba(48, 209, 88, 0.28);
  color: var(--green);
}

.row-badge.neg {
  background: rgba(255, 69, 58, 0.14);
  border-color: rgba(255, 69, 58, 0.28);
  color: var(--red);
}

.row-badge.buy {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.3);
  color: var(--accent);
}

.welcome-app-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}


/* =========================================================================
   Authentic Matte Surfaces & Unboxed Phantom Hero (v21 De-AI Polish)
   ========================================================================= */

/* 1. Kill floating neon background blobs & mouse-follow spotlight glare */
.liquid-ambient-bg,
.card::before,
.hero-card::before,
.bot-mini-card::before,
.preset-row-card::before {
  display: none !important;
}

/* 2. Clean matte elevated cards (translucency reserved for overlapping chrome) */
.card,
.list-card,
.hero-card,
.chart-card,
.screen-card,
.bot-mini-card,
.risk-strip,
.quick-pill,
.stat-tile,
.adv-drawer,
.settings-group,
.simple-adv-bridge,
.pipe-step {
  background: var(--card);
  border: 1px solid var(--sep);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* 3. Open, unboxed Phantom Wallet header & neutral dark action tiles */
.phantom-hero {
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  padding: 16px 4px 10px;
  margin: 4px 0 8px;
}

.phantom-act-tile {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--sep);
  box-shadow: none;
  color: var(--text);
}

.phantom-act-btn:hover .phantom-act-tile {
  background: var(--card-2);
  border-color: rgba(255, 255, 255, 0.14);
}

/* 4. Understated monochrome icons & flat status pills */
.apple-row-icon,
.apple-row-icon.icon-blue,
.apple-row-icon.icon-green,
.apple-row-icon.icon-red,
.apple-row-icon.icon-indigo {
  background: var(--card-2);
  color: var(--text-2);
  border: 1px solid var(--sep);
  box-shadow: none;
}

.nav-dynamic-pill {
  background: var(--card);
  border: 1px solid var(--sep);
  box-shadow: none;
}

.nav-dynamic-pill:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.16);
}

.hero-delta {
  border: 0;
  background: rgba(48, 209, 88, 0.12);
}

.hero-delta.neg {
  border: 0;
  background: rgba(255, 69, 58, 0.12);
}

.tabbar {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  border-color: var(--sep);
}

/* ===== v23 Functional Upgrades ===== */
.audit-score-card {
  gap: 12px;
}

.audit-score-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.audit-score-id {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.audit-seg-bar {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 5px;
}

.audit-seg-cell {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.audit-seg-cell.ok {
  background: var(--green);
}

.audit-seg-cell.fail {
  background: var(--red);
}

.audit-score-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mint-copy-chip {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--card-2);
  border: 1px solid var(--sep);
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: border-color 140ms ease, color 140ms ease;
}

.mint-copy-chip:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text);
}

.bot-decision-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 8px;
  margin: 0 -8px;
  border-top: 1px solid var(--sep);
  border-radius: 7px;
  cursor: pointer;
  transition: background 140ms ease;
}

.bot-decision-row:hover {
  background: rgba(255, 255, 255, 0.04);
}

.bot-decision-main {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bot-decision-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bot-decision-sub {
  font-size: 11.5px;
  color: var(--text-3);
}

.bot-decision-right {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.activity-search-input {
  flex: 1;
  min-width: 140px;
  height: 32px;
  padding: 0 12px;
  font-size: 12.5px;
  border-radius: 999px;
}

.simple-sell-btn {
  margin-left: 8px;
  flex-shrink: 0;
}

.report-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  margin: 10px 0;
}

.report-body th,
.report-body td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--sep);
  text-align: left;
}

.report-body th {
  color: var(--text-2);
  font-weight: 600;
}

.report-body a {
  color: var(--accent);
}

.j7-inspector-banner {
  border-radius: 10px;
  background: var(--card-2);
  border: 1px solid var(--sep);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 180ms ease, background 180ms ease;
}

.j7-inspector-banner.is-active {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.06);
}

.j7-inspector-banner.is-passed {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(16, 185, 129, 0.06);
}

.j7-inspector-banner.is-rejected {
  border-color: rgba(239, 68, 68, 0.38);
  background: rgba(239, 68, 68, 0.05);
}

.j7-inspector-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.j7-inspector-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.j7-snippet {
  font-size: 12.5px;
  color: var(--text);
  line-height: 1.38;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.j7-ca-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.j7-ca-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--card-2);
  border: 1px solid var(--sep);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-2);
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}

.j7-ca-chip:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.j7-insp-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 4px;
  border-top: 1px solid var(--sep);
}

.j7-insp-row:first-child {
  border-top: none;
  padding-top: 2px;
}

.j7-insp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.j7-insp-reason {
  font-size: 11.5px;
  color: var(--text-2);
}

.alert-source-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Header Telemetry Strip */
.telemetry-strip {
  max-width: 1080px;
  margin: 0 auto 10px;
  padding: 0 2px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tel-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-2);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.tel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-3);
  flex: none;
}

.tel-pill.ok {
  color: var(--green);
  border-color: rgba(48, 209, 88, 0.32);
  background: rgba(48, 209, 88, 0.1);
}

.tel-pill.ok .tel-dot {
  background: var(--green);
  box-shadow: 0 0 6px rgba(48, 209, 88, 0.55);
}

.tel-pill.warn {
  color: var(--orange);
  border-color: rgba(255, 159, 10, 0.36);
  background: rgba(255, 159, 10, 0.12);
}

.tel-pill.warn .tel-dot {
  background: var(--orange);
}

.tel-pill.off {
  color: var(--red);
  border-color: rgba(255, 69, 58, 0.32);
  background: rgba(255, 69, 58, 0.08);
}

.tel-pill.off .tel-dot {
  background: var(--red);
}

.tel-pill.tel-mode {
  font-weight: 700;
  color: var(--cyan);
  border-color: rgba(100, 210, 255, 0.32);
  background: rgba(100, 210, 255, 0.1);
}

.tel-pill.tel-mode.is-live {
  color: var(--red);
  border-color: rgba(255, 69, 58, 0.45);
  background: rgba(255, 69, 58, 0.14);
}

/* 8-Layer Audit Pills */
.layer-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.layer-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 600;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-3);
}

.layer-chip.pass {
  color: var(--green);
  border-color: rgba(48, 209, 88, 0.38);
  background: rgba(48, 209, 88, 0.12);
}

.layer-chip.fail {
  color: var(--red);
  border-color: rgba(255, 69, 58, 0.48);
  background: rgba(255, 69, 58, 0.16);
}

.layer-chip.pending {
  opacity: 0.55;
  border-style: dashed;
}
