/* Siyah-beyaz tema (varsayılan koyu), [data-theme="light"] beyaz. Tek renk: zarar ve uyarılar için kırmızı */
:root {
  color-scheme: dark;
  --paper: #000000;
  --surface: #0b0b0b;
  --surface-2: #111111;
  --ink: #f5f5f5;
  --muted: #8f8f8f;
  --line: #262626;
  --line-soft: #1a1a1a;
  --teal: #ffffff; --teal-hi: #ffffff; --teal-lo: #9a9a9a;
  --gold: #ffffff; --gold-hi: #ffffff; --gold-lo: #9a9a9a;
  --brass: #ffffff;
  --brass-soft: rgba(255, 255, 255, 0.08);
  --lume: #ffffff;
  --lume-soft: rgba(255, 255, 255, 0.07);
  --loss: #ff5a5f; --loss-soft: rgba(255, 90, 95, 0.12);
  --ok: #ffffff;
  --on-accent: #000000;
  --dial-hi: #111111; --dial-lo: #000000;
  --seg-1: #4d4d4d; --seg-2: #8c8c8c; --seg-3: #b3b3b3; --seg-4: #d6d6d6;
  --seg-5: #6b6b6b; --seg-6: #a0a0a0; --seg-7: #5c5c5c; --seg-8: #c4c4c4;
  --ch-site: #ffffff; --ch-trendyol: #bdbdbd; --ch-hepsiburada: #8c8c8c; --ch-pazarama: #6e6e6e;
  --ch-idefix: #9e9e9e; --ch-meta: #d9d9d9; --ch-google: #a6a6a6; --ch-paytr: #7a7a7a; --ch-vikaon: #ffffff;
  --ch-trendyol_ads: #bdbdbd; --ch-doviz: #8c8c8c; --ch-default: #8f8f8f;
  --glow: 0 0 14px rgba(255, 255, 255, 0.18);
  --font: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-num: "Saira", "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-display: "Saira", "Hanken Grotesk", "Segoe UI", system-ui, sans-serif;
  --r-sm: 6px; --r: 10px;
  --gap: 14px;
}
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #ffffff; --surface: #ffffff; --surface-2: #fafafa; --ink: #0a0a0a; --muted: #6b6b6b;
  --line: #dedede; --line-soft: #ededed;
  --teal: #0a0a0a; --teal-hi: #0a0a0a; --teal-lo: #6b6b6b;
  --gold: #0a0a0a; --gold-hi: #0a0a0a; --gold-lo: #6b6b6b; --brass: #0a0a0a; --brass-soft: rgba(0, 0, 0, 0.06);
  --lume: #0a0a0a; --lume-soft: rgba(0, 0, 0, 0.05); --loss: #d6333a; --loss-soft: rgba(214, 51, 58, 0.08); --ok: #0a0a0a;
  --on-accent: #ffffff;
  --dial-hi: #ffffff; --dial-lo: #f0f0f0;
  --seg-1: #1f1f1f; --seg-2: #4d4d4d; --seg-3: #7a7a7a; --seg-4: #a6a6a6;
  --seg-5: #333333; --seg-6: #8c8c8c; --seg-7: #5c5c5c; --seg-8: #bdbdbd;
  --ch-site: #0a0a0a; --ch-trendyol: #4d4d4d; --ch-hepsiburada: #7a7a7a; --ch-pazarama: #999999;
  --ch-idefix: #666666; --ch-meta: #333333; --ch-google: #5c5c5c; --ch-paytr: #8c8c8c; --ch-vikaon: #0a0a0a;
  --ch-trendyol_ads: #4d4d4d; --ch-doviz: #7a7a7a; --ch-default: #6b6b6b;
  --glow: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
html, body { height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.45; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .neg { color: var(--loss); } .pos { color: var(--ok); }

/* Üst bölüm */
.top { flex: none; background: var(--surface); border-bottom: 1px solid var(--line); padding: 0 20px; }
.top-row { display: flex; align-items: center; gap: 24px; height: 52px; }
.brand { font-weight: 700; font-size: 17px; letter-spacing: -0.01em; white-space: nowrap; }
.brand span { color: var(--muted); font-weight: 500; }
.tabs { display: flex; gap: 2px; height: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: flex; align-items: center; padding: 0 12px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--brass); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ok) 12%, transparent); color: var(--ok); text-decoration: none; font-size: 13px; font-weight: 500; }
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.bad { background: var(--loss-soft); color: var(--loss); }
.pill.wait { background: var(--brass-soft); color: var(--brass); }
.user { color: var(--muted); font-size: 13px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; }
.filter-row { display: flex; align-items: center; gap: 16px; padding: 8px 0 10px; flex-wrap: wrap; }
.ranges { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface); }
.ranges button { border: 0; background: none; padding: 5px 12px; cursor: pointer; color: var(--muted); white-space: nowrap; }
.ranges button + button { border-left: 1px solid var(--line); }
.ranges button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.custom-range { display: none; gap: 6px; align-items: center; }
.custom-range.open { display: inline-flex; }
.custom-range input { border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); padding: 4px 8px; }
.toggle { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); cursor: pointer; }
.period { color: var(--muted); font-size: 13px; }

/* Görünümler */
main { flex: 1; min-height: 0; padding: var(--gap) 20px calc(var(--gap) + 56px); }
.view { height: 100%; display: flex; flex-direction: column; gap: var(--gap); min-height: 0; }
.fill { flex: 1; min-height: 0; }
.scroll { overflow: auto; min-height: 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; min-height: 0; min-width: 0; }
.panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.005em; }
.panel-head p { margin: 0; color: var(--muted); font-size: 12.5px; }
.more { color: var(--muted); font-size: 13px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.8fr) minmax(0, 1.3fr); gap: var(--gap); }
.grid-ads { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: var(--gap); }
.grid-data { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: var(--gap); align-items: start; }
.grid-data > .panel.fill { height: 100%; }
.col { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; }

/* KPI şeridi */
.kpis { flex: none; display: grid; grid-template-columns: minmax(260px, 1.3fr) minmax(0, 2.7fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.kpi-main { padding: 14px 20px; border-right: 1px solid var(--line); }
.kpi-label { margin: 0; color: var(--muted); font-size: 13px; }
.hero-number { margin: 2px 0 0; font-size: clamp(38px, 4.4vw, 58px); font-weight: 650; line-height: 1; letter-spacing: -0.035em; }
.hero-number.neg { color: var(--loss); }
.hero-number .cur { font-size: 0.42em; font-weight: 500; letter-spacing: 0; margin-left: 5px; color: var(--muted); }
.hero-sub { margin-top: 8px; color: var(--muted); font-size: 12.5px; display: flex; gap: 4px 14px; flex-wrap: wrap; }
.delta.up { color: var(--ok); } .delta.down { color: var(--loss); }
.facts { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fact { padding: 14px 18px; border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; justify-content: center; }
.fact:last-child { border-right: 0; }
.fact dt { color: var(--muted); font-size: 12.5px; }
.fact dd { margin: 3px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.fact .small { margin-top: 2px; }

/* Kâr şeridi */
.ribbon-block { flex: none; }
.ribbon { display: flex; height: 26px; border-radius: var(--r-sm); overflow: hidden; background: var(--line-soft); }
.ribbon .seg { height: 100%; min-width: 2px; transform-origin: left; }
.ribbon .seg.profit { background: var(--brass); }
.ribbon .seg.loss { background: repeating-linear-gradient(135deg, var(--loss) 0 6px, var(--loss-soft) 6px 12px); }
.ribbon.animate .seg { animation: grow 700ms cubic-bezier(.2,.7,.2,1) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .ribbon.animate .seg { animation: none; } }
.legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 4px 22px; }
.legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 8px; align-items: center; font-size: 13px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; }
.legend .amt { font-weight: 600; }
.legend .pct { color: var(--muted); font-size: 12px; min-width: 42px; text-align: right; }
.legend li.profit .amt { color: var(--brass); }
.warnings { font-size: 12.5px; color: var(--muted); border-left: 3px solid var(--brass); padding: 2px 10px; }
.warnings p { margin: 0; }

/* Grafik */
.chart { position: relative; flex: 1; min-height: 160px; }
.chart svg { width: 100%; height: 100%; display: block; position: absolute; inset: 0; }
.chart .tip { position: absolute; pointer-events: none; background: var(--ink); color: var(--paper); padding: 5px 9px; border-radius: 4px; font-size: 12.5px; white-space: nowrap; transform: translate(-50%, -110%); display: none; z-index: 2; }

/* Tablolar */
.table-wrap { overflow: auto; border: 1px solid var(--line-soft); border-radius: var(--r-sm); min-height: 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 7px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
th { color: var(--muted); font-weight: 500; font-size: 12px; background: var(--surface); position: sticky; top: 0; z-index: 1; }
th:first-child, td:first-child { text-align: left; }
td.name { max-width: 0; width: 46%; overflow: hidden; text-overflow: ellipsis; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: color-mix(in srgb, var(--line-soft) 60%, transparent); }
tr.total td { font-weight: 600; background: color-mix(in srgb, var(--line-soft) 45%, transparent); }
.tag { display: inline-block; font-size: 11.5px; padding: 1px 7px; border-radius: 10px; background: var(--brass-soft); color: var(--brass); margin-left: 6px; vertical-align: 1px; font-weight: 500; }
.tag.bad { background: var(--loss-soft); color: var(--loss); }
.tag.ok { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.empty { padding: 20px 12px; color: var(--muted); text-align: left !important; white-space: normal; }
.note { color: var(--muted); font-size: 12px; margin: 0; }

/* Özet: kanal mini + risk özeti */
.mini-risk { border-top: 1px solid var(--line-soft); padding-top: 10px; font-size: 13px; }
.mini-risk strong { font-weight: 600; }
.mini-risk a { color: var(--loss); }

/* Riskli kampanyalar */
.risk-panel { border-left: 3px solid var(--loss); gap: 0; }
.risk-panel.ok { border-left-color: var(--ok); }
.risk-panel h3 { margin: 0 0 2px; font-size: 15px; }
.risk-panel .sub { color: var(--muted); font-size: 12.5px; margin: 0 0 12px; }
.risk-panel ol { margin: 0; padding-left: 20px; display: grid; gap: 12px; }
.risk-panel .why { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.risk-panel .loss { color: var(--loss); font-weight: 600; }
.risk-panel .foot { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--line-soft); }

/* Kurallar */
.rules { display: flex; flex-direction: column; gap: 14px; }
.rule-group h3 { margin: 0 0 4px; font-size: 13px; color: var(--muted); font-weight: 600; }
.rule { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 14px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.rule:last-child { border-bottom: 0; }
.rule .label { font-weight: 500; cursor: pointer; }
.rule .label:hover { text-decoration: underline; text-decoration-color: var(--line); }
.rule .val { font-weight: 600; text-align: right; white-space: nowrap; }
.rule .since { color: var(--muted); font-size: 12px; white-space: nowrap; }
.rule .desc { grid-column: 1 / -1; color: var(--muted); font-size: 12.5px; }
.rule .edit { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rule .edit input { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 8px; background: var(--paper); width: 120px; }
.rule .edit input[type="date"] { width: 150px; }
.rule-actions { display: flex; gap: 8px; align-items: center; }

/* Düğmeler */
.btn { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-sm); padding: 4px 12px; cursor: pointer; font-size: 13px; }
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.small { padding: 2px 9px; font-size: 12px; }
.upload { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-sm); font-size: 14px; display: none; z-index: 40; max-width: 90vw; }
.loading .view { opacity: 0.55; transition: opacity 150ms; }
#recon { display: flex; flex-direction: column; gap: 10px; }
#recon .grid-2 { align-items: start; }

/* Küçük ekranlar: sayfa normal kayar */
@media (max-width: 1000px), (max-height: 680px) {
  body { display: block; height: auto; }
  main { padding: 12px 12px 80px; }
  .view { height: auto; }
  .grid-2, .grid-3, .grid-ads, .grid-data { grid-template-columns: minmax(0, 1fr); }
  .scroll { max-height: 60vh; }
  .chart { height: 220px; flex: none; }
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .kpi-main { border-right: 0; border-bottom: 1px solid var(--line); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(2) { border-right: 0; }
  .fact:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .top { padding: 0 12px; position: sticky; top: 0; z-index: 20; }
  .top-row { gap: 12px; flex-wrap: wrap; height: auto; padding-top: 8px; }
  .tabs { order: 3; width: 100%; height: 38px; }
  .user { display: none; }
}

/* Giriş */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login form { width: min(380px, 100%); }
.login h1 { font-size: 28px; margin: 0 0 4px; letter-spacing: -0.02em; }
.login p { color: var(--muted); margin: 0 0 24px; }
.login label { display: block; font-size: 14px; color: var(--muted); margin: 14px 0 4px; }
.login input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.login button { margin-top: 20px; width: 100%; padding: 11px; }
.login .err { color: var(--loss); font-size: 14px; margin-top: 12px; }

/* Claude sohbet */
.chat-fab { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 30; border: 0; border-radius: 22px; padding: 11px 18px; background: var(--ink); color: var(--paper); font-weight: 600; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.chat-fab:hover { background: var(--brass); }
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 31; width: min(460px, calc(100vw - 24px)); height: min(680px, calc(100vh - 40px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 14px 40px rgba(0,0,0,.22); overflow: hidden; }
.chat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.chat-actions { display: flex; gap: 10px; align-items: center; }
.chat-x { border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.chat-body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.msg { max-width: 92%; font-size: 14px; line-height: 1.5; }
.msg.user { align-self: flex-end; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 12px 12px 2px 12px; white-space: pre-wrap; }
.msg.bot { align-self: stretch; max-width: 100%; }
.msg.bot p { margin: 0 0 8px; }
.msg.bot ul { margin: 0 0 8px; padding-left: 20px; }
.msg.bot table { font-size: 13px; margin: 6px 0 10px; border: 1px solid var(--line-soft); }
.msg.bot th, .msg.bot td { padding: 5px 8px; }
.msg.err { color: var(--loss); }
.msg .meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.chat-chart { background: var(--paper); border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px; margin: 6px 0 10px; }
.chat-chart h4 { margin: 0 0 6px; font-size: 13px; }
.chat-chart canvas { width: 100% !important; height: 240px !important; }
.chat-hints { display: flex; flex-direction: column; gap: 8px; }
.chat-hints button { text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: 8px; padding: 8px 10px; cursor: pointer; font-size: 13px; }
.chat-hints button:hover { border-color: var(--ink); }
.chat-input { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--paper); font: inherit; font-size: 14px; }
.typing { color: var(--muted); font-size: 13px; }
.typing::after { content: "…"; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .2; } }


/* Alt sekmeler, küçük göstergeler */
.seg { display: inline-flex; gap: 2px; background: var(--paper); border-radius: var(--r-sm); padding: 2px; }
.seg button { border: 0; background: none; padding: 4px 10px; border-radius: 5px; cursor: pointer; color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.sub { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; }
.summary { margin: 0; font-size: 13px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; flex: none; }
.kv > div { background: var(--paper); border-radius: var(--r-sm); padding: 7px 10px; }
.kv dt, .kv .k { color: var(--muted); font-size: 12px; }
.kv .v { font-size: 17px; line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.kv .v.neg { color: var(--loss); }
.inner { gap: 10px; }
.heat-panel { flex: none; }
.heat { display: grid; grid-template-columns: 78px repeat(24, minmax(0, 1fr)); gap: 2px; font-size: 11px; }
.heat .hl { color: var(--muted); display: flex; align-items: center; }
.heat .hh { color: var(--muted); text-align: center; }
.heat .c { height: 17px; border-radius: 3px; background: var(--brass); }
.grid-plan { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); }
.grid-plan > :nth-child(1) { grid-column: 1; grid-row: 1; }
.grid-plan > :nth-child(2) { grid-column: 2; grid-row: 1 / span 2; }
.grid-plan > :nth-child(3) { grid-column: 1; grid-row: 2 / span 2; }
.grid-plan > :nth-child(4) { grid-column: 2; grid-row: 3; }
.bar { height: 8px; background: var(--line-soft); border-radius: 4px; overflow: hidden; position: relative; }
.bar i { position: absolute; inset: 0 auto 0 0; background: var(--brass); border-radius: 4px; }
.bar b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); }
.target-row { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 8px; }
.target-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; }
.target-form input { width: 130px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 8px; background: var(--paper); }
.sim { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; font-size: 12.5px; color: var(--muted); }
.sim label { display: flex; flex-direction: column; gap: 3px; }
.sim input, .sim select { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 5px 8px; background: var(--paper); color: var(--ink); font-size: 13px; width: 100%; }
.sim-search { position: relative; }
.sim-results { position: absolute; left: 0; right: 0; top: 100%; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); max-height: 240px; overflow: auto; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.sim-results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 10px; cursor: pointer; font-size: 13px; color: var(--ink); }
.sim-results button:hover { background: var(--paper); }
.sim-out { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.big { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; }
.fx-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.fx-head svg { flex: 1; min-width: 160px; height: 46px; }
.alert { background: var(--loss-soft); color: var(--loss); border-radius: var(--r-sm); padding: 6px 10px; font-size: 13px; }
.weekly { background: var(--paper); border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; }
.weekly h4 { margin: 0 0 6px; font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }
.weekly ul { margin: 0; padding-left: 18px; }
@media (max-width: 1000px), (max-height: 680px) {
  .grid-plan { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; }
  .grid-plan > * { grid-column: auto !important; grid-row: auto !important; }
  .sim { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .heat { grid-template-columns: 60px repeat(24, minmax(0, 1fr)); }
}

.inner td.name { width: 70%; }
.plan-col { display: flex; flex-direction: column; gap: var(--gap); min-height: 0; }

/* Logo */
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { height: 20px; width: auto; display: block; }

.login-logo { width: 220px; height: auto; display: block; margin: 0 0 22px; }
.brand .logo, .login-logo { filter: invert(1) brightness(1.05); }
:root[data-theme="light"] .brand .logo, :root[data-theme="light"] .login-logo { filter: none; }

/* Kanal ve kaynak rozetleri */
.chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--ch-default)); flex: none; }
.chip.has-logo::before { display: none; }
.chip img { height: 20px; width: auto; max-width: 70px; object-fit: contain; display: block; background: #fff; border-radius: 4px; padding: 1px 3px; box-shadow: 0 0 0 1px var(--line-soft); }

/* Canlılık: renkli vurgu çizgileri, hedef ve göstergeler */
.kpi-main { background: linear-gradient(0deg, var(--brass-soft), transparent 140%); border-radius: var(--r) 0 0 var(--r); }
.fact { position: relative; }
.fact::before { content: ""; position: absolute; left: 18px; top: 10px; width: 22px; height: 3px; border-radius: 2px; background: var(--fc, var(--line)); }
.fact:nth-child(1) { --fc: var(--ch-trendyol); } .fact:nth-child(2) { --fc: var(--ch-site); }
.fact:nth-child(3) { --fc: var(--seg-4); } .fact:nth-child(4) { --fc: var(--brass); }
.delta.up, .delta.down { padding: 0 7px; border-radius: 10px; }
.delta.up { background: color-mix(in srgb, var(--ok) 13%, transparent); }
.delta.down { background: var(--loss-soft); }
.tabs a[aria-current="page"] { background: color-mix(in srgb, var(--brass-soft) 70%, transparent); }
.panel-head h2 { display: flex; align-items: center; gap: 8px; }
.panel-head h2::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--brass); }
.kv > div { border-left: 3px solid var(--kc, var(--line)); }
.kv > div:nth-child(4n+1) { --kc: var(--ch-trendyol); } .kv > div:nth-child(4n+2) { --kc: var(--ch-site); }
.kv > div:nth-child(4n+3) { --kc: var(--seg-4); } .kv > div:nth-child(4n+4) { --kc: var(--seg-5); }
.heat .c { background: var(--ch-trendyol); }

.logo-up { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-top: 8px; border-top: 1px solid var(--line-soft); }
.logo-up select, .logo-up input { font-size: 13px; }


/* ====================================================== Siyah-turkuaz teknik görünüm */
body {
  background:
    radial-gradient(900px 420px at 15% -8%, rgba(255, 255, 255, 0.05), transparent 60%),
    radial-gradient(circle at 1px 1px, rgba(143, 143, 143, 0.10) 1px, transparent 0) 0 0 / 22px 22px,
    var(--paper);
  background-attachment: fixed;
}
:root[data-theme="light"] body { background: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.07) 1px, transparent 0) 0 0 / 22px 22px, var(--paper); }
.top { position: relative; background: rgba(0, 0, 0, 0.86); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
:root[data-theme="light"] .top { background: rgba(255, 255, 255, 0.9); }
.top::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, var(--teal), transparent); opacity: .6; }
.brand .logo { height: 21px; }
.brand .logo, .login-logo { filter: invert(1); }
:root[data-theme="light"] .brand .logo, :root[data-theme="light"] .login-logo { filter: none; }
.panel { background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.panel-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 15.5px; letter-spacing: 0.02em; }
.panel-head h2::before { width: 3px; height: 14px; border-radius: 2px; background: var(--teal); box-shadow: var(--glow); }
.tabs a { font-weight: 500; }
.tabs a[aria-current="page"] { background: var(--lume-soft); color: var(--teal-hi); border-bottom: 2px solid var(--teal); }
:root[data-theme="light"] .tabs a[aria-current="page"] { color: var(--teal-lo); }
.ranges { background: var(--surface); border-color: var(--line); }
.ranges button[aria-pressed="true"] { background: var(--teal); color: var(--on-accent); font-weight: 600; }
input[type="checkbox"] { accent-color: var(--teal); }
.btn { background: var(--surface-2); border-color: var(--line); }
.btn:hover { border-color: var(--teal); }
.btn.primary { background: var(--teal); color: var(--on-accent); border-color: var(--teal); font-weight: 600; }
.chat-fab { background: var(--teal); color: var(--on-accent); box-shadow: 0 0 0 1px rgba(255, 255, 255, .35), 0 10px 28px -6px rgba(255, 255, 255, 0.3); }
.chat-fab:hover { background: var(--teal-hi); }
.pill { background: var(--lume-soft); color: var(--teal); border: 1px solid rgba(255, 255, 255, 0.21); }
.pill .dot { animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 60%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .pill .dot { animation: none; } }
.pill.bad { background: var(--loss-soft); color: var(--loss); border-color: rgba(255, 107, 107, 0.4); }
.pill.wait { background: rgba(255, 255, 255, 0.1); color: var(--ink); border-color: rgba(255, 255, 255, 0.35); }
.theme-btn { border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); border-radius: 999px; padding: 3px 10px; font-size: 12.5px; cursor: pointer; }
.theme-btn:hover { color: var(--ink); border-color: var(--teal); }
th { background: var(--surface-2); color: var(--muted); font-weight: 500; }
tbody tr:hover td { background: var(--lume-soft); }
.table-wrap { border-color: var(--line-soft); background: rgba(0, 0, 0, 0.35); }
:root[data-theme="light"] .table-wrap { background: transparent; }
.kv > div { background: rgba(143, 143, 143, 0.06); border-left: 2px solid var(--kc, var(--teal)); }
.tag { background: var(--brass-soft); color: var(--teal); }
td, .legend .amt, .kv .v, .rule .val { font-variant-numeric: tabular-nums; }
.big, .kv .v, .hero-number, .fact dd { font-family: var(--font-num); }

/* ---------- Özet: net kâr + eğri, göstergeler */
.kpis { display: grid; grid-template-columns: minmax(320px, 1.35fr) minmax(0, 2.65fr); gap: var(--gap); background: none; border: 0; box-shadow: none; }
.kpi-main { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 14px 20px; border: 1px solid var(--line);
  border-radius: var(--r); background: radial-gradient(420px 180px at 0% 0%, rgba(255, 255, 255, 0.084), transparent 70%), linear-gradient(180deg, var(--surface-2), var(--surface)); overflow: hidden; }
.kpi-main::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--teal); box-shadow: var(--glow); }
.hero-number { font-weight: 600; font-size: clamp(36px, 3.9vw, 54px); letter-spacing: -0.01em; color: var(--ink); text-shadow: 0 0 26px rgba(255, 255, 255, 0.108); }
:root[data-theme="light"] .hero-number { text-shadow: none; }
.hero-number .cur { color: var(--teal); font-family: var(--font); }
.hero-number.neg { color: var(--loss); text-shadow: none; }
.spark { position: absolute; right: 14px; top: 14px; width: 42%; height: 46%; opacity: .95; }
.spark .sl { fill: none; stroke: var(--teal); stroke-width: 1.6; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.33)); }
.spark .sa { fill: url(#sparkFill); }
.spark .sz { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 3; }
.spark .sd { fill: var(--teal-hi); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); margin: 0; }
.fact { position: relative; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; justify-content: center;
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); overflow: hidden; }
.fact::before { content: ""; position: absolute; left: 16px; right: 16px; width: auto; top: 0; height: 2px; border-radius: 0 0 2px 2px; background: var(--fc, var(--ink)); opacity: .85; }
.fact:nth-child(1) { --fc: var(--ink); } .fact:nth-child(2) { --fc: var(--seg-3); } .fact:nth-child(3) { --fc: var(--seg-2); } .fact:nth-child(4) { --fc: var(--ink); }
.fact dt { color: var(--muted); font-size: 12.5px; }
.fact dd { margin: 4px 0 0; font-size: 24px; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
.fact .meter { height: 3px; background: var(--line-soft); border-radius: 2px; margin-top: 8px; overflow: hidden; }
.fact .meter i { display: block; height: 100%; background: var(--fc, var(--ink)); border-radius: 2px; }
.chgpill { display: inline-block; margin-top: 6px; font-size: 12px; padding: 1px 8px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.chgpill.up { background: var(--lume-soft); color: var(--teal); } .chgpill.down { background: var(--loss-soft); color: var(--loss); }
.chgpill.flat { background: rgba(143, 143, 143, .1); color: var(--muted); }
.delta.up { background: var(--lume-soft); color: var(--teal); } .delta.down { background: var(--loss-soft); color: var(--loss); }

/* ---------- Şerit ve ölçek */
.ribbon { height: 18px; border-radius: 4px; gap: 2px; background: transparent; box-shadow: none; }
.ribbon .seg { border-radius: 2px; }
.ribbon .seg.profit { background: var(--teal); box-shadow: var(--glow); }
.scale { display: grid; grid-template-columns: repeat(10, 1fr); height: 8px; margin-top: -4px; }
.scale span { border-left: 1px solid var(--line); }
.scale span:nth-child(odd) { height: 5px; }
.scale span:last-child { border-right: 1px solid var(--line); }
.scale-labels { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--muted); margin-top: -6px; font-variant-numeric: tabular-nums; }
.chart rect { filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.18)); }

/* ---------- Geçiş: ince çizgi saat */
.watch .tk { stroke: var(--muted); stroke-width: .5; opacity: .45; } .watch .tk.long { stroke: var(--teal); stroke-width: 1.3; opacity: 1; }
.watch .hand { transform-box: view-box; transform-origin: 50px 50px; }
.watch .h-hour line { stroke: var(--ink); stroke-width: 3; stroke-linecap: round; }
.watch .h-min line { stroke: var(--ink); stroke-width: 2; stroke-linecap: round; }
.watch .h-sec line { stroke: var(--teal); stroke-width: 1; } .watch .h-sec circle { fill: var(--teal); }
.watch .w-pin { fill: var(--teal); }
.watch .w-brand { font-family: var(--font-display); font-size: 5.5px; letter-spacing: 1.6px; fill: var(--muted); }
.watch-overlay { position: fixed; inset: 0; z-index: 35; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.65), transparent 50%); animation: woIn 180ms ease-out both; }
:root[data-theme="light"] .watch-overlay { background: radial-gradient(circle at center, rgba(238, 243, 243, 0.75), transparent 50%); }
.watch-overlay.out { animation: woOut 240ms ease-in both; }
.wo-box { width: 110px; height: 110px; filter: drop-shadow(0 0 22px rgba(255, 255, 255, 0.21)); animation: woBox 500ms cubic-bezier(.2,.8,.2,1) both; }
.wo-box .h-sec { animation: spin 0.9s linear infinite; }
.wo-box .h-min { animation: spin 3.6s linear infinite; }
.wo-box .h-hour { animation: spin 14s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes woIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes woOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes woBox { from { transform: scale(.85); opacity: 0; } to { transform: none; opacity: 1; } }
.view.enter { animation: viewIn 360ms cubic-bezier(.2,.7,.2,1) both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .watch-overlay { display: none !important; } .view.enter { animation: none; } }
@media (max-width: 1000px), (max-height: 680px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spark { display: none; }
}

/* Geçmiş veri göstergesi */
.hist { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--lume); background: var(--lume-soft);
  border: 1px solid color-mix(in srgb, var(--lume) 30%, transparent); border-radius: 999px; padding: 3px 11px; }
.hist::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 2.4s ease-out infinite; }
.hist.err { color: var(--loss); background: var(--loss-soft); border-color: color-mix(in srgb, var(--loss) 35%, transparent); }
.hist.err::before { animation: none; }
.hist-box { font-size: 12.5px; color: var(--muted); padding-top: 8px; border-top: 1px solid var(--line-soft); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Gizlilik modu */
.privacy-bar { flex: none; flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; }
.priv-title { margin: 0 0 2px; font-size: 15px; }
.priv-pill { background: var(--brass-soft); color: var(--brass); border: 1px solid color-mix(in srgb, var(--brass) 40%, transparent); text-decoration: none; }
body.gizli .chat-fab { display: none; }
body.gizli .chat { display: none !important; }
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(5, 10, 18, 0.62); display: grid; place-items: center; backdrop-filter: blur(3px); }
.modal-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; width: min(340px, 92vw); display: flex; flex-direction: column; gap: 12px; }
.modal-box h3 { margin: 0; font-size: 15px; }
.modal-box input { font-family: var(--font-num); font-size: 26px; letter-spacing: 0.4em; text-align: center; padding: 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--paper); color: var(--ink); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
@media (max-width: 1000px), (max-height: 680px) { .privacy-bar { flex-direction: column; align-items: flex-start; } }


.login h1 { font-family: var(--font-display); font-weight: 600; letter-spacing: .02em; }


/* Son siparişler */
.recent { display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 0; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.recent .panel-head h2 { font-size: 14px; }
#recentTable td { padding: 6px 10px; }
#recentTable td.name { width: 38%; }
#recentTable .when { color: var(--muted); font-size: 12px; white-space: nowrap; }
#recentTable .sub { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
#recentTable tr.new td { animation: newRow 2.6s ease-out 1; }
@keyframes newRow { 0% { background: rgba(255, 255, 255, 0.16); } 100% { background: transparent; } }
:root[data-theme="light"] #recentTable tr.new td { animation-name: newRowL; }
@keyframes newRowL { 0% { background: rgba(0, 0, 0, 0.08); } 100% { background: transparent; } }
@media (prefers-reduced-motion: reduce) { #recentTable tr.new td { animation: none; } }

.grid-ozet { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr) minmax(0, 1.2fr); gap: var(--gap); }
.recent-panel .panel-head p { font-size: 11.5px; }
#recentTable td.name { width: 40%; }
#channelsMini td, #recentTable td { padding: 6px 8px; }
@media (max-width: 1000px), (max-height: 680px) { .grid-ozet { grid-template-columns: minmax(0, 1fr); } .recent-panel .scroll { max-height: 60vh; } }

#recentTable td.name, #recentTable th:nth-child(3) { text-align: left; }
#recentTable .pay { color: var(--muted); font-size: 11.5px; }
#recentTable td:nth-child(2) { white-space: nowrap; }

/* Üst çubuk: dolar kuru */
.fx-pill { display: inline-flex; align-items: baseline; gap: 7px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--ink); text-decoration: none; font-size: 13px; white-space: nowrap; }
.fx-pill:hover { border-color: var(--ink); }
.fx-pill .fx-l { color: var(--muted); font-size: 12px; }
.fx-pill b { font-family: var(--font-num); font-weight: 600; font-variant-numeric: tabular-nums; }
.fx-pill .fx-c { font-size: 11.5px; font-variant-numeric: tabular-nums; }
.fx-pill .fx-c.up { color: var(--loss); } .fx-pill .fx-c.down { color: var(--muted); }
@media (max-width: 1000px) { .fx-pill .fx-l { display: none; } }

.priv-right { display: flex; align-items: center; gap: 14px; }
