/* ═══════════════════════════════════════════
   狐の交易機器人平台 – 君瀾信號機器人平台
   Dark Theme: bg #0D1117, cards #161B22, gold #5E6AD2
   ═══════════════════════════════════════════ */

:root {
  --bg: #0D1117;
  --panel: #161B22;
  --line: rgba(148,163,184,.18);
  --text: #e5eefb;
  --muted: #91a4bd;
  --primary: #38bdf8;
  --primary2: #22d3ee;
  --green: #22c55e;
  --red: #fb7185;
  --yellow: #A5AEFF;
  --gold: #5E6AD2;
  --info: #3b82f6;
  --shadow: 0 24px 80px rgba(0,0,0,.35);

  /* ── Spacing scale (8px base) ──
     統一卡片節奏：卡片群 gap = --gap，卡片內距 = --card-pad */
  --sp-1: 8px;
  --sp-2: 12px;
  --sp-3: 16px;
  --sp-4: 20px;
  --sp-5: 24px;
  --sp-6: 28px;
  --gap: var(--sp-3);        /* 卡片與卡片間距 = 16px */
  --card-pad: var(--sp-4);   /* 卡片內距 = 20px */
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter","Noto Sans TC","Microsoft JhengHei",system-ui,sans-serif;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 18% 8%, rgba(56,189,248,.15), transparent 32%),
    radial-gradient(circle at 85% 18%, rgba(34,211,238,.10), transparent 28%),
    radial-gradient(circle at 50% 80%, rgba(255,215,0,.05), transparent 40%);
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.glass {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

/* ──────── Background Orbs ──────── */
.bg-orbs {
  position: fixed; inset: 0;
  pointer-events: none; overflow: hidden; z-index: -1;
}
.bg-orbs span {
  position: absolute; width: 280px; height: 280px;
  border-radius: 999px; filter: blur(28px); opacity: .18;
  animation: floatOrb 14s ease-in-out infinite;
}
.bg-orbs span:nth-child(1) { left: 6%; top: 8%; background: #38bdf8; }
.bg-orbs span:nth-child(2) { right: 10%; top: 18%; background: #22d3ee; animation-delay: -5s; }
.bg-orbs span:nth-child(3) { left: 42%; bottom: 4%; background: #5E6AD2; animation-delay: -9s; }

/* ──────── Auth Screen ──────── */
.auth-screen {
  min-height: 100vh; display: grid; place-items: center; padding: 28px;
}
.auth-card {
  width: min(480px, 100%); padding: 30px;
  border-radius: 30px;
  animation: riseIn .65s cubic-bezier(.2,.8,.2,1) both;
}
.brand {
  display: flex; gap: 14px; align-items: center; margin-bottom: 30px;
}
.brand-mark {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(56,189,248,.28), rgba(255,215,0,.15));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
  font-size: 28px;
  animation: lobsterPulse 2.8s ease-in-out infinite;
}
.brand-mark img {
  width: 34px;
  height: 34px;
  display: block;
  border-radius: 10px;
}
.brand h1 { font-size: 22px; margin: 0 0 4px; }
.brand p { color: var(--muted); margin: 0; font-size: 12px; }
.auth-card h2 { margin: 0 0 10px; font-size: 30px; }
.eyebrow {
  color: var(--gold); text-transform: uppercase;
  letter-spacing: .12em; font-size: 12px; margin: 0 0 8px;
}
.muted { color: var(--muted); margin: 0; }

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 5px; margin-top: 22px; border-radius: 16px;
  background: rgba(255,255,255,.38); border: 1px solid var(--line);
}
.auth-tabs button {
  border: 0; background: transparent; color: var(--muted);
  padding: 10px; border-radius: 12px; transition: .2s;
}
.auth-tabs button.active {
  color: var(--text); background: rgba(56,189,248,.14);
}

.auth-form { display: none; gap: 14px; margin-top: 18px; }
.auth-form.active { display: grid; }
.auth-foot { margin-top: 16px; color: var(--muted); font-size: 13px; }

/* ──────── App Shell ──────── */
.app-shell { display: none; min-height: 100vh; }
body.logged-in .auth-screen { display: none; }
body.logged-in .app-shell { display: flex; }

/* ──────── Sidebar ──────── */
.sidebar {
  width: 285px; padding: 28px 22px;
  border-right: 1px solid var(--line);
  position: sticky; top: 0; height: 100vh;
  animation: riseIn .55s both;
  overflow-y: auto;
}
.nav { display: grid; gap: 6px; }
.nav button {
  color: var(--muted); text-align: left; border: 0;
  background: transparent; padding: 11px 14px;
  border-radius: 14px; transition: .22s;
  font-size: 14px;
}
.nav button:hover, .nav button.active {
  color: var(--text);
  background: rgba(56,189,248,.12);
  box-shadow: inset 0 0 0 1px rgba(56,189,248,.22);
}
.nav-divider {
  height: 1px; background: var(--line); margin: 8px 0;
}

.side-card {
  position: absolute; left: 22px; right: 22px; bottom: 24px;
  display: flex; gap: 12px; padding: 14px;
  border-radius: 18px; background: rgba(255,255,255,.8);
  border: 1px solid var(--line);
}
.side-card p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.status-dot {
  width: 10px; height: 10px; margin-top: 5px;
  border-radius: 999px; background: var(--green);
  animation: onlineBlink 1.8s ease-in-out infinite;
}

/* ──────── Main Content ──────── */
.main { flex: 1; padding: 30px; max-width: 1800px; margin: 0 auto; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; margin-bottom: 22px; animation: riseIn .6s both;
}
.topbar h2 { font-size: 34px; margin: 0; }
.top-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ──────── Buttons ──────── */
.primary, .ghost, .small-btn, .danger-btn {
  border: 0; border-radius: 14px; padding: 12px 16px;
  color: var(--text); transition: .22s;
}
.primary {
  background: linear-gradient(135deg, #0284c7, #06b6d4);
  box-shadow: 0 10px 32px rgba(6,182,212,.24);
}
.ghost, .small-btn {
  background: rgba(148,163,184,.12); border: 1px solid var(--line);
}
.danger-btn {
  background: rgba(251,113,133,.14); color: #fecdd3;
  border: 1px solid rgba(251,113,133,.28);
}
.danger-btn.inline { width: auto; margin: 0; }
.primary:hover, .ghost:hover, .small-btn:hover, .danger-btn:hover {
  transform: translateY(-2px);
}
.full { width: 100%; }

/* ──────── Pages ──────── */
.page {
  display: none;
  animation: none;
}
.page.active {
  display: block;
  animation: pageIn .4s ease both;
}

.hero-card {
  display: flex; justify-content: space-between; gap: 24px;
  align-items: center; border-radius: 28px; padding: 28px;
  margin-bottom: 20px;
}
.hero-card h3 { margin: 0 0 10px; font-size: 24px; }

.webhook-box, .code-card, pre {
  padding: 18px; border-radius: 18px;
  background: rgba(255,255,255,.5);
  border: 1px dashed rgba(56,189,248,.36);
  overflow: auto;
}
.webhook-box { min-width: 360px; position: relative; overflow: hidden; }
.webhook-box span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.webhook-box code, .code-card code { color: #bae6fd; word-break: break-all; }
.webhook-box:after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 0%, rgba(255,255,255,.08) 42%, transparent 70%);
  transform: translateX(-120%);
  animation: shine 4s ease-in-out infinite;
}
pre { color: #c4e8ff; white-space: pre-wrap; }

/* ──────── Stats Grid ──────── */
.stats-grid {
  display: grid; grid-template-columns: repeat(4,1fr);
  gap: var(--gap); margin-bottom: var(--sp-4);
}
.stat-card {
  border-radius: 22px; padding: var(--card-pad);
  animation: riseIn .55s both;
}
.stat-card span, .stat-card small { color: var(--muted); display: block; }
.stat-card strong { display: block; font-size: 30px; margin: 8px 0; }
.green { color: var(--green) !important; }
.red { color: var(--red) !important; }
.yellow { color: var(--yellow) !important; }

.content-grid {
  display: grid; grid-template-columns: 1.8fr 1fr;
  gap: var(--gap); margin-bottom: var(--sp-4);
}
.panel {
  border-radius: 24px; padding: var(--card-pad);
  overflow: hidden; animation: riseIn .6s both;
  transition: border-color .25s, transform .25s;
}
.panel:hover {
  border-color: rgba(56,189,248,.22);
}
.panel-head {
  display: flex; align-items: center;
  justify-content: space-between; gap: 12px; margin-bottom: 18px;
}
.panel h3 { margin: 0; font-size: 21px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; }
.filters input, .filters select { max-width: 180px; }

/* ──────── Bot List & Cards ──────── */
.bot-list { display: grid; gap: var(--gap); }
.bot-card {
  display: flex; align-items: center; gap: var(--gap);
  padding: var(--card-pad); border-radius: 20px;
  background: rgba(22,27,34,.85);
  border: 1px solid var(--line);
  transition: .25s;
}
.bot-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56,189,248,.34);
  box-shadow: 0 8px 32px rgba(56,189,248,.08);
}
.bot-icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 16px; font-size: 22px; font-weight: 800;
}
.bot-icon.longzong {
  background: linear-gradient(135deg, rgba(250,204,21,.18), rgba(255,215,0,.08));
  color: #c3ccff;
}
.bot-icon.tv {
  background: linear-gradient(135deg, rgba(56,189,248,.18), rgba(34,211,238,.08));
  color: #bae6fd;
}
.bot-info { flex: 1; }
.bot-info h4 { margin: 0 0 6px; }
.bot-info p { margin: 0 0 10px; color: var(--muted); }
.bot-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  border: 1px solid var(--line);
  background: rgba(148,163,184,.10); color: #cbd5e1;
  border-radius: 12px; padding: 8px 10px; font-size: 12px;
  transition: .2s;
}
.icon-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(56,189,248,.34); color: var(--text);
}
.icon-btn.danger {
  color: #fecdd3; border-color: rgba(251,113,133,.22);
  background: rgba(251,113,133,.10);
}
.icon-btn.danger:hover {
  border-color: rgba(251,113,133,.46);
  background: rgba(251,113,133,.18);
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tags span, .pill {
  font-size: 12px; padding: 5px 9px;
  border-radius: 999px; background: rgba(148,163,184,.13);
  color: #cbd5e1; white-space: nowrap;
}
.pill.ok { background: rgba(34,197,94,.15); color: #86efac; }
.pill.warn { background: rgba(250,204,21,.14); color: #c3ccff; }
.pill.fail { background: rgba(251,113,133,.16); color: #fecdd3; }
.pill.info { background: rgba(59,130,246,.15); color: #93c5fd; }
.pill.skipped { background: rgba(148,163,184,.12); color: #94a3b8; }

/* ──────── Toggle / Switch ──────── */
.toggle-row {
  display: flex; align-items: center; gap: 12px; margin-top: 7px;
}
.toggle-label { color: var(--muted); font-size: 13px; }
.switch input { display: none; }
.switch span {
  display: block; width: 52px; height: 30px;
  border-radius: 999px; background: rgba(148,163,184,.25);
  position: relative; transition: .2s;
}
.switch span:before {
  content: ""; position: absolute;
  width: 24px; height: 24px; left: 3px; top: 3px;
  border-radius: 50%; background: white; transition: .2s;
}
.switch input:checked + span { background: rgba(34,197,94,.75); }
.switch input:checked + span:before { transform: translateX(22px); }

/* ──────── Leverage Slider ──────── */
.leverage-input {
  display: flex; align-items: center; gap: 14px; margin-top: 7px;
}
.leverage-slider {
  flex: 1; -webkit-appearance: none; appearance: none;
  height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, rgba(56,189,248,.3), rgba(255,215,0,.3));
  outline: none; cursor: pointer;
}
.leverage-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 10px rgba(56,189,248,.5);
  cursor: pointer; transition: .2s;
}
.leverage-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 16px rgba(56,189,248,.7);
}
.leverage-slider::-moz-range-thumb {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--primary); border: none;
  box-shadow: 0 0 10px rgba(56,189,248,.5);
  cursor: pointer;
}
.leverage-num {
  width: 70px !important; text-align: center;
  padding: 8px !important; margin-top: 0 !important;
}
.leverage-val {
  color: var(--gold); font-weight: 700; font-size: 15px;
  min-width: 45px;
}

/* ──────── Symbol Tags Input ──────── */
.symbol-tags {
  display: flex; flex-wrap: wrap; gap: 6px;
  align-items: center; margin-top: 7px;
  padding: 8px 10px; border-radius: 13px;
  background: rgba(255,255,255,.48);
  border: 1px solid var(--line);
  min-height: 44px;
}
.symbol-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  background: rgba(56,189,248,.12);
  color: #bae6fd; font-size: 12px;
  border: 1px solid rgba(56,189,248,.22);
}
.symbol-tag button {
  border: 0; background: transparent; color: var(--muted);
  font-size: 14px; padding: 0; margin: 0; line-height: 1;
}
.symbol-tag button:hover { color: var(--red); }
.symbol-tags input {
  border: 0; background: transparent; padding: 4px;
  margin-top: 0; min-width: 120px; flex: 1;
  font-size: 13px;
}
.symbol-tags input:focus {
  border: 0; box-shadow: none;
}

/* ──────── Bot Type Selection ──────── */
.bot-type-select {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin-bottom: 18px;
}
.bot-type-card {
  display: flex; flex-direction: column;
  align-items: center; gap: 6px; padding: 16px 12px;
  border-radius: 16px; border: 2px solid var(--line);
  background: rgba(22,27,34,.6);
  transition: .25s;
}
.bot-type-card:hover:not(.disabled) {
  border-color: rgba(56,189,248,.4);
  transform: translateY(-2px);
}
.bot-type-card.active {
  border-color: var(--primary);
  background: rgba(56,189,248,.08);
  box-shadow: 0 0 20px rgba(56,189,248,.12);
}
.bot-type-card.disabled {
  opacity: .45; cursor: not-allowed;
}
.bot-type-icon { font-size: 28px; }
.bot-type-card strong { font-size: 14px; color: var(--text); }
.bot-type-card small { font-size: 11px; color: var(--muted); }

.reversal-config {
  grid-column: 1 / -1;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(56,189,248,.22);
  background: linear-gradient(180deg, rgba(56,189,248,.06), rgba(255,255,255,.25));
}
.reversal-config h4 { margin: 0 0 12px; font-size: 16px; }
.reversal-config .notice { margin-top: 10px; white-space: pre-line; }
.reversal-preview { color: #dbeafe; }

/* ──────── Forms ──────── */
.bot-form { display: grid; gap: 13px; }
.bot-form.two-col { grid-template-columns: 1fr 1fr 1fr; }
.bot-form label, .auth-form label { color: var(--muted); font-size: 13px; }

input, select {
  width: 100%; margin-top: 7px;
  padding: 12px 13px; color: var(--text);
  background: rgba(255,255,255,.48);
  border: 1px solid var(--line);
  border-radius: 13px; outline: none;
  transition: .22s;
}
input:focus, select:focus {
  border-color: rgba(56,189,248,.7);
  box-shadow: 0 0 0 4px rgba(56,189,248,.10);
}
select option { color: #111827; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-line {
  display: flex; justify-content: space-between;
  gap: 10px; align-items: center;
}
.form-line a { color: #bae6fd; text-decoration: none; }
.check-row {
  display: flex !important; align-items: center; gap: 9px;
}
.check-row input { width: auto; margin: 0; }

.notice {
  margin-top: 14px; color: #c3ccff;
  background: rgba(250,204,21,.1);
  border: 1px solid rgba(250,204,21,.18);
  padding: 12px 14px; border-radius: 14px;
  font-size: 13px;
}

/* ──────── Gate Test Result ──────── */
.gate-test-result {
  margin-top: 14px; padding: 12px 14px;
  border-radius: 14px; font-size: 13px;
  animation: riseIn .3s ease both;
}
.gate-test-result.success {
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.25);
  color: #86efac;
}
.gate-test-result.error {
  background: rgba(251,113,133,.1);
  border: 1px solid rgba(251,113,133,.25);
  color: #fecdd3;
}

/* ──────── Tables ──────── */
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left; padding: 13px 10px;
  border-bottom: 1px solid var(--line);
  color: #dbeafe; white-space: nowrap;
}
th { color: var(--muted); font-weight: 600; font-size: 13px; }
.buy { color: var(--green); font-weight: 700; }
.sell { color: var(--red); font-weight: 700; }
tbody tr { animation: rowIn .45s ease both; }

/* ──────── Lists ──────── */
.check-list {
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: 13px; color: #cbd5e1;
}
.check-list li { padding-left: 28px; position: relative; }
.check-list li:before {
  content: "✓"; position: absolute; left: 0; color: var(--green);
}

.mini-list, .metric-list { display: grid; gap: 12px; }
.mini-list div, .metric-list div {
  padding: 13px; border: 1px solid var(--line);
  border-radius: 15px; background: rgba(22,27,34,.6);
  transition: .2s;
}
.mini-list div:hover, .metric-list div:hover {
  border-color: rgba(56,189,248,.2);
}
.mini-list strong, .mini-list span,
.metric-list strong, .metric-list span { display: block; }
.mini-list span, .metric-list span { color: var(--muted); margin-top: 5px; font-size: 13px; }
.metric-list strong { font-size: 24px; }

.mail-preview {
  padding: 18px; border-radius: 18px;
  background: rgba(255,255,255,.36); border: 1px solid var(--line);
}

/* ──────── Learning Section ──────── */
.learning-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.learning-card {
  padding: 22px; border-radius: 18px;
  transition: .25s; cursor: pointer;
}
.learning-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56,189,248,.3);
  box-shadow: 0 8px 32px rgba(56,189,248,.1);
}
.learning-icon { font-size: 36px; margin-bottom: 12px; }
.learning-card h4 { margin: 0 0 8px; font-size: 16px; }
.learning-card p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ──────── Community Section ──────── */
.community-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.community-card {
  padding: 22px; border-radius: 18px;
  transition: .25s; cursor: pointer;
  text-decoration: none; color: var(--text);
  display: block;
}
.community-card:hover {
  transform: translateY(-4px);
  border-color: rgba(56,189,248,.3);
  box-shadow: 0 8px 32px rgba(56,189,248,.1);
}
.community-icon { font-size: 36px; margin-bottom: 12px; }
.community-card h4 { margin: 0 0 8px; font-size: 16px; }
.community-card p { margin: 0 0 12px; color: var(--muted); font-size: 13px; line-height: 1.6; }

/* ──────── Modal ──────── */
.modal-backdrop {
  position: fixed; inset: 0; display: none;
  align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(255,255,255,.72);
  z-index: 20;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(760px, 100%); max-height: 90vh;
  overflow-y: auto; border-radius: 26px;
  padding: 22px; animation: riseIn .25s ease both;
}

.preflight-modal { width: min(720px, 100%); }
.preflight-hero {
  display: flex; align-items: center; gap: 14px;
  margin: 14px 0 18px; padding: 16px;
  border: 1px solid rgba(56,189,248,.2);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(56,189,248,.13), rgba(255,215,0,.07));
}
.preflight-orb {
  width: 54px; height: 54px; display: grid; place-items: center;
  border-radius: 18px;
  background: rgba(255,255,255,.68);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 12px 28px rgba(56,189,248,.12);
  font-size: 28px;
}
.preflight-hero strong { display: block; font-size: 18px; }
.preflight-hero small { display: block; color: var(--muted); margin-top: 4px; }
.preflight-summary {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.preflight-chip {
  padding: 12px 13px; border-radius: 16px;
  background: rgba(255,255,255,.54);
  border: 1px solid rgba(148,163,184,.16);
}
.preflight-chip small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.preflight-chip strong { font-size: 14px; word-break: break-word; }
.preflight-checklist {
  display: grid; gap: 9px; margin: 12px 0 14px;
}
.preflight-check {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 12px; border-radius: 15px;
  background: rgba(255,255,255,.46);
  border: 1px solid rgba(148,163,184,.14);
}
.preflight-check .mark {
  width: 22px; height: 22px; border-radius: 999px;
  display: grid; place-items: center; flex: 0 0 auto;
  font-size: 12px; font-weight: 800;
}
.preflight-check.ok .mark { background: rgba(34,197,94,.18); color: var(--green); }
.preflight-check.warn .mark { background: rgba(250,204,21,.18); color: var(--yellow); }
.preflight-check.bad .mark { background: rgba(251,113,133,.18); color: var(--red); }
.preflight-check strong { display: block; font-size: 13px; }
.preflight-check small { color: var(--muted); }
#preflight-confirm-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ──────── Toast ──────── */
.toast {
  position: fixed; right: 22px; bottom: 22px;
  padding: 13px 16px; border-radius: 14px;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(56,189,248,.32);
  box-shadow: var(--shadow);
  opacity: 0; transform: translateY(12px);
  transition: .22s; z-index: 30;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ──────── Animations ──────── */
@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes rowIn {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes floatOrb {
  0%, 100% { transform: translate3d(0,0,0) scale(1); }
  33% { transform: translate3d(42px,-28px,0) scale(1.08); }
  66% { transform: translate3d(-28px,36px,0) scale(.94); }
}
@keyframes lobsterPulse {
  0%, 100% { transform: rotate(0) scale(1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 0 0 rgba(56,189,248,0); }
  50% { transform: rotate(-4deg) scale(1.05); box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), 0 0 28px rgba(56,189,248,.18); }
}
@keyframes onlineBlink {
  0%, 100% { opacity: 1; box-shadow: 0 0 18px var(--green); }
  50% { opacity: .55; box-shadow: 0 0 5px var(--green); }
}
@keyframes shine {
  0%, 55% { transform: translateX(-120%); }
  78%, 100% { transform: translateX(120%); }
}

/* ──────── Responsive ──────── */
@media (max-width: 1050px) {
  body.logged-in .app-shell { display: block; }
  .sidebar { width: auto; height: auto; position: relative; }
  .side-card { position: static; margin-top: 24px; }
  .hero-card, .topbar { flex-direction: column; align-items: flex-start; }
  .webhook-box { min-width: 0; width: 100%; }
  .stats-grid, .content-grid, .bot-form.two-col { grid-template-columns: 1fr; }
  .filters input, .filters select { max-width: none; }
  .top-actions { width: 100%; }
  .top-actions button { flex: 1; }
  .bot-type-select { grid-template-columns: 1fr; }
  .preflight-summary { grid-template-columns: 1fr; }
  .learning-grid, .community-grid { grid-template-columns: 1fr; }
}

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

/* === Symbol Dropdown === */
.symbol-select-wrap {
  position: relative;
}
.symbol-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 220px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
}
.symbol-dropdown.show { display: block; }
.symbol-option {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  border-bottom: 1px solid var(--line);
}
.symbol-option:last-child { border-bottom: none; }
.symbol-option:hover { background: rgba(255,215,0,.08); }
.symbol-option small { color: var(--muted); font-size: 12px; }

/* === Signal Mode Toggle === */
.signal-mode-toggle {
  display: flex;
  gap: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.signal-mode-btn {
  flex: 1;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.signal-mode-btn:first-child { border-right: 1px solid var(--line); }
.signal-mode-btn.active { background: var(--gold); color: #000; }
.signal-mode-btn:hover:not(.active) { background: rgba(255,215,0,.1); color: var(--text); }

/* === Gate Test Result === */
.gate-test-result {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
}
.gate-test-result.success { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.3); color: var(--green); }
.gate-test-result.error { background: rgba(251,113,133,.12); border: 1px solid rgba(251,113,133,.3); color: var(--red); }

/* === Leverage Hint === */
.leverage-hint { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

/* === Skipped Pill === */
.pill.skipped { background: rgba(148,163,184,.15); color: var(--muted); }

/* === Toggle Label === */
.toggle-label { font-size: 13px; color: var(--text); margin-left: 8px; }
.toggle-row { display: flex; align-items: center; gap: 8px; }

/* === Exchange Grid === */
.exchange-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  margin-top: 12px;
}
.exchange-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: all .2s;
}
.exchange-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(255,215,0,.12);
}
.exchange-card.active:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(255,215,0,.2);
}
.exchange-card.disabled {
  opacity: .45;
  cursor: not-allowed;
}
.exchange-logo {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #fff;
}
.exchange-logo.gate { background: linear-gradient(135deg, #1a5cff, #0033cc); }
.exchange-logo.binance { background: linear-gradient(135deg, #f0b90b, #d4a00a); }
.exchange-logo.okx { background: linear-gradient(135deg, #fff, #333); color: #000; }
.exchange-logo.bybit { background: linear-gradient(135deg, #f7a600, #e09500); }
.exchange-logo.bitget { background: linear-gradient(135deg, #00d4aa, #00b894); }
.exchange-logo.coinex { background: linear-gradient(135deg, #00c853, #00a844); }
.exchange-card strong { font-size: 14px; }
.exchange-tags { display: flex; gap: 6px; }
.exchange-tags .pill { font-size: 11px; padding: 2px 8px; }
.exchange-bots { color: var(--muted); font-size: 12px; }

/* === Connected Exchange Accounts === */
.exchange-accounts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}
.exchange-account-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 18px;
}
.exchange-account-empty {
  text-align: center;
  padding: 30px;
  color: var(--muted);
}

/* === Balance Banner (in modal) === */
.balance-banner {
  display: flex;
  gap: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
}
.balance-item {
  flex: 1;
  padding: 16px 24px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.balance-item:last-child { border-right: none; }
.balance-item small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
}
.balance-item strong {
  color: var(--gold);
  font-size: 18px;
}

/* === Wide Modal === */
.modal-wide {
  max-width: 960px;
  width: 90vw;
}
.modal-wide .bot-form.two-col {
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.modal-wide .bot-form label {
  font-size: 14px;
}
.modal-wide .bot-form input,
.modal-wide .bot-form select {
  padding: 10px 14px;
  font-size: 14px;
}
.modal-wide .leverage-input {
  gap: 16px;
}
.modal-wide .leverage-slider {
  height: 12px;
}
.modal-wide .leverage-slider::-webkit-slider-thumb {
  width: 28px; height: 28px;
}
.modal-wide .leverage-num {
  width: 80px !important;
  padding: 10px !important;
  font-size: 15px;
}

/* === Extra Wide Modal === */
.modal-xl {
  max-width: 1100px;
  width: 95vw;
}
.modal-xl .bot-form.two-col {
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.modal-xl .bot-form label {
  font-size: 14px;
}
.modal-xl .bot-form input,
.modal-xl .bot-form select,
.modal-xl .bot-form textarea {
  padding: 11px 14px;
  font-size: 14px;
}

/* === Webhook URL Box === */
.webhook-url-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 14px;
  margin-top: 4px;
}
.webhook-url-box code {
  flex: 1;
  font-size: 12px;
  color: var(--gold);
  word-break: break-all;
  user-select: all;
}
.webhook-url-box .icon-btn {
  flex-shrink: 0;
}

/* === TV Format Box === */
.tv-alert-section {
  display: grid;
  gap: 10px;
}
.tv-alert-list {
  display: grid;
  gap: 7px;
}
.tv-alert-list h5 {
  margin: 4px 0 1px;
  color: var(--primary);
  font-size: 15px;
  line-height: 1.2;
}
.tv-alert-row {
  display: grid;
  gap: 4px;
}
.tv-alert-row > span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}
.tv-alert-code {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 8px 8px 10px;
  border-radius: 4px;
  background: rgba(148, 163, 184, .28);
  border-bottom: 4px solid rgba(229, 231, 235, .6);
}
.tv-alert-code code {
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 800;
  scrollbar-width: thin;
  user-select: all;
}
.tv-alert-code .icon-btn {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  font-size: 12px;
}

/* === Bot Form Two-Panel Layout === */
.bot-form-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.bot-form-layout .bot-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bot-form-layout .bot-form label {
  font-size: 14px;
}
.bot-form-layout .bot-form input,
.bot-form-layout .bot-form select {
  padding: 11px 14px;
  font-size: 14px;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-row-2 label {
  font-size: 14px;
}

/* === Signal Config Panel (Right Side) === */
.signal-config-panel {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  max-height: 520px;
}
.signal-config-panel h4 {
  margin: 0;
  font-size: 15px;
  color: var(--gold);
}
.signal-config-panel h5 {
  margin: 12px 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.signal-config-panel label {
  font-size: 13px;
  color: var(--muted);
}
.signal-config-panel input,
.signal-config-panel select,
.signal-config-panel textarea {
  width: 100%;
}

/* === TV Examples === */
.tv-examples {
  margin-top: 8px;
}
.tv-example-group {
  margin-bottom: 12px;
}
.tv-example-group strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}
.tv-example-group code {
  display: block;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 11px;
  color: var(--primary);
  margin-bottom: 4px;
  word-break: break-all;
  user-select: all;
}
.tg-examples {
  margin-top: 8px;
}
.tg-examples .tv-example-group code {
  color: var(--green);
}
.exchange-acct-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.exchange-acct-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.exchange-balance {
  color: var(--gold);
  font-weight: 700;
  font-size: 15px;
}

/* === Modal Actions === */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* Tonight upgrade: user journey dashboard */
.night-upgrade { display: grid; gap: 18px; margin: 18px 0 24px; }
.night-hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px; border: 1px solid rgba(20,184,166,.28); background: linear-gradient(135deg, rgba(10,22,40,.82), rgba(15,39,71,.72)); }
.completion-ring { --pct: 0; width: 118px; height: 118px; border-radius: 999px; display: grid; place-items: center; flex: 0 0 auto; background: conic-gradient(var(--accent, #14b8a6) calc(var(--pct) * 1%), rgba(255,255,255,.10) 0); position: relative; box-shadow: 0 18px 50px rgba(20,184,166,.18); }
.completion-ring::after { content: ''; position: absolute; inset: 10px; border-radius: inherit; background: rgba(10,22,40,.92); }
.completion-ring strong, .completion-ring span { position: relative; z-index: 1; }
.completion-ring strong { font-size: 28px; line-height: 1; color: #f8fafc; }
.completion-ring span { font-size: 12px; color: #94a3b8; margin-top: -28px; }
.night-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--gap); }
.night-card { padding: var(--card-pad); border: 1px solid rgba(255,255,255,.10); background: rgba(15,39,71,.52); }
.night-card span { display: block; color: #94a3b8; font-size: 13px; margin-bottom: 8px; }
.night-card strong { display: block; font-size: clamp(22px, 3vw, 34px); color: #f8fafc; }
.night-card small { color: #64748b; }
.night-two-col { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(280px,.85fr); gap: var(--gap); }
.setup-list { display: grid; gap: 10px; margin: 14px 0; }
.setup-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.08); }
.webhook-copy-box { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(20,184,166,.09); border: 1px solid rgba(20,184,166,.24); }
.webhook-copy-box code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #99f6e4; }
.risk-note { margin-top: 12px; color: #fbbf24; font-size: 13px; }
.warning-list { display: grid; gap: 10px; padding: 0; margin: 14px 0 0; list-style: none; }
.warning-list li { padding: 11px 13px; border-radius: 13px; color: #c3ccff; background: rgba(249,115,22,.11); border: 1px solid rgba(249,115,22,.25); }
.signal-timeline { display: grid; gap: 12px; }
.timeline-item { display: grid; grid-template-columns: 18px 1fr; gap: 12px; padding: 12px; border-radius: 16px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.timeline-dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; background: #f97316; box-shadow: 0 0 0 5px rgba(249,115,22,.12); }
.timeline-dot.buy { background: #22c55e; box-shadow: 0 0 0 5px rgba(34,197,94,.12); }
.timeline-dot.sell { background: #ef4444; box-shadow: 0 0 0 5px rgba(239,68,68,.12); }
.timeline-item p { margin: 4px 0; color: #cbd5e1; }
.timeline-item small { color: #64748b; }
.metric-list.compact div { min-height: auto; }
@media (max-width: 980px) { .night-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } .night-two-col { grid-template-columns: 1fr; } .night-hero { align-items: flex-start; } }
@media (max-width: 640px) { .night-hero { flex-direction: column; } .night-grid { grid-template-columns: 1fr; } .completion-ring { width: 104px; height: 104px; } .webhook-copy-box { grid-template-columns: 1fr; } .setup-list > div { align-items: flex-start; flex-direction: column; } }
@media (prefers-reduced-motion: reduce) { .night-upgrade *, .night-upgrade *::before, .night-upgrade *::after { transition: none !important; animation: none !important; transform: none !important; } }


/* === Juilan Liquid Glass Refresh (2026-06-21) === */
:root {
  --bg: #0a0b0e;
  --panel: rgba(17,19,25,.62);
  --line: rgba(94,106,210,.18);
  --text: #e7eaf0;
  --muted: #8b94a7;
  --primary: #5E6AD2;
  --primary2: #A5AEFF;
  --gold: #5E6AD2;
  --yellow: #A5AEFF;
  --shadow: 0 1px 0 rgba(255,255,255,.06), 0 28px 90px rgba(0,0,0,.42);
  --glass-bg: linear-gradient(180deg, rgba(255,255,255,.082), rgba(255,255,255,.025)), rgba(17,19,25,.54);
  --glass-border: rgba(94,106,210,.22);
}

body {
  background:
    radial-gradient(circle at 16% 8%, rgba(94,106,210,.16), transparent 28rem),
    radial-gradient(circle at 88% 16%, rgba(94,106,210,.12), transparent 24rem),
    radial-gradient(circle at 55% 82%, rgba(57,184,196,.07), transparent 32rem),
    linear-gradient(180deg, #0a0b0e, #0f0d0a 46%, #080706);
  color: var(--text);
}

body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255,255,255,.026) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.72), transparent 78%);
}

.glass,
.panel,
.stat-card,
.hero-card,
.modal,
.sidebar,
.auth-card,
.bot-card,
.side-card,
.exchange-account-card,
.balance-banner,
.signal-config-panel,
.preflight-chip,
.preflight-check,
.webhook-box,
.code-card,
pre,
.notice,
.tv-example-group,
.tg-examples,
.bot-type-card {
  background: var(--glass-bg) !important;
  border-color: var(--glass-border) !important;
  box-shadow: var(--shadow) !important;
  backdrop-filter: blur(22px) saturate(1.22);
  -webkit-backdrop-filter: blur(22px) saturate(1.22);
}

.panel,
.stat-card,
.hero-card,
.modal,
.bot-card,
.exchange-account-card,
.bot-type-card,
.preflight-chip,
.preflight-check {
  position: relative;
}

.panel::before,
.stat-card::before,
.hero-card::before,
.modal::before,
.bot-card::before,
.exchange-account-card::before,
.bot-type-card::before,
.preflight-chip::before,
.preflight-check::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(94,106,210,.76), transparent 74%);
  opacity: .72;
  pointer-events: none;
}

.sidebar {
  background: color-mix(in srgb, #0a0b0e 78%, transparent) !important;
  border-right-color: rgba(94,106,210,.18);
}

.brand-mark,
.bot-icon,
.preflight-orb,
.detail-card-title .icon {
  background: linear-gradient(145deg, rgba(94,106,210,.24), rgba(57,184,196,.08)) !important;
  border: 1px solid rgba(94,106,210,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 12px 34px rgba(0,0,0,.24);
}

.topbar h2,
.hero-card h3,
.panel h3,
.modal h3,
.stat-card strong,
.bot-main strong {
  letter-spacing: -.02em;
  text-shadow: 0 1px 0 rgba(0,0,0,.24);
}

.eyebrow {
  color: var(--gold) !important;
  background: rgba(94,106,210,.13) !important;
  border: 1px solid rgba(94,106,210,.24);
  padding: .28rem .72rem;
  border-radius: 999px;
}

.nav button {
  border: 1px solid transparent;
  border-radius: 999px;
}
.nav button:hover,
.nav button.active {
  background: rgba(94,106,210,.13) !important;
  border-color: rgba(94,106,210,.24);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 24px rgba(0,0,0,.16);
}

.primary {
  color: #1a0e00;
  font-weight: 800;
  background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 96%, #fff 10%), var(--gold)) !important;
  box-shadow: 0 14px 38px rgba(94,106,210,.20), inset 0 1px 0 rgba(255,255,255,.28) !important;
}
.ghost,
.small-btn,
.icon-btn {
  background: rgba(241,227,202,.075) !important;
  border: 1px solid rgba(94,106,210,.18) !important;
  color: var(--text) !important;
  backdrop-filter: blur(14px);
}
.primary:hover,
.ghost:hover,
.small-btn:hover,
.icon-btn:hover,
.bot-card:hover,
.panel:hover,
.stat-card:hover,
.bot-type-card:hover:not(.disabled) {
  transform: translateY(-3px);
  border-color: rgba(94,106,210,.42) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.08), 0 30px 90px rgba(0,0,0,.46) !important;
}

input,
select,
textarea {
  background: rgba(8,7,6,.42) !important;
  border-color: rgba(94,106,210,.20) !important;
  color: var(--text) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}
input:focus,
select:focus,
textarea:focus {
  border-color: rgba(94,106,210,.66) !important;
  box-shadow: 0 0 0 3px rgba(94,106,210,.13), inset 0 1px 0 rgba(255,255,255,.06) !important;
}
select option { color: #1f160a; background: #e7eaf0; }

.webhook-box,
.code-card,
pre,
.webhook-url-box {
  border-style: solid !important;
  background: rgba(8,7,6,.46) !important;
}
.webhook-box code,
.code-card code,
.webhook-url-box code,
pre,
code {
  color: #f5d48c !important;
}

.bot-type-card.active,
.signal-mode-btn.active {
  background: linear-gradient(180deg, rgba(94,106,210,.18), rgba(94,106,210,.07)) !important;
  border-color: rgba(94,106,210,.52) !important;
  box-shadow: 0 0 0 3px rgba(94,106,210,.10), var(--shadow) !important;
}

.modal-backdrop {
  background: radial-gradient(circle at 50% 18%, rgba(94,106,210,.15), transparent 26rem), rgba(2,2,2,.70);
  backdrop-filter: blur(10px);
}

.balance-item,
.stat-chip,
.tv-alert-item,
.symbol-option,
.chat-bubble,
.timeline-item {
  background: rgba(241,227,202,.055) !important;
  border-color: rgba(94,106,210,.16) !important;
}

.pill.ok,
.status-dot { box-shadow: 0 0 22px rgba(34,197,94,.28); }

@media (prefers-reduced-motion: no-preference) {
  .panel,
  .stat-card,
  .hero-card,
  .bot-card,
  .bot-type-card,
  .modal { transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease, background .18s ease; }
}

@media (max-width: 700px) {
  .main { padding: 18px; }
  .sidebar { backdrop-filter: blur(18px); }
  .topbar h2 { font-size: 28px; }
}



/* Fix: symbol dropdown must be readable, not transparent-through */
.symbol-select-wrap { z-index: 30; }
.symbol-dropdown {
  background: #FBFAFD !important;
  border: 1px solid rgba(94,106,210,.46) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.06) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  z-index: 5000 !important;
  overflow-y: auto;
}
.symbol-option {
  background: #FBFAFD !important;
  color: var(--text) !important;
  border-bottom: 1px solid rgba(94,106,210,.16) !important;
}
.symbol-option:nth-child(even) { background: #F3F1F9 !important; }
.symbol-option:hover {
  background: #241c11 !important;
  color: #dbe1ff !important;
}
.symbol-option small { color: #d3c3a8 !important; }



/* Bot card action buttons: readable labels */
.bot-card { align-items: stretch; }
.bot-main { flex: 1; min-width: 0; }
.bot-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 230px;
}
.bot-action-btn {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(94,106,210,.22);
  background: rgba(241,227,202,.075);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 10px 24px rgba(0,0,0,.18);
  transition: transform .2s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.bot-action-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(94,106,210,.48);
  background: rgba(94,106,210,.13);
  box-shadow: 0 16px 34px rgba(0,0,0,.28);
}
.bot-action-btn.play { color: #bbf7d0; border-color: rgba(34,197,94,.26); }
.bot-action-btn.pause { color: #c3ccff; }
.bot-action-btn.edit { color: #ced6ff; }
.bot-action-btn.danger {
  color: #fecdd3;
  border-color: rgba(251,113,133,.32);
  background: rgba(251,113,133,.10);
}
.bot-action-btn.danger:hover { background: rgba(251,113,133,.18); border-color: rgba(251,113,133,.52); }

@media (max-width: 820px) {
  .bot-card { flex-direction: column; }
  .bot-actions { width: 100%; min-width: 0; justify-content: stretch; }
  .bot-action-btn { flex: 1; }
}



/* Learning: intraday analysis workspace */
.full-span { grid-column: 1 / -1; }
.intraday-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.intraday-card {
  padding: 15px;
  border-radius: 18px;
  background: rgba(241,227,202,.055);
  border: 1px solid rgba(94,106,210,.16);
}
.intraday-card span {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 10px;
  border-radius: 10px;
  color: var(--gold);
  background: rgba(94,106,210,.13);
  border: 1px solid rgba(94,106,210,.22);
  font-weight: 900;
  font-size: 12px;
}
.intraday-card strong { display: block; margin-bottom: 6px; }
.intraday-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.intraday-template {
  border-radius: 18px;
  padding: 16px;
  border: 1px solid rgba(94,106,210,.16);
  background: rgba(8,7,6,.32);
}
.intraday-template strong { display: block; margin-bottom: 10px; }
.intraday-template pre {
  margin: 0;
  border-radius: 14px;
}
@media (max-width: 1050px) { .intraday-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .intraday-grid { grid-template-columns: 1fr; } }


/* Admin: signal parser test */
.signal-test-result {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(94,106,210,.16);
  background: rgba(8,7,6,.28);
}
.signal-test-result strong { display: block; margin-bottom: 12px; }
.signal-test-result.ok { border-color: rgba(34,197,94,.28); }
.signal-test-result.warn { border-color: rgba(250,204,21,.34); color: var(--yellow); }
.metric-list.compact { gap: 8px; margin-bottom: 12px; }
.metric-list.compact div { padding: 10px; }
.signal-test-result pre {
  max-height: 320px;
  margin-top: 12px;
}


/* ──────── Auth polish 2026-06-25 ──────── */
.auth-screen {
  min-height: 100vh;
  padding: clamp(22px, 4vw, 48px);
  place-items: center;
}
.auth-card {
  width: min(430px, calc(100vw - 36px));
  padding: clamp(24px, 3vw, 34px);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(31,29,24,.92), rgba(13,15,14,.88)) !important;
  border: 1px solid rgba(94,106,210,.22) !important;
  box-shadow: 0 26px 90px rgba(0,0,0,.52), inset 0 1px 0 rgba(255,255,255,.06) !important;
}
.auth-brand {
  margin-bottom: 22px;
}
.auth-brand .brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 16px;
}
.auth-brand .brand-mark img {
  width: 30px;
  height: 30px;
}
.auth-card .eyebrow {
  display: inline-flex;
  align-items: center;
  width: auto;
  min-height: 0;
  margin: 0 0 12px;
  padding: 5px 10px;
  border-radius: 999px;
  color: #f7d277;
  background: rgba(94,106,210,.10) !important;
  border: 1px solid rgba(94,106,210,.20);
  box-shadow: none !important;
  letter-spacing: .14em;
  line-height: 1.25;
}
.auth-card h2 {
  margin-bottom: 9px;
  font-size: clamp(25px, 3vw, 30px);
  letter-spacing: -.02em;
}
.auth-card > .muted {
  line-height: 1.65;
  font-size: 14px;
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 24px;
  padding: 5px;
  border-radius: 15px;
  background: rgba(5,7,8,.58) !important;
  border: 1px solid rgba(94,106,210,.16) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}
.auth-tabs button {
  min-height: 38px;
  border-radius: 11px;
  color: #aeb8c5;
  font-weight: 700;
  background: transparent !important;
  box-shadow: none !important;
}
.auth-tabs button.active {
  color: #111827;
  background: linear-gradient(135deg, #f6d47d, #5f6fe8) !important;
  box-shadow: 0 10px 24px rgba(94,106,210,.22) !important;
}
.auth-form {
  gap: 13px;
  margin-top: 20px;
}
.auth-form label {
  display: grid;
  gap: 7px;
  color: #aeb8c5;
  font-size: 12px;
  letter-spacing: .01em;
}
.auth-form input {
  margin-top: 0;
  min-height: 43px;
  border-radius: 12px;
  background: rgba(5,7,8,.52) !important;
  border-color: rgba(94,106,210,.16) !important;
}
.auth-form input::placeholder {
  color: rgba(174,184,197,.48);
}
.auth-form .check-row {
  display: flex !important;
  grid-template-columns: none;
  gap: 9px;
  line-height: 1.4;
}
.auth-form .check-row input {
  width: 14px;
  min-height: 14px;
  accent-color: #5f6fe8;
}
.auth-form .primary.full {
  min-height: 46px;
  margin-top: 2px;
  border-radius: 13px;
  color: #15100a;
  font-weight: 800;
  background: linear-gradient(135deg, #f7d277, #5f6fe8) !important;
  box-shadow: 0 16px 36px rgba(94,106,210,.25) !important;
}
.auth-foot {
  margin-top: 15px;
  line-height: 1.55;
  font-size: 12px;
  color: rgba(174,184,197,.78);
}
@media (max-width: 520px) {
  .auth-card { padding: 22px; border-radius: 22px; }
  .form-line { align-items: flex-start; flex-direction: column; }
}


/* ──────── Required email verification 2026-06-25 ──────── */
.verify-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: end; }
.verify-row label { min-width: 0; }
.verify-row .send-code-btn { min-height: 43px; margin: 0; padding: 0 14px; white-space: nowrap; border-radius: 12px; color: #f7d277; background: rgba(94,106,210,.10) !important; border: 1px solid rgba(94,106,210,.25) !important; box-shadow: none !important; }
.verify-row .send-code-btn:disabled { opacity: .62; cursor: wait; transform: none; }
.auth-hint { margin: -2px 0 0; color: rgba(247,210,119,.78); font-size: 12px; line-height: 1.5; }
@media (max-width: 520px) { .verify-row { grid-template-columns: 1fr; } .verify-row .send-code-btn { width: 100%; } }






/* ──────── Test email panel 2026-06-25 ──────── */
.test-email-panel { color: #dbeafe; }
.test-email-panel strong { color: #f7d277; }
.test-email-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 10px; margin: 14px 0 10px; align-items: end; }
.test-email-row input { margin-top: 0; }
.test-email-row button { min-height: 43px; white-space: nowrap; }
#test-email-result { font-size: 12px; }
@media (max-width: 720px) { .test-email-row { grid-template-columns: 1fr; } .test-email-row button { width: 100%; } }

/* ──────── Admin panel 2026-06-25 ──────── */
#admin-users-table {
  table-layout: fixed;
  font-size: 12px;
}
.admin-user-toolbar {
  display: flex;
  gap: 8px;
  margin: 10px 0 12px;
}
.admin-user-toolbar .inline-input {
  max-width: 360px;
  height: 36px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
}
#admin-users-table th,
#admin-users-table td {
  padding: 8px 6px;
  vertical-align: middle;
}
#admin-users-table th:nth-child(1), #admin-users-table td:nth-child(1) { width: 90px; }
#admin-users-table th:nth-child(2), #admin-users-table td:nth-child(2) { width: 110px; }
#admin-users-table th:nth-child(3), #admin-users-table td:nth-child(3) { width: 62px; }
#admin-users-table th:nth-child(4), #admin-users-table td:nth-child(4) { width: 78px; }
#admin-users-table th:nth-child(5), #admin-users-table td:nth-child(5) { width: 132px; }
#admin-users-table th:nth-child(6), #admin-users-table td:nth-child(6) { width: 120px; }
#admin-users-table th:nth-child(7), #admin-users-table td:nth-child(7) { width: 92px; }
#admin-users-table th:nth-child(8), #admin-users-table td:nth-child(8) { width: 220px; }
#admin-users-table .inline-input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.2;
}
#admin-users-table select.inline-input {
  padding-right: 18px;
}
#admin-users-table code {
  display: inline-block;
  max-width: 112px;
  overflow: hidden;
  color: #c3ccff;
  font-size: 10px;
  text-overflow: ellipsis;
  vertical-align: middle;
}
#admin-users-table .admin-user-actions {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}
#admin-users-table .admin-user-actions .small-btn {
  min-width: 0;
  padding: 7px 6px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1;
}
#admin-users-status { margin-top: 10px; font-size: 12px; }
