/* Opus Ajan paneli: koyu borsa terminali */
:root {
  --bg: #06080c;
  --bg-2: #0a0d13;
  --panel: #0e1219;
  --panel-2: #121823;
  --panel-3: #18202d;
  --line: #1a2230;
  --line-2: #243043;
  --text: #e9edf4;
  --text-2: #a4aec0;
  --text-3: #6a7487;
  --text-4: #4a5365;
  --green: #2ebd85;
  --green-2: #3fd99b;
  --green-soft: rgba(46, 189, 133, 0.12);
  --red: #f6465d;
  --red-2: #ff6b7f;
  --red-soft: rgba(246, 70, 93, 0.12);
  --amber: #f0b90b;
  --amber-soft: rgba(240, 185, 11, 0.12);
  --clay: #d97757;
  --clay-2: #ec916f;
  --clay-soft: rgba(217, 119, 87, 0.13);
  --blue: #5b8def;
  --blue-soft: rgba(91, 141, 239, 0.13);
  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset, 0 12px 40px -18px rgba(0, 0, 0, 0.8);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); }
body {
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(217, 119, 87, 0.07), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(91, 141, 239, 0.05), transparent 60%),
    var(--bg);
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--clay-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.up { color: var(--green); }
.down { color: var(--red); }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.tiny { font-size: 11px; }
.small { font-size: 12px; }
.hidden { display: none !important; }
.nowrap { white-space: nowrap; }

/* ------------------------------------------------------------------ üst bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px;
  background: rgba(6, 8, 12, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-name { font-weight: 700; letter-spacing: 0.14em; font-size: 12.5px; }
.brand-sub { color: var(--text-3); font-size: 11px; letter-spacing: 0.02em; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--line-2); color: var(--text-2); background: var(--panel);
}
.badge.live { color: var(--red-2); border-color: rgba(246, 70, 93, 0.35); background: var(--red-soft); }
.badge.demo { color: var(--amber); border-color: rgba(240, 185, 11, 0.3); background: var(--amber-soft); }
.spacer { flex: 1; }
.status-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line-2);
  font-size: 12.5px; white-space: nowrap; max-width: 46vw; overflow: hidden; text-overflow: ellipsis;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot.green { background: var(--green); box-shadow: 0 0 0 3px rgba(46, 189, 133, 0.18); }
.dot.red { background: var(--red); box-shadow: 0 0 0 3px rgba(246, 70, 93, 0.18); }
.dot.amber { background: var(--amber); box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.16); }
.dot.clay { background: var(--clay); }
.dot.pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(217, 119, 87, 0.55); }
  50% { box-shadow: 0 0 0 7px rgba(217, 119, 87, 0); }
}
.clock { font-family: var(--mono); color: var(--text-2); font-size: 12px; }
.conn { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-3); }

/* ------------------------------------------------------------------ düğmeler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text);
  font-weight: 600; font-size: 12.5px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.05s, opacity 0.15s;
}
.btn:hover { background: var(--panel-3); border-color: #2f3d54; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--clay); border-color: var(--clay); color: #160b06; }
.btn.primary:hover { background: var(--clay-2); border-color: var(--clay-2); }
.btn.danger { background: transparent; color: var(--red-2); border-color: rgba(246, 70, 93, 0.45); }
.btn.danger:hover { background: var(--red-soft); }
.btn.danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-solid:hover { background: var(--red-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12px; border-radius: 7px; }
.btn.lg { height: 44px; padding: 0 22px; font-size: 14px; border-radius: 10px; }
.icon-btn { width: 34px; padding: 0; }

/* ------------------------------------------------------------------ yerleşim */
.page { max-width: 1680px; margin: 0 auto; padding: 18px 20px 40px; }
.kpis { display: grid; grid-template-columns: 1.25fr 1.1fr 1.35fr 1fr 1.1fr 1.15fr; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 14px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.012), transparent 40%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
}
.card-title { font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); }
.card-body { padding: 14px; }
.card-body.flush { padding: 0; }

.tabs { display: flex; gap: 2px; background: var(--bg-2); padding: 3px; border-radius: 8px; border: 1px solid var(--line); }
.tab {
  border: 0; background: transparent; color: var(--text-3); cursor: pointer;
  padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 600;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--panel-3); color: var(--text); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset; }
.tab .count { margin-left: 6px; color: var(--text-3); font-family: var(--mono); font-size: 11px; }

/* ------------------------------------------------------------------ KPI kartları */
.kpi { padding: 13px 14px 12px; display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden; }
.kpi-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-3); }
.kpi-value { font-family: var(--mono); font-size: 25px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; }
.kpi-value .unit { font-size: 12px; color: var(--text-3); margin-left: 6px; font-weight: 500; letter-spacing: 0; }
.kpi-sub { font-size: 11.5px; color: var(--text-2); display: flex; gap: 10px; flex-wrap: wrap; }
.kpi.hero .kpi-value { font-size: 30px; }
.flash-up { animation: flashUp 0.9s ease-out; }
.flash-down { animation: flashDown 0.9s ease-out; }
@keyframes flashUp { from { background: rgba(46, 189, 133, 0.16); } to { background: transparent; } }
@keyframes flashDown { from { background: rgba(246, 70, 93, 0.16); } to { background: transparent; } }

.progress { position: relative; height: 8px; background: var(--bg-2); border-radius: 999px; border: 1px solid var(--line); overflow: visible; margin-top: 6px; }
.progress-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, #8a4a33, var(--clay) 60%, var(--clay-2)); transition: width 0.6s ease; }
.progress-fill.neg { background: linear-gradient(90deg, #6d2430, var(--red)); }
.progress-ticks { position: relative; height: 14px; margin-top: 4px; }
.progress-ticks span { position: absolute; transform: translateX(-50%); font-size: 10px; color: var(--text-4); font-family: var(--mono); }
.progress-ticks span.hit { color: var(--clay-2); }
.tick-mark { position: absolute; top: -1px; bottom: -1px; width: 1px; background: var(--line-2); }

.minibar { height: 4px; border-radius: 999px; background: var(--bg-2); overflow: hidden; margin-top: 4px; }
.minibar > div { height: 100%; background: var(--blue); border-radius: 999px; transition: width 0.6s ease; }
.minibar.warn > div { background: var(--amber); }
.minibar.bad > div { background: var(--red); }

.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px; font-size: 11px;
  background: var(--panel-2); border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap;
}
.chip.clay { background: var(--clay-soft); border-color: rgba(217, 119, 87, 0.35); color: var(--clay-2); }
.chip.red { background: var(--red-soft); border-color: rgba(246, 70, 93, 0.35); color: var(--red-2); }
.chip.green { background: var(--green-soft); border-color: rgba(46, 189, 133, 0.35); color: var(--green-2); }
.chip.amber { background: var(--amber-soft); border-color: rgba(240, 185, 11, 0.3); color: var(--amber); }
.chip.blue { background: var(--blue-soft); border-color: rgba(91, 141, 239, 0.3); color: #8fb0f5; }

/* ------------------------------------------------------------------ grafikler */
.chart-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chart-wrap { position: relative; height: 430px; }
.chart-wrap.short { height: 300px; }
.chart-legend {
  position: absolute; left: 12px; top: 10px; z-index: 3; pointer-events: none;
  display: flex; gap: 12px; flex-wrap: wrap; font-family: var(--mono); font-size: 11.5px; color: var(--text-2);
}
.chart-legend b { color: var(--text); font-weight: 600; }
.symbol-input {
  width: 128px; height: 28px; padding: 0 10px; border-radius: 7px; background: var(--bg-2);
  border: 1px solid var(--line-2); font-family: var(--mono); font-size: 12px; text-transform: uppercase; outline: none;
}
.symbol-input:focus { border-color: var(--clay); }
.line-key { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-3); }
.line-key i { width: 14px; height: 2px; display: inline-block; border-radius: 2px; }

/* ------------------------------------------------------------------ tablolar */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.t th {
  text-align: left; font-weight: 600; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-3); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel);
  position: sticky; top: 0;
}
table.t td { padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tr:hover td { background: rgba(255, 255, 255, 0.015); }
table.t td.r, table.t th.r { text-align: right; }
.side { display: inline-flex; align-items: center; padding: 1px 6px; border-radius: 4px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.05em; }
.side.long { background: var(--green-soft); color: var(--green-2); }
.side.short { background: var(--red-soft); color: var(--red-2); }
.sym { font-weight: 700; letter-spacing: 0.01em; }
.sym-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.liqbar { width: 70px; height: 4px; border-radius: 999px; background: var(--bg-2); overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 8px; }
.liqbar > div { height: 100%; }
.empty { padding: 34px 16px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.empty .big { font-size: 13.5px; color: var(--text-2); margin-bottom: 4px; }

/* ------------------------------------------------------------------ ajanın aklı */
.mind { display: flex; flex-direction: column; max-height: calc(100vh - 210px); min-height: 520px; }
.mind-scroll { overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.mind-scroll::-webkit-scrollbar, .scroll::-webkit-scrollbar { width: 8px; }
.mind-scroll::-webkit-scrollbar-thumb, .scroll::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; }
.sess {
  border: 1px solid var(--line); border-radius: 9px; background: var(--panel-2); padding: 11px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.sess.live {
  border-color: rgba(217, 119, 87, 0.45);
  background: linear-gradient(180deg, rgba(217, 119, 87, 0.08), rgba(217, 119, 87, 0.02) 60%), var(--panel-2);
}
.sess-head { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-3); }
.sess-head .when { color: var(--text-2); font-family: var(--mono); }
.sess-summary { font-size: 13.5px; font-weight: 600; color: var(--text); line-height: 1.45; }
.sess-rationale { font-size: 12.5px; color: var(--text-2); line-height: 1.55; white-space: pre-wrap; }
.sess-foot { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--text-3); flex-wrap: wrap; }
.sess-foot .sep { width: 3px; height: 3px; border-radius: 50%; background: var(--text-4); }
.stream {
  font-size: 12.5px; line-height: 1.55; color: var(--text-2); white-space: pre-wrap; word-break: break-word;
  max-height: 260px; overflow-y: auto; padding: 9px 10px; border-radius: 7px; background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--line);
}
.stream .thinking { color: var(--text-3); font-style: italic; }
.stream .text { color: var(--text); }
.toolrow { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 5px 8px; border-radius: 6px; background: rgba(255, 255, 255, 0.02); border: 1px solid var(--line); }
.toolrow .tname { font-family: var(--mono); color: var(--text); font-size: 11.5px; }
.toolrow .targs { color: var(--text-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.toolrow.err { border-color: rgba(246, 70, 93, 0.35); }
.spinner { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--clay); animation: spin 0.8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.steps { display: flex; flex-direction: column; gap: 6px; }
.step { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.step-label { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-4); margin-bottom: 3px; }
.step pre {
  margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 11px; color: var(--text-2);
  background: rgba(0, 0, 0, 0.25); border: 1px solid var(--line); border-radius: 6px; padding: 8px; max-height: 240px; overflow: auto;
}
.journal { border-left: 2px solid var(--clay); padding: 4px 0 4px 10px; font-size: 12.5px; color: var(--text-2); white-space: pre-wrap; }
.link-btn { background: none; border: 0; color: var(--clay-2); cursor: pointer; font-size: 11.5px; padding: 0; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }

/* ------------------------------------------------------------------ istatistik */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); }
.stat { background: var(--panel); padding: 13px 14px; }
.stat-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.stat-value { font-family: var(--mono); font-size: 18px; margin-top: 5px; font-weight: 600; }
.stat-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ------------------------------------------------------------------ formlar, karşılama, kurulum */
.hero-wrap { max-width: 980px; margin: 30px auto; padding: 0 20px; display: flex; flex-direction: column; gap: 16px; }
.hero { padding: 30px; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 30px; align-items: center; }
.hero h1 { font-size: 30px; line-height: 1.15; margin: 0 0 10px; letter-spacing: -0.02em; }
.hero p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 11.5px; font-weight: 600; color: var(--text-2); letter-spacing: 0.02em; }
.field .hint { font-size: 11.5px; color: var(--text-3); }
.input {
  height: 40px; padding: 0 12px; border-radius: 8px; background: var(--bg-2); border: 1px solid var(--line-2);
  outline: none; font-size: 14px; width: 100%;
}
.input:focus { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(217, 119, 87, 0.15); }
.input.mono { font-family: var(--mono); }
.input-group { position: relative; }
.input-group .suffix { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 12px; font-family: var(--mono); }
.checklist { display: flex; flex-direction: column; gap: 10px; }
.check { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.check .ok { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green-2); font-size: 12px; flex: none; }
.check .no { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--red-soft); color: var(--red-2); font-size: 12px; flex: none; }
.alert { padding: 11px 13px; border-radius: 8px; font-size: 12.5px; line-height: 1.5; border: 1px solid; }
.alert.warn { background: var(--amber-soft); border-color: rgba(240, 185, 11, 0.3); color: #f6d66b; }
.alert.err { background: var(--red-soft); border-color: rgba(246, 70, 93, 0.35); color: var(--red-2); }
.alert.ok { background: var(--green-soft); border-color: rgba(46, 189, 133, 0.35); color: var(--green-2); }
.alert.info { background: var(--blue-soft); border-color: rgba(91, 141, 239, 0.3); color: #a9c1f7; }
.steps-list { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 13px; line-height: 1.7; }
.steps-list b { color: var(--text); }
.copybox {
  position: relative; font-family: var(--mono); font-size: 11.5px; white-space: pre-wrap; word-break: break-all;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 8px; padding: 12px; color: var(--text);
}
.copybox .btn { position: absolute; right: 8px; top: 8px; }
.setup-step { display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding: 18px; border-bottom: 1px solid var(--line); }
.setup-step:last-child { border-bottom: 0; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  background: var(--panel-3); border: 1px solid var(--line-2); color: var(--text-2);
}
.step-num.done { background: var(--green-soft); border-color: rgba(46, 189, 133, 0.4); color: var(--green-2); }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 9px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 12.5px; }
.seg button.active { background: var(--panel-3); color: var(--text); }

/* ------------------------------------------------------------------ modal */
.modal-back { position: fixed; inset: 0; background: rgba(2, 3, 6, 0.72); backdrop-filter: blur(4px); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade 0.15s ease; }
.modal { width: min(480px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.9); animation: rise 0.18s ease; }
.modal-head { padding: 18px 20px 6px; font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.modal-body { padding: 8px 20px 4px; color: var(--text-2); font-size: 13.5px; line-height: 1.6; }
.modal-body ul { margin: 8px 0; padding-left: 18px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 20px 18px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

.toast-wrap { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 11px 14px; border-radius: 9px; background: var(--panel-2); border: 1px solid var(--line-2); box-shadow: var(--shadow); font-size: 12.5px; max-width: 360px; animation: rise 0.2s ease; }
.toast.err { border-color: rgba(246, 70, 93, 0.45); }
.toast.ok { border-color: rgba(46, 189, 133, 0.45); }

.banner { margin-bottom: 14px; }
.skeleton { background: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ mobil */
.mobile-nav { display: none; }
@media (max-width: 1360px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid { grid-template-columns: minmax(0, 1fr) 380px; }
}
@media (max-width: 1080px) {
  .grid { grid-template-columns: 1fr; }
  .mind { max-height: none; min-height: 0; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  body { font-size: 13px; }
  .topbar { padding: 9px 14px; gap: 10px; }
  .brand-sub, .clock, .conn-text, .topbar .hide-sm { display: none; }
  .status-pill { max-width: 52vw; font-size: 12px; padding: 5px 10px; }
  .page { padding: 12px 12px 92px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .kpi { padding: 11px 12px; }
  .kpi.hero { grid-column: span 2; }
  .kpi-value { font-size: 21px; }
  .kpi.hero .kpi-value { font-size: 28px; }
  .chart-wrap { height: 340px; }
  .chart-wrap.short { height: 240px; }
  .hero { grid-template-columns: 1fr; padding: 20px; }
  .hero h1 { font-size: 24px; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: rgba(10, 13, 19, 0.94); backdrop-filter: blur(14px); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-nav button { border: 0; background: transparent; color: var(--text-3); display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; padding: 6px 0; cursor: pointer; border-radius: 8px; }
  .mobile-nav button.active { color: var(--clay-2); background: var(--clay-soft); }
  .mobile-nav svg { width: 20px; height: 20px; }
  [data-mview]:not(.mshow) { display: none !important; }
  .setup-step { grid-template-columns: 1fr; }
  .positions-table { display: none; }
  .pos-cards { display: flex !important; }
}
.pos-cards { display: none; flex-direction: column; gap: 10px; padding: 12px; }
.pos-card { border: 1px solid var(--line); border-radius: 9px; padding: 12px; background: var(--panel-2); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.pos-card .full { grid-column: span 2; display: flex; align-items: center; justify-content: space-between; }
.kv-l { font-size: 10.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; }
.kv-v { font-family: var(--mono); font-size: 13px; margin-top: 2px; }
