:root {
  color-scheme: dark;
  --brand-navy: #10263f;
  --brand-secondary: #10263f;
  --pilot-ice: #f4faf7;
  --slate: #6b7a86;
  --bg: #07131f;
  --panel: rgb(16 38 63 / .84);
  --panel-solid: #0e2238;
  --panel-2: #15324f;
  --line: rgb(46 184 230 / .16);
  --muted: #91a0ac;
  --text: var(--pilot-ice);
  --accent: #2ccb77;
  --accent-rgb: 44 203 119;
  --accent-2: #2eb8e6;
  --cyan-rgb: 46 184 230;
  --red: #e65252;
  --red-rgb: 230 82 82;
  --amber: #f6b73c;
  --amber-rgb: 246 183 60;
  --radius: 22px;
  font-family: Sora, Inter, Arial, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Public white-label billing */
.billing-body { min-height: 100vh; background: radial-gradient(circle at top, #173b59, #08131f 65%); color: #ecf8ff; }
.billing-shell { width: min(720px, calc(100% - 28px)); margin: 0 auto; padding: 42px 0; }
.billing-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.billing-brand img { width: 48px; height: 48px; border-radius: 14px; }
.billing-brand div { display: grid; }
.billing-brand strong { font-size: 1.15rem; }
.billing-brand span { color: #9ab0bf; font-size: .78rem; }
.billing-card { padding: clamp(22px, 5vw, 42px); background: rgba(15, 35, 52, .96); border: 1px solid rgba(255,255,255,.1); }
.billing-card h1 { margin: 7px 0 10px; }
.billing-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 26px 0; }
.billing-details div { display: grid; gap: 7px; padding: 15px; border-radius: 14px; background: rgba(255,255,255,.055); }
.billing-details span { color: #9ab0bf; font-size: .75rem; }
.billing-details strong { font-size: .94rem; }
.billing-methods h2 { font-size: 1rem; margin: 0 0 12px; }
.billing-methods { display: grid; gap: 10px; }
.billing-methods > button { display: flex; justify-content: space-between; align-items: center; width: 100%; padding: 15px 18px; border: 0; border-radius: 12px; color: #071711; background: #2ccb77; font: 700 .94rem Sora, sans-serif; cursor: pointer; }
.billing-methods button small { opacity: .7; }
.billing-methods button:disabled { opacity: .55; cursor: wait; }
.billing-checkout { margin-top: 22px; }
.checkout-result { display: grid; gap: 10px; }
.billing-qr { width: min(260px, 100%); padding: 10px; margin: 0 auto 10px; border-radius: 12px; background: white; }
.checkout-result label { color: #9ab0bf; font-size: .78rem; }
.copy-row { display: flex; min-width: 0; gap: 8px; }
.copy-row code { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 12px; border-radius: 10px; background: #06111b; color: #d9efff; }
.copy-row button { flex: 0 0 auto; border: 0; border-radius: 10px; padding: 0 13px; font-weight: 700; cursor: pointer; }
.billing-status { margin: 18px 0 0; color: #ffcc66; }
.billing-status.paid { padding: 16px; border-radius: 12px; color: #8ff2b7; background: rgba(44,203,119,.12); }
.billing-footnote { color: #8ca3b3; text-align: center; font-size: .76rem; line-height: 1.6; }
@media (max-width: 560px) { .billing-details { grid-template-columns: 1fr; } .billing-shell { padding-top: 22px; } }

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    linear-gradient(rgb(var(--cyan-rgb) / .035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(var(--cyan-rgb) / .035) 1px, transparent 1px),
    radial-gradient(circle at 52% 22%, #123454 0, var(--bg) 44%);
  background-size: 42px 42px, 42px 42px, auto;
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }

.ambient { position: fixed; width: 340px; height: 340px; border-radius: 50%; filter: blur(100px); pointer-events: none; opacity: .16; }
.ambient-one { top: -150px; left: -90px; background: var(--accent); }
.ambient-two { right: -150px; bottom: -100px; background: var(--accent-2); opacity: .11; }

.site-header {
  width: min(1440px, calc(100% - 56px));
  height: 84px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 4;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 42px; height: 42px; display: block; overflow: hidden;
  border: 1px solid rgb(var(--cyan-rgb) / .28); border-radius: 50%;
  background: var(--pilot-ice);
  box-shadow: 0 0 32px rgb(var(--accent-rgb) / .18);
}
.brand-mark img, .avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.brand > span:last-child { display: flex; flex-direction: column; }
.brand strong { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.brand small { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .16em; margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: 12px; }
.mode-pill, .status-badge, .live-dot {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px;
  border: 1px solid rgb(var(--accent-rgb) / .2); border-radius: 999px;
  color: var(--accent); background: rgb(var(--accent-rgb) / .08); font: 700 10px/1 ui-monospace, SFMono-Regular, monospace; letter-spacing: .08em;
}
.mode-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.ghost-button, .tiny-button {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 13px;
  background: rgb(255 255 255 / .025); color: #d4e4ea; cursor: pointer;
}
.ghost-button:hover, .tiny-button:hover { border-color: rgb(var(--accent-rgb) / .42); color: white; }

.hero-shell {
  width: min(1440px, calc(100% - 56px));
  min-height: calc(100vh - 136px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(360px, 480px) minmax(300px, .82fr);
  gap: clamp(28px, 4vw, 72px);
  align-items: center;
  padding: 44px 0 36px;
  position: relative;
}

.intro-panel { align-self: center; }
.product-lockup { width: max-content; max-width: 220px; margin-bottom: 22px; padding: 8px 12px; border: 1px solid rgb(var(--cyan-rgb) / .2); border-radius: 14px; background: var(--pilot-ice); box-shadow: 0 12px 36px rgb(0 0 0 / .18); }
.product-lockup img { display: block; width: 190px; max-width: 100%; height: auto; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font: 700 10px/1.2 ui-monospace, SFMono-Regular, monospace; letter-spacing: .16em; }
.intro-panel h1, .admin-topline h1 {
  margin: 0; max-width: 560px; font-size: clamp(38px, 4vw, 68px); line-height: 1.01; letter-spacing: -.045em; font-weight: 650;
}
.intro-panel h1 span { color: var(--accent); }
.lead { max-width: 525px; margin: 24px 0 28px; color: #a8b7c2; font-size: 16px; line-height: 1.7; }
.feature-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; max-width: 520px; }
.feature-row div { padding: 15px 12px; display: flex; flex-direction: column; gap: 5px; background: rgb(10 28 45 / .9); }
.feature-row b { color: var(--accent); font: 700 10px ui-monospace, monospace; }
.feature-row span { color: #c4d3dc; font-size: 12px; }
.safety-note { display: flex; gap: 12px; margin-top: 22px; max-width: 520px; padding: 14px 16px; border-radius: 13px; background: rgb(var(--accent-rgb) / .05); border: 1px solid rgb(var(--accent-rgb) / .12); }
.safety-note svg { width: 24px; flex: 0 0 auto; fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.safety-note p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.safety-note strong { color: #e4f2ee; display: block; }

.phone-stage { display: grid; place-items: center; perspective: 1200px; }
.phone {
  width: min(100%, 404px); height: min(720px, calc(100vh - 150px)); min-height: 600px;
  border: 7px solid #193149; border-radius: 38px; overflow: hidden; position: relative;
  background: #0b1b2b;
  box-shadow: 0 50px 110px rgb(0 0 0 / .55), 0 0 0 1px rgb(255 255 255 / .06), inset 0 0 0 1px #000;
}
.phone::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 50px rgb(0 0 0 / .16); border-radius: 30px; }
.phone-bar { height: 23px; display: flex; align-items: center; justify-content: center; position: absolute; z-index: 5; width: 100%; pointer-events: none; }
.phone-bar b { width: 84px; height: 18px; background: #06111c; border-radius: 0 0 12px 12px; }
.telegram-header { height: 76px; padding: 19px 13px 8px; display: flex; align-items: center; gap: 10px; background: rgb(14 34 56 / .97); border-bottom: 1px solid var(--line); }
.icon-button { border: 0; background: none; color: #a9bac6; font-size: 31px; padding: 0 4px; }
.icon-button.dots { margin-left: auto; font-size: 15px; letter-spacing: 2px; }
.avatar { width: 38px; height: 38px; flex: 0 0 auto; overflow: hidden; border: 1px solid rgb(var(--cyan-rgb) / .3); border-radius: 50%; background: var(--pilot-ice); }
.telegram-title { display: flex; flex-direction: column; min-width: 0; }
.telegram-title strong { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.telegram-title span { font-size: 10px; color: var(--muted); margin-top: 2px; }
.chat {
  height: calc(100% - 123px); overflow-y: auto; padding: 18px 12px 28px;
  background:
    radial-gradient(circle at 20% 30%, rgb(var(--accent-rgb) / .04), transparent 38%),
    radial-gradient(circle at 70% 70%, rgb(var(--cyan-rgb) / .04), transparent 35%), #091827;
  scrollbar-width: thin; scrollbar-color: #24465f transparent;
}
.chat::before { content: attr(data-session-label); display: block; width: max-content; margin: 0 auto 14px; padding: 4px 8px; color: #8298a7; background: rgb(0 0 0 / .24); border-radius: 7px; font: 600 9px ui-monospace, monospace; letter-spacing: .08em; }
.message { max-width: 91%; margin: 0 0 10px; animation: rise .28s ease both; }
.message.bot { margin-right: auto; }
.message.user { margin-left: auto; }
.bubble { position: relative; padding: 11px 12px; border-radius: 14px 14px 14px 4px; color: #e0edf2; background: #17314a; box-shadow: 0 5px 14px rgb(0 0 0 / .13); font-size: 12px; line-height: 1.5; }
.message.user .bubble { border-radius: 14px 14px 4px 14px; color: #edfff5; background: #15523b; }
.bubble strong { color: white; }
.bubble .time { float: right; color: #8499a7; font-size: 8px; margin: 7px 0 0 8px; }
.message.user .time { color: #a8d4ba; }
.bot-buttons { display: grid; gap: 1px; margin-top: 3px; border-radius: 11px; overflow: hidden; }
.bot-buttons.row { grid-template-columns: repeat(2, 1fr); }
.bot-buttons button { min-height: 38px; border: 0; background: #15304a; color: var(--accent); cursor: pointer; font-weight: 600; font-size: 11px; transition: background .15s; }
.bot-buttons button:hover { background: #1b405e; }
.bot-buttons button:disabled { color: #728591; cursor: wait; }
.typing { display: inline-flex; gap: 4px; align-items: center; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: #8297a5; animation: pulse 1s infinite alternate; }
.typing i:nth-child(2) { animation-delay: .2s; }.typing i:nth-child(3) { animation-delay: .4s; }
.composer { height: 47px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-top: 1px solid var(--line); background: #0f2438; }
.composer span { flex: 1; color: #748996; padding: 8px 11px; border-radius: 18px; background: #081725; font-size: 11px; }
.composer button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--accent); color: #061c11; font-size: 14px; }

.signal-card { margin-top: 10px; padding: 13px; border: 1px solid rgb(var(--accent-rgb) / .14); border-radius: 13px; background: linear-gradient(145deg, rgb(var(--accent-rgb) / .07), rgb(0 0 0 / .08)); }
.signal-head { display: flex; align-items: center; gap: 9px; }
.signal-direction { padding: 5px 8px; border-radius: 7px; font: 800 11px ui-monospace, monospace; }
.signal-direction.call { color: #07120b; background: var(--accent); }
.signal-direction.put { color: #fff; background: var(--red); }
.signal-direction.wait { color: #211a06; background: var(--amber); }
.signal-head b { font-size: 12px; }.signal-head small { display: block; color: var(--muted); font-size: 9px; }
.confidence { margin-left: auto; text-align: right; }.confidence b { color: var(--accent); }.confidence span { display: block; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.mini-chart { width: 100%; height: 66px; display: block; margin: 10px 0 7px; }
.signal-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }
.signal-grid div { padding: 7px; background: rgb(0 0 0 / .16); border-radius: 8px; }
.signal-grid small { color: var(--muted); font-size: 7px; text-transform: uppercase; display: block; }.signal-grid b { font: 600 9px ui-monospace, monospace; }
.result-line { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.result-line b.win { color: var(--accent); }.result-line b.loss { color: var(--red); }.result-line b.draw, .result-line b.skipped { color: var(--amber); }.result-line b.void { color: #a9b8af; }
.strategy-list { display: grid; gap: 7px; margin-top: 11px; }
.strategy-explain { padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: rgb(0 0 0 / .13); }
.strategy-explain b { display: block; margin-bottom: 2px; color: #edfff5; font-size: 10px; }
.strategy-explain span, .risk-copy { color: #9bafbb; font-size: 9px; line-height: 1.45; }
.risk-copy { color: var(--amber); }
.gale-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 8px; }
.gale-step { display: grid; grid-template-columns: auto 1fr; gap: 2px 5px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 7px; background: rgb(0 0 0 / .13); }
.gale-step span { color: #dcecf1; font-size: 8px; font-weight: 700; }.gale-step b { text-align: right; font: 600 8px ui-monospace, monospace; }
.gale-step em { grid-column: 1/-1; color: var(--amber); font: normal 700 7px ui-monospace, monospace; }
.gale-step.win em { color: var(--accent); }.gale-step.loss em { color: var(--red); }.gale-step.skipped em, .gale-step.draw em { color: var(--amber); }.gale-step.void em { color: #a9b8af; }

.test-console {
  max-width: 380px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(160deg, rgb(20 48 75 / .92), rgb(8 24 39 / .94));
  box-shadow: 0 25px 70px rgb(0 0 0 / .22); backdrop-filter: blur(15px);
}
.console-heading, .panel-heading { display: flex; justify-content: space-between; align-items: flex-start; }
.console-heading h2, .panel-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.live-dot { padding: 6px 8px; font-size: 8px; }.live-dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.profile-card { display: flex; align-items: center; gap: 10px; margin: 21px 0; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: rgb(0 0 0 / .12); }
.profile-avatar { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: #173b4e; color: var(--accent); font-weight: 800; font-size: 11px; }
.profile-card > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; }
.profile-card strong { font-size: 12px; }.profile-card span { color: var(--muted); font-size: 9px; overflow: hidden; text-overflow: ellipsis; }
.credit-chip { margin-left: auto; white-space: nowrap; padding: 6px 7px; border-radius: 8px; color: #d3e4e9 !important; background: rgb(var(--accent-rgb) / .08); }.credit-chip b { color: var(--accent); }
.funnel { padding: 3px 2px; }
.funnel-step { display: grid; grid-template-columns: 28px 1fr 18px; gap: 10px; align-items: center; color: #7e929f; }
.funnel-step i { width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #31506a; border-radius: 50%; font: 700 9px ui-monospace, monospace; font-style: normal; }
.funnel-step span { font-size: 11px; font-weight: 600; }.funnel-step small { display: block; font-size: 8px; font-weight: 400; color: #718693; margin-top: 2px; }.funnel-step > b { font-size: 11px; }
.funnel-step.active { color: #e0edf2; }.funnel-step.active i { color: #061c11; border-color: var(--accent); background: var(--accent); }.funnel-step.active > b { color: var(--accent); }
.funnel-line { width: 1px; height: 14px; margin: 3px 0 3px 14px; background: #29465d; }.funnel-line.active { background: var(--accent); }
.console-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 20px; }
.console-actions button, .form-actions button, .admin-auth button {
  min-height: 39px; border: 1px solid rgb(var(--accent-rgb) / .2); border-radius: 9px; padding: 8px;
  color: #cce8d9; background: rgb(var(--accent-rgb) / .08); cursor: pointer; font-size: 9px; font-weight: 700;
}
.console-actions button:last-child { grid-column: 1/-1; }.console-actions button:hover, .form-actions button:hover, .admin-auth button:hover { color: #061c11; background: var(--accent); }
.key-field { display: block; margin-top: 13px; }.key-field span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .08em; }
.key-field input, .admin-auth input, .partner-editor input, .partner-editor textarea, .partner-editor select, .affiliate-lookup-form input, .affiliate-lookup-form select {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; outline: 0;
  color: #e0edf2; background: rgb(0 0 0 / .19); font-size: 10px;
}
.key-field input:focus, .admin-auth input:focus, .partner-editor input:focus, .partner-editor textarea:focus, .partner-editor select:focus, .affiliate-lookup-form input:focus, .affiliate-lookup-form select:focus { border-color: rgb(var(--accent-rgb) / .45); }
.microcopy { margin: 9px 0 0; color: #718692; font-size: 8px; line-height: 1.5; }.microcopy code { color: #9ebbc7; }

footer { width: min(1440px, calc(100% - 56px)); min-height: 52px; margin: auto; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: #718692; font: 500 9px ui-monospace, monospace; }
#health.ok { color: var(--accent); } #health.bad { color: var(--red); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 20; max-width: 360px; padding: 12px 15px; border: 1px solid rgb(var(--accent-rgb) / .22); border-radius: 11px; background: #142f48; box-shadow: 0 15px 50px rgb(0 0 0 / .4); color: #e0edf2; font-size: 11px; transform: translateY(30px); opacity: 0; pointer-events: none; transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }.toast.error { border-color: rgb(var(--red-rgb) / .34); }

/* Admin */
.admin-body { background-size: 42px 42px, 42px 42px, auto; }
.admin-shell { width: min(1440px, calc(100% - 56px)); margin: auto; padding: 48px 0 60px; }
.admin-topline { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; }
.admin-topline h1 { font-size: clamp(38px, 5vw, 62px); }.admin-topline > div > p:last-child { color: var(--muted); margin: 13px 0 0; }
.admin-controls { width: min(560px, 100%); display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: end; }
.admin-controls > label { color: var(--muted); font-size: 9px; }.admin-controls > label input { width: 100%; height: 39px; margin-top: 6px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; color: #e0edf2; background: rgb(0 0 0 / .19); }
.admin-auth { width: min(380px, 100%); display: grid; grid-template-columns: 1fr 100px; gap: 8px; align-items: end; }
.admin-auth label { color: var(--muted); font-size: 9px; }.admin-auth label input { margin-top: 6px; height: 39px; }.admin-auth button { height: 39px; }
.metric-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin: 34px 0 18px; }
.metric-grid article { min-height: 118px; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: rgb(14 34 56 / .82); }
.metric-grid span, .metric-grid small { display: block; color: var(--muted); font-size: 9px; }.metric-grid strong { display: block; margin: 12px 0 7px; color: var(--pilot-ice); font-size: 25px; letter-spacing: -.04em; }.metric-grid article:nth-child(3) strong, .metric-grid article:nth-child(6) strong { color: var(--accent); }
.admin-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; margin: 18px 0; }
.panel { border: 1px solid var(--line); border-radius: 18px; padding: 20px; background: rgb(14 34 56 / .86); box-shadow: 0 20px 60px rgb(0 0 0 / .14); }
.compact-panel { margin-top: 24px; display: grid; grid-template-columns: minmax(280px,.65fr) 1fr; align-items: center; gap: 24px; padding: 16px 20px; }
.compact-panel h2 { margin: 0; font-size: 16px; }.compact-panel > p, .panel-copy { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.report-panel { margin-bottom: 18px; }.panel-actions { display: flex; gap: 7px; }
.partner-editor form { margin-top: 20px; }.form-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.partner-editor label { display: block; color: var(--muted); font-size: 9px; }.partner-editor label input, .partner-editor label textarea, .partner-editor label select { margin-top: 6px; }.partner-editor > form > label { margin-top: 12px; }
.partner-editor textarea { resize: vertical; min-height: 72px; line-height: 1.5; }
.form-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }.form-actions button { min-width: 160px; }.form-actions span { color: var(--muted); font-size: 9px; }
.distribution-box { display: grid; grid-template-columns: 1fr auto; gap: 7px; margin-top: 14px; padding: 11px; border: 1px dashed rgb(var(--accent-rgb) / .24); border-radius: 10px; background: rgb(var(--accent-rgb) / .04); }
.distribution-box span { grid-column: 1/-1; color: var(--muted); font-size: 8px; text-transform: uppercase; }.distribution-box code { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--accent); font-size: 9px; white-space: nowrap; }
.event-list { margin-top: 15px; max-height: 420px; overflow-y: auto; }
.event-item { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.event-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--accent); background: rgb(var(--accent-rgb) / .09); font-size: 10px; font-weight: 800; }.event-item b { display: block; font-size: 10px; }.event-item span { color: var(--muted); font-size: 8px; }.event-amount { text-align: right; }.empty-state { padding: 40px 0; text-align: center; color: var(--muted); font-size: 10px; }
.signal-table-panel { min-height: 300px; }.legend { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 8px; }.legend i { width: 6px; height: 6px; border-radius: 50%; margin-left: 7px; }.legend .win { background: var(--accent); }.legend .loss { background: var(--red); }.legend .pending { background: var(--amber); }
.source-attribution { margin-top: 9px; color: #718579; font-size: 8px; text-align: right; }.source-attribution a { color: inherit; }
.table-wrap { overflow-x: auto; margin-top: 17px; } table { width: 100%; border-collapse: collapse; font-size: 9px; } th { color: #7f94a2; text-align: left; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; } th, td { padding: 11px 9px; border-bottom: 1px solid var(--line); white-space: nowrap; } td { color: #c3d4dd; } td > small { display: block; margin-top: 3px; color: #7f94a2; font-size: 7px; } td.direction-call { color: var(--accent); } td.direction-put { color: var(--red); }.result-pill { display: inline-block; min-width: 50px; text-align: center; padding: 4px 7px; border-radius: 6px; background: rgb(var(--amber-rgb) / .09); color: var(--amber); text-transform: uppercase; font-size: 8px; }.result-pill.win { color: var(--accent); background: rgb(var(--accent-rgb) / .09); }.result-pill.loss { color: var(--red); background: rgb(var(--red-rgb) / .09); }
.row-actions { display: flex; gap: 4px; }.row-actions button { border: 1px solid var(--line); border-radius: 6px; padding: 5px 6px; background: rgb(255 255 255 / .025); color: #c4d7df; cursor: pointer; font-size: 8px; }.row-actions button:hover { border-color: var(--accent); color: var(--accent); }.row-actions button:disabled { opacity: .35; cursor: not-allowed; }
.quality-ok { color: var(--accent); }.quality-warning { color: var(--amber); }
.status-badge.status-past_due, .status-badge.status-suspended { color: var(--red); border-color: rgb(var(--red-rgb) / .22); background: rgb(var(--red-rgb) / .08); }.status-badge.status-active { color: var(--accent-2); border-color: rgb(var(--cyan-rgb) / .22); background: rgb(var(--cyan-rgb) / .08); }
.invoice-wrap { max-height: 580px; overflow: auto; }.invoice-panel .panel-copy { margin-top: 12px; }
.affiliate-api-panel { margin: 18px 0; }
.affiliate-api-panel .panel-copy { max-width: 900px; margin-top: 10px; }
.affiliate-lookup-form { display: grid; grid-template-columns: minmax(220px, 420px) 150px; gap: 9px; align-items: end; margin-top: 16px; }
.affiliate-lookup-form label { color: var(--muted); font-size: 9px; }
.affiliate-lookup-form input { display: block; margin-top: 6px; }
.affiliate-lookup-form button { height: 36px; border: 1px solid rgb(var(--accent-rgb) / .2); border-radius: 9px; color: #cce8d9; background: rgb(var(--accent-rgb) / .08); cursor: pointer; font-size: 9px; font-weight: 700; }
.affiliate-lookup-form button:hover { color: #061c11; background: var(--accent); }
.affiliate-lookup-form button:disabled { opacity: .4; cursor: not-allowed; }
.affiliate-result { margin-top: 12px; padding: 11px; border: 1px dashed rgb(var(--accent-rgb) / .22); border-radius: 10px; color: #a9bdc8; background: rgb(var(--accent-rgb) / .035); font-size: 9px; line-height: 1.55; }
.affiliate-checks-wrap { max-height: 310px; overflow: auto; }

@keyframes rise { from { opacity: 0; transform: translateY(7px); } }
@keyframes pulse { from { opacity: .3; transform: translateY(1px); } to { opacity: 1; transform: translateY(-1px); } }

@media (max-width: 1180px) {
  .hero-shell { grid-template-columns: minmax(280px,.8fr) minmax(350px,430px); }
  .test-console { grid-column: 1 / -1; max-width: 850px; width: 100%; margin: 0 auto; }
  .console-actions { grid-template-columns: repeat(3,1fr); }.console-actions button:last-child { grid-column: auto; }
  .metric-grid { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 800px) {
  .site-header, .hero-shell, footer, .admin-shell { width: min(100% - 28px, 600px); }
  .site-header { height: 70px; }.mode-pill { display: none; }
  .hero-shell { display: flex; flex-direction: column; padding-top: 34px; }
  .intro-panel { text-align: center; }.product-lockup { margin-left: auto; margin-right: auto; }.intro-panel h1 { font-size: 42px; }.lead, .safety-note, .feature-row { margin-left: auto; margin-right: auto; }.safety-note { text-align: left; }
  .phone { height: 680px; max-height: none; }
  .phone-stage { width: 100%; }.test-console { max-width: 404px; }
  .console-actions { grid-template-columns: 1fr 1fr; }.console-actions button:last-child { grid-column: 1/-1; }
  footer { margin-top: 20px; }
  .admin-topline { align-items: flex-start; flex-direction: column; }.admin-auth { width: 100%; }
  .admin-controls { width: 100%; grid-template-columns: 1fr; }.compact-panel { grid-template-columns: 1fr; gap: 10px; }
  .metric-grid { grid-template-columns: repeat(2,1fr); }.admin-grid { grid-template-columns: 1fr; }.form-grid { grid-template-columns: 1fr; }
  .affiliate-lookup-form { grid-template-columns: 1fr; }
}

@media (max-width: 470px) {
  .site-header, .hero-shell, footer, .admin-shell { width: calc(100% - 20px); }
  .ghost-button { font-size: 9px; }.intro-panel h1 { font-size: 36px; }.lead { font-size: 14px; }
  .feature-row span { font-size: 10px; }.phone { width: 100%; border-width: 5px; border-radius: 32px; min-height: 620px; height: 670px; }
  .test-console { padding: 17px; }.metric-grid { grid-template-columns: 1fr 1fr; gap: 7px; }.metric-grid article { min-height: 105px; padding: 12px; }
  .admin-auth { grid-template-columns: 1fr; }.admin-shell { padding-top: 32px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* Partner onboarding guides */
.guide-body { min-height: 100vh; margin: 0; color: #10263f; background: #f4f8fa; }
.guide-header { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px max(20px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid #dce6eb; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); }
.guide-brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.guide-brand img { width: 42px; height: 42px; border-radius: 12px; }
.guide-brand span { display: grid; }
.guide-brand small { color: #617786; font-size: .72rem; }
.guide-header nav { display: flex; flex-wrap: wrap; gap: 8px; }
.guide-header nav a { padding: 9px 12px; border-radius: 9px; color: #49616f; text-decoration: none; font-size: .82rem; font-weight: 600; }
.guide-header nav a.active { color: #071711; background: var(--accent); }
.guide-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 48px 0 70px; }
.guide-hero { max-width: 820px; margin-bottom: 28px; }
.guide-hero h1 { margin: 8px 0 14px; font-size: clamp(2rem, 5vw, 3.7rem); line-height: 1.05; letter-spacing: -.045em; }
.guide-hero > p:last-child { color: #536c7b; font-size: 1.04rem; line-height: 1.75; }
.guide-alert, .guide-card { border: 1px solid #dce6eb; border-radius: 18px; background: #fff; box-shadow: 0 12px 36px rgba(16,38,63,.055); }
.guide-alert { margin: 0 0 28px; padding: 18px 22px; border-color: color-mix(in srgb, var(--accent) 45%, #dce6eb); background: color-mix(in srgb, var(--accent) 8%, white); }
.guide-alert p { margin: 8px 0 0; color: #526a78; line-height: 1.6; }
.guide-card { padding: clamp(20px, 4vw, 30px); }
.guide-card h2, .guide-card h3 { margin: 0 0 12px; }
.guide-card h4 { margin: 24px 0 9px; font-size: .78rem; letter-spacing: .05em; text-transform: uppercase; }
.guide-card p, .guide-card li { color: #526a78; line-height: 1.65; }
.guide-card ul, .guide-card ol { margin: 12px 0 0; padding-left: 22px; }
.guide-card li + li { margin-top: 8px; }
.guide-two-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 28px 0 44px; }
.guide-section-title { margin: 42px 0 18px; }
.guide-section-title h2 { margin: 4px 0 0; font-size: clamp(1.45rem, 3vw, 2rem); }
.event-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.event-card { position: relative; overflow: hidden; padding: 0; }
.guide-card-number { display: grid; place-items: center; width: 44px; height: 44px; margin: 22px 0 0 22px; border-radius: 13px; color: #071711; background: var(--accent); font-weight: 700; }
.guide-card-content { padding: 20px 22px 26px; }
.guide-copy-row { display: flex; align-items: stretch; gap: 8px; }
.guide-copy-row code { flex: 1; min-width: 0; padding: 11px; overflow-wrap: anywhere; border-radius: 9px; color: #173f5c; background: #edf3f6; font-size: .72rem; }
.guide-copy-row button { flex: 0 0 auto; border: 0; border-radius: 9px; padding: 0 13px; color: #071711; background: var(--accent); font: 700 .75rem Sora, sans-serif; cursor: pointer; }
.guide-table-wrap { width: 100%; overflow-x: auto; border: 1px solid #dce6eb; border-radius: 14px; background: #fff; }
.guide-table-wrap table { width: 100%; border-collapse: collapse; }
.guide-table-wrap th, .guide-table-wrap td { padding: 12px 14px; border-bottom: 1px solid #e7eef2; text-align: left; vertical-align: top; font-size: .78rem; line-height: 1.5; }
.guide-table-wrap th { color: #6a7f8d; background: #f8fafb; font-size: .68rem; letter-spacing: .04em; text-transform: uppercase; }
.guide-table-wrap tr:last-child td { border-bottom: 0; }
.guide-card details { margin-top: 22px; border-top: 1px solid #e7eef2; padding-top: 16px; }
.guide-card summary, .script-card summary { cursor: pointer; color: #173f5c; font-weight: 700; }
.warning-card { border-color: #f0d69b; background: #fffaf0; }
.success-card { border-color: #b9e8ce; background: #f3fcf7; }
.media-table th:nth-child(4), .media-table td:nth-child(4), .media-table th:nth-child(5), .media-table td:nth-child(5) { min-width: 250px; }
.priority { display: inline-flex; padding: 4px 8px; border-radius: 999px; font-size: .68rem; font-weight: 700; }
.priority-p0 { color: #17412a; background: #d9f5e5; }
.priority-p1 { color: #6b4a04; background: #fff0c4; }
.priority-p2 { color: #4f6070; background: #e8eef2; }
.script-grid { display: grid; gap: 12px; }
.script-card { border: 1px solid #dce6eb; border-radius: 16px; background: white; }
.script-card summary { padding: 19px 22px; }
.script-card > div { padding: 0 22px 22px; color: #526a78; }
.script-card li { margin: 8px 0; line-height: 1.55; }
@media (max-width: 900px) { .event-grid { grid-template-columns: 1fr; } .guide-two-columns { grid-template-columns: 1fr; } }
@media (max-width: 650px) { .guide-header { position: static; align-items: flex-start; flex-direction: column; } .guide-header nav { width: 100%; } .guide-header nav a { flex: 1; text-align: center; } .guide-shell { padding-top: 30px; } .guide-copy-row { flex-direction: column; } .guide-copy-row button { min-height: 42px; } }
