:root {
  color-scheme: light;
  --bg:#f7f4ef;
  --ink:#111111;
  --muted:#6b6258;
  --line:#dfd6c9;
  --soft-line:#eee6dc;
  --accent:#f97316;
  --accent-strong:#c2410c;
  --panel:#fff;
  --good:#087443;
  --warn:#b54708;
  --danger:#b42318;
  --shadow:0 14px 36px rgba(16, 24, 40, .08);
}
* { box-sizing: border-box; }
body { min-height:100vh; margin:0; font-family: Arial, Helvetica, sans-serif; background:linear-gradient(180deg, rgba(247,244,239,.66), rgba(247,244,239,.84)), url("/static/images/aipom-sport-bg.png") center top / cover no-repeat fixed; color:var(--ink); font-size:15px; }
a { color:var(--accent); text-decoration:none; }
.topbar { min-height:64px; display:flex; align-items:center; justify-content:space-between; gap:24px; padding:0 28px; background:rgba(255,255,255,.92); backdrop-filter:blur(14px); border-bottom:1px solid var(--line); position:sticky; top:0; z-index:10; }
.brand { display:flex; align-items:center; gap:10px; font-weight:800; color:var(--ink); white-space:nowrap; }
.brand-mark { display:inline-grid; place-items:center; width:34px; height:34px; border-radius:8px; background:#111; color:#f97316; font-size:13px; letter-spacing:.5px; }
.main-nav { display:flex; gap:6px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.main-nav a { color:#344054; padding:9px 11px; border-radius:7px; }
.main-nav a:hover { background:#fff3e8; color:var(--accent-strong); }
.main-nav .nav-exit { color:#9b1c1c; }
.page { max-width:1220px; margin:0 auto; padding:32px 24px 64px; }
.page-hero { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:22px; }
.eyebrow { margin:0 0 6px; color:var(--accent); font-size:13px; font-weight:700; text-transform:uppercase; }
h1 { font-size:30px; line-height:1.18; margin:0; }
h2 { font-size:20px; margin:0 0 16px; }
.page-description { margin:8px 0 0; color:var(--muted); max-width:760px; line-height:1.55; }
.toolbar { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:14px; margin-bottom:22px; }
.card { background:var(--panel); border:1px solid var(--soft-line); border-radius:8px; padding:18px; box-shadow:var(--shadow); }
.card span { display:block; color:var(--muted); font-size:13px; }
.card strong { display:block; margin-top:8px; font-size:24px; }
.section { background:rgba(255,255,255,.94); border:1px solid var(--line); border-radius:8px; padding:18px; box-shadow:var(--shadow); margin-bottom:22px; }
.notice { border-radius:8px; padding:13px 15px; margin-bottom:16px; font-weight:700; border:1px solid var(--line); }
.notice-success { background:#e7f6ed; color:var(--good); border-color:#b7e4c7; }
.notice-error { background:#fff1f0; color:var(--danger); border-color:#f2b8b5; }
.notice-info { background:#eef6ff; color:#175cd3; border-color:#b9d7ff; }
.notice-warning { background:#fff3e8; color:#9a3412; border-color:#fdba74; }
.control-notice { margin-top:18px; margin-bottom:0; }
.section-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:16px; }
.section-head p { margin:4px 0 0; color:var(--muted); }
.status-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:12px 0 16px; }
.status-step { border:1px solid var(--line); border-left:4px solid var(--accent); border-radius:8px; padding:13px; background:#fff; min-height:112px; }
.status-step span { display:block; color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; }
.status-step strong { display:block; margin-top:7px; font-size:18px; line-height:1.2; }
.status-step p { margin:8px 0 0; color:var(--muted); line-height:1.4; font-size:13px; }
.status-step.status-ok { background:#f3fff7; border-left-color:var(--good); color:var(--ink); }
.status-step.status-warn { background:#fff8f1; border-left-color:var(--accent); color:var(--ink); }
.status-step.status-bad { background:#fff7f7; border-left-color:var(--danger); color:var(--ink); }
.signal-summary { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:10px; margin:12px 0; }
.signal-summary div { border:1px solid var(--soft-line); border-radius:8px; padding:12px; background:#fff8f1; }
.signal-summary span { display:block; color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; }
.signal-summary strong { display:block; margin-top:6px; font-size:18px; }
.signals-hero { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:22px; padding:26px; border:1px solid rgba(223,214,201,.82); border-radius:8px; background:linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,248,241,.86)); box-shadow:var(--shadow); }
.signals-hero h1 { font-size:34px; }
.hero-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
.signals-control-panel, .signals-workspace { background:rgba(255,255,255,.94); border:1px solid var(--line); border-radius:8px; padding:18px; box-shadow:var(--shadow); margin-bottom:22px; }
.control-main { display:grid; grid-template-columns:minmax(260px, 1fr) 2fr; gap:16px; align-items:stretch; }
.control-label { display:block; color:var(--accent); font-size:12px; font-weight:900; text-transform:uppercase; margin-bottom:7px; }
.control-main strong { display:block; font-size:20px; }
.control-main small { display:block; color:var(--muted); margin-top:6px; line-height:1.4; }
.control-status { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:10px; }
.control-status span { border:1px solid var(--soft-line); border-radius:8px; padding:12px; background:#fffaf5; color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; }
.control-status strong { color:var(--ink); font-size:16px; margin-top:5px; text-transform:none; }
.signals-toolbar { display:flex; justify-content:space-between; gap:14px; align-items:center; margin-bottom:16px; }
.latest-run-strip { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 16px; margin-bottom:16px; border:1px solid #fed7aa; border-radius:8px; background:#fff7ed; box-shadow:0 12px 28px rgba(249,115,22,.10); }
.latest-run-strip strong { display:block; font-size:16px; }
.latest-run-strip span { display:block; color:var(--muted); margin-top:4px; line-height:1.35; }
.latest-run-links { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.latest-run-links a, .latest-pill { display:inline-flex; align-items:center; min-height:26px; border-radius:999px; padding:0 10px; font-size:12px; font-weight:900; text-decoration:none; }
.latest-run-links a { background:#111; color:#fff; }
.latest-pill { background:#ff6b13; color:#111; border:1px solid #ff6b13; }
.segmented-tabs { display:inline-flex; padding:4px; border:1px solid var(--line); border-radius:8px; background:#fff8f1; gap:4px; }
.segmented-tabs a { min-height:38px; display:inline-flex; align-items:center; justify-content:center; padding:0 14px; border-radius:7px; color:#111; font-weight:900; }
.segmented-tabs a.active { background:#111; color:#fff; }
.segmented-tabs a:not(.active):hover { background:#ffe7d3; color:#9a3412; }
.filter-panel { display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)) auto auto; gap:10px; align-items:end; margin:16px 0 18px; padding:14px; border:1px solid var(--soft-line); border-radius:8px; background:#fffaf5; }
.filter-panel label { margin:0; }
.filter-panel button, .filter-panel .button { width:100%; }
.archive-metrics { display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:10px; margin:14px 0; }
.archive-metrics div { border:1px solid var(--soft-line); border-radius:8px; padding:13px; background:#fffaf5; }
.archive-metrics span { display:block; color:var(--muted); font-size:12px; font-weight:900; text-transform:uppercase; }
.archive-metrics strong { display:block; font-size:22px; margin-top:6px; }
.archive-metrics .metric-danger { border-color:#fecaca; background:#fff7f7; }
.archive-metrics .metric-danger strong { color:var(--danger); }
.archive-metrics .metric-good { border-color:#b7e4c7; background:#f3fff7; }
.archive-metrics .metric-good strong { color:var(--good); }
.learning-panel { display:grid; grid-template-columns:minmax(260px, 1fr) minmax(280px, .9fr); gap:16px; border:1px solid #fdba74; border-radius:8px; padding:16px; background:linear-gradient(135deg, #fffaf5, #fff3e8); margin-bottom:14px; }
.learning-panel strong { display:block; font-size:22px; margin-bottom:8px; }
.learning-panel p { margin:0; color:var(--muted); line-height:1.5; }
.learning-panel ul { margin:0; padding-left:18px; color:#7c2d12; line-height:1.45; }
.learning-panel li + li { margin-top:6px; }
.learning-negative { border-color:#f2b8b5; background:linear-gradient(135deg, #fffaf5, #fff1f0); }
.learning-positive { border-color:#b7e4c7; background:linear-gradient(135deg, #fffaf5, #f3fff7); }
.run-progress { display:flex; gap:12px; align-items:center; border:1px solid #fdba74; border-radius:8px; background:#fff3e8; color:#111; padding:14px 15px; margin:12px 0 16px; }
.run-progress[hidden] { display:none; }
.run-progress strong { display:block; margin-bottom:3px; }
.run-progress p { margin:0; color:#7c2d12; line-height:1.45; }
.run-spinner { width:26px; height:26px; border:4px solid #fed7aa; border-top-color:var(--accent); border-radius:50%; animation:spin 900ms linear infinite; flex:0 0 auto; }
@keyframes spin { to { transform:rotate(360deg); } }
.table-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:8px; background:#fff; }
table { width:100%; border-collapse:separate; border-spacing:0; background:#fff; min-width:760px; }
th, td { padding:12px 14px; border-bottom:1px solid var(--soft-line); text-align:left; vertical-align:middle; }
th { color:#344054; background:#f4f7fb; font-size:13px; font-weight:700; }
tr:last-child td { border-bottom:0; }
label { display:flex; flex-direction:column; gap:7px; font-size:13px; color:#344054; font-weight:600; }
input, select, textarea { width:100%; min-height:40px; border:1px solid #cfd8e3; border-radius:7px; padding:8px 10px; font:inherit; background:#fff; color:var(--ink); }
textarea { min-height:82px; resize:vertical; }
input:focus, select:focus, textarea:focus { outline:2px solid #b9dcf8; border-color:var(--accent); }
button, .button { display:inline-flex; align-items:center; justify-content:center; min-height:40px; border:0; border-radius:7px; padding:0 14px; background:var(--accent); color:#111; cursor:pointer; font:inherit; font-weight:800; white-space:nowrap; }
button:hover, .button:hover { background:var(--accent-strong); color:#fff; }
.button-secondary { background:#111; color:#fff; }
.button-secondary:hover { background:#333; color:#fff; }
.panel { background:#fff; border:1px solid var(--line); border-radius:8px; padding:18px; margin-bottom:20px; display:grid; gap:14px; box-shadow:var(--shadow); }
.grid-form { grid-template-columns:repeat(4,minmax(0,1fr)); align-items:end; }
.grid-form h2, .grid-form .wide { grid-column:1/-1; }
.inline { display:flex; gap:8px; align-items:center; margin:0; flex-wrap:nowrap; }
.inline input { min-width:120px; }
.inline select { min-width:150px; }
.check { flex-direction:row; align-items:center; gap:8px; font-weight:600; }
.check input { width:18px; height:18px; min-height:18px; }
.status { display:inline-flex; align-items:center; min-height:26px; border-radius:999px; padding:0 9px; font-size:12px; font-weight:700; background:#fff3e8; color:#9a3412; }
.status-active, .status-true { background:#e7f6ed; color:var(--good); }
.status-paused, .status-false { background:#fff4e6; color:var(--warn); }
.status-ok { background:#e7f6ed; color:var(--good); }
.status-warning { background:#fff4e6; color:var(--warn); }
.status-error { background:#fff1f0; color:var(--danger); }
.journal-message { max-width:520px; line-height:1.45; }
.journal-details { margin-top:8px; color:var(--muted); }
.journal-details summary { cursor:pointer; color:var(--accent); font-weight:700; }
.journal-details code { display:block; margin-top:8px; white-space:pre-wrap; color:#344054; background:#f8fafc; border:1px solid var(--soft-line); border-radius:8px; padding:10px; font-size:12px; }
.actions-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:14px; margin-bottom:22px; }
.action-card { background:#fff; border:1px solid var(--line); border-radius:8px; padding:18px; box-shadow:var(--shadow); }
.action-card h3 { margin:0 0 8px; font-size:17px; }
.action-card p { margin:0 0 14px; color:var(--muted); line-height:1.5; }
.ai-inline { min-width:420px; }
.ai-inline input { min-width:170px; }
.provider-grid { display:grid; grid-template-columns:1fr; gap:16px; }
.provider-card { border:1px solid var(--line); border-radius:8px; padding:18px; background:#fff; }
.provider-title { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:14px; }
.provider-title h3 { margin:0 0 5px; font-size:19px; }
.provider-title p { margin:0; color:var(--muted); word-break:break-word; }
.provider-meta { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:16px; }
.provider-meta span { background:#f4f7fb; border:1px solid var(--soft-line); border-radius:7px; padding:8px 10px; color:#475467; }
.provider-badges { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.provider-form { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; align-items:end; }
.provider-form .check { min-height:40px; }
.provider-form button { align-self:end; }
.provider-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.sync-form { margin:0; }
.sync-form button { width:auto; }
.button-danger { background:#b42318; }
.button-danger:hover { background:#8f1b13; }
.advanced-settings { grid-column:1/-1; border:1px solid var(--soft-line); border-radius:8px; padding:10px 12px; background:#f8fafc; }
.advanced-settings summary { cursor:pointer; font-weight:700; color:#344054; }
.advanced-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:12px; }
.signal-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; min-width:560px; }
.signal-actions .inline input { width:110px; }
.signal-list { display:grid; gap:14px; }
.signal-card { border:1px solid var(--line); border-radius:8px; background:rgba(255,255,255,.96); overflow:hidden; box-shadow:var(--shadow); }
.signal-card.signal-latest { border-color:#fb923c; box-shadow:0 18px 46px rgba(249,115,22,.18); position:relative; }
.signal-card.signal-latest:before { content:""; position:absolute; inset:0 0 auto; height:5px; background:linear-gradient(90deg, #111, #ff6b13); }
.signal-card.signal-strong { border-color:#86efac; box-shadow:0 16px 38px rgba(8, 116, 67, .12); }
.signal-card.signal-premium { border-color:#f97316; box-shadow:0 18px 44px rgba(249, 115, 22, .22); position:relative; }
.signal-card.signal-premium:before { content:""; position:absolute; inset:0 0 auto; height:4px; background:linear-gradient(90deg, #111, #f97316, #12b76a); }
.signal-main { display:flex; justify-content:space-between; gap:14px; align-items:flex-start; padding:16px; border-bottom:1px solid var(--soft-line); }
.signal-badges { display:flex; flex-direction:column; gap:8px; align-items:flex-end; max-width:270px; }
.signal-topline { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.signal-id { display:inline-flex; align-items:center; min-height:24px; padding:0 8px; border-radius:999px; background:#111; color:#f97316; font-size:12px; font-weight:900; }
.sport-pill, .power-pill { display:inline-flex; align-items:center; min-height:24px; border-radius:999px; padding:0 9px; font-size:12px; font-weight:900; }
.sport-pill { background:#fff3e8; color:#9a3412; border:1px solid #fdba74; }
.power-pill { background:#111; color:#fff; border:1px solid #111; }
.signal-premium .power-pill { background:#f97316; color:#111; border-color:#f97316; }
.power-note { display:block; max-width:260px; border:1px solid #fdba74; background:#fff8f1; color:#9a3412; border-radius:8px; padding:8px 10px; font-size:12px; font-weight:800; line-height:1.3; }
.signal-strong .power-note { border-color:#b7e4c7; background:#f3fff7; color:var(--good); }
.signal-premium .power-note { border-color:#f97316; background:#111; color:#fff; }
.signal-card h3 { margin:8px 0 6px; font-size:19px; line-height:1.25; }
.signal-card p { margin:0; color:var(--muted); line-height:1.45; }
.signal-metrics { display:grid; grid-template-columns:1.2fr .8fr .8fr; gap:0; border-bottom:1px solid var(--soft-line); }
.signal-metrics div { padding:14px 16px; border-right:1px solid var(--soft-line); background:#fffaf5; }
.signal-metrics div:last-child { border-right:0; }
.signal-metrics span { display:block; color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; }
.signal-metrics strong { display:block; margin-top:6px; font-size:24px; }
.signal-metrics div:first-child strong { font-size:18px; line-height:1.25; }
.signal-explain { padding:14px 16px; background:#fff8d8; color:#453b00 !important; border-bottom:1px solid #f0df9a; white-space:pre-wrap; overflow-wrap:anywhere; }
.traffic-light { display:grid; grid-template-columns:14px 1fr; gap:4px 8px; align-items:center; border:1px solid var(--soft-line); border-radius:8px; padding:8px 10px; background:#fff; font-size:12px; }
.traffic-light i { width:14px; height:14px; border-radius:50%; display:block; grid-row:1/3; }
.traffic-light strong { font-size:13px; line-height:1.1; }
.traffic-light small { color:var(--muted); line-height:1.25; }
.traffic-green { border-color:#b7e4c7; background:#f3fff7; }
.traffic-green i { background:#12b76a; }
.traffic-yellow { border-color:#fedf89; background:#fffbeb; }
.traffic-yellow i { background:#f79009; }
.traffic-red { border-color:#fecaca; background:#fff7f7; }
.traffic-red i { background:#d92d20; }
.signal-card-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:end; padding:14px 16px; }
.signal-card-actions form { margin:0; }
.signal-confirm { display:grid; grid-template-columns:130px 130px auto; gap:10px; align-items:end; }
.signal-confirm input { min-height:40px; }
.settle-inline { min-width:430px; }
.bet-list { display:grid; gap:14px; }
.bet-card { border:1px solid var(--line); border-radius:8px; background:rgba(255,255,255,.96); box-shadow:var(--shadow); overflow:hidden; }
.bet-card-head { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; padding:16px; border-bottom:1px solid var(--soft-line); }
.bet-card h3 { margin:8px 0 6px; font-size:20px; line-height:1.25; }
.bet-card p { margin:0; color:var(--muted); line-height:1.45; }
.bet-result { min-width:150px; border:1px solid var(--soft-line); border-radius:8px; padding:10px 12px; background:#fffaf5; text-align:left; }
.bet-result span, .bet-metrics span { display:block; color:var(--muted); font-size:12px; font-weight:900; text-transform:uppercase; }
.bet-result strong { display:block; margin-top:5px; font-size:18px; }
.bet-won .bet-result { background:#f3fff7; border-color:#b7e4c7; color:var(--good); }
.bet-lost .bet-result { background:#fff7f7; border-color:#fecaca; color:var(--danger); }
.bet-push .bet-result { background:#fff8f1; border-color:#fdba74; color:var(--warn); }
.bet-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); border-bottom:1px solid var(--soft-line); }
.bet-metrics div { padding:14px 16px; border-right:1px solid var(--soft-line); background:#fffaf5; min-width:0; }
.bet-metrics div:last-child { border-right:0; }
.bet-metrics strong { display:block; margin-top:6px; font-size:22px; overflow-wrap:anywhere; }
.bet-note { padding:12px 16px; background:#fff8d8; border-bottom:1px solid #f0df9a; color:#453b00 !important; }
.bet-edit-form, .bet-settle-form { display:grid; gap:10px; align-items:end; padding:14px 16px; }
.bet-edit-form { grid-template-columns:minmax(120px,160px) minmax(120px,160px) minmax(220px,1fr) auto; border-bottom:1px solid var(--soft-line); background:#fffdf9; }
.bet-settle-form { grid-template-columns:minmax(130px,180px) minmax(180px,1fr) auto; }
.bet-edit-form button, .bet-settle-form button { width:100%; min-width:130px; }
.bet-form-title { grid-column:1/-1; color:var(--accent); font-weight:900; text-transform:uppercase; font-size:12px; }
.advisor-hero .toolbar { align-items:flex-start; }
.advisor-shell { display:grid; grid-template-columns:minmax(240px,.55fr) minmax(320px,1fr); gap:18px; align-items:start; }
.advisor-intro { border:1px solid #fdba74; border-radius:8px; padding:16px; background:#fff8f1; }
.advisor-intro strong { display:block; font-size:20px; margin-bottom:8px; }
.advisor-intro p { margin:0; color:var(--muted); line-height:1.55; }
.advisor-form { display:grid; gap:14px; }
.advisor-form textarea { min-height:180px; line-height:1.5; }
.advisor-form button { justify-self:start; min-width:190px; }
.advisor-progress { display:flex; gap:12px; align-items:center; border:1px solid #fdba74; border-radius:8px; background:#fff3e8; color:#111; padding:16px; margin:16px 0; }
.advisor-progress[hidden] { display:none; }
.advisor-progress strong { display:block; margin-bottom:4px; }
.advisor-progress p { margin:0; color:#7c2d12; line-height:1.45; }
.paste-upload { display:grid; gap:4px; place-items:center; min-height:118px; border:2px dashed #fdba74; border-radius:8px; background:#fff8f1; color:#7c2d12; text-align:center; padding:18px; cursor:copy; }
.paste-upload strong { font-size:18px; color:#111; }
.paste-upload span { color:var(--muted); line-height:1.4; }
.paste-upload:focus, .paste-upload.is-dragover { outline:3px solid rgba(249,115,22,.28); border-color:var(--accent); background:#fff3e8; }
.paste-upload.has-files { border-style:solid; background:#fffaf5; }
.hidden-file-input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.upload-preview { display:grid; grid-template-columns:repeat(auto-fit,minmax(120px,1fr)); gap:10px; }
.upload-preview-item { border:1px solid var(--soft-line); border-radius:8px; overflow:hidden; background:#fff; }
.upload-preview-item img { display:block; width:100%; height:86px; object-fit:cover; background:#f8fafc; }
.upload-preview-item span { display:block; padding:7px 8px; color:var(--muted); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.advisor-uploaded { margin-top:16px; }
.ocr-grid { display:grid; gap:12px; }
.ocr-card { border:1px solid var(--soft-line); border-radius:8px; background:#fffaf5; padding:14px; }
.ocr-card strong { display:block; margin-bottom:8px; }
.ocr-card pre { margin:0; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.45; color:#344054; font-family:Consolas, "Courier New", monospace; font-size:13px; }
.ocr-card p { margin:0; color:#7a271a; }
.advisor-answer { border-color:#111; }
.advisor-message { white-space:pre-wrap; line-height:1.6; background:#fff8d8; border:1px solid #f0df9a; border-radius:8px; padding:18px; color:#2d2500; overflow-wrap:anywhere; }
.note { background:#fff8d8; color:#453b00; }
.hint { color:var(--muted); font-size:13px; line-height:1.5; margin:12px 0 0; }
.empty-state { background:#fff; border:1px solid var(--line); border-radius:8px; padding:34px; box-shadow:var(--shadow); text-align:center; }
.empty-state h2 { margin:0 0 8px; }
.empty-state p { margin:0 auto 18px; color:var(--muted); max-width:560px; line-height:1.55; }
.empty-inline { color:var(--muted); padding:18px 4px; text-align:center; }
.error-box { background:#fff7f7; border:1px solid #f2b8b5; border-radius:8px; padding:14px; }
.error-box p { margin:8px 0; color:#7a271a; }
.error-box code { display:block; white-space:pre-wrap; color:#344054; font-size:13px; }
.node-flow { display:grid; grid-template-columns:1fr 34px 1fr 34px 1fr 34px 1fr; gap:0; align-items:stretch; overflow-x:auto; padding:4px; }
.flow-node { min-width:230px; background:#fff; border:1px solid var(--line); border-radius:8px; padding:16px; box-shadow:var(--shadow); display:grid; gap:12px; align-content:start; }
.flow-node h3 { margin:0; font-size:18px; }
.flow-node p { margin:0; color:var(--muted); line-height:1.45; }
.flow-node-muted { background:#f8fbff; }
.node-type { justify-self:start; border-radius:999px; background:#111; color:#f97316; padding:5px 9px; font-size:12px; font-weight:800; }
.flow-link { position:relative; min-height:100%; }
.flow-link:before { content:""; position:absolute; left:8px; right:8px; top:50%; height:2px; background:#b9c7d8; }
.flow-link:after { content:""; position:absolute; right:6px; top:calc(50% - 5px); width:10px; height:10px; border-top:2px solid #b9c7d8; border-right:2px solid #b9c7d8; transform:rotate(45deg); background:transparent; }
.node-help { margin-top:14px; border:1px dashed #b9c7d8; border-radius:8px; padding:14px; background:#f8fbff; }
.node-help p { margin:0 0 12px; color:var(--muted); }
button:disabled, select:disabled { opacity:.6; cursor:not-allowed; }
.terminal-section { background:rgba(255,255,255,.9); }
.server-presets { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:10px; }
.server-presets form { margin:0; }
.server-presets button { width:100%; min-height:48px; padding:10px 14px; white-space:normal; line-height:1.2; text-align:center; }
.server-command-form { display:grid; gap:12px; }
.terminal-input-section { border-color:#111; }
.terminal-label { display:inline-flex; align-items:center; width:max-content; border-radius:999px; padding:6px 10px; background:#111; color:#f97316; font-family:Consolas, "Courier New", monospace; font-size:13px; font-weight:900; }
.server-command-form textarea { min-height:180px; font-family:Consolas, "Courier New", monospace; background:#111; color:#f8fafc; border-color:#111; font-size:14px; line-height:1.5; }
.server-command-form textarea::placeholder { color:#94a3b8; }
.server-command-form textarea:focus { outline:3px solid rgba(249,115,22,.35); border-color:#f97316; }
.server-command-form button { justify-self:start; }
.server-output { display:grid; gap:12px; }
.server-output span { display:block; color:var(--muted); font-size:12px; font-weight:900; text-transform:uppercase; margin-bottom:6px; }
.server-output code, .server-output pre { display:block; margin:0; border:1px solid #1f2937; border-radius:8px; background:#111; color:#f8fafc; padding:12px; font-family:Consolas, "Courier New", monospace; font-size:13px; line-height:1.45; overflow:auto; white-space:pre-wrap; overflow-wrap:anywhere; max-height:520px; }
@media (max-width: 1100px) { .node-flow { grid-template-columns:1fr; gap:12px; } .flow-link { display:none; } }
.browser-controls { display:flex; align-items:end; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.browser-controls form { display:flex; align-items:end; gap:10px; flex-wrap:wrap; }
.browser-controls label { min-width:260px; }
.browser-frame { border:1px solid var(--line); border-radius:8px; overflow:auto; background:#111; max-height:78vh; }
.browser-frame img { display:block; max-width:100%; height:auto; cursor:crosshair; background:#fff; }
.account-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(320px,1fr)); gap:16px; }
.account-card { background:#fff; border:1px solid var(--line); border-radius:8px; padding:20px; box-shadow:var(--shadow); }
.account-card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:18px; }
.account-card h2 { margin:0 0 5px; font-size:20px; }
.account-card p { margin:0; color:var(--muted); }
.account-card-bank { border:1px solid var(--soft-line); background:#f7fafc; border-radius:8px; padding:14px; margin-bottom:16px; }
.account-card-bank span { display:block; color:var(--muted); font-size:13px; margin-bottom:6px; }
.account-card-bank strong { font-size:24px; }
.settings-form { display:grid; gap:18px; }
.setting-row { display:flex; justify-content:space-between; gap:20px; align-items:center; border-bottom:1px solid var(--soft-line); padding-bottom:16px; }
.setting-row h2 { margin:0 0 6px; }
.setting-row p { margin:0; color:var(--muted); }
.switch { flex-direction:row; align-items:center; gap:10px; font-weight:800; white-space:nowrap; }
.switch input { width:22px; height:22px; min-height:22px; }
.setup-form { max-width:520px; display:grid; gap:14px; }
.label-row { display:flex; align-items:center; gap:7px; }
.help { display:inline-grid; place-items:center; width:18px; height:18px; border-radius:50%; background:#111; color:#f97316; font-size:12px; font-weight:900; cursor:help; }
.login-page { min-height:100vh; display:grid; place-items:center; background:var(--bg) url("/static/images/aipom-sport-bg.png") center / cover no-repeat; }
.login-box { width:min(420px, calc(100vw - 32px)); background:#fff; border:1px solid var(--line); border-radius:8px; padding:28px; display:grid; gap:15px; box-shadow:var(--shadow); }
.login-brand { display:flex; align-items:center; gap:12px; }
.login-brand h1 { font-size:24px; }
.login-subtitle { margin:0; color:var(--muted); }
.login-link { justify-self:center; color:var(--accent); font-weight:700; }
.client-login-page { background:var(--bg) url("/static/images/aipom-sport-bg.png") center / cover no-repeat; }
.error { color:#b42318; margin:0; }
@media (max-width: 980px) { .grid-form, .provider-form { grid-template-columns:repeat(2,minmax(0,1fr)); } .page-hero, .signals-hero { flex-direction:column; } .status-grid, .signal-summary { grid-template-columns:repeat(2,minmax(0,1fr)); } .control-main, .learning-panel, .advisor-shell { grid-template-columns:1fr; } .filter-panel { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 720px) { body { background-attachment:scroll; } .topbar { height:auto; padding:12px; align-items:flex-start; flex-direction:column; } .main-nav { justify-content:flex-start; } .page { padding:24px 14px 48px; } .grid-form { grid-template-columns:1fr; } .status-grid, .signal-summary, .signal-metrics, .signal-confirm, .filter-panel, .bet-metrics, .bet-edit-form, .bet-settle-form { grid-template-columns:1fr; } .latest-run-strip, .signals-toolbar, .bet-card-head { align-items:stretch; flex-direction:column; } .latest-run-links { justify-content:flex-start; } .bet-result { width:100%; } .segmented-tabs { width:100%; } .segmented-tabs a { flex:1; } .signal-main { flex-direction:column; } .signal-badges { align-items:flex-start; max-width:none; } table { min-width:680px; } }
