/* Brand35 Paneli — arayüz. Renkler Brand35 logosundan; grafik renkleri dataviz referans paletinden (doğrulanmış). */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/manrope-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/manrope-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/bricolage-grotesque-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: "Bricolage Grotesque"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url(fonts/bricolage-grotesque-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }

:root {
  color-scheme: light;
  --brand: #E65238; --brand-deep: #C2381F;
  --bg: #F5F4F1; --surface: #FFFFFF; --surface-2: #FAF9F7; --line: rgba(18,18,18,.09); --line-2: rgba(18,18,18,.16);
  --ink: #121212; --ink-2: #4A4A48; --muted: #6E6D69;
  --good: #0f7b3e; --bad: #b42318; --warn-bg: #FFF4E5; --warn-ink: #7a4a00; --info-bg: #EEF4FD; --info-ink: #1c4f8f;
  --series-1: #2a78d6; --series-2: #eb6834; --series-3: #1baf7a; --grid: #ecebe7; --chart-surface: #FFFFFF;
  --radius: 16px; --radius-sm: 10px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Bricolage Grotesque", "Manrope", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #121212; --surface: #1c1c1b; --surface-2: #232322; --line: rgba(255,255,255,.08); --line-2: rgba(255,255,255,.16);
    --ink: #f0efec; --ink-2: #c3c2b7; --muted: #a3a29b;
    --good: #4ac285; --bad: #f2867d; --warn-bg: #3a2c12; --warn-ink: #f5cf8a; --info-bg: #17263a; --info-ink: #9cc3f5;
    --series-1: #3987e5; --series-2: #d95926; --series-3: #199e70; --grid: #2c2c2a; --chart-surface: #1c1c1b;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); letter-spacing: -0.02em; line-height: 1.15; margin: 0; }
h1 { font-size: 1.75rem; font-weight: 750; }
h2 { font-size: 1.1rem; font-weight: 700; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* Yerleşim */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: var(--surface); border-right: 1px solid var(--line); padding: 20px 14px; display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; }
.logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px; text-decoration: none; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 14px; }
.logo b { font-family: var(--font-head); font-size: 15px; letter-spacing: -0.01em; }
.logo small { display: block; color: var(--muted); font-size: 12px; line-height: 1.2; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 550; min-height: 40px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--ink); }
.nav a[aria-current="page"] svg { color: var(--brand); }
.nav svg { width: 18px; height: 18px; flex: none; }
.nav .sep { height: 1px; background: var(--line); margin: 8px 6px; }
.nav .soon { margin-left: auto; font-size: 11px; color: var(--muted); }
.side-foot { margin-top: auto; font-size: 13px; color: var(--muted); padding: 0 8px; }
.side-foot form { display: inline; }
.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 12px; padding: 16px 28px; border-bottom: 1px solid var(--line); background: var(--surface); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.top h1 { font-size: 1.35rem; margin-right: auto; }
.content { padding: 24px 28px 56px; max-width: 1320px; }
.top .menu-btn { display: none; }

/* Denetimler */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink-2); }
.btn-primary { background: var(--brand-deep); border-color: var(--brand-deep); color: #fff; }
.btn-primary:hover { background: #a92f19; border-color: #a92f19; }
.btn-sm { min-height: 34px; padding: 5px 12px; font-size: 13px; }
.btn-danger { color: var(--bad); }
select, input[type=text], input[type=email], input[type=password], input[type=number], input[type=month], textarea {
  font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 12px; padding: 9px 12px; min-height: 42px; width: 100%; }
textarea { min-height: 120px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.help { font-size: 13px; color: var(--muted); margin-top: 4px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 999px; padding: 3px; background: var(--surface); }
.seg a { padding: 5px 12px; border-radius: 999px; text-decoration: none; font-size: 13px; font-weight: 600; color: var(--ink-2); min-height: 32px; display: inline-flex; align-items: center; }
.seg a[aria-current="true"] { background: var(--ink); color: var(--surface); }
.acc-switch select { min-height: 38px; padding: 6px 10px; width: auto; border-radius: 999px; font-weight: 600; }

/* Kartlar */
.grid { display: grid; gap: 16px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2 { grid-template-columns: 3fr 2fr; }
.g2e { grid-template-columns: 1fr 1fr; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; min-width: 0; }
.card h2 { margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.card-head { display: flex; align-items: baseline; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.stack > * + * { margin-top: 16px; }

.tile .label { color: var(--ink-2); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.tile .value { font-family: var(--font-head); font-size: 1.9rem; font-weight: 700; letter-spacing: -0.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.tile .value small { font-size: 1rem; color: var(--muted); font-weight: 600; margin-left: 6px; }
.tile .delta { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.info { position: relative; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--line-2); font-size: 11px; color: var(--muted); cursor: help; background: none; padding: 0; font-weight: 700; }
.info .tip { display: none; position: absolute; left: 50%; top: 24px; transform: translateX(-50%); width: 260px; background: var(--ink); color: var(--surface); font-size: 12.5px; font-weight: 500; line-height: 1.45; padding: 10px 12px; border-radius: 10px; z-index: 20; text-align: left; }
.info:hover .tip, .info:focus .tip { display: block; }

/* Bant ve uyarılar */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 12px; font-size: 14px; margin-bottom: 16px; }
.banner.sample { background: var(--info-bg); color: var(--info-ink); }
.banner.warn { background: var(--warn-bg); color: var(--warn-ink); }
.banner.ok { background: color-mix(in srgb, var(--good) 14%, transparent); color: var(--ink); }
.banner.err { background: color-mix(in srgb, var(--bad) 14%, transparent); color: var(--ink); }
.banner b { font-weight: 700; }
.banner a { font-weight: 700; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.pill.ornek { background: var(--info-bg); color: var(--info-ink); border-color: transparent; }
.pill.ok::before, .pill.hata::before, .pill.yeni::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.pill.ok::before { background: var(--good); }
.pill.hata::before { background: var(--bad); }

/* Tablolar */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: none; }
tbody tr:hover { background: var(--surface-2); }
tr.total td { font-weight: 700; border-top: 1px solid var(--line-2); border-bottom: none; }
td.neg { color: var(--ink-2); }

/* Şelale: net satıştan net kâra */
.fall { display: grid; grid-template-columns: minmax(130px, 1.2fr) 2fr auto; gap: 6px 12px; align-items: center; font-size: 14px; }
.fall .bar { height: 14px; position: relative; }
.fall .bar i { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: var(--series-1); }
.fall .bar i.minus { background: color-mix(in srgb, var(--ink-2) 35%, transparent); }
.fall .bar i.result { background: var(--series-1); }
.fall .name { color: var(--ink-2); }
.fall .name.strong, .fall .val.strong { color: var(--ink); font-weight: 700; }
.fall .val { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* Kanal çubukları */
.hbars { display: grid; grid-template-columns: auto 1fr auto; gap: 10px 12px; align-items: center; font-size: 14px; }
.hbars .track { height: 14px; background: var(--surface-2); border-radius: 4px; position: relative; }
.hbars .track i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--series-1); border-radius: 0 4px 4px 0; }

/* Grafik */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .axis { fill: var(--muted); font-size: 11px; font-family: var(--font); }
.chart .s1 { stroke: var(--series-1); }
.chart .s2 { stroke: var(--series-2); }
.chart .area1 { fill: var(--series-1); opacity: .1; }
.chart .dot { stroke: var(--chart-surface); stroke-width: 2; }
.chart .endlabel { fill: var(--ink-2); font-size: 12px; font-weight: 650; font-family: var(--font); }
.chart .cross { stroke: var(--line-2); stroke-width: 1; }
.chart .tt { position: absolute; pointer-events: none; background: var(--ink); color: var(--surface); padding: 8px 10px; border-radius: 10px; font-size: 12.5px; line-height: 1.45; white-space: nowrap; transform: translate(-50%, -110%); display: none; z-index: 10; }
.chart .tt i { display: inline-block; width: 10px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); margin-bottom: 8px; flex-wrap: wrap; }
.legend span::before { content: ""; display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; background: var(--c); }
details.table-view { margin-top: 10px; font-size: 13px; }
details.table-view summary { cursor: pointer; color: var(--muted); font-weight: 600; }

/* Giriş */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth .card { width: 100%; max-width: 400px; padding: 28px; }
.auth h1 { font-size: 1.5rem; margin: 18px 0 4px; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty h2 { color: var(--ink); margin-bottom: 6px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.platform-fields[hidden] { display: none; }
code { font-size: 12.5px; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g2, .g2e { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 30; transform: translateX(-102%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.2); height: 100%; }
  .side.open { transform: none; }
  .top .menu-btn { display: inline-flex; }
  .seg { max-width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .seg a { white-space: nowrap; }
  .top { padding: 12px 16px; }
  .content { padding: 16px 16px 48px; }
  .fall { grid-template-columns: 1fr auto; }
  .fall .bar { display: none; }
}
@media (max-width: 480px) { .g4 { grid-template-columns: 1fr; } .tile .value { font-size: 1.6rem; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Aylık rapor (ekranda A4 benzeri, yazdırınca tek renk dostu) */
body.report { background: var(--bg); }
.report-bar { position: sticky; top: 0; display: flex; gap: 10px; justify-content: center; padding: 10px; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 5; }
.report-page { max-width: 900px; margin: 24px auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px 40px; }
.report-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; border-bottom: 2px solid var(--ink); padding-bottom: 16px; margin-bottom: 18px; }
.report-head h1 { font-size: 1.6rem; margin: 4px 0; }
.report-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.report-tiles > div { border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; }
.report-tiles .label { font-size: 12px; font-weight: 650; color: var(--ink-2); }
.report-tiles .value { font-family: var(--font-head); font-size: 1.35rem; font-weight: 700; margin: 2px 0; font-variant-numeric: tabular-nums; }
.report-tiles .delta { font-size: 11.5px; font-weight: 600; color: var(--muted); display: block; }
.report-tiles .delta.up { color: var(--good); } .report-tiles .delta.down { color: var(--bad); }
.report-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 22px; }
.report-page h2 { font-size: 1rem; margin-bottom: 8px; }
.report-page table { font-size: 13px; }
.report-page th, .report-page td { padding: 5px 6px; }
.report-notes { font-size: 13px; padding-left: 18px; color: var(--ink-2); }
.report-foot { border-top: 1px solid var(--line-2); padding-top: 12px; font-size: 11.5px; color: var(--muted); }
@media (max-width: 700px) { .report-page { padding: 20px; margin: 0; border-radius: 0; } .report-tiles, .report-cols { grid-template-columns: 1fr 1fr; } .report-cols { grid-template-columns: 1fr; } }
@media print {
  @page { size: A4; margin: 12mm; }
  :root { color-scheme: light; --bg: #fff; --surface: #fff; --ink: #000; --ink-2: #222; --muted: #555; --line: #ddd; --line-2: #bbb; }
  .no-print, .side, .top { display: none !important; }
  body, body.report { background: #fff; }
  .report-page { border: 0; margin: 0; padding: 0; max-width: none; }
  .banner { border: 1px solid #999; }
  .logo-mark, .delta, .pill { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .report-cols, .report-tiles > div, tr { break-inside: avoid; }
}
td code { word-break: break-word; white-space: normal; }
.qr svg { width: 100%; height: auto; display: block; }
.kanal td:first-child { white-space: nowrap; }
@media (max-width: 440px) { .report-tiles { grid-template-columns: 1fr; } .report-head { flex-direction: column; } .report-page table { font-size: 12px; } }
