:root {
  --bg: #f3efe6;
  --bg-2: #e7eef0;
  --ink: #152028;
  --muted: #5c6b75;
  --line: #d5dde2;
  --panel: rgba(255, 252, 247, 0.88);
  --panel-solid: #fffdf9;
  --rail-bg: rgba(255, 253, 249, 0.72);
  --input-bg: #ffffff;
  --teal: #0f6b6b;
  --teal-deep: #0a4f4f;
  --teal-soft: #e7f3f3;
  --long: #1f7a4d;
  --long-bg: #e6f5ec;
  --short: #b42318;
  --short-bg: #fdeceb;
  --wait: #9a6700;
  --wait-bg: #fff4d6;
  --neutral-bg: #f3f1ec;
  --hover: #f3f8f8;
  --shadow: 0 18px 40px rgba(21, 32, 40, 0.08);
  --glow-a: #d9ecec;
  --glow-b: #f0e2cf;
  --chart-bg: #fffdf9;
  --chart-grid: #e4eaee;
  --radius: 14px;
  --font: "Manrope", sans-serif;
  --display: "Fraunces", Georgia, serif;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0c1216;
  --bg-2: #10181e;
  --ink: #e7eef2;
  --muted: #9aabb6;
  --line: #2a3640;
  --panel: rgba(18, 26, 32, 0.92);
  --panel-solid: #161e24;
  --rail-bg: rgba(14, 20, 24, 0.88);
  --input-bg: #0f161b;
  --teal: #3d9a94;
  --teal-deep: #8fd4cf;
  --teal-soft: #1a3030;
  --long: #4ecb8a;
  --long-bg: #143528;
  --short: #e87a72;
  --short-bg: #3a1c1a;
  --wait: #e0b14a;
  --wait-bg: #3a3018;
  --neutral-bg: #1c242a;
  --hover: #1c2830;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
  --glow-a: rgba(40, 100, 100, 0.28);
  --glow-b: rgba(90, 70, 35, 0.16);
  --chart-bg: #161e24;
  --chart-grid: #2a3640;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { height: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 480px at 12% -10%, var(--glow-a) 0%, transparent 55%),
    radial-gradient(800px 420px at 100% 0%, var(--glow-b) 0%, transparent 50%),
    linear-gradient(160deg, var(--bg), var(--bg-2));
}
body.is-login {
  overflow: hidden;
  height: 100%;
  touch-action: manipulation;
}
body.is-login .shell,
body.is-login #appExtras {
  display: none !important;
}
[hidden] {
  display: none !important;
}

.shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  min-height: 100vh;
}

.rail {
  padding: 1.6rem 1.35rem 1.5rem;
  border-right: 1px solid var(--line);
  background: var(--rail-bg);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}
.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex: 0 0 auto;
  box-shadow: 0 2px 8px rgba(15, 107, 107, 0.25);
}
.brand-mark {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--teal-deep);
  line-height: 1;
}
.brand-sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.steps { display: grid; gap: 0.85rem; }
.field {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.7rem;
  align-items: start;
}
.field-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: var(--teal);
  margin-top: 1.45rem;
}
.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.hint {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

input, select, button, textarea {
  width: 100%;
  font: inherit;
  font-size: 16px; /* iOS zoom engeli */
  color: var(--ink);
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--input-bg);
  padding: 0.75rem 0.85rem;
  min-height: 44px;
}
input:focus, select:focus, button:focus {
  outline: 2px solid rgba(15, 107, 107, 0.35);
  outline-offset: 1px;
}

button#run {
  margin-top: 1.2rem;
  border: 0;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
button#run:hover { background: var(--teal-deep); transform: translateY(-1px); }
button#run:disabled { opacity: 0.65; cursor: wait; transform: none; }
.btn-scan {
  margin-top: 0.55rem;
  border: 1px solid var(--teal);
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-weight: 700;
  cursor: pointer;
}
.btn-scan:hover { background: #d5ecec; }
.btn-scan:disabled { opacity: 0.65; cursor: wait; }
.btn-scan.push-on {
  background: #e6f6ee;
  border-color: #8fc9a8;
  color: #1f7a4d;
  font-weight: 700;
}
.btn-logout {
  margin-top: 0.55rem;
  width: 100%;
  border: 1px solid #c9a0a0;
  background: #fdeceb;
  color: #8a2e28;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
}
.btn-logout:hover {
  background: #f8d4d2;
}
.auto-scan-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
  cursor: pointer;
}
.auto-scan-toggle input { width: auto; }

.scan-panel {
  margin-bottom: 1.1rem;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem 1rem;
  box-shadow: var(--shadow);
}
.scan-block {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--line);
}
.scan-block:first-of-type {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: none;
}
.scan-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.45rem;
}
.scan-block-head h4 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
}
.watch-panel {
  margin-bottom: 1.1rem;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem 1.1rem;
  box-shadow: var(--shadow);
}
.journal-panel {
  margin-bottom: 1.1rem;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.9rem 1rem 1.2rem;
  box-shadow: var(--shadow);
}
.journal-capital {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: end;
  margin: 0.5rem 0 0.85rem;
}
.journal-capital label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
  flex: 1;
  min-width: 160px;
}
.journal-capital input {
  font-size: 1rem;
}
.journal-summary { margin-bottom: 1rem; }
.journal-form {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.9rem 1rem;
  background: #fff;
  margin-bottom: 1rem;
}
.journal-form h4 {
  margin: 0 0 0.65rem;
  font-family: var(--display);
  font-size: 1.05rem;
}
.journal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.55rem;
}
.journal-form label {
  display: grid;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.journal-form input,
.journal-form select,
.journal-form textarea {
  font-size: 16px;
  width: 100%;
}
.journal-notes { margin-top: 0.65rem; }
.journal-mistakes {
  margin: 0.75rem 0 0.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.55rem 0.7rem 0.65rem;
}
.journal-mistakes legend {
  padding: 0 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
}
.journal-mistakes label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--ink);
  margin: 0.28rem 0;
}
.journal-mistakes input { width: auto; }
.journal-preview {
  margin: 0.65rem 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px dashed var(--line);
}
.journal-preview.win {
  background: var(--long-bg);
  border-color: #b9dfc8;
  color: var(--long);
  font-weight: 600;
}
.journal-preview.loss {
  background: var(--short-bg);
  border-color: #e8b4b0;
  color: var(--short);
  font-weight: 600;
}
.journal-list {
  display: grid;
  gap: 0.7rem;
}
.journal-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.8rem 0.9rem;
  background: #fff;
}
.journal-item.win { border-color: #b9dfc8; }
.journal-item.loss { border-color: #e8b4b0; background: #fff8f7; }
.journal-item-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
}
.journal-item-top .muted {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
}
.journal-pnl {
  text-align: right;
  font-weight: 700;
  font-size: 1.05rem;
}
.journal-pnl small {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  opacity: 0.85;
}
.journal-item-meta {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.journal-note,
.journal-mistakes-line,
.journal-comment {
  margin: 0.45rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
}
.journal-comment { color: #3d4f58; }
.journal-item.open {
  border-color: #0f6b6b;
  background: #f3faf9;
}
.journal-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
.journal-item-actions button {
  width: auto;
  padding: 0.35rem 0.6rem;
  font-size: 0.75rem;
}
.watch-panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.65rem 0 0.85rem;
}
.watch-desk {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.watch-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.watch-card:hover {
  border-color: #0f6b6b;
  box-shadow: 0 6px 18px rgba(15, 40, 50, 0.06);
}
.watch-card.hot {
  border-color: #c48a2a;
  background: #fff8eb;
}
.watch-card.near {
  border-color: #9bb7c4;
  background: #f5fafb;
}
.watch-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
}
.watch-card-top b {
  display: block;
  font-size: 1.05rem;
}
.watch-card-top .muted {
  color: var(--muted);
  font-size: 0.78rem;
}
.watch-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 999px;
  background: #eef3f5;
  color: #4a5c66;
  white-space: nowrap;
}
.watch-pill.hot {
  background: #ffe8bf;
  color: #6a4200;
}
.watch-pill.near {
  background: #dceef3;
  color: #1f5566;
}
.watch-card-price {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin-top: 0.55rem;
}
.watch-card-price strong {
  font-size: 1.2rem;
  font-family: var(--display);
}
.watch-card-meta {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}
.watch-card-actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.watch-card-actions button {
  flex: 1;
  font-size: 0.78rem;
  padding: 0.4rem 0.45rem;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.scan-results { margin-top: 0.7rem; overflow-x: auto; }
.scan-results table { width: 100%; }
.scan-results tr.clickable { cursor: pointer; }
.scan-results tr.clickable:hover { background: #f3f8f8; }
.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge.al { background: var(--long-bg); color: var(--long); }
.badge.sat { background: var(--short-bg); color: var(--short); }
.badge.girme { background: #f0eeea; color: #5c6b75; }

.warn {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

main {
  padding: 1.4rem 1.7rem 2.4rem;
  overflow: auto;
}

.topbar {
  margin-bottom: 1.1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: #e6f5ec;
  color: var(--long);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}
.live-badge.off {
  background: #eee;
  color: var(--muted);
}
.live-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--long);
  box-shadow: 0 0 0 0 rgba(31, 122, 77, 0.55);
  animation: livePulse 1.4s ease-out infinite;
}
.live-badge.off .live-dot {
  background: #9aa;
  animation: none;
  box-shadow: none;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 122, 77, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(31, 122, 77, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 122, 77, 0); }
}
.live-toggle { margin: 0.35rem 0 0.15rem; }
.top-title {
  font-family: var(--display);
  font-size: 1.55rem;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}
.status { margin: 0; color: var(--muted); font-size: 0.92rem; }
.status.error { color: var(--short); font-weight: 600; }

.hidden { display: none !important; }

.empty {
  border: 1px dashed #c9d4da;
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
  background: rgba(255, 253, 249, 0.65);
  max-width: 640px;
}
.empty-kicker {
  margin: 0 0 0.35rem;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.empty h3 {
  font-family: var(--display);
  margin: 0 0 0.9rem;
  font-size: 1.45rem;
}
.empty-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  line-height: 1.7;
}
.empty-list b { color: var(--ink); }

.verdict {
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.9rem;
  border: 1px solid var(--line);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}
.verdict-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1rem;
  align-items: baseline;
  justify-content: space-between;
}
.verdict-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.verdict-badge .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
}
.verdict.long { background: var(--long-bg); border-color: #b9dfc8; color: var(--long); }
.verdict.short { background: var(--short-bg); border-color: #f0c2bd; color: var(--short); }
.verdict.girme { background: #f3f1ec; border-color: #d5dde2; color: #5c6b75; }
.verdict-badge.huge { font-size: 2.4rem; }

.risk-box {
  margin: 0.75rem 0 0.85rem;
  border-radius: 12px;
  border: 1px solid #e2c48a;
  background: #fff8e8;
  padding: 0.9rem 1rem;
}
.risk-box h4 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 1.05rem;
  color: #8a5a00;
}
.risk-box ul { margin: 0.25rem 0 0.55rem; padding-left: 1.1rem; color: var(--ink); }
.risk-box li { margin: 0.25rem 0; font-size: 0.9rem; line-height: 1.4; }
.risk-box .ex { color: var(--muted); font-size: 0.85rem; }

.news-list { list-style: none; margin: 0.4rem 0 0; padding: 0; }
.news-item {
  padding: 0.55rem 0.65rem;
  margin: 0.35rem 0;
  border-left: 3px solid #9aabb0;
  background: rgba(15, 40, 45, 0.03);
  font-size: 0.9rem;
  line-height: 1.4;
}
.news-item.tone-olumlu { border-left-color: var(--long, #1a7a4c); }
.news-item.tone-olumsuz { border-left-color: var(--short, #b33a3a); }
.news-item .tone {
  display: inline-block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-right: 0.35rem;
}
.push-news-banner {
  padding: 0.75rem 0.85rem;
  margin: 0 0 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff8f0;
}
.push-news-banner.long {
  background: #f0faf4;
  border-color: #b9dfc8;
}
.push-news-banner.short {
  background: #fdf2f2;
  border-color: #e8b4b4;
}
.push-news-banner .label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
  color: var(--muted);
}
.push-news-banner p { margin: 0.2rem 0; }

.wf-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin: 0.5rem 0 0.75rem;
}
.wf-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.wf-controls select {
  min-width: 14rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid rgba(20, 50, 55, 0.15);
  background: #fff;
  font: inherit;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.85rem;
}
.btn-watch {
  width: auto;
  min-width: 140px;
  border: 0;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  padding: 0.7rem 1rem;
}
.btn-watch.pulse {
  animation: watchPulse 1.4s ease-in-out infinite;
}
@keyframes watchPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(15, 107, 107, 0.35); }
  50% { box-shadow: 0 0 0 8px rgba(15, 107, 107, 0); }
}
.check-list {
  display: grid;
  gap: 0.3rem;
  margin: 0.45rem 0 0.6rem;
  font-size: 0.9rem;
  color: var(--ink);
}
.verdict-text .sub-line {
  display: inline-block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}
.btn-watch.active { background: #8a5a00; }
.btn-ghost {
  width: auto;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
}

.watch-box {
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.watch-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}
.watch-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.05rem;
}
.watch-list { display: grid; gap: 0.45rem; margin-top: 0.55rem; }
.watch-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem;
  padding: 0.55rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.watch-item:hover,
.watch-item:focus-visible {
  border-color: #0f6b6b;
  background: #f3faf9;
  outline: none;
}
.watch-item b { display: block; }
.watch-item span { color: var(--muted); }
.watch-open-hint {
  display: block !important;
  color: #0f6b6b !important;
  font-size: 0.7rem;
  margin-top: 0.12rem;
}
.watch-item-actions {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  align-items: stretch;
}
.watch-item.in-trade,
.watch-card.in-trade {
  border-color: color-mix(in srgb, var(--short) 45%, var(--line));
}
.watch-item button,
.watch-item-actions button {
  width: auto;
  padding: 0.25rem 0.45rem;
  font-size: 0.72rem;
  cursor: pointer;
}
.watch-item-actions button.on,
.watch-card-actions button.on {
  background: #fde8e8;
  border-color: #e8a0a0;
  color: var(--short);
  font-weight: 700;
}
.alert-feed { margin-top: 0.65rem; display: grid; gap: 0.4rem; }
.alert-item {
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: var(--long-bg);
  border: 1px solid #b9dfc8;
  color: var(--long);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.35;
}
.watch-item.hot {
  border-color: #c48a2a;
  background: #fff8eb;
}
.alert-item.hot,
.alert-item.approach_entry,
.alert-item.in_zone,
.alert-item.ready_action {
  background: #fff4e0;
  border-color: #e0b45a;
  color: #6a4200;
  font-weight: 600;
}
.alert-item.tp { background: var(--wait-bg); border-color: #ebd7a0; color: var(--wait); }
.verdict-text {
  margin: 0.55rem 0 0;
  color: var(--ink);
  font-size: 0.95rem;
  line-height: 1.45;
  max-width: 70ch;
}
.verdict-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}
.tf-board {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}
.tf-board-head {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
}
.tf-board-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
}
@media (max-width: 720px) {
  .tf-board-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.tf-chip {
  border-radius: 10px;
  padding: 0.45rem 0.5rem;
  background: #f3f1ec;
  border: 1px solid #d5dde2;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-height: 4.2rem;
}
.tf-chip.long { background: var(--long-bg); border-color: #b9dfc8; color: var(--long); }
.tf-chip.short { background: var(--short-bg); border-color: #f0c2bd; color: var(--short); }
.tf-chip.notr { color: #5c6b75; }
.tf-lab { font-size: 0.72rem; opacity: 0.85; }
.tf-side { font-weight: 800; font-size: 1.05rem; font-family: var(--display); letter-spacing: 0.02em; }
.tf-pct { font-size: 0.68rem; opacity: 0.9; }
.tf-note {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  line-height: 1.35;
  opacity: 0.92;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.card {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
}
.card small {
  color: var(--muted);
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.3rem;
}
.card b {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.card .sub {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.plan-strip {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}
.plan-step {
  position: relative;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1rem 0.95rem;
}
.plan-step .step-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.plan-step strong {
  display: block;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.plan-step .step-note {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.8rem;
}
.plan-step.entry { border-top: 3px solid #2f7ea8; }
.plan-step.stop { border-top: 3px solid var(--short); }
.plan-step.tp { border-top: 3px solid var(--long); }
.plan-step.rr { border-top: 3px solid var(--teal); }
.plan-wait {
  grid-column: 1 / -1;
  background: var(--wait-bg);
  border: 1px solid #ebd7a0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
}
.plan-wait b { color: var(--wait); font-family: var(--display); font-size: 1.25rem; }
.plan-wait p { margin: 0.35rem 0 0; color: var(--ink); }

.chart-wrap {
  margin-top: 1.1rem;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 0.85rem 0.4rem;
  box-shadow: var(--shadow);
  overflow: hidden;
  isolation: isolate;
}
#chart {
  height: 680px;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}
.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.2rem 0.35rem 0.55rem;
}
.section-head h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}
#chart { height: 680px; }

.tab-bar {
  display: flex;
  gap: 0.35rem;
  margin: 1.15rem 0 0.7rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 0.15rem;
}
.tab-bar::-webkit-scrollbar { display: none; }
.tab-bar button {
  width: auto;
  flex: 0 0 auto;
  background: transparent;
  border: 1px solid transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  padding: 0.65rem 0.9rem;
  min-height: 42px;
  white-space: nowrap;
}
.tab-bar button:hover { color: var(--ink); }
.tab-bar button.active {
  background: #fff;
  border-color: var(--line);
  color: var(--teal-deep);
  box-shadow: 0 1px 0 rgba(21, 32, 40, 0.04);
}

.panel {
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem 1.15rem;
  box-shadow: var(--shadow);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.panel h3 {
  font-family: var(--display);
  font-size: 1.12rem;
  margin: 0.2rem 0 0.7rem;
}
.panel h3:not(:first-child) { margin-top: 1.2rem; }

.guide {
  display: grid;
  gap: 0.55rem;
  margin: 0.4rem 0 1rem;
}
.guide-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  background: #f7fafb;
  border: 1px solid var(--line);
}
.guide-item .label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.guide-item p { margin: 0; color: var(--ink); font-size: 0.92rem; line-height: 1.4; }

table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.55rem 0.35rem; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.note { margin: 0.45rem 0; color: var(--muted); font-size: 0.9rem; line-height: 1.45; }
.long { color: var(--long); }
.short { color: var(--short); }
.nötr, .notr { color: var(--wait); }

.mobile-only { display: none !important; }
.desktop-only { display: none; }
@media (min-width: 981px) {
  .desktop-only { display: inline-flex !important; }
}

.brand-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.icon-btn {
  width: 44px !important;
  min-width: 44px;
  height: 44px;
  min-height: 44px !important;
  padding: 0 !important;
  display: grid;
  place-items: center;
  border-radius: 12px !important;
  font-size: 1.15rem;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  flex-shrink: 0;
}
.rail-backdrop {
  display: none;
}

.mobile-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: none;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.15rem 0.75rem;
  margin: -0.25rem 0 0.75rem;
  background: linear-gradient(180deg, rgba(243, 239, 230, 0.96), rgba(243, 239, 230, 0.88));
  backdrop-filter: blur(8px);
}
.mobile-bar-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.mobile-bar-title strong {
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--teal-deep);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mobile-bar-title span {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-cta {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 45;
  padding: 0.65rem 0.85rem calc(0.65rem + env(safe-area-inset-bottom));
  background: rgba(255, 252, 247, 0.94);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(21, 32, 40, 0.08);
  backdrop-filter: blur(10px);
}
.mobile-cta button {
  border: 0;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  min-height: 48px;
}

@media (max-width: 980px) {
  .mobile-only { display: revert !important; }
  .icon-btn.mobile-only,
  button.mobile-only { display: grid !important; }
  .mobile-bar.mobile-only { display: flex !important; }
  .mobile-cta.mobile-only { display: block !important; }
  .desktop-only { display: none !important; }
  .shell { grid-template-columns: 1fr; }
  .rail {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    width: min(88vw, 320px);
    height: 100vh;
    height: 100dvh;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
  .rail.open { transform: translateX(0); }
  .rail-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(21, 32, 40, 0.45);
    border: 0;
    padding: 0;
    width: auto;
    min-height: 0;
  }
  .rail-backdrop[hidden] { display: none !important; }
  .mobile-bar { display: flex !important; }
  .mobile-cta { display: block !important; }
  main {
    padding: 0.85rem 0.85rem calc(5.5rem + env(safe-area-inset-bottom));
  }
  .metrics, .plan-strip { grid-template-columns: 1fr 1fr; }
  .chart-wrap {
    padding: 0.55rem 0.35rem 0.25rem;
    margin-top: 0.75rem;
  }
  .section-head {
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.15rem 0.25rem 0.4rem;
  }
  .section-head p { font-size: 0.72rem; line-height: 1.35; }
  #chart { height: 520px !important; min-height: 480px; }
  .guide-item { grid-template-columns: 1fr; }
  .verdict-badge.huge { font-size: 1.55rem; }
  .watch-box { margin-bottom: 0.5rem; }
  table { font-size: 0.82rem; }
  th, td { padding: 0.5rem 0.3rem; }
}
@media (max-width: 560px) {
  .metrics, .plan-strip { grid-template-columns: 1fr; }
  main { padding-left: 0.75rem; padding-right: 0.75rem; }
  #chart { height: 480px !important; min-height: 440px; }
  .brand-mark { font-size: 1.65rem; }
  .field-num { margin-top: 1.55rem; }
  .scan-panel, .panel, .risk-box, .verdict { border-radius: 12px; }
}

.coach-fab {
  position: fixed;
  right: max(0.9rem, env(safe-area-inset-right));
  bottom: max(5.2rem, calc(4.2rem + env(safe-area-inset-bottom)));
  z-index: 60;
  width: auto;
  min-width: 3.2rem;
  padding: 0.7rem 0.95rem;
  border-radius: 999px;
  border: 0;
  background: #0f6b6b;
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 8px 24px rgba(15, 107, 107, 0.35);
  cursor: pointer;
}
@media (min-width: 981px) {
  .coach-fab { bottom: 1.4rem; }
}
.coach-panel {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  z-index: 70;
  width: min(400px, calc(100vw - 1.5rem));
  max-height: min(72vh, 620px);
  display: flex;
  flex-direction: column;
  background: #fffdf9;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(21, 32, 40, 0.18);
  overflow: hidden;
}
.coach-panel.hidden { display: none; }
.coach-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: #f3faf9;
}
.coach-mode {
  display: inline-block;
  margin-left: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
  background: #e6f0f0;
  color: #0f6b6b;
  vertical-align: middle;
}
.coach-intro {
  margin: 0;
  padding: 0.45rem 0.85rem 0.2rem;
  font-size: 0.75rem;
}
.coach-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.55rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 180px;
}
.coach-bubble {
  max-width: 92%;
  padding: 0.55rem 0.7rem;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.coach-bubble.user {
  align-self: flex-end;
  background: #0f6b6b;
  color: #fff;
}
.coach-bubble.bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink);
}
.coach-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.coach-form input {
  font-size: 16px;
  margin: 0;
}
.coach-form button {
  width: auto;
  padding: 0.55rem 0.85rem;
  margin: 0;
  background: #0f6b6b;
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
}

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(15, 107, 107, 0.18), transparent 55%),
    linear-gradient(160deg, var(--bg), var(--bg-2));
}
.login-gate[hidden] {
  display: none !important;
}
.login-card {
  width: min(100%, 360px);
  max-height: calc(100dvh - 2.5rem);
  overflow: auto;
  background: var(--panel-solid);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 0.75rem;
  -webkit-overflow-scrolling: touch;
}
.login-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  justify-self: center;
  box-shadow: 0 4px 14px rgba(15, 107, 107, 0.28);
}
.login-card h1 {
  margin: 0;
  text-align: center;
  font-family: var(--display);
  font-size: 1.85rem;
  color: var(--teal-deep);
}
.login-card .hint {
  text-align: center;
  margin: 0;
}
.login-card label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.login-card input {
  font-size: 16px;
  width: 100%;
}
.login-card button {
  margin-top: 0.35rem;
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-weight: 700;
  padding: 0.75rem;
}
.login-error {
  margin: 0;
  color: var(--short);
  font-size: 0.88rem;
  text-align: center;
}
.user-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 107, 107, 0.1);
  color: var(--teal-deep);
  font-size: 0.8rem;
  font-weight: 700;
}
.market-pulse {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
  margin: 0 0 0.85rem;
}
.pulse-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.pulse-item.open {
  background: var(--long-bg);
  border-color: #9dceb0;
  color: var(--long);
}
.pulse-item.closed {
  background: var(--short-bg);
  border-color: #e8b4b0;
  color: var(--short);
}
.pulse-tedbir {
  margin-left: auto;
}
.tedbir-panel {
  margin: 0 0 1rem;
  padding: 0.85rem;
  border: 1px solid #e8b4b0;
  background: #fff8f7;
  border-radius: var(--radius);
}
.tedbir-list {
  display: grid;
  gap: 0.35rem;
  max-height: 280px;
  overflow: auto;
  margin-top: 0.55rem;
}
.tedbir-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.5rem;
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid #f0d0cc;
  font-size: 0.84rem;
}
.tedbir-row b { color: #8a2e28; }
.tedbir-hit {
  margin: 0.55rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #fdeceb;
  border: 1px solid #e8b4b0;
  color: #8a2e28;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
}
.session-hit {
  margin: 0.55rem 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.4;
}
.session-hit.open {
  background: var(--long-bg);
  border: 1px solid #9dceb0;
  color: var(--long);
}
.session-hit.closed {
  background: var(--wait-bg);
  border: 1px solid #e6d09a;
  color: #7a5a00;
}

/* —— Tema anahtarı —— */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: auto;
  min-height: 36px;
  padding: 0.35rem 0.65rem;
  margin: 0;
  border: 1px solid var(--line);
  background: var(--input-bg);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  border-radius: 999px;
}
.theme-toggle:hover {
  border-color: var(--teal);
  color: var(--teal-deep);
}
.theme-toggle .theme-ico {
  font-size: 0.95rem;
  line-height: 1;
}
.brand-row .theme-toggle {
  flex: 0 0 auto;
}
.topbar-actions .theme-toggle {
  order: -1;
}
.mobile-bar .theme-toggle {
  min-width: 40px;
  padding: 0.35rem 0.5rem;
  justify-content: center;
}

/* —— Koyu tema: sabit açık renkleri kapat —— */
html[data-theme="dark"] .btn-scan:hover { background: #243e3e; }
html[data-theme="dark"] .btn-watch.active { background: #a67a20; color: #fff; }
html[data-theme="dark"] .scan-results tr.clickable:hover { background: var(--hover); }
html[data-theme="dark"] .badge.girme { background: #2a3238; color: var(--muted); }
html[data-theme="dark"] .verdict.girme {
  background: var(--neutral-bg);
  border-color: var(--line);
  color: var(--muted);
}
html[data-theme="dark"] .metric,
html[data-theme="dark"] .guide-item,
html[data-theme="dark"] .watch-item,
html[data-theme="dark"] .watch-card,
html[data-theme="dark"] .journal-item,
html[data-theme="dark"] .news-item,
html[data-theme="dark"] .empty,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .risk-box,
html[data-theme="dark"] .plan-strip .guide-item {
  background: var(--panel-solid);
  border-color: var(--line);
  color: var(--ink);
}
html[data-theme="dark"] .tab-bar button {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
html[data-theme="dark"] .tab-bar button.active {
  color: var(--teal-deep);
  border-color: var(--teal);
  background: var(--teal-soft);
}
html[data-theme="dark"] .mobile-bar {
  background: var(--panel-solid);
  border-bottom-color: var(--line);
}
html[data-theme="dark"] .topbar {
  border-bottom-color: var(--line);
}
html[data-theme="dark"] .market-pulse {
  background: var(--panel-solid);
  border-color: var(--line);
}
html[data-theme="dark"] .user-chip {
  background: rgba(61, 154, 148, 0.18);
  color: var(--teal-deep);
}
html[data-theme="dark"] .live-badge {
  background: var(--teal-soft);
  color: var(--teal-deep);
  border-color: var(--teal);
}
html[data-theme="dark"] .warn {
  background: var(--wait-bg);
  border-color: #6a5420;
  color: var(--wait);
}
html[data-theme="dark"] .risk-box {
  background: var(--wait-bg);
  border-color: #6a5420;
  color: var(--wait);
}
html[data-theme="dark"] .journal-item.loss,
html[data-theme="dark"] .tedbir-panel,
html[data-theme="dark"] .tedbir-hit {
  background: var(--short-bg);
  border-color: #6a3834;
  color: var(--short);
}
html[data-theme="dark"] .tedbir-row {
  border-bottom-color: #4a2e2c;
}
html[data-theme="dark"] .tedbir-row b { color: var(--short); }
html[data-theme="dark"] .journal-comment { color: var(--muted); }
html[data-theme="dark"] .session-hit.closed {
  color: var(--wait);
  border-color: #6a5420;
}
html[data-theme="dark"] .session-hit.open {
  border-color: #2f6a4a;
}
html[data-theme="dark"] .btn-logout {
  background: var(--short-bg);
  border-color: #6a3834;
  color: var(--short);
}
html[data-theme="dark"] .rail-backdrop {
  background: rgba(0, 0, 0, 0.55);
}
html[data-theme="dark"] table th {
  color: var(--muted);
}
html[data-theme="dark"] table td {
  border-color: var(--line);
}
html[data-theme="dark"] .icon-btn {
  background: var(--input-bg);
  color: var(--ink);
  border-color: var(--line);
}
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] button:focus,
html[data-theme="dark"] textarea:focus {
  outline-color: rgba(61, 154, 148, 0.45);
}
html[data-theme="dark"] .coach-bubble,
html[data-theme="dark"] .alert-feed .alert-item {
  background: var(--panel-solid);
  border-color: var(--line);
}
html[data-theme="dark"] option {
  background: var(--panel-solid);
  color: var(--ink);
}

/* Kaldıraç kutusu (kripto) — mevcut planın altında */
.lev-box {
  margin-top: 0.85rem;
  padding: 0.85rem 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-solid);
  box-shadow: var(--shadow);
}
.lev-box.hidden { display: none !important; }
.lev-head h3 {
  margin: 0 0 0.25rem;
  font-family: var(--display);
  font-size: 1.15rem;
}
.lev-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin: 0.65rem 0 0.75rem;
}
.lev-controls label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.lev-controls select,
.lev-controls input {
  min-height: 42px;
  text-transform: none;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}
.lev-metrics { margin-top: 0.25rem; }
.lev-warn-hard { color: var(--short); font-weight: 600; }
.lev-warn-soft { color: var(--wait); font-weight: 600; }
.lev-fund { color: var(--muted); }
@media (max-width: 640px) {
  .lev-controls { grid-template-columns: 1fr; }
}

