:root {
  --bg: #07090F;
  --bg-card: rgba(11, 15, 25, 0.86);
  --bg-solid: #0B0F19;
  --bg-elevated: #121827;
  --border: rgba(148, 163, 184, 0.16);
  --border-glow: rgba(0, 240, 255, 0.35);
  --text: #F1F5F9;
  --muted: #94A3B8;
  --cyan: #00F0FF;
  --emerald: #10B981;
  --coral: #F43F5E;
  --amber: #F59E0B;
  --violet: #8B5CF6;
  --shadow-card: 0 12px 32px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 12% 0%, rgba(0, 240, 255, 0.08), transparent 36%),
    radial-gradient(circle at 88% 12%, rgba(139, 92, 246, 0.09), transparent 38%),
    var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}
.muted { color: var(--muted); }
.small-note { font-size: 0.78rem; margin: 0.22rem 0 0; }
.hidden { display: none !important; }
.text-cyan { color: var(--cyan); }
.text-emerald { color: var(--emerald); }
.text-coral { color: var(--coral); }
.text-amber { color: var(--amber); }
.text-violet { color: var(--violet); }

/* COMPACT HEADER <= 52px */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 12px;
  background: rgba(7, 9, 15, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.brand { display: flex; align-items: center; gap: 8px; min-width: 0; }
.brand-name { font-weight: 800; letter-spacing: 0.08em; font-size: 0.94rem; }
.topbar-status { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

@media (max-width: 440px) {
  .hide-xs { display: none !important; }
}

.shell {
  max-width: 1440px;
  margin: 0 auto;
  padding: 12px 12px 92px;
}

/* GLASS CARDS */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow-card);
}
.glass-card {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.card h1 { margin: 8px 0; font-size: 1.45rem; line-height: 1.22; }
.card h2 { margin: 0 0 2px; font-size: 1rem; font-weight: 700; }
.card h3 { margin: 6px 0; font-size: 0.92rem; }
.lead { margin: 8px 0 12px; color: #CBD5E1; font-size: 0.92rem; }

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* BADGES & PILLS */
.badge, .pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-neutral { background: rgba(148, 163, 184, 0.14); color: var(--muted); }
.badge-cyan { background: rgba(0, 240, 255, 0.14); color: var(--cyan); border: 1px solid rgba(0, 240, 255, 0.25); }
.badge-ok { background: rgba(16, 185, 129, 0.16); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.26); }
.badge-amber { background: rgba(245, 158, 11, 0.16); color: var(--amber); border: 1px solid rgba(245, 158, 11, 0.28); }
.badge-staging {
  background: rgba(245, 158, 11, 0.16);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.44);
  font-size: 0.66rem;
  padding: 2px 7px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-violet { background: rgba(139, 92, 246, 0.18); color: #C4B5FD; border: 1px solid rgba(139, 92, 246, 0.3); }

.pill-ok { background: rgba(16, 185, 129, 0.16); color: var(--emerald); }
.pill-warn { background: rgba(245, 158, 11, 0.16); color: var(--amber); }
.pill-danger { background: rgba(244, 63, 94, 0.18); color: #FDA4AF; }
.pill-market { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text); }
.pill-sse { background: rgba(15, 23, 42, 0.85); border: 1px solid var(--border); color: var(--muted); }
.pill-sse.online { color: var(--emerald); border-color: rgba(16, 185, 129, 0.35); }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* BUTTONS & INPUTS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 9px 14px;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-compact { padding: 5px 10px; font-size: 0.75rem; border-radius: 9px; }
.btn-lg { padding: 11px 16px; font-size: 0.92rem; }
.btn-block { width: 100%; }
.btn-cyan { background: linear-gradient(135deg, #00F0FF, #0EA5E9); color: #05080F; font-weight: 700; }
.btn-cyan-outline { background: rgba(0, 240, 255, 0.08); border-color: rgba(0, 240, 255, 0.4); color: var(--cyan); }
.btn-emerald { background: rgba(16, 185, 129, 0.22); border-color: var(--emerald); color: #6EE7B7; }
.btn-coral-outline { background: rgba(244, 63, 94, 0.12); border-color: rgba(244, 63, 94, 0.45); color: #FDA4AF; }
.btn-secondary { background: var(--bg-elevated); border-color: var(--border); color: var(--text); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--muted); }

select, input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="search"] {
  width: 100%;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 0.88rem;
  outline: none;
}
select:focus, input:focus { border-color: var(--cyan); }

input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
}

/* TOAST */
.toast {
  position: fixed;
  top: 58px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 70;
  width: min(92vw, 460px);
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(11, 15, 25, 0.96);
  border: 1px solid var(--cyan);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  font-size: 0.84rem;
  text-align: center;
}

/* VISITOR / ENTRY SCREEN */
.visitor-wrap { display: flex; flex-direction: column; gap: 14px; }
.attr-banner {
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(139, 92, 246, 0.16);
  border: 1px solid rgba(139, 92, 246, 0.4);
  font-size: 0.84rem;
}
.visitor-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.visitor-left, .visitor-right { display: flex; flex-direction: column; gap: 14px; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.steps-trio { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 10px; }
.mini-step {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(18, 24, 39, 0.72);
  border: 1px solid var(--border);
}
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 240, 255, 0.16);
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.76rem;
  margin-bottom: 2px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  background: var(--bg-elevated);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}
.seg-btn {
  border: none;
  border-radius: 9px;
  padding: 8px 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}
.seg-btn.active {
  background: rgba(0, 240, 255, 0.16);
  color: var(--cyan);
}

.public-box { display: flex; flex-direction: column; gap: 10px; }
.public-engines-mini { display: grid; grid-template-columns: 1fr; gap: 8px; }
.public-engine-item {
  padding: 9px 10px;
  border-radius: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

/* DEMO & LIVE SWIPE CARD */
.swipe-card {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 14px;
  background: linear-gradient(150deg, rgba(18, 24, 39, 0.95), rgba(11, 15, 25, 0.96));
  border: 1px solid rgba(0, 240, 255, 0.25);
  touch-action: pan-y;
  user-select: none;
  cursor: grab;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  margin-bottom: 10px;
}
.swipe-card.dragging { transition: none; cursor: grabbing; }
.swipe-card.swipe-left-glow { border-color: var(--coral); box-shadow: 0 0 24px rgba(244, 63, 94, 0.26); }
.swipe-card.swipe-right-glow { border-color: var(--emerald); box-shadow: 0 0 24px rgba(16, 185, 129, 0.28); }

.swipe-stamp {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}
.stamp-left { right: 12px; border: 2px solid var(--coral); color: var(--coral); background: rgba(244, 63, 94, 0.15); }
.stamp-right { left: 12px; border: 2px solid var(--emerald); color: var(--emerald); background: rgba(16, 185, 129, 0.15); }

.risk-preview-pill {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(0, 240, 255, 0.08);
  border: 1px solid rgba(0, 240, 255, 0.24);
  font-size: 0.8rem;
  color: #E0F2FE;
}
.swipe-hint { font-size: 0.73rem; text-align: center; margin-top: 8px; }
.demo-feedback {
  margin-top: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 0.82rem;
}

/* APP LAYOUT & SIDEBAR */
.app-layout { display: grid; grid-template-columns: 1fr; gap: 14px; }
.sidebar-bento { display: none; }
.workspace { min-width: 0; }
.tab-panel { display: none; flex-direction: column; gap: 14px; }
.tab-panel.active { display: flex; }

/* ONBOARDING CHECKLIST 1->2->3 */
.onboarding-card { border-color: rgba(0, 240, 255, 0.32); }
.stepper-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 10px; }
.step-pill {
  text-align: center;
  padding: 7px 6px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
}
.step-pill.done { background: rgba(16, 185, 129, 0.14); border-color: rgba(16, 185, 129, 0.4); color: var(--emerald); }
.step-pill.active { background: rgba(0, 240, 255, 0.14); border-color: rgba(0, 240, 255, 0.45); color: var(--cyan); }
.onb-mt5-grid { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }

.preset-cards { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
.preset-pick, .exit-pick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.preset-pick.selected, .exit-pick.selected {
  border-color: var(--cyan);
  background: rgba(0, 240, 255, 0.12);
}

/* SHIELD GAUGE */
.shield-visual { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.shield-ring-wrap { position: relative; width: 92px; height: 92px; flex-shrink: 0; }
.shield-ring { width: 92px; height: 92px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--bg-elevated); stroke-width: 10; }
.ring-fg {
  fill: none;
  stroke: var(--emerald);
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 301.6;
  stroke-dashoffset: 301.6;
  transition: stroke-dashoffset 0.3s ease, stroke 0.25s ease;
}
.shield-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
}
.shield-meta { flex: 1; min-width: 190px; }
.meter-track {
  height: 10px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.meter-fill { height: 100%; background: linear-gradient(90deg, var(--emerald), var(--amber), var(--coral)); transition: width 0.25s; }
.shield-stats-line { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; gap: 8px; }
.quick-links-row { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* KPIS & LISTS */
.grid-hero, .grid-two { display: grid; grid-template-columns: 1fr; gap: 12px; }
.grid-two-compact { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.kpi-card { display: flex; flex-direction: column; gap: 2px; }
.kpi-label { font-size: 0.76rem; color: var(--muted); }
.kpi-num { font-size: 1.48rem; font-weight: 700; }
.kpi-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { display: flex; flex-direction: column; }
.market-pills { display: flex; flex-wrap: wrap; gap: 7px; }

.coach-lines { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 0.86rem; }
.exec-cards-grid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.exec-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 9px 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 11px;
}

/* RADARS & LIGHTWEIGHT-CHARTS v5 (>= 50% HEIGHT MOBILE) */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.filter-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; flex: 1; }
.filter-group select { width: auto; min-width: 110px; padding: 7px 9px; font-size: 0.82rem; }
.tf-pills { display: inline-flex; gap: 4px; background: var(--bg-elevated); padding: 3px; border-radius: 10px; border: 1px solid var(--border); }
.tf-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 7px;
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.tf-btn.active { background: rgba(0, 240, 255, 0.16); color: var(--cyan); }

.chart-card { padding: 10px; }
.chart-overlay-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.chart-overlay-left, .chart-overlay-right { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chart-host {
  width: 100%;
  min-height: 52vh;
  height: clamp(350px, 54vh, 520px);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #07090F;
  position: relative;
}

.signal-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.signal-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.signal-card:hover { border-color: var(--border-glow); }
.sig-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sig-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; font-size: 0.8rem; }
.sig-actions { display: flex; gap: 8px; margin-top: 4px; }
.sig-actions .btn { flex: 1; }

/* AUTOPILOT ENGINE CARDS */
.engine-cards-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.engine-card { display: flex; flex-direction: column; gap: 8px; }
.engine-pairs-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.pair-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.76rem;
  cursor: pointer;
}
.pair-chip.is-live { border-color: rgba(16, 185, 129, 0.5); background: rgba(16, 185, 129, 0.14); color: #6EE7B7; }
.pair-chip.is-sim { border-color: rgba(245, 158, 11, 0.4); }

.vault-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 0.92rem;
  list-style: none;
}
.vault-summary::-webkit-details-marker { display: none; }

.table-wrap { overflow-x: auto; margin-top: 10px; }
.matrix-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.matrix-table th, .matrix-table td {
  padding: 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}
.matrix-table th { color: var(--muted); font-weight: 600; }

/* FORMS & ACCOUNTS */
.stack-form { display: flex; flex-direction: column; gap: 10px; }
.stack-form label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; color: var(--muted); }
.accounts-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.row-between { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.field-label { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.share-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.share-box code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.78rem; }

/* BOTTOM DOCK (< 1280px) */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 30;
  height: 64px;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 3px;
  background: rgba(7, 9, 15, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.bnav-btn {
  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 4px 2px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 600;
  cursor: pointer;
}
.bnav-btn.active { color: var(--cyan); background: rgba(0, 240, 255, 0.1); border-color: rgba(0, 240, 255, 0.25); }
.bnav-ico { font-size: 0.95rem; line-height: 1; }

.count-badge {
  position: absolute;
  top: 4px;
  right: 12px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--cyan);
  color: #05080F;
  font-size: 0.68rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* FLOATING COACH BUBBLE (NO OVERLAP WITH BOTTOM DOCK) */
.coach-fab {
  position: fixed;
  right: 14px;
  bottom: 76px;
  z-index: 35;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0, 240, 255, 0.45);
  background: rgba(11, 15, 25, 0.94);
  color: var(--cyan);
  font-weight: 700;
  font-size: 0.82rem;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
.fab-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); }

/* DRAWERS & BOTTOM SHEETS */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(3, 5, 10, 0.72);
  backdrop-filter: blur(4px);
}
.drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  max-height: 88vh;
  background: #0B0F19;
  border-top: 1px solid var(--border-glow);
  border-radius: 20px 20px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -14px 40px rgba(0, 0, 0, 0.65);
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.drawer-body {
  padding: 14px 16px 24px;
  overflow-y: auto;
}

.exit-cards { display: grid; grid-template-columns: 1fr; gap: 7px; }
.asset-pills-wrap { display: flex; flex-wrap: wrap; gap: 7px; }
.asset-pill {
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.asset-pill.active {
  background: rgba(0, 240, 255, 0.16);
  border-color: var(--cyan);
  color: var(--cyan);
}
.toggle-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text) !important;
}
.advanced-bridge {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  font-size: 0.82rem;
}
.advanced-bridge summary { cursor: pointer; font-weight: 600; }

.coach-drawer-body { display: flex; flex-direction: column; gap: 10px; }
.quick-prompts { display: flex; flex-wrap: wrap; gap: 6px; }
.prompt-chip {
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--cyan);
  font-size: 0.75rem;
  cursor: pointer;
}
.chat-box {
  height: 240px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.chat-msg { padding: 8px 11px; border-radius: 11px; font-size: 0.85rem; max-width: 92%; }
.chat-user { align-self: flex-end; background: rgba(0, 240, 255, 0.14); border: 1px solid rgba(0, 240, 255, 0.35); }
.chat-bot { align-self: flex-start; background: var(--bg-elevated); border: 1px solid var(--border); }
.chat-blocked { border-color: rgba(244, 63, 94, 0.55); background: rgba(244, 63, 94, 0.12); }
.chat-input-row { display: flex; gap: 8px; }
.chat-input-row input { flex: 1; }

/* RESPONSIVE BREAKPOINTS */
@media (min-width: 768px) {
  .shell { padding: 16px 20px 88px; }
  .steps-trio, .preset-cards, .exit-cards { grid-template-columns: repeat(3, 1fr); }
  .public-engines-mini, .grid-hero, .grid-two, .signal-grid, .engine-cards-grid { grid-template-columns: repeat(2, 1fr); }
  .onb-mt5-grid { grid-template-columns: repeat(3, 1fr); }
  .onb-mt5-grid .sig-actions { grid-column: 1 / -1; }
  .drawer {
    left: auto;
    top: 50px;
    right: 0;
    bottom: 0;
    width: 430px;
    max-height: none;
    border-radius: 0;
    border-top: none;
    border-left: 1px solid var(--border-glow);
  }
}

@media (min-width: 1024px) {
  .visitor-grid { grid-template-columns: 1.35fr 0.95fr; align-items: start; }
  .auth-card { position: sticky; top: 66px; }
  .signal-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1280px) {
  .shell { padding: 18px 24px 32px; }
  .bottom-nav { display: none; }
  .coach-fab { bottom: 22px; right: 24px; }
  .app-layout {
    grid-template-columns: 248px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
  }
  .sidebar-bento {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 68px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    backdrop-filter: blur(14px);
  }
  .sidebar-user {
    display: flex;
    flex-direction: column;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-nav { display: flex; flex-direction: column; gap: 6px; }
  .nav-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 10px 12px;
    border-radius: 11px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--muted);
    font-size: 0.87rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
  }
  .nav-btn.active {
    background: rgba(0, 240, 255, 0.13);
    border-color: rgba(0, 240, 255, 0.34);
    color: var(--cyan);
  }
  .nav-btn .count-badge { position: static; margin-left: auto; }
  .sidebar-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
  .engine-cards-grid { grid-template-columns: repeat(4, 1fr); }
}

/* UNIFIED IDENTITY, PASSWORD RESET & TEAM CONSOLE */
.link-btn {
  background: transparent;
  border: none;
  color: var(--cyan);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.forgot-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 4px;
}
.info-banner {
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(0, 240, 255, 0.1);
  border: 1px solid rgba(0, 240, 255, 0.35);
  color: #E0F2FE;
  font-size: 0.8rem;
}
.identity-summary-box,
.mailbox-panel,
.security-box,
.policy-preview-box,
.mail-health-box {
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mailbox-panel {
  border-color: rgba(0, 240, 255, 0.28);
  background: rgba(0, 240, 255, 0.05);
}
.policy-preview-box {
  border-color: rgba(139, 92, 246, 0.34);
  background: rgba(139, 92, 246, 0.08);
  font-size: 0.79rem;
}
.identity-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.identity-kv {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.identity-kv strong {
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}
.alias-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.btn-amber-outline {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
  color: #FCD34D;
}
.team-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}
.role-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.filter-pill {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--muted);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
}
.filter-pill.active {
  background: rgba(0, 240, 255, 0.16);
  border-color: var(--cyan);
  color: var(--cyan);
}
.team-users-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
.team-user-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.team-user-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}
.team-user-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.input-suffix-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.input-suffix-wrap input {
  border: none;
  border-radius: 0;
  flex: 1;
  min-width: 0;
}
.input-suffix {
  padding: 0 10px;
  font-size: 0.76rem;
  color: var(--muted);
  border-left: 1px solid var(--border);
  white-space: nowrap;
}
@media (min-width: 768px) {
  .team-users-list { grid-template-columns: repeat(2, 1fr); }
  .billing-plans-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* SAAS BILLING, 1-TIER PARTNER SLUGS & BRIDGE CONNECT (BYO) */
.billing-plans-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.plan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 13px;
  border-radius: 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.plan-card.active-plan {
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.25);
}
.plan-price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.plan-price-val {
  font-size: 1.35rem;
  font-weight: 800;
}
.plan-features-list {
  margin: 0;
  padding-left: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: var(--muted);
}
.plan-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-top: 4px;
}
.crypto-pay-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.crypto-pay-row select {
  width: 92px;
  flex-shrink: 0;
}
.crypto-pay-row button {
  flex: 1;
  min-width: 0;
}
.billing-status-box {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bridge-account-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.bridge-key-panel {
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(0, 240, 255, 0.05);
  border: 1px dashed rgba(0, 240, 255, 0.35);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.token-reveal-box {
  margin-bottom: 10px;
  padding: 11px 12px;
  border-radius: 11px;
  background: rgba(16, 185, 129, 0.11);
  border: 1px solid rgba(16, 185, 129, 0.48);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.token-reveal-box code {
  word-break: break-all;
  font-size: 0.84rem;
  color: #ECFDF5;
}
.slug-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.slug-form-row .input-prefix-wrap {
  flex: 1;
  min-width: 180px;
  display: flex;
  align-items: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.input-prefix {
  padding: 0 9px;
  font-size: 0.76rem;
  color: var(--muted);
  border-right: 1px solid var(--border);
  white-space: nowrap;
}
.slug-form-row .input-prefix-wrap input {
  border: none;
  border-radius: 0;
  flex: 1;
  min-width: 0;
}
.share-channels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 6px;
}
.compliance-list .policy-preview-box p {
  margin: 4px 0 0;
}

/* ================================================================
   LOT 7: PUBLIC VITRINE, EXEC EXPORT BAR, ACADEMY, SUB-TABS & STUDIO
   ================================================================ */
html {
  scroll-behavior: smooth;
}

.vitrine-nav {
  position: sticky;
  top: 56px;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 9px 12px;
  border-radius: 14px;
  background: rgba(11, 15, 25, 0.9);
  border: 1px solid var(--border);
}
.vitrine-links {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  max-width: 100%;
  scrollbar-width: none;
}
.vitrine-links::-webkit-scrollbar {
  display: none;
}
.vitrine-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 9px;
  border-radius: 8px;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}
.vitrine-link:hover {
  color: var(--cyan);
  background: rgba(0, 240, 255, 0.08);
}

.vitrine-section {
  scroll-margin-top: 112px;
}

.vitrine-engines-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.vitrine-engine-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.security-compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.security-option-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 13px;
  border-radius: 13px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.security-option-card.is-bridge {
  border-color: rgba(16, 185, 129, 0.42);
  background: rgba(16, 185, 129, 0.05);
}
.shield-callout {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(0, 240, 255, 0.06);
  border: 1px solid rgba(0, 240, 255, 0.3);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}
.faq-item p {
  margin-top: 7px;
}

.vitrine-footer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: space-between;
}
.footer-brand-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.footer-links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.footer-link {
  color: var(--cyan);
  text-decoration: none;
}
.footer-link:hover {
  text-decoration: underline;
}

/* COCKPIT EXECUTIONS FILTER & CSV EXPORT TOOLBAR */
.exec-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.exec-toolbar select {
  width: auto;
  min-width: 125px;
  padding: 5px 9px;
  font-size: 0.78rem;
}

/* ACADEMY MODULES */
.academy-kpi {
  padding: 10px;
  border-radius: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.academy-exit-item {
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.academy-cmd-box {
  padding: 10px 11px;
  border-radius: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cmd-code {
  display: block;
  padding: 8px 9px;
  border-radius: 8px;
  background: #07090F;
  border: 1px solid var(--border);
  color: #E0F2FE;
  font-size: 0.74rem;
  overflow-x: auto;
  white-space: nowrap;
}

/* TACTILE SUB-TAB BARS (MON ESPACE & STUDIO) */
.subtab-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow-x: auto;
  padding: 6px;
  border-radius: 13px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  scrollbar-width: none;
}
.subtab-bar::-webkit-scrollbar {
  display: none;
}
.subtab-btn {
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  border-radius: 9px;
  padding: 8px 13px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.subtab-btn:hover {
  color: var(--text);
}
.subtab-btn.active {
  background: rgba(0, 240, 255, 0.14);
  border-color: rgba(0, 240, 255, 0.36);
  color: var(--cyan);
}

/* STUDIO CONTROLS & AUDIT LOGS */
.ks-control-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.ks-control-bar input {
  flex: 1;
  min-width: 210px;
}
.audit-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.audit-filter-row select {
  width: auto;
  min-width: 190px;
}
.audit-filter-row input {
  flex: 1;
  min-width: 200px;
}
.audit-event-card {
  padding: 10px 12px;
  border-radius: 11px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.audit-details-pre {
  margin: 0;
  font-size: 0.75rem;
  color: #CBD5E1;
  overflow-wrap: anywhere;
}

@media (min-width: 768px) {
  .vitrine-engines-grid,
  .security-compare-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .vitrine-footer {
    flex-direction: row;
    align-items: center;
  }
}

@media (min-width: 1280px) {
  .vitrine-engines-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
