:root {
  --bg: #0c1117;
  --surface: #151c26;
  --surface-2: #111820;
  --surface-elevated: #1a2330;
  --border: #243044;
  --border-subtle: #1c2736;
  --text: #eef2f7;
  --muted: #9badc2;
  --green: #22c55e;
  --red: #ef4444;
  --amber: #f59e0b;
  --blue: #3b82f6;
  --accent: #3b82f6;
  --sidebar-w: 220px;
  --topbar-h: 56px;
  --radius: 8px;
  --radius-lg: 8px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.auth-pending #header-auth-out,
body.auth-pending #header-auth-in {
  display: none;
}

body.auth-pending {
  overflow: hidden;
}

body.auth-pending .app {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

body.auth-pending .sidebar {
  opacity: 0.5;
  pointer-events: none;
}

body.auth-pending .login-gate {
  display: none;
}

body:not(.auth-pending) .auth-pending-gate {
  display: none;
}

.auth-pending-gate {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(7, 10, 14, 0.88);
  backdrop-filter: blur(6px);
}

.auth-pending-card {
  width: min(420px, 100%);
  text-align: center;
  padding: 2rem 1.75rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #141f2e 0%, var(--surface) 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.auth-pending-logo {
  display: block;
  font-size: 2rem;
  color: var(--amber);
  margin-bottom: 0.75rem;
}

.auth-pending-card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.5rem;
}

.auth-pending-lead {
  font-size: 0.95rem;
  line-height: 1.5;
  max-width: 32ch;
  margin: 0 auto;
}

.auth-pending-spinner {
  margin: 0 auto 1rem;
}

body.app-locked {
  overflow: hidden;
}

body.app-locked .app {
  filter: blur(6px);
  pointer-events: none;
  user-select: none;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(7, 10, 14, 0.92);
  backdrop-filter: blur(4px);
}

.login-gate.hidden {
  display: none;
}

.login-gate-card {
  width: min(420px, 100%);
  text-align: center;
  padding: 2rem 1.75rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #141f2e 0%, var(--surface) 100%);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.login-gate-logo {
  display: block;
  font-size: 2rem;
  color: var(--amber);
  margin-bottom: 0.75rem;
}

.login-gate-card h2 {
  font-size: 1.35rem;
  margin-bottom: 0.65rem;
}

.login-gate-lead {
  font-size: 0.88rem;
  line-height: 1.55;
  color: #c8d4e0;
  margin-bottom: 1.25rem;
}

.login-gate-btn {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
}

.login-gate-foot {
  margin-top: 1rem;
  font-size: 0.72rem;
}

.gate-error {
  margin-top: 0.85rem;
  font-size: 0.82rem;
  color: var(--red);
}

body {
  font-family: "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 16% -10%, rgba(34, 197, 94, 0.12), transparent 28rem),
    radial-gradient(circle at 92% 10%, rgba(245, 158, 11, 0.1), transparent 24rem),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Top bar ── */
.topbar {
  height: var(--topbar-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  z-index: 50;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.topbar-titles h1 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
}

.topbar-sub {
  font-size: 0.7rem;
  color: var(--muted);
  display: block;
}

.topbar-status {
  flex: 1;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.status-pill {
  font-size: 0.78rem;
  color: var(--muted);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border-subtle);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-actions {
  flex-shrink: 0;
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

/* ── Layout: sidebar + main ── */
.app-layout {
  flex: 1;
  display: flex;
  min-height: 0;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--surface-2);
  padding: 0.75rem 0.5rem;
}

body.app-locked .sidebar {
  opacity: 0.5;
  pointer-events: none;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.nav-item.active,
.main-tab.active.nav-item {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

.nav-icon {
  width: 1.25rem;
  text-align: center;
  font-size: 1rem;
  opacity: 0.9;
}

.sidebar-footer {
  margin-top: auto;
  padding: 0.85rem 0.75rem 0.25rem;
  border-top: 1px solid var(--border-subtle);
}

.sidebar-footer-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 0.2rem;
}

.sidebar-footer-value {
  font-size: 1.05rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 0 0 0.35rem;
}

.sidebar-footer-link {
  font-size: 0.78rem;
  color: var(--blue);
  text-decoration: none;
}

.sidebar-footer-link:hover {
  text-decoration: underline;
}

.app-main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  background: var(--bg);
}

.content-area {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem 2rem;
}

/* ── Cards & page headers ── */
.card,
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.2rem;
}

.card-desc {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

.page-header {
  margin-bottom: 1.25rem;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

.page-header-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  max-width: 52ch;
}

/* ── Dashboard ── */
.dashboard {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.dashboard-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.15rem;
  border-color: rgba(34, 197, 94, 0.28);
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.12), transparent 38%),
    linear-gradient(165deg, rgba(59, 130, 246, 0.11), var(--surface) 58%);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.22);
}

.dashboard-guide-main {
  min-width: 0;
}

.dashboard-guide-pill {
  display: inline-flex;
  align-items: center;
  margin-bottom: 0.45rem;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(147, 197, 253, 0.35);
  color: #93c5fd;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dashboard-guide h2 {
  margin: 0;
  font-size: 1.16rem;
  line-height: 1.3;
}

.dashboard-guide p {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  max-width: 68ch;
}

.dashboard-guide-steps {
  flex: 0 0 auto;
  display: flex;
  gap: 0.45rem;
  min-width: 0;
}

.dashboard-guide-steps span {
  display: grid;
  place-items: center;
  min-width: 5.4rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: #dbeafe;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.5rem 0.6rem;
}

.risk-status-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.95rem;
  border-color: rgba(52, 211, 153, 0.22);
  background:
    linear-gradient(90deg, rgba(16, 185, 129, 0.08), rgba(59, 130, 246, 0.04)),
    var(--surface);
}

.risk-status-main {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 14rem;
}

.risk-mode-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(16, 185, 129, 0.12);
  color: #a7f3d0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.28rem 0.52rem;
}

.risk-status-main h2 {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.2;
}

.risk-status-main p {
  margin: 0.12rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.risk-checks {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-width: 0;
}

.risk-check {
  display: inline-flex;
  align-items: baseline;
  gap: 0.34rem;
  max-width: 15rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.45);
  color: var(--text);
  padding: 0.28rem 0.5rem;
}

.risk-check strong,
.risk-check small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-check strong {
  font-size: 0.68rem;
  font-weight: 800;
}

.risk-check small {
  color: var(--muted);
  font-size: 0.64rem;
}

.risk-check.ok {
  border-color: rgba(52, 211, 153, 0.32);
}

.risk-check.ok strong {
  color: #bbf7d0;
}

.risk-check.warn {
  border-color: rgba(251, 191, 36, 0.36);
}

.institutional-panel {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border, #2a3441);
}

.institutional-title {
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
  color: var(--muted, #8b98a5);
}

.inst-summary {
  font-size: 0.8rem;
  color: var(--muted, #8b98a5);
  margin: 0 0 0.5rem;
}

.inst-rows {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.risk-check.warn strong {
  color: #fde68a;
}

/* Market monitor — pick market → start watching */
body.app-locked #start-panel.monitor-card {
  display: none;
}

.monitor-card {
  position: relative;
  z-index: 30;
  margin: 0;
  padding: 0;
  overflow: visible;
  border-color: rgba(148, 163, 184, 0.22);
}

.monitor-card-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
  padding: 0.95rem 1.1rem;
}

.monitor-status {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1 1 220px;
  min-width: 0;
}

.monitor-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
}

.monitor-card.is-live .monitor-badge {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.15);
}

.monitor-status-text {
  min-width: 0;
}

.monitor-heading {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.monitor-subline {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}

.monitor-controls-stack {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 0;
}

.monitor-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
  flex-shrink: 0;
}

.watchlist-picker {
  width: min(420px, 100%);
}

.watchlist-picker-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.watchlist-groups {
  position: relative;
  z-index: 20;
}

.watch-select {
  position: relative;
  z-index: 60;
}

.watch-select-summary {
  list-style: none;
  min-height: 2.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--surface-elevated);
  padding: 0.42rem 0.55rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.watch-select-summary:hover {
  border-color: rgba(147, 197, 253, 0.55);
}

.watch-select-summary::-webkit-details-marker {
  display: none;
}

.watch-select-main {
  min-width: 0;
  display: grid;
  gap: 0.1rem;
}

.watch-select-main small {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.watch-select-picked {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
  max-height: 2.1rem;
  overflow: hidden;
}

.watch-select-picked span {
  display: inline-flex;
  align-items: center;
  max-width: 8.5rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(147, 197, 253, 0.22);
  color: #f8fafc;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.12rem 0.42rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-select-count {
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(147, 197, 253, 0.28);
  color: #bfdbfe;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.22rem 0.48rem;
}

.watch-select-menu-wide {
  width: min(380px, calc(100vw - 2rem));
  max-height: min(420px, 70vh);
}

.watch-search-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.watch-search-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.65);
  color: #f8fafc;
  font-size: 0.82rem;
  padding: 0.5rem 0.62rem;
  margin-bottom: 0.45rem;
}

.watch-search-input:focus {
  outline: none;
  border-color: rgba(147, 197, 253, 0.65);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
}

.watch-search-results {
  display: grid;
  gap: 0.22rem;
  max-height: 180px;
  overflow: auto;
  margin-bottom: 0.55rem;
}

.watch-search-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  color: #f8fafc;
  padding: 0.38rem 0.45rem;
  cursor: pointer;
}

.watch-search-row:hover:not([disabled]) {
  border-color: rgba(147, 197, 253, 0.45);
  background: rgba(59, 130, 246, 0.12);
}

.watch-search-row[disabled] {
  opacity: 0.45;
  cursor: default;
}

.watch-search-row-main {
  min-width: 0;
  display: grid;
  gap: 0.08rem;
}

.watch-search-row-main strong {
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-search-row-main small {
  font-size: 0.64rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-search-row-tag {
  flex: 0 0 auto;
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #93c5fd;
}

.watch-search-empty {
  margin: 0.2rem 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.watch-quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
  margin-bottom: 0.55rem;
}

.watch-quick-pick {
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.1);
  color: #dbeafe;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  cursor: pointer;
}

.watch-quick-pick:hover {
  border-color: rgba(147, 197, 253, 0.5);
  background: rgba(59, 130, 246, 0.18);
}

.watch-picked {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.watch-picked-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.16);
  border: 1px solid rgba(147, 197, 253, 0.28);
  color: #f8fafc;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.2rem 0.12rem 0.45rem;
  max-width: 100%;
}

.watch-picked-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 9rem;
}

.watch-picked-remove {
  border: none;
  background: rgba(15, 23, 42, 0.35);
  color: #cbd5e1;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  padding: 0;
}

.watch-picked-remove:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #fecaca;
}

.watch-select-menu {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: auto;
  width: min(320px, calc(100vw - 3rem));
  max-height: 280px;
  overflow: auto;
  display: grid;
  gap: 0.65rem;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 8px;
  background: #101821;
  padding: 0.4rem;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
  z-index: 100;
}

.watch-select:not([open]) .watch-select-menu {
  display: none;
}

.watch-select-help {
  margin: 0 0 0.45rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.watchlist-group-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #93c5fd;
  margin: 0.28rem 0 0.18rem;
}

.watchlist-chips {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.22rem;
}

.watch-chip {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 1.75rem;
  color: var(--text);
  padding: 0.24rem 0.34rem;
  border-radius: 5px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
  min-width: 0;
}

.watch-chip:hover {
  border-color: rgba(147, 197, 253, 0.38);
  background: rgba(255, 255, 255, 0.04);
}

.watch-chip-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.watch-chip:has(input:checked) {
  border-color: rgba(96, 165, 250, 0.78);
  background: rgba(59, 130, 246, 0.18);
  color: #f8fafc;
  box-shadow: none;
}

.watch-chip-mark {
  flex: 0 0 auto;
  width: 0.82rem;
  height: 0.82rem;
  border-radius: 3px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  place-items: center;
}

.watch-chip-mark::after {
  content: "";
  width: 0.28rem;
  height: 0.46rem;
  border-radius: 0;
  background: transparent;
}

.watch-chip:has(input:checked) .watch-chip-mark {
  border-color: #93c5fd;
  background: rgba(59, 130, 246, 0.25);
}

.watch-chip:has(input:checked) .watch-chip-mark::after {
  background: transparent;
  border: solid #93c5fd;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
  box-shadow: none;
}

.watch-chip-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem;
  min-width: 0;
  width: 100%;
}

.watch-chip-copy strong {
  font-size: 0.74rem;
  line-height: 1.2;
  color: #f8fafc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-chip-copy small {
  font-size: 0.6rem;
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.monitor-card.is-live .watchlist-picker {
  display: none;
}

.watch-grid-section {
  padding: 1rem 1.1rem;
  background: rgba(21, 28, 38, 0.92);
  border: 1px solid var(--border);
}

.watch-grid-head {
  margin-bottom: 0.75rem;
}

.watch-grid-title {
  margin: 0 0 0.2rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.watch-grid-hint {
  margin: 0;
  font-size: 0.78rem;
  color: #a8b8cc;
}

.watch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(156px, 1fr));
  gap: 0.55rem;
}

/* button reset — native <button> was rendering dark-on-dark in some browsers */
.watch-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.75rem;
  min-height: 6.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  color: var(--text);
  font: inherit;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.watch-card:hover {
  border-color: #4a5f78;
  background: #1f2a3a;
}

.watch-card.active {
  border-color: #60a5fa;
  background: linear-gradient(
    165deg,
    rgba(37, 99, 235, 0.22) 0%,
    var(--surface-elevated) 55%
  );
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35), 0 4px 14px rgba(0, 0, 0, 0.25);
}

.watch-card:focus-visible,
.nav-item:focus-visible,
.btn:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 2px;
}

.watch-card.buy {
  border-left: 3px solid var(--green);
}

.watch-card.sell {
  border-left: 3px solid var(--red);
}

.watch-card.hold {
  border-left: 3px solid #64748b;
}

.watch-card.buy .watch-card-status {
  color: #86efac;
}

.watch-card.sell .watch-card-status {
  color: #fca5a5;
}

.watch-card-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.2;
}

.watch-card-status {
  font-size: 0.74rem;
  color: #b6c5d6;
  line-height: 1.3;
}

.watch-card-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin-top: 0.1rem;
}

.watch-card-kite-margin {
  display: block;
  font-size: 0.68rem;
  margin-top: 0.2rem;
  line-height: 1.2;
  color: var(--muted);
}

.position-kite-margin {
  font-size: 0.72rem;
  margin-top: 0.35rem;
  line-height: 1.35;
}

.watch-card-trade-dot {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.focus-market-label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.focus-market-label strong {
  color: var(--text);
  font-weight: 600;
}

.monitor-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 11rem;
}

.monitor-field-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.monitor-select {
  min-width: 11rem;
  font-size: 0.95rem;
}

.monitor-actions {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.btn-start-main {
  min-width: 8.5rem;
  white-space: nowrap;
}

.btn-stop-main {
  min-width: 4.5rem;
}


.monitor-card.is-live .btn-start-main {
  display: none;
}

.monitor-card.is-live .btn-stop-main {
  min-width: 7.5rem;
}

.monitor-foot {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.65rem 1.15rem;
  border-top: 1px solid var(--border-subtle);
  background: rgba(0, 0, 0, 0.15);
}

.monitor-foot-icon {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.05rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  font-size: 0.62rem;
  font-weight: 700;
  font-style: italic;
  line-height: 1.1rem;
  text-align: center;
  color: var(--muted);
}

.monitor-foot .session-hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
}

.field-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
}

.onboarding-steps {
  position: relative;
  z-index: 1;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  padding: 0.85rem 1rem;
  margin: 0;
  font-size: 0.82rem;
}

.onboarding-steps li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.onboarding-steps li span {
  width: 1.35rem;
  height: 1.35rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  font-size: 0.72rem;
  font-weight: 700;
}

.dashboard-top {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 1rem;
  align-items: stretch;
  margin-bottom: 1rem;
}

.dashboard-top > .card {
  height: 100%;
  min-height: 0;
}

.dashboard-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.layman-fold {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 0.85rem;
}

.layman-fold > summary {
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--muted);
}

.layman-fold[open] > summary {
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.layman-fold-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.85rem;
}

.settings-section-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
}

.settings-today-card {
  margin-bottom: 0.85rem;
}

.settings-save-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1rem 0 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.settings-save-msg {
  margin: 0;
  font-size: 0.82rem;
  flex: 1;
  min-width: 12rem;
}

.settings-save-msg.ok {
  color: var(--green);
}

.settings-save-msg.err {
  color: var(--red);
}

.settings-save-hint {
  font-size: 0.78rem;
  line-height: 1.45;
  margin: 0 0 0.75rem;
}

.app-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.logo { color: var(--amber); font-size: 1.35rem; line-height: 1; }
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  max-width: 55%;
}
.header-auth { display: flex; align-items: center; gap: 0.5rem; }
.header-auth.hidden { display: none; }
.header-login-fallback { position: relative; }
.header-login-fallback summary {
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--muted);
  list-style: none;
}
.header-login-fallback summary::-webkit-details-marker { display: none; }
.header-login-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 20;
  display: flex;
  gap: 0.35rem;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  min-width: 220px;
}
.header-login-popover input {
  flex: 1;
  min-width: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.78rem;
}
.header-login-msg {
  flex-basis: 100%;
  font-size: 0.75rem;
  margin: 0;
  text-align: right;
}
.header-login-msg.ok { color: var(--green); }
.header-login-msg.err { color: var(--red); }
.header-login-setup {
  flex-basis: 100%;
  font-size: 0.68rem;
  line-height: 1.35;
  color: var(--muted);
  margin: 0;
  text-align: right;
  word-break: break-all;
}
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.78rem; }
.btn-reset { width: 100%; margin-top: 0.5rem; }

.badge {
  background: var(--border);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
}
.badge.ok { background: #14532d; color: var(--green); }

/* app-main scroll handled in shell section above */

.page-panel {
  padding-top: 0.85rem;
}

.page {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding-bottom: 1.5rem;
}

.page-narrow {
  max-width: 560px;
}

.page-hero {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 0.25rem;
}

.page-hero h2 {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
  color: var(--text);
}

.page-hero-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--muted);
  margin: 0;
}

.page-hero-icon {
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.1rem;
}

.page-guide {
  margin-bottom: 0.25rem;
}

.page-guide a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
}

.page-guide a:hover {
  text-decoration: underline;
}

.page-card {
  border-radius: 14px;
}

.page-card-muted {
  padding: 1rem;
  border: 1px dashed var(--border);
  border-radius: 12px;
  background: transparent;
  text-align: center;
}

.page-card-muted .btn-reset {
  width: 100%;
  max-width: 320px;
  margin: 0 auto 0.5rem;
}

.help-banner a {
  color: #93c5fd;
  font-weight: 500;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-hero .setup-tag {
  align-self: flex-start;
  margin-top: 0.15rem;
}

/* ── Sidebar settings ── */
.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
}

.settings-card-muted {
  background: transparent;
  border-style: dashed;
  padding: 0.5rem;
}

.settings-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.settings-card-head h2 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin: 0;
}

.settings-badge {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

/* ── Sidebar setup panels (wallet, market, rules) ── */
.setup-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.setup-panel-wallet {
  border-color: rgba(59, 130, 246, 0.28);
  background: linear-gradient(165deg, rgba(20, 31, 46, 0.95) 0%, var(--surface) 55%);
}

.setup-panel-market {
  border-color: rgba(34, 197, 94, 0.22);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.06);
}

.setup-panel-rules {
  border-color: rgba(148, 163, 184, 0.2);
}

.setup-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.setup-panel-title {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-width: 0;
}

.setup-panel-title h2 {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
  text-transform: none;
}

.setup-panel-desc {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--muted);
  margin: 0.2rem 0 0;
}

.setup-panel-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 700;
}

.setup-icon-wallet {
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.setup-icon-market {
  background: rgba(34, 197, 94, 0.14);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.28);
  font-size: 0.75rem;
}

.setup-icon-rules {
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: 0.85rem;
}

.setup-tag {
  flex-shrink: 0;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.28);
}

.setup-callout {
  font-size: 0.74rem;
  line-height: 1.45;
  color: var(--muted);
  margin: 0;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.setup-fold {
  border-top: 1px solid var(--border);
  padding-top: 0.55rem;
}

.setup-fold > summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--blue);
  list-style: none;
  padding: 0.2rem 0;
  user-select: none;
}

.setup-fold > summary::-webkit-details-marker {
  display: none;
}

.setup-fold > summary::before {
  content: "▸ ";
  display: inline-block;
  transition: transform 0.15s ease;
  color: var(--muted);
}

.setup-fold[open] > summary::before {
  transform: rotate(90deg);
}

.setup-fold-body {
  padding: 0.55rem 0 0.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.setup-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin: 0;
}

.setup-field-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

.setup-input,
.setup-select {
  width: 100%;
  font-size: 0.88rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.setup-input:focus,
.setup-select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.setup-input-narrow {
  width: 4.25rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.setup-field-hint,
.setup-empty-hint {
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--muted);
  margin: 0;
}

.setup-actions-stack {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.setup-actions-stack .btn {
  width: 100%;
  justify-content: center;
}

.wallet-balance-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.wallet-stat {
  padding: 0.65rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.wallet-stat-primary {
  grid-column: 1 / -1;
  border-color: rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.08);
}

.wallet-stat-label {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.wallet-stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
  color: var(--text);
}

.wallet-stat-value-sm {
  font-size: 1.05rem;
}

.wallet-action-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.wallet-action-group .wallet-action-btn:last-child {
  grid-column: 1 / -1;
}

.wallet-action-add {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.wallet-breakdown {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.wallet-breakdown > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.78rem;
}

.wallet-breakdown dt {
  color: var(--muted);
  font-weight: 400;
}

.wallet-breakdown dd {
  margin: 0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.market-picker {
  margin: 0;
}

.setup-field-market .market-select-wrap {
  position: relative;
}

.setup-field-market .market-select-wrap::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.setup-field-market .setup-select {
  padding-right: 2rem;
  font-weight: 500;
}

.monitor-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.45rem;
  margin-top: 0.15rem;
}

.btn-monitor-start {
  width: 100%;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 10px;
}

.btn-monitor-stop {
  width: 100%;
  padding: 0.5rem;
  font-size: 0.82rem;
  border-radius: 8px;
}

.setting-rows {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.setting-row-stack {
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}

.setting-row-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.setting-row-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
}

.setting-row-hint {
  font-size: 0.68rem;
  color: var(--muted);
}

.setting-row-control {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.setting-row-control-wide {
  flex: 1;
  max-width: 9.5rem;
}

.setting-row-control-wide .setup-select {
  min-width: 0;
}

.setting-row-unit {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

.setting-row-foot {
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--muted);
  margin: -0.35rem 0 0;
  padding-left: 0.1rem;
}

/* Legacy wallet classes (kept for JS hooks) */
.wallet-card {
  border-color: rgba(59, 130, 246, 0.35);
  background: linear-gradient(180deg, #141f2e 0%, var(--surface) 100%);
}

.field-compact {
  margin-bottom: 0.55rem !important;
  font-size: 0.78rem !important;
}

.field-compact input,
.field-compact select {
  font-size: 0.88rem;
  padding: 0.45rem 0.55rem;
}

.field-hint {
  font-size: 0.68rem;
  line-height: 1.4;
  color: var(--muted);
  margin: -0.35rem 0 0.55rem;
}

.guide-card {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
}

.guide-card.hidden {
  display: none;
}

.guide-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

.guide-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.78rem;
  line-height: 1.4;
}

.guide-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.guide-steps li span {
  flex-shrink: 0;
  width: 1.25rem;
  height: 1.25rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.2);
  color: var(--amber);
  font-size: 0.68rem;
  font-weight: 700;
}

.help-banner {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px dashed rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.08);
  font-size: 0.84rem;
  line-height: 1.5;
}

.help-banner.hidden {
  display: none;
}

.help-banner strong {
  display: block;
  margin-bottom: 0.25rem;
  color: #93c5fd;
}

.settings-details {
  margin-top: 0.5rem;
}

.settings-details > summary {
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--blue);
  list-style: none;
  margin-bottom: 0.45rem;
}

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

.settings-details-card {
  padding: 0.65rem 0.85rem;
}

.settings-details-card > summary {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.settings-details-card[open] > summary {
  margin-bottom: 0.5rem;
}

.session-hint {
  margin: 0.35rem 0 0.65rem;
  line-height: 1.4;
}

.monitor-actions {
  margin-top: 0.25rem;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--muted);
}

/* Legacy main-tabs (unused — nav is sidebar) */
.main-tabs { display: none; }

.tab-panel {
  display: none;
  flex-direction: column;
  gap: 0.85rem;
}

.tab-panel.active {
  display: flex;
}

.section-head {
  margin-bottom: 0.75rem;
}

.section-head h2 {
  margin-bottom: 0.25rem;
}

.section-desc {
  font-size: 0.8rem;
  line-height: 1.4;
}

.trades-section {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.trade-card {
  padding: 1rem;
}

.trade-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.trade-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.6rem;
  min-width: 0;
}

.trade-kpi span {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.trade-kpi strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.trade-kpi.pnl-kpi strong {
  font-size: 1.15rem;
}

.trade-kpi.loss-zone { border-left: 3px solid rgba(239, 68, 68, 0.5); }
.trade-kpi.profit-zone { border-left: 3px solid rgba(34, 197, 94, 0.5); }

.trade-meta {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.trade-meta-item span {
  color: var(--muted);
  margin-right: 0.35rem;
}

.hub-scores-inline {
  border-top: none;
  padding-top: 0;
  margin-top: 0.25rem;
}

.hub-time {
  font-size: 0.78rem;
  display: block;
  margin-top: 0.15rem;
}

.stats-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.stats-hero-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
}

.stats-hero-item span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.stats-hero-item strong {
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.metrics-inline {
  margin-bottom: 0.65rem;
}

.gates-hint {
  margin: 0 0 0.5rem;
}

.open-trades-panel {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-top: 0;
  border-top: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem;
}

.square-off-note {
  margin: 0;
}

.paper-account {
  margin: 0 0 0.5rem;
  padding: 0.5rem 0.6rem;
  background: rgba(0, 0, 0, 0.2);
}

.paper-reset {
  width: 100%;
  margin-top: 0.35rem;
}

.paper-hint {
  margin: 0.45rem 0 0;
  font-size: 0.72rem;
}


.panel h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

input, select {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  font-size: 0.95rem;
}

.btn-row { display: flex; gap: 0.5rem; margin-top: 0.5rem; }

.btn {
  flex: 1;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  text-decoration: none;
  text-align: center;
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.1); }

.hero {
  background: linear-gradient(135deg, #141b24 0%, #0b1220 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
}

.signal-hub {
  padding: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-color: rgba(59, 130, 246, 0.26);
  background:
    linear-gradient(180deg, rgba(59, 130, 246, 0.08), transparent 42%),
    var(--surface);
}

.decision-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.1rem;
}

.decision-strip span {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #bfdbfe;
  border: 1px solid rgba(147, 197, 253, 0.24);
  background: rgba(59, 130, 246, 0.1);
  border-radius: 999px;
  padding: 0.22rem 0.48rem;
}

.signal-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0 0.15rem;
}

.signal-hero-main {
  min-width: 0;
}

.signal-hero-symbol {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.25rem;
}

.signal-hero-price {
  text-align: right;
  flex-shrink: 0;
}

.signal-hub.in-trade .hub-summary {
  display: none;
}

.signal-hub.in-trade #hub-scores-wrap,
.signal-hub.in-trade #badges,
.signal-hub.in-trade #hub-readiness {
  display: none !important;
}

.signal-hub .badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.hub-top {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  align-items: center;
}
.hub-symbol { font-weight: 600; font-size: 0.95rem; display: block; }
.hub-identity .muted { font-size: 0.8rem; }
.hub-signal { text-align: center; }
.hub-signal .badges { justify-content: center; margin-top: 0.35rem; }
.hub-action {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.25rem 0;
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
}
.hub-action.buy { color: var(--green); }
.hub-action.sell { color: var(--red); }
.hub-action.hold { color: var(--muted); }
.hub-ltp-wrap { text-align: right; }
.hub-label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.hub-ltp {
  font-size: 2.08rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.hub-summary {
  font-size: 0.88rem;
  color: #b8c8d8;
  margin: 0;
  line-height: 1.45;
}

.signal-hub:not(.in-trade) .hub-summary {
  padding: 0.65rem 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  border-left: 3px solid var(--blue);
}

.next-step-card {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  background: #101720;
}

.next-step-card.buy {
  border-color: rgba(34, 197, 94, 0.38);
  background: rgba(34, 197, 94, 0.09);
}

.next-step-card.sell,
.next-step-card.blocked {
  border-color: rgba(239, 68, 68, 0.34);
  background: rgba(239, 68, 68, 0.08);
}

.next-step-card.manage,
.next-step-card.done {
  border-color: rgba(59, 130, 246, 0.4);
  background: rgba(59, 130, 246, 0.1);
}

.next-step-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.next-step-card.buy .next-step-kicker { color: #86efac; }
.next-step-card.sell .next-step-kicker,
.next-step-card.blocked .next-step-kicker { color: #fca5a5; }
.next-step-card.manage .next-step-kicker,
.next-step-card.done .next-step-kicker { color: #93c5fd; }

.next-step-text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #e5edf6;
}

.market-coverage-panel {
  padding: 1rem 1.1rem;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.08), transparent 34%),
    var(--surface);
}

.market-coverage-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.market-coverage-head h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.market-coverage-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.market-coverage-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.market-coverage-grid article {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  padding: 0.75rem;
  min-width: 0;
  transition: border-color 0.15s, transform 0.15s;
}

.market-coverage-grid article:hover {
  border-color: rgba(147, 197, 253, 0.45);
  transform: translateY(-1px);
}

.market-coverage-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.28rem;
}

.market-coverage-grid strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  margin-bottom: 0.28rem;
}

.market-coverage-grid p {
  margin: 0;
  color: #b8c8d8;
  font-size: 0.76rem;
  line-height: 1.4;
}

.chart-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.chart-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
}

.chart-status {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Position panel — full height beside signal */
.position-panel {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1rem 1.1rem;
}

.position-panel .card-title {
  margin: 0;
}

.position-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  flex-shrink: 0;
}

.position-status-pill {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  white-space: nowrap;
}

.position-status-pill.active {
  color: #86efac;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
}

.position-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 14rem;
  background: var(--bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.position-card.inactive {
  border-style: dashed;
}

.position-empty {
  flex: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.25rem 1rem;
  min-height: 6rem;
}

.position-card.inactive .position-empty {
  display: flex;
}

.position-card.inactive .position-hero {
  display: none;
}

.position-empty-title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
}

.position-empty-desc {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 16rem;
}

.position-card.inactive .position-levels dd {
  color: var(--muted);
}

.position-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.5rem 0 0.75rem;
  min-height: 5.5rem;
}

.position-hero-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.position-pnl {
  font-size: 2.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  margin: 0;
  line-height: 1.1;
}

.position-alert {
  font-size: 0.78rem;
  line-height: 1.4;
  color: #93c5fd;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  margin: 0 0 0.65rem;
  flex-shrink: 0;
}

.position-levels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin: 0;
  flex-shrink: 0;
}

.position-level {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 4.25rem;
}

.position-level-stop {
  border-left: 3px solid rgba(239, 68, 68, 0.45);
}

.position-level-target {
  border-left: 3px solid rgba(34, 197, 94, 0.45);
}

.position-level-entry {
  border-left: 3px solid rgba(148, 163, 184, 0.35);
}

.position-levels dt {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.position-levels dd {
  font-size: 1.05rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin: 0;
}

.position-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  color: var(--muted);
  flex-shrink: 0;
}

.position-footer strong {
  font-size: 0.92rem;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.position-margin-per-lot {
  margin: -0.35rem 0 0.5rem;
  font-size: 0.72rem;
  text-align: right;
}

.open-trade-margin-per-lot {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  margin-top: 0.1rem;
}

.position-card.live-trade {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.15);
}

.position-card.live-trade .position-hero {
  align-items: stretch;
  text-align: left;
}

.position-panel .open-trades-panel {
  display: none;
}

.position-subhead {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.35rem;
}

.hub-blockers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.blocker-chip {
  font-size: 0.78rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: #450a0a55;
  color: #fca5a5;
  border: 1px solid #7f1d1d;
}

.hub-mgmt {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.mgmt-chip {
  font-size: 0.78rem;
  padding: 0.3rem 0.55rem;
  border-radius: 999px;
  background: #14532d55;
  color: #86efac;
  border: 1px solid #166534;
}
.mgmt-chip.highlight {
  background: #1e3a8a55;
  color: #93c5fd;
  border-color: #2563eb;
}
.mgmt-chip.warn {
  background: #42200655;
  color: #fcd34d;
  border-color: #92400e;
}

.hub-trade {
  padding: 0.85rem;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.hub-trade.live-trade {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px #2563eb55, 0 4px 24px #1d4ed822;
}
.hub-trade.entry-flash {
  animation: entryPulse 1.2s ease-in-out 2;
}
@keyframes entryPulse {
  0%, 100% { box-shadow: 0 0 0 1px #2563eb55, 0 4px 24px #1d4ed822; }
  50% { box-shadow: 0 0 0 2px #3b82f6, 0 0 32px #3b82f666; }
}

.mgmt-banner {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.75rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #1e3a5f 0%, #172554 100%);
  border: 1px solid #2563eb;
}
.mgmt-banner-icon {
  color: #60a5fa;
  font-size: 1rem;
  line-height: 1.3;
}
.mgmt-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.mgmt-banner-text strong {
  font-size: 0.88rem;
  color: #e0f2fe;
  line-height: 1.35;
}
.mgmt-banner-text span {
  font-size: 0.75rem;
  color: #93c5fd;
  line-height: 1.35;
}

.hub-trade.inactive { opacity: 0.55; }
.hub-trade.inactive .mgmt-banner { display: none; }
.hub-trade-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.6rem;
}
.hub-trade-head h3,
.hub-section-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
.trade-status.active { color: var(--amber); }

.trade-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
}
.strip-item {
  background: var(--surface);
  padding: 0.5rem 0.55rem;
  border-radius: 8px;
  min-width: 0;
}
.strip-item span {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-bottom: 0.15rem;
}
.strip-item strong {
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}
.hub-trade-note { font-size: 0.75rem; margin-top: 0.45rem; }

.open-trades-panel {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.open-trades-hint {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
}

.open-trades-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.5rem;
}

.open-trade-card {
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.open-trade-card--small {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  font-size: 0.74rem;
  line-height: 1.25;
}

.open-trade-card--small:hover {
  border-color: var(--accent, #38bdf8);
  background: rgba(56, 189, 248, 0.06);
}

.open-trade-card--small.is-focus {
  border-color: var(--accent, #38bdf8);
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.22);
}

.open-trade-small-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.open-trade-small-symbol {
  font-size: 0.78rem;
  margin-right: auto;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.open-trade-small-pnl {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.open-trade-small-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 0.5rem;
  margin: 0;
}

.open-trade-small-grid div {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 0;
}

.open-trade-small-grid dt {
  margin: 0;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.open-trade-small-grid dd {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.open-trade-small-meta {
  font-size: 0.65rem;
}

.open-trade-card--small .open-trade-side {
  font-size: 0.62rem;
  padding: 0.1rem 0.35rem;
}

.open-trade-card.buy.open-trade-card--small {
  border-left: 3px solid rgba(34, 197, 94, 0.75);
}

.open-trade-card.sell.open-trade-card--small {
  border-left: 3px solid rgba(239, 68, 68, 0.75);
}

.hub-analysis { min-height: 0; }
.deep-analysis.compact h3 { font-size: 0.9rem; margin: 0.5rem 0 0.25rem; }
.deep-analysis.compact h4 { font-size: 0.72rem; margin: 0.45rem 0 0.2rem; }
.deep-analysis.compact p { font-size: 0.82rem; margin: 0.2rem 0; }

.hub-scores {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}

.hero-top { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 0.85rem; }
.muted { color: var(--muted); }

.signal-action {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin: 0.5rem 0;
}
.signal-action.buy { color: var(--green); }
.signal-action.sell { color: var(--red); }
.signal-action.hold { color: var(--muted); }

.ltp { font-size: 3rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.scores { margin-top: 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; }
.score-bar { display: grid; grid-template-columns: 44px 1fr 28px; align-items: center; gap: 0.5rem; font-size: 0.8rem; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 1024px) {
  .dashboard-guide {
    align-items: stretch;
    flex-direction: column;
  }

  .risk-status-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .risk-checks {
    justify-content: flex-start;
  }

  .dashboard-guide-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    display: grid;
    min-width: 0;
  }

  .dashboard-top {
    grid-template-columns: 1fr;
  }

  .market-coverage-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-hero {
    align-items: flex-start;
  }

  .position-card {
    min-height: 11rem;
  }

  .monitor-card-body {
    flex-direction: column;
    align-items: stretch;
  }

  .monitor-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .monitor-field,
  .monitor-select {
    width: 100%;
    min-width: 0;
  }

  .monitor-actions {
    width: 100%;
  }

  .monitor-actions .btn {
    flex: 1;
  }
}

@media (max-width: 900px) {
  .app-layout {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 0.35rem 0.5rem;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-nav {
    flex-direction: row;
    flex: 1;
    overflow-x: auto;
    gap: 0.15rem;
  }

  .nav-item {
    flex: 1;
    min-width: 4.5rem;
    justify-content: center;
    padding: 0.5rem 0.4rem;
    font-size: 0.78rem;
  }

  .nav-label {
    display: none;
  }

  .sidebar-footer {
    display: none;
  }

  .content-area {
    padding: 1rem;
  }

  .watch-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .watchlist-picker {
    width: 100%;
  }

  .watchlist-chips {
    grid-template-columns: 1fr;
  }

  #chart-container {
    height: 340px;
  }

  .dashboard-guide-steps {
    grid-template-columns: 1fr;
  }

  .market-coverage-grid {
    grid-template-columns: 1fr;
  }

  .watch-card {
    min-height: 5.75rem;
  }

  .signal-hero {
    gap: 0.75rem;
  }

  .topbar-status {
    display: none;
  }

  .app-main { max-height: none; }
  .grid { grid-template-columns: 1fr; }
  .hub-top { grid-template-columns: 1fr; text-align: left; }
  .hub-signal { text-align: left; }
  .hub-signal .badges { justify-content: flex-start; }
  .hub-ltp-wrap { text-align: left; }
  .hub-ltp { font-size: 1.75rem; }
  .trade-kpis { grid-template-columns: repeat(2, 1fr); }
  .trade-strip { grid-template-columns: repeat(2, 1fr); }
  .hub-scores-inline { grid-template-columns: 1fr; }
  .main-tabs { position: static; }
  .tab-sublabel { display: none; }
  .stats-hero { grid-template-columns: 1fr; }

  .setting-row:not(.setting-row-stack) {
    flex-direction: column;
    align-items: stretch;
  }

  .setting-row-control,
  .setting-row-control-wide {
    max-width: none;
    width: 100%;
  }

  .setting-row-control .setup-input-narrow {
    width: 100%;
    text-align: left;
  }
}

.bar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.fill { height: 100%; border-radius: 4px; transition: width 0.3s; }
.fill.long { background: var(--green); }
.fill.short { background: var(--red); }

.stats-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.ss-date { font-size: 0.72rem; margin: -0.35rem 0 0.5rem; }
.ss-exits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.65rem;
}
.ss-exit-chip {
  font-size: 0.72rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--muted);
}
.ss-exit-chip.good {
  background: #14532d44;
  border-color: #166534;
  color: #86efac;
}
.ss-exit-chip.bad {
  background: #450a0a44;
  border-color: #7f1d1d;
  color: #fca5a5;
}
.ss-exit-chip.neutral {
  color: var(--muted);
}
.ss-summary { font-size: 0.8rem; margin-top: 0.55rem; line-height: 1.4; }
.ss-summary.muted { color: var(--muted); }
.ss-summary.profit { color: var(--green); }
.ss-summary.loss { color: var(--red); }

.metrics, .trade-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}
.metrics div, .trade-grid div {
  background: var(--bg);
  padding: 0.6rem;
  border-radius: 8px;
}
.metrics span, .trade-grid span { display: block; font-size: 0.75rem; color: var(--muted); }
.metrics strong, .trade-grid strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }

.profit { color: var(--green); }
.loss { color: var(--red); }
.neutral-val { color: var(--muted); }

.stats-grid strong.profit { color: var(--green); }
.stats-grid strong.loss { color: var(--red); }
.stats-grid strong.neutral-val { color: var(--text); }
.stats-grid #ss-wl .profit,
.stats-grid #ss-wl .loss { font-weight: 700; }
.stats-grid #ss-wl .neutral-val { font-weight: 400; color: var(--muted); }

.pa-grid strong.bias-bull { color: var(--green); }
.pa-grid strong.bias-bear { color: var(--red); }
.pa-grid strong.bias-neutral { color: var(--muted); }

.pa-pattern-list {
  list-style: none;
  margin: 0.65rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.pa-pattern-list li {
  font-size: 0.8rem;
  padding: 0.4rem 0.55rem;
  background: var(--bg);
  border-radius: 6px;
  border-left: 3px solid var(--border);
}
.pa-pattern-list li.bull { border-left-color: var(--green); }
.pa-pattern-list li.bear { border-left-color: var(--red); }
.pa-pattern-list li.neutral { border-left-color: var(--muted); }
.pa-pattern-list .pat-name { font-weight: 600; }
.pa-pattern-list .pat-note { color: var(--muted); font-size: 0.75rem; }

.pa-note {
  font-size: 0.82rem;
  line-height: 1.45;
  margin-top: 0.6rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg);
  border-radius: 8px;
}

.reasons { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.reasons li {
  background: var(--bg);
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.8rem;
  border: 1px solid var(--border);
}

.alerts { display: flex; flex-direction: column; gap: 0.5rem; max-height: 240px; overflow-y: auto; }
.alert-item {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.6rem;
  background: var(--bg);
  border-radius: 8px;
  font-size: 0.85rem;
}
.alert-item .tag {
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-align: center;
}
.alert-item .tag.buy { background: #14532d; color: var(--green); }
.alert-item .tag.sell { background: #450a0a; color: var(--red); }
.alert-item .tag.exit { background: #422006; color: var(--amber); }

/* Trade history table */
.journal-wrap {
  min-height: 120px;
}

.journal-empty {
  padding: 1.5rem 1rem;
  text-align: center;
}

.journal-summary {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
}

.journal-summary .linkish {
  background: none;
  border: none;
  padding: 0;
  color: var(--accent, #60a5fa);
  cursor: pointer;
  font: inherit;
  text-decoration: underline;
}

.journal-scroll-status {
  margin: 0.65rem 0 0;
  padding: 0 0.25rem;
  font-size: 0.8rem;
  text-align: center;
}

.journal-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
  max-height: min(72vh, 640px);
  background: var(--bg);
}

.journal-table--trades {
  min-width: 1080px;
}

.journal-trade-row.journal-row-open {
  background: rgba(245, 158, 11, 0.07);
}

.journal-trade-row.journal-row-superseded,
.journal-row-superseded {
  opacity: 0.7;
  background: rgba(122, 138, 154, 0.06);
}

.journal-trade-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.journal-side {
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.journal-side.side-buy {
  color: var(--green);
}

.journal-side.side-sell {
  color: #f87171;
}

.journal-open-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--amber);
}

.journal-table .col-id {
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

.journal-table .col-opened,
.journal-table .col-closed {
  white-space: nowrap;
  font-size: 0.78rem;
}

.journal-table .col-symbol strong {
  display: block;
  font-size: 0.84rem;
}

.journal-table .col-pnl {
  font-weight: 700;
  white-space: nowrap;
}

.journal-table .col-entry,
.journal-table .col-exit,
.journal-table .col-stop,
.journal-table .col-target,
.journal-table .col-margin {
  white-space: nowrap;
}

.journal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
}

.journal-table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface);
  box-shadow: 0 1px 0 var(--border);
}

.journal-card-table thead {
  display: none;
}

.journal-table th {
  padding: 0.55rem 0.65rem;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.journal-table td {
  padding: 0.6rem 0.65rem;
  border-top: 1px solid var(--border);
  vertical-align: middle;
}

.journal-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

.journal-trade-group {
  border-top: 1px solid var(--border);
}

.journal-trade-group:first-of-type {
  border-top: none;
}

.journal-trade-header td {
  padding: 0.55rem 0.65rem 0.35rem;
  background: rgba(59, 130, 246, 0.08);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
}

.journal-trade-open .journal-trade-header td {
  background: rgba(245, 158, 11, 0.1);
}

.journal-trade-superseded .journal-trade-header td {
  background: rgba(122, 138, 154, 0.12);
}

.journal-trade-id {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
  background: rgba(59, 130, 246, 0.15);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.journal-trade-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  flex: 1;
  min-width: 12rem;
}

.journal-dup-note {
  font-size: 0.72rem;
  color: var(--muted);
  width: 100%;
  flex-basis: 100%;
}

.journal-row-superseded td {
  opacity: 0.65;
  font-size: 0.78rem;
  background: rgba(122, 138, 154, 0.06);
}

.journal-badge-muted {
  background: rgba(122, 138, 154, 0.2);
  color: var(--muted);
  font-size: 0.72rem;
}

.journal-trade-pnl {
  font-size: 0.9rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.journal-trade-card-group {
  border-top: 0;
}

.journal-card-row td {
  padding: 0.7rem;
  background: var(--bg);
}

.journal-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 0.85rem;
}

.journal-card.buy {
  border-left: 3px solid var(--green);
}

.journal-card.sell {
  border-left: 3px solid var(--red);
}

.journal-card-top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.journal-card-kicker {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.18rem;
}

.journal-card h3 {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.25;
}

.journal-card h3 span {
  color: var(--muted);
  font-weight: 600;
}

.journal-lots-tag {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--surface-2, rgba(255, 255, 255, 0.06));
  color: var(--text);
  font-size: 0.72rem;
}

.journal-card p {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.journal-card-result {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
  text-align: right;
  min-width: 8rem;
}

.journal-card-result strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}

.journal-card-result small {
  color: var(--muted);
  font-size: 0.7rem;
}

.journal-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(8rem, 1fr));
  gap: 0.5rem;
}

.journal-metric {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.5rem 0.55rem;
  background: rgba(255, 255, 255, 0.02);
  min-width: 0;
}

.journal-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.66rem;
  margin-bottom: 0.18rem;
}

.journal-metric strong {
  display: block;
  color: var(--text);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.journal-metric small,
.journal-metric em {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.66rem;
  line-height: 1.25;
  font-style: normal;
}

.journal-result-plain {
  background: rgba(59, 130, 246, 0.06);
}

.journal-metric.profit strong {
  color: var(--green);
}

.journal-metric.loss strong {
  color: var(--red);
}

.journal-card-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.journal-card-foot span {
  color: var(--muted);
  font-size: 0.7rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.18rem 0.45rem;
}

.journal-card-foot .journal-card-explain {
  flex-basis: 100%;
  border-radius: 6px;
  border-color: rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.07);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
  padding: 0.45rem 0.55rem;
}

.journal-row-linked .col-when {
  padding-left: 0.35rem;
}

.journal-link-mark {
  display: inline-block;
  width: 1rem;
  margin-right: 0.2rem;
  color: var(--blue);
  font-weight: 700;
  text-align: center;
}

.journal-row-exit.journal-row-linked .journal-link-mark {
  color: var(--muted);
}

.journal-table .col-when {
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.journal-table .col-symbol strong {
  display: block;
  font-size: 0.84rem;
}

.journal-table .col-symbol span {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.journal-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.journal-badge.entry-buy {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.journal-badge.entry-sell {
  background: rgba(239, 68, 68, 0.12);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.journal-badge.exit-win {
  background: rgba(34, 197, 94, 0.12);
  color: var(--green);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.journal-badge.exit-loss {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.journal-badge.exit-neutral {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.journal-table .col-result {
  min-width: 8.5rem;
}

.journal-table th .th-sub {
  display: block;
  font-size: 0.58rem;
  font-weight: 400;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  margin-top: 0.12rem;
}

.journal-result-cell {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  align-items: flex-start;
}

.journal-result-kind {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.journal-result-anticipated .journal-result-kind {
  color: var(--amber);
}

.journal-result-realized .journal-result-kind {
  color: var(--muted);
}

.journal-result-anticipated {
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  border: 1px dashed rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.06);
}

.journal-result-realized {
  padding: 0.2rem 0;
}

.journal-anticipated-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.5rem;
  width: 100%;
}

.journal-anticipated-label {
  font-size: 0.68rem;
  color: var(--muted);
  min-width: 4.2rem;
}

.journal-result-detail {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.journal-pnl {
  font-weight: 600;
  white-space: nowrap;
}

.journal-pnl.profit { color: var(--green); }
.journal-pnl.loss { color: var(--red); }
.journal-pnl.neutral { color: var(--muted); font-weight: 500; }

.journal-plan {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.journal-dash {
  color: var(--muted);
}

.journal-capital {
  font-weight: 600;
  color: var(--amber);
  white-space: nowrap;
}

.wallet-hint {
  font-size: 0.75rem;
  line-height: 1.4;
  margin: 0.35rem 0 0.5rem;
}

.wallet-more {
  margin-top: 0.35rem;
}

.wallet-log-details {
  margin-top: 0.5rem;
}

.paper-audit-issues {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  color: var(--text);
  font-size: 0.82rem;
}

.paper-audit-issues li {
  margin-bottom: 0.35rem;
}

.paper-audit-open {
  margin-top: 0.65rem;
}

.paper-audit-row {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.45rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
}

.paper-audit-row strong {
  font-size: 0.84rem;
}

.paper-audit-row span {
  color: var(--muted);
}

.paper-tx-list {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  max-height: 220px;
  overflow-y: auto;
}

.paper-tx-item {
  padding: 0.45rem 0;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
}

.paper-tx-item:first-child {
  border-top: none;
}

.paper-tx-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.paper-tx-kind {
  font-weight: 600;
  color: var(--text);
}

.paper-tx-amt.debit,
.paper-tx-item.debit .paper-tx-amt {
  color: var(--red);
}

.paper-tx-amt.credit,
.paper-tx-item.credit .paper-tx-amt {
  color: var(--green);
}

.paper-tx-note {
  margin: 0.15rem 0 0;
  color: var(--muted);
  line-height: 1.35;
}

.paper-tx-meta {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 0.1rem;
}

.paper-tx-empty {
  margin: 0.25rem 0 0;
}

@media (max-width: 900px) {
  .journal-table .col-stop,
  .journal-table .col-target,
  .journal-table .col-grade,
  .journal-table .col-setup,
  .journal-table th.col-stop,
  .journal-table th.col-target,
  .journal-table th.col-grade,
  .journal-table th.col-setup {
    display: none;
  }
  .journal-table .col-margin,
  .journal-table th.col-margin {
    display: none;
  }
}

.badges { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin: 0.5rem 0; }
.badge-pill {
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--border);
  color: var(--muted);
}
.badge-pill.grade-a { background: #14532d; color: var(--green); }
.badge-pill.grade-b { background: #422006; color: var(--amber); }

.gates { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem; }
.gates li { font-size: 0.8rem; padding: 0.35rem 0.5rem; border-radius: 6px; }
.gate.pass { background: #14532d33; color: var(--green); }
.gate.fail { background: #450a0a33; color: var(--red); }
.blockers li.pass { color: var(--green); }

.chart-panel {
  padding: 0.85rem 0.85rem 0.65rem;
  border-color: rgba(148, 163, 184, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent 34%),
    var(--surface);
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0 0.25rem 0.5rem;
}
.chart-header h2 { margin-bottom: 0; }
.chart-status { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 0.2rem; }
.chart-status.err { color: var(--red); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.6rem; font-size: 0.72rem; }
.chart-legend .lg::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 3px;
  margin-right: 4px;
  vertical-align: middle;
  border-radius: 2px;
}
.lg.vwap::before { background: #f59e0b; }
.lg.support::before { background: #22c55e; }
.lg.resistance::before { background: #ef4444; }
.lg.range::before { background: linear-gradient(90deg, #f97316 50%, #38bdf8 50%); }
.lg.trade-level::before { background: #a78bfa; }
.lg.ema8::before { background: #4ade80; }
.lg.ema21::before { background: #60a5fa; }
.lg.ema50::before { background: #a78bfa; }
.lg.sup::before { background: #22c55e; height: 2px; border-bottom: 1px dashed #22c55e; }
.lg.res::before { background: #ef4444; }
.lg.tup::before { background: #22c55e88; }
.lg.trend::before { background: #60a5fa88; }

.analysis-summary { font-size: 0.85rem; margin: 0.25rem 0 0.5rem; text-align: center; }
.analysis-summary.err { color: var(--red); }

.analysis-stack {
  margin-top: 0;
}

.live-analysis-grid {
  margin-bottom: 1rem;
}

.hub-readiness {
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--amber);
  margin: 0.5rem 0 0.25rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
}
.deep-analysis { font-size: 0.85rem; line-height: 1.55; color: #c8d4e0; }
.deep-analysis h3 { font-size: 1rem; color: var(--text); margin: 0.75rem 0 0.35rem; }
.deep-analysis h4 { font-size: 0.8rem; color: var(--amber); margin: 0.6rem 0 0.25rem; text-transform: uppercase; letter-spacing: 0.04em; }
.deep-analysis p { margin: 0.35rem 0; }
.gates.compact { margin-top: 0.75rem; }

#chart-container {
  width: 100%;
  height: 430px;
  border-radius: 8px;
  overflow: hidden;
  background: #0b0f14;
  border: 1px solid var(--border-subtle);
}

.hidden { display: none !important; }
.hint { font-size: 0.8rem; color: var(--muted); margin-bottom: 0.75rem; }

.paper-hint {
  margin: 0.35rem 0 0.75rem;
}

.paper-account {
  display: grid;
  gap: 0.35rem;
  margin: 0.5rem 0 0.65rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.8rem;
}

.paper-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.paper-row span {
  color: var(--muted);
}

.paper-reset {
  width: 100%;
  margin-bottom: 0.35rem;
}

.square-off-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 0.85rem;
  padding: 0.65rem 0.75rem;
  border-left: 3px solid var(--accent, #3b82f6);
  background: rgba(59, 130, 246, 0.06);
  border-radius: 0 6px 6px 0;
}

.square-off-note strong {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.square-off-note p {
  margin: 0;
  line-height: 1.45;
}
.msg { font-size: 0.8rem; margin-top: 0.5rem; }
.msg.ok { color: var(--green); }
.msg.err { color: var(--red); }

.app-footer {
  padding: 0.75rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  margin-top: 0.5rem;
}

.footer-disclaimer {
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 72rem;
}

.trust-banner {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 0.85rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.trust-banner-warn {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.35);
}

.trust-banner-ok {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.35);
}

.trust-reg {
  font-family: ui-monospace, monospace;
  font-size: 0.8rem;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.trust-card {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
}

.trust-card h3 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.trust-list {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text);
}

.trust-list li + li {
  margin-top: 0.35rem;
}

.research-note-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.research-note-actions {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}

.research-note {
  margin-top: 0.75rem;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 0.78rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 28rem;
  overflow: auto;
}

.trust-contact-title {
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
}

.trust-contact-panel p a {
  color: var(--blue);
}

/* —— Consumer layer (simple mode) —— */
.consumer-card {
  padding: 1.1rem 1.25rem;
  border-color: var(--border);
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
}

.consumer-card-main {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.consumer-score-ring {
  flex-shrink: 0;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  display: grid;
  place-content: center;
  text-align: center;
  border: 3px solid var(--border);
  background: var(--surface-elevated);
}

.consumer-score-ring strong {
  font-size: 1.35rem;
  line-height: 1.1;
}

.consumer-score-sub {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-top: 0.15rem;
}

.consumer-score-ring.score-high { border-color: var(--green); }
.consumer-score-ring.score-mid { border-color: var(--amber); }
.consumer-score-ring.score-low { border-color: var(--border); }

.consumer-card-copy h2 {
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.consumer-card-copy p {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

.consumer-why {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}

.consumer-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.consumer-stats-row span {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.consumer-stats-row strong {
  font-size: 0.95rem;
}

.consumer-welcome h2 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.consumer-welcome p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.consumer-steps {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
}

.consumer-steps a {
  color: var(--blue);
}

.setting-row-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--muted);
}

.setting-row-check input {
  margin-top: 0.2rem;
}

.option-leg-line {
  font-size: 0.88rem;
  color: var(--blue);
  margin-top: 0.35rem;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.hub-symbol-contract {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin-top: 0.15rem;
  letter-spacing: 0.01em;
}

.chart-instrument-note {
  font-size: 0.78rem;
  color: var(--blue);
  margin-top: 0.25rem;
  line-height: 1.35;
}

.signal-hero-symbol .hub-time {
  display: block;
  margin-top: 0.2rem;
}

.option-practice-panel {
  margin: 0.85rem 0 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(59, 130, 246, 0.45);
  background: linear-gradient(145deg, rgba(59, 130, 246, 0.14), rgba(59, 130, 246, 0.06));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.option-practice-head {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.option-practice-icon {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.35rem 0.45rem;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
}

.option-practice-head-text {
  flex: 1;
  min-width: 0;
}

.option-practice-title {
  font-size: 0.95rem;
  font-weight: 650;
  color: var(--text);
  line-height: 1.25;
}

.option-practice-sub {
  font-size: 0.78rem;
  margin-top: 0.15rem;
  line-height: 1.35;
}

.option-practice-status {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.25);
  color: var(--muted);
}

.option-practice-status.is-open {
  background: rgba(34, 197, 94, 0.2);
  color: var(--green);
}

.option-practice-status.is-ready {
  background: rgba(59, 130, 246, 0.22);
  color: var(--blue);
}

.option-practice-status.is-waiting {
  background: rgba(245, 158, 11, 0.18);
  color: var(--amber);
}

.option-practice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}

@media (max-width: 520px) {
  .option-practice-grid {
    grid-template-columns: 1fr;
  }
}

.option-practice-row {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.option-practice-row dt {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.option-practice-row dd {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  word-break: break-word;
}

.option-practice-row-highlight {
  grid-column: 1 / -1;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.option-practice-row-highlight dd.opt-practice-contract {
  font-size: 1rem;
  color: #93c5fd;
}

.option-practice-row-highlight dd.opt-practice-contract.has-leg {
  color: #bfdbfe;
  font-size: 1.05rem;
}

.position-option-banner {
  margin: 0 0 0.65rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.82rem;
  line-height: 1.4;
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.28);
  border-radius: 8px;
}

#decision-practice-tag {
  color: var(--blue);
  font-weight: 600;
}

.index-practice-badge {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(100, 116, 139, 0.2);
  color: var(--muted);
  vertical-align: middle;
}

.index-practice-badge.option {
  background: rgba(59, 130, 246, 0.18);
  color: var(--blue);
}

.watch-card-option-mode {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  background: var(--blue);
  padding: 0.12rem 0.38rem;
  border-radius: 4px;
  margin-top: 0.2rem;
  margin-bottom: 0.15rem;
}

.watch-card-option-leg {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0.2rem;
  color: #93c5fd;
}

.watch-card.watch-card--options {
  border-color: rgba(59, 130, 246, 0.55);
  background: linear-gradient(160deg, rgba(59, 130, 246, 0.12), var(--surface));
}

.watch-card.watch-card--options.active {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.35);
}

.watch-card.is-loading {
  pointer-events: none;
  opacity: 0.78;
}

.watch-card.is-loading::after {
  content: "Loading…";
  display: block;
  margin-top: 0.3rem;
  color: var(--blue);
  font-size: 0.7rem;
  font-weight: 650;
}

@media (max-width: 640px) {
  .consumer-card-main {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .consumer-stats-row {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.page-eyebrow {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--blue);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.analysis-selector-card {
  position: relative;
  z-index: 4;
}

.analysis-selector-card > label {
  display: block;
  margin-bottom: 0.55rem;
  font-weight: 650;
}

.analysis-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.65rem;
}

.analysis-instrument-search {
  width: 100%;
  min-height: 44px;
  padding: 0.7rem 0.8rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
}

.analysis-search-results {
  display: grid;
  gap: 0.35rem;
  max-height: 300px;
  margin-top: 0.55rem;
  overflow-y: auto;
}

.analysis-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.7rem 0.8rem;
  color: var(--text);
  text-align: left;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.analysis-result span,
.analysis-result small {
  display: block;
}

.analysis-result small,
.analysis-result em,
.analysis-search-note,
.analysis-selected {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.analysis-quick-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.analysis-quick-picks button {
  padding: 0.45rem 0.7rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
}

.analysis-selected {
  margin-top: 0.65rem;
}

.analysis-content {
  margin-top: 1rem;
}

.analysis-empty,
.analysis-loading {
  padding: 2.5rem 1.25rem;
  text-align: center;
}

.analysis-empty p,
.analysis-loading p {
  max-width: 620px;
  margin: 0.45rem auto 0;
  color: var(--muted);
}

.analysis-spinner {
  display: inline-block;
  width: 28px;
  height: 28px;
  margin-bottom: 0.8rem;
  border: 3px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: analysis-spin 0.8s linear infinite;
}

@keyframes analysis-spin {
  to { transform: rotate(360deg); }
}

.analysis-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 1rem;
}

.analysis-hero-card h2 {
  font-size: 1.35rem;
}

.analysis-hero-card p {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}

.analysis-price,
.analysis-decision {
  display: flex;
  min-width: 120px;
  flex-direction: column;
  padding: 0.7rem 0.85rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.analysis-price span,
.analysis-decision span,
.analysis-decision small {
  color: var(--muted);
  font-size: 0.7rem;
}

.analysis-price strong,
.analysis-decision strong {
  margin-top: 0.15rem;
  font-size: 1.1rem;
}

.analysis-decision.buy strong { color: var(--green); }
.analysis-decision.sell strong { color: var(--red); }
.analysis-decision.hold strong { color: var(--amber); }

.analysis-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.analysis-block h3 {
  margin-bottom: 0.8rem;
}

.analysis-block-wide {
  grid-column: 1 / -1;
}

.analysis-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.analysis-metrics-wide {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.analysis-metrics > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.7rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.analysis-metrics span {
  color: var(--muted);
  font-size: 0.7rem;
}

.analysis-metrics strong {
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.analysis-detail,
.analysis-summary-text {
  margin-top: 0.8rem;
  line-height: 1.55;
}

.analysis-blockers {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  color: var(--amber);
}

.analysis-ready {
  margin-top: 0.75rem;
  color: var(--green);
}

.analysis-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.analysis-paper-note {
  margin-top: 0.65rem;
  font-size: 0.76rem;
}

.research-score-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), var(--surface));
}

.research-score-card p {
  margin-top: 0.35rem;
  color: var(--muted);
}

.research-score {
  flex: 0 0 auto;
  color: var(--blue);
  font-size: 2.4rem;
}

.research-score small {
  color: var(--muted);
  font-size: 0.8rem;
}

.timeframe-table {
  display: grid;
  gap: 0.4rem;
}

.timeframe-row {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr repeat(3, 0.7fr);
  align-items: center;
  gap: 0.55rem;
  padding: 0.7rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.timeframe-row .buy { color: var(--green); }
.timeframe-row .sell { color: var(--red); }
.timeframe-row .hold { color: var(--amber); }

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.scenario {
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.scenario p {
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.scenario.bull { border-color: rgba(34, 197, 94, 0.35); }
.scenario.base { border-color: rgba(245, 158, 11, 0.35); }
.scenario.bear { border-color: rgba(239, 68, 68, 0.35); }

.analysis-limitations {
  grid-column: 1 / -1;
}

.analysis-limitations summary {
  cursor: pointer;
  font-weight: 650;
}

.analysis-limitations p,
.analysis-limitations ul {
  margin-top: 0.7rem;
  color: var(--muted);
  line-height: 1.5;
}

.filings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.analysis-source-link,
.filing-item a {
  color: var(--blue);
  font-size: 0.8rem;
  text-decoration: none;
}

.filings-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.filings-columns h4 {
  margin-bottom: 0.55rem;
  font-size: 0.86rem;
}

.filing-list {
  display: grid;
  gap: 0.5rem;
  max-height: 480px;
  overflow-y: auto;
}

.filing-item {
  padding: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.filing-item span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
}

.filing-item strong {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.86rem;
}

.filing-item p {
  margin: 0.35rem 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.analysis-limitations ul {
  padding-left: 1.15rem;
}

.options-page {
  max-width: 1180px;
}

.option-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 0.75rem;
}

.option-controls label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.76rem;
}

.option-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
}

.option-summary-grid > div {
  display: grid;
  gap: 0.25rem;
  padding: 0.75rem;
  background: var(--surface-2);
  border-radius: var(--radius-sm);
}

.option-summary-grid span {
  color: var(--muted);
  font-size: 0.7rem;
}

.option-chain-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
}

.option-chain-head p {
  margin-top: 0.2rem;
}

.option-chain-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.option-chain-table {
  width: 100%;
  min-width: 850px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.option-chain-table th,
.option-chain-table td {
  padding: 0.65rem 0.55rem;
  border-bottom: 1px solid var(--border-subtle);
  text-align: right;
  font-size: 0.78rem;
  white-space: nowrap;
}

.option-chain-table th {
  position: sticky;
  top: 0;
  background: var(--surface-2);
  color: var(--muted);
  z-index: 1;
}

.option-chain-table .strike-col {
  text-align: center;
  background: rgba(245, 158, 11, 0.08);
  font-weight: 700;
}

.option-chain-table .strike-col small {
  display: block;
  color: var(--amber);
  font-size: 0.6rem;
}

.option-chain-table tr.atm {
  background: rgba(245, 158, 11, 0.06);
}

.option-chain-table .call-ltp {
  color: var(--green);
  font-weight: 650;
}

.option-chain-table .put-ltp {
  color: var(--red);
  font-weight: 650;
}

.option-chain-empty {
  padding: 2rem !important;
  color: var(--muted);
  text-align: center !important;
}

.scanner-actions { display: flex; gap: 0.55rem; }
.momentum-scanner-results { display: grid; gap: 0.55rem; }
.momentum-candidate {
  display: grid;
  grid-template-columns: auto minmax(150px, 1.5fr) repeat(4, minmax(85px, 0.7fr));
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.momentum-candidate.bull { border-left-color: var(--green); }
.momentum-candidate.bear { border-left-color: var(--red); }
.momentum-rank {
  display: grid;
  place-items: center;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  background: var(--border);
  font-weight: 700;
}
.momentum-name, .momentum-candidate > div:not(.momentum-rank) { display: grid; gap: 0.18rem; }
.momentum-name span, .momentum-candidate > div span { color: var(--muted); font-size: 0.68rem; }
.momentum-candidate p { grid-column: 2 / -1; margin: 0; color: var(--muted); font-size: 0.74rem; }

@media (max-width: 760px) {
  .analysis-hero-card,
  .analysis-grid {
    grid-template-columns: 1fr;
  }

  .analysis-block-wide {
    grid-column: auto;
  }

  .analysis-hero-card {
    align-items: stretch;
  }

  .analysis-price,
  .analysis-decision {
    min-width: 0;
  }

  .analysis-metrics-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeframe-row {
    grid-template-columns: 1fr 1.5fr;
  }

  .timeframe-row span:nth-child(n+3) {
    font-size: 0.72rem;
  }

  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .filings-columns {
    grid-template-columns: 1fr;
  }

  .option-controls {
    grid-template-columns: 1fr 1fr;
  }

  .option-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .analysis-search-row {
    grid-template-columns: 1fr;
  }

  .analysis-load-btn,
  .analysis-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  .analysis-metrics,
  .analysis-metrics-wide {
    grid-template-columns: 1fr 1fr;
  }

  .research-score-card {
    align-items: flex-start;
  }

  .option-controls {
    grid-template-columns: 1fr;
  }

  .option-controls .btn,
  .option-chain-head .btn {
    width: 100%;
    min-height: 44px;
  }

  .option-chain-head {
    align-items: stretch;
    flex-direction: column;
  }

  .scanner-actions { width: 100%; }
  .scanner-actions .btn { flex: 1; }
  .momentum-candidate { grid-template-columns: auto 1fr 1fr; }
  .momentum-name { grid-column: 2 / -1; }
  .momentum-candidate p { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
  .analysis-metrics,
  .analysis-metrics-wide {
    grid-template-columns: 1fr;
  }
}
.home-welcome {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 22px 26px;
  border: 1px solid #29433a;
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 18%, rgba(61, 164, 126, .16), transparent 32%),
    linear-gradient(135deg, #14211d 0%, #101a17 100%);
}
.home-eyebrow { color: #217a5a; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.home-welcome h1 { max-width: 720px; margin: 6px 0 8px; font-size: clamp(25px, 3vw, 36px); line-height: 1.12; letter-spacing: -.025em; }
.home-welcome p { max-width: 720px; margin: 0; color: #a8b8b1; font-size: 15px; line-height: 1.5; }
.home-safety-badge { min-width: 215px; display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #285644; border-radius: 16px; background: #173126; color: #8ee0bb; }
.home-safety-badge > span { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #217a5a; color: white; font-weight: 900; }
.home-safety-badge div { display: grid; gap: 3px; }.home-safety-badge small { color: #82a998; }
.home-secondary-info { display: none !important; }
#start-panel { border-color: #29483c; box-shadow: 0 14px 35px rgba(0, 0, 0, .16); }
#start-panel .monitor-heading { font-size: 22px; }
.btn-start-main { min-height: 48px; padding-inline: 24px; }
.signal-hub { border-color: #2b4037; }
.signal-hub .hub-action { border-radius: 14px; }
.next-step-card { border-left: 4px solid #217a5a; }
.position-panel { border-color: #2b3933; }
.home-more-details { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.home-more-details > summary { cursor: pointer; padding: 16px 18px; color: #a4b6ae; font-weight: 750; list-style-position: inside; }
.home-more-details-body { padding: 0 12px 12px; }
@media (max-width: 760px) {
  .home-welcome { align-items: flex-start; flex-direction: column; padding: 22px 20px; }
  .home-safety-badge { width: 100%; min-width: 0; }
}

/* ── Automatic mode home ── */
body.auto-mode .home-welcome { display: none; }
body.auto-mode .home-secondary-info { display: none !important; }

.auto-mode-bar {
  border-color: #29483c;
  background:
    radial-gradient(circle at 92% 12%, rgba(61, 164, 126, 0.14), transparent 36%),
    linear-gradient(135deg, #14211d 0%, #101a17 100%);
  padding: 20px 22px;
  margin-bottom: 0;
}
.auto-mode-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.auto-mode-copy h1 {
  margin: 6px 0 8px;
  font-size: clamp(22px, 2.8vw, 32px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.auto-mode-copy p {
  margin: 0;
  max-width: 640px;
  color: #a8b8b1;
  font-size: 14px;
  line-height: 1.5;
}
.auto-mode-status {
  min-width: 160px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  text-align: right;
}
.auto-mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.auto-mode-pill.live {
  color: #8ee0bb;
  background: rgba(33, 122, 90, 0.22);
  border-color: #2d6b52;
}
.auto-mode-pill.live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3dd68c;
  box-shadow: 0 0 0 4px rgba(61, 214, 140, 0.2);
  animation: auto-pulse 1.6s ease-in-out infinite;
}
.auto-mode-pill.standby {
  color: #d4c07a;
  background: rgba(120, 96, 24, 0.18);
  border-color: #5a4a1e;
}
.auto-mode-pill.wait {
  color: #9eb0c8;
  background: rgba(80, 100, 130, 0.18);
  border-color: #3d4f66;
}
.auto-mode-pill.alert {
  color: #ffb4b4;
  background: rgba(140, 40, 40, 0.2);
  border-color: #6b3030;
}
.auto-mode-pill.manual {
  color: #a8b8b1;
  background: rgba(255, 255, 255, 0.04);
  border-color: #33443c;
}
.auto-mode-detail,
.auto-mode-scan {
  margin: 0;
  max-width: 280px;
  font-size: 12px;
  line-height: 1.45;
}
.auto-morning-strip {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.auto-morning-strip-label {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 700;
  color: #82a998;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.auto-morning-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.auto-morning-chip {
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #c8d6d0;
}
.auto-morning-chip.buy { border-color: rgba(61, 214, 140, 0.35); color: #9eecc8; }
.auto-morning-chip.sell { border-color: rgba(255, 120, 120, 0.35); color: #ffb8b8; }

.watch-grid-section--auto {
  margin-top: 14px;
}
.watch-grid-section--preview {
  opacity: 0.92;
}
.watch-grid-section--preview .watch-card-price {
  color: #6d7d76;
}
.watch-grid-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.watch-grid-head-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}
.watch-grid-session-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: min(280px, 42vw);
}
.watch-grid-session-badges.hidden {
  display: none;
}
.session-badge {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.2;
}
.session-badge--open {
  color: #8ee0bb;
  background: rgba(33, 122, 90, 0.15);
  border: 1px solid rgba(45, 107, 82, 0.5);
}
.session-badge--closed {
  color: #f0c674;
  background: rgba(180, 120, 20, 0.18);
  border: 1px solid rgba(200, 140, 30, 0.45);
}
.watch-grid-live-dot {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8ee0bb;
  background: rgba(33, 122, 90, 0.2);
  border: 1px solid #2d6b52;
  animation: auto-pulse 1.6s ease-in-out infinite;
}
.watch-grid-empty {
  margin: 12px 0 0;
  font-size: 13px;
  text-align: center;
  padding: 8px 0 4px;
}
.manual-monitor-panel {
  margin-top: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.12);
}
.manual-monitor-panel > summary {
  cursor: pointer;
  padding: 14px 16px;
  color: #8fa59c;
  font-weight: 700;
  list-style-position: inside;
}
.manual-monitor-panel #start-panel {
  margin: 0 12px 12px;
  box-shadow: none;
}
.dashboard-auto .consumer-card {
  margin-top: 14px;
}
.dashboard-auto .dashboard-top {
  margin-top: 14px;
}
@keyframes auto-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.55; }
}
@media (max-width: 760px) {
  .auto-mode-status {
    align-items: flex-start;
    text-align: left;
    width: 100%;
  }
  .auto-mode-detail,
  .auto-mode-scan {
    max-width: none;
  }
}
