/* Kanal Paneli — "gece mavisi cam" tasarım sistemi.
   Koyu tema varsayılan; açık tema [data-theme="light"] ile. Tüm renkler token üzerinden. */
[hidden] { display: none !important; }

:root {
  color-scheme: dark;
  --bg-0: #050a1f; --bg-1: #08133a;
  --glow-1: rgba(70, 125, 255, .38); --glow-2: rgba(40, 95, 230, .26); --glow-3: rgba(120, 90, 255, .14);
  --ink: #eaf0ff; --ink-2: #c5cfec; --muted: #8e9bc2; --faint: #5f6b93;
  --glass: rgba(255, 255, 255, .045); --glass-2: rgba(255, 255, 255, .075); --glass-3: rgba(255, 255, 255, .11);
  --stroke: rgba(255, 255, 255, .085); --stroke-2: rgba(255, 255, 255, .16); --hl: rgba(255, 255, 255, .07);
  --field: rgba(8, 16, 48, .55);
  --accent: #5b8cff; --accent-2: #86a8ff; --accent-ink: #ffffff; --accent-soft: rgba(91, 140, 255, .16);
  --grad: linear-gradient(135deg, #6a96ff 0%, #4b6ef5 55%, #5a4cf0 100%);
  /* Durum renkleri — rezerve; her zaman simge + etiketle birlikte */
  --st-good: #22c55e; --st-good-2: #16a34a; --st-warning: #fbbf24; --st-serious: #fb8a5a; --st-critical: #f05252; --st-info: #5b8cff;
  --ok: #6ee7a0; --ok-bg: rgba(34, 197, 94, .14); --warn: #fcd36b; --warn-bg: rgba(251, 191, 36, .14);
  --bad: #ff8a8a; --bad-bg: rgba(240, 82, 82, .15); --info: #9db8ff; --info-bg: rgba(91, 140, 255, .15); --neutral-bg: rgba(255, 255, 255, .07);
  --shadow: 0 1px 0 var(--hl) inset, 0 12px 32px rgba(0, 4, 24, .38);
  --shadow-lg: 0 1px 0 var(--hl) inset, 0 24px 60px rgba(0, 4, 24, .6);
  --radius: 18px; --radius-sm: 12px; --ctl: 36px;
  --rail: 76px; --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Inter", sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, sans-serif;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg-0: #e9eefb; --bg-1: #f4f7ff;
  --glow-1: rgba(91, 140, 255, .25); --glow-2: rgba(120, 160, 255, .2); --glow-3: rgba(150, 120, 255, .12);
  --ink: #0f1a3a; --ink-2: #2d3a63; --muted: #5d6b93; --faint: #9aa5c4;
  --glass: rgba(255, 255, 255, .62); --glass-2: rgba(255, 255, 255, .8); --glass-3: rgba(255, 255, 255, .95);
  --stroke: rgba(30, 50, 120, .1); --stroke-2: rgba(30, 50, 120, .18); --hl: rgba(255, 255, 255, .9);
  --field: rgba(255, 255, 255, .85);
  --accent: #3d6bf0; --accent-2: #2b55d6; --accent-soft: rgba(61, 107, 240, .12);
  --ok: #157a3c; --ok-bg: rgba(34, 197, 94, .14); --warn: #8a5a00; --warn-bg: rgba(251, 191, 36, .2);
  --bad: #c02626; --bad-bg: rgba(240, 82, 82, .12); --info: #2b55d6; --info-bg: rgba(61, 107, 240, .12); --neutral-bg: rgba(30, 50, 120, .07);
  --shadow: 0 1px 0 var(--hl) inset, 0 10px 30px rgba(30, 50, 120, .1);
  --shadow-lg: 0 1px 0 var(--hl) inset, 0 24px 60px rgba(30, 50, 120, .22);
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; background: var(--bg-0); }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 620px at 8% -12%, var(--glow-1), transparent 60%),
    radial-gradient(900px 520px at 105% -5%, var(--glow-2), transparent 60%),
    radial-gradient(700px 500px at 60% 120%, var(--glow-3), transparent 60%),
    linear-gradient(180deg, var(--bg-1), var(--bg-0) 70%);
  background-attachment: fixed;
}
a { color: var(--accent-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--accent-soft); }
* { scrollbar-width: thin; scrollbar-color: var(--stroke-2) transparent; }

/* ---------- Kabuk ---------- */
.layout { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.layout.noside { grid-template-columns: minmax(0, 1fr); }
.rail {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px 0; border-right: 1px solid var(--stroke);
  background: linear-gradient(180deg, var(--glass-2), var(--glass)); backdrop-filter: blur(22px) saturate(140%);
  z-index: 30;
}
.rail .logo { width: 42px; height: 42px; border-radius: 13px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 17px; margin-bottom: 14px; box-shadow: 0 8px 24px rgba(75, 110, 245, .45); text-decoration: none; }
.rail nav { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.rail .sep { width: 28px; height: 1px; background: var(--stroke); margin: 8px 0; }
.rail a.ni {
  position: relative; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
  color: var(--muted); text-decoration: none; font-size: 18px; transition: background .18s var(--ease), color .18s var(--ease), transform .18s var(--ease);
}
.rail a.ni:hover { background: var(--glass-2); color: var(--ink); }
.rail a.ni.on { background: var(--glass-3); color: var(--ink); box-shadow: 0 1px 0 var(--hl) inset, 0 6px 18px rgba(0, 0, 0, .25); }
.rail a.ni.on::before { content: ""; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.rail a.ni .dotc { position: absolute; top: 5px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; background: var(--st-critical); color: #fff; box-shadow: 0 0 0 2px var(--bg-1); font-style: normal; }
.rail a.ni .dotc.calm { background: var(--accent); }
.rail a.ni .tt {
  position: absolute; left: 56px; top: 50%; transform: translate(-4px, -50%); white-space: nowrap; pointer-events: none;
  background: var(--glass-3); color: var(--ink); border: 1px solid var(--stroke); padding: 5px 10px; border-radius: 9px; font-size: 12.5px;
  backdrop-filter: blur(16px); box-shadow: var(--shadow); opacity: 0; transition: opacity .14s, transform .14s var(--ease); font-weight: 550;
}
.rail a.ni:hover .tt, .rail a.ni:focus-visible .tt { opacity: 1; transform: translate(0, -50%); }
.rail .bottom { margin-top: auto; display: flex; flex-direction: column; gap: 6px; align-items: center; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 14px 32px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-1) 78%, transparent), transparent);
  backdrop-filter: blur(14px);
}
.topbar .menu-btn { display: none; }
.gsearch { position: relative; flex: 0 1 380px; }
.gsearch input { width: 100%; padding-left: 38px; padding-right: 64px; border-radius: 12px; background: var(--glass); }
.gsearch .ic { position: absolute; left: 13px; top: 50%; transform: translateY(-52%); color: var(--muted); pointer-events: none; font-size: 15px; }
.gsearch kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); font: 11px var(--font); color: var(--muted); border: 1px solid var(--stroke-2); border-radius: 6px; padding: 1px 6px; background: var(--glass); pointer-events: none; }
.pop {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; min-width: 300px; z-index: 40; padding: 6px;
  background: var(--glass-3); border: 1px solid var(--stroke); border-radius: 14px; backdrop-filter: blur(24px) saturate(150%);
  box-shadow: var(--shadow-lg); max-height: 60vh; overflow: auto; transform-origin: top; animation: popin .16s var(--ease);
}
:root:not([data-theme="light"]) .pop { background: rgba(14, 24, 64, .92); }
@keyframes popin { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.pop .opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; cursor: pointer; font-size: 13.5px; }
.pop .opt small { margin-left: auto; color: var(--muted); font-size: 11.5px; }
.pop .opt:hover, .pop .opt.on { background: var(--accent-soft); }
.pop .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: var(--faint); padding: 8px 10px 4px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.bellwrap { position: relative; }
.bellwrap .pop { left: auto; right: 0; width: 360px; }
.iconsq { width: var(--ctl); height: var(--ctl); padding: 0; justify-content: center; border-radius: 11px; position: relative; font-size: 15px; }
.iconsq .dotc { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; background: var(--st-critical); color: #fff; }
.userchip { display: flex; align-items: center; gap: 10px; padding: 3px 4px 3px 3px; border-radius: 14px; }
.userchip .nm { line-height: 1.2; }
.userchip .nm b { display: block; font-size: 13px; font-weight: 600; }
.userchip .nm span { font-size: 11.5px; color: var(--muted); }

main#app { width: 100%; max-width: 1560px; margin: 0 auto; padding: 8px 32px 64px; view-transition-name: page; }
.progress { position: fixed; top: 0; left: 0; height: 2px; z-index: 70; width: 0; background: var(--grad); box-shadow: 0 0 12px var(--accent); opacity: 0; transition: width .3s var(--ease), opacity .25s; }
.progress.run { opacity: 1; width: 70%; transition: width 2.4s cubic-bezier(.1, .7, .2, 1), opacity .1s; }
.progress.done { opacity: 0; width: 100%; transition: width .2s, opacity .35s .15s; }

/* Ekran geçişleri (View Transitions; desteklenmezse JS ile yumuşak geçiş) */
::view-transition-old(page) { animation: vt-out .14s ease-in both; }
::view-transition-new(page) { animation: vt-in .24s var(--ease) both; }
@keyframes vt-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(6px); } }
.enter { animation: vt-in .24s var(--ease) both; }

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .rail { position: fixed; left: 0; top: 0; width: var(--rail); transform: translateX(calc(-100% - 24px)); visibility: hidden; transition: transform .24s var(--ease), visibility 0s .24s; box-shadow: var(--shadow-lg); }
  .rail.open { visibility: visible; transition: transform .24s var(--ease); }
  .rail.open { transform: none; }
  /* Mobil çekmece: dokunmatikte üzerine gelme yok, etiketler görünür */
  .rail { width: 250px; align-items: stretch; padding: 18px 14px; }
  .rail nav, .rail .bottom { align-items: stretch; }
  .rail .logo { margin-left: 2px; }
  .rail .sep { width: 100%; }
  .rail a.ni { width: 100%; display: flex; justify-content: flex-start; gap: 12px; padding: 0 12px; }
  .rail a.ni .tt { position: static; order: 1; opacity: 1; transform: none; background: none; border: 0; box-shadow: none; padding: 0; backdrop-filter: none; font-size: 14px; color: inherit; }
  .rail a.ni .dotc { position: static; order: 2; margin-left: auto; box-shadow: none; }
  .rail a.ni.on::before { left: -14px; }
  .topbar { padding: 10px 16px; gap: 10px; }
  .topbar .menu-btn { display: inline-flex; }
  .userchip .nm, .gsearch kbd { display: none; }
  main#app { padding: 4px 16px 56px; }
}
.scrim { position: fixed; inset: 0; background: rgba(2, 6, 20, .5); z-index: 25; backdrop-filter: blur(2px); animation: popin .2s; }

/* ---------- Tipografi ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 6px 0 20px; }
h1 { font: 600 24px/1.2 var(--font-display); margin: 0; letter-spacing: -.3px; }
h2 { font-size: 15px; margin: 0; font-weight: 600; letter-spacing: -.1px; }
h3 { font-size: 13.5px; margin: 16px 0 8px; font-weight: 600; color: var(--ink-2); }
.hello { font: 300 34px/1.15 var(--font-display); letter-spacing: -.6px; margin: 2px 0 0; }
.hello-sub { color: var(--muted); font-size: 13.5px; }
.eyebrow { color: var(--muted); font-size: 13px; }
.sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
code, .mono { font-family: "Cascadia Code", "JetBrains Mono", Consolas, ui-monospace, monospace; font-size: 12.5px; word-break: break-all; }

/* ---------- Cam yüzeyler ---------- */
.card {
  position: relative; background: linear-gradient(160deg, var(--glass-2), var(--glass) 60%); border: 1px solid var(--stroke);
  border-radius: var(--radius); padding: 18px; margin: 0 0 16px; box-shadow: var(--shadow); backdrop-filter: blur(20px) saturate(140%);
}
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-h .hint { color: var(--muted); font-size: 12px; margin-top: 2px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 16px; margin-bottom: 16px; }
.grid > * { min-width: 0; }
.grid > .card { margin: 0; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.narrow { max-width: 410px; margin: 12vh auto; }
.empty-state { text-align: center; padding: 28px 16px; color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--stroke); border-radius: var(--radius); background: var(--glass); backdrop-filter: blur(20px); box-shadow: var(--shadow); margin-bottom: 16px; }
.card .table-wrap { box-shadow: none; background: transparent; border-radius: var(--radius-sm); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { padding: 11px 14px; border-bottom: 1px solid var(--stroke); text-align: left; vertical-align: middle; }
th { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); white-space: nowrap; background: transparent; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: var(--glass); }
tr:last-child td { border-bottom: 0; }
td.num { text-align: right; }
td.nm { min-width: 210px; }

/* ---------- Kontroller: tek yükseklik, sabit kutu (kayma yok) ---------- */
button, .btn {
  font: 550 13.5px/1 var(--font); height: var(--ctl); padding: 0 14px; border-radius: 11px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; position: relative;
  border: 1px solid var(--stroke-2); background: var(--glass); color: var(--ink);
  transition: background .15s var(--ease), border-color .15s, box-shadow .15s, transform .1s; -webkit-tap-highlight-color: transparent;
}
button:hover, .btn:hover { background: var(--glass-2); border-color: var(--stroke-2); color: var(--ink); }
button:active, .btn:active { transform: translateY(1px); }
button.primary, .btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(75, 110, 245, .35), 0 1px 0 rgba(255, 255, 255, .25) inset; }
button.primary:hover, .btn.primary:hover { filter: brightness(1.08); color: #fff; }
button.danger { color: var(--bad); border-color: color-mix(in srgb, var(--st-critical) 40%, transparent); }
button.danger:hover { background: var(--bad-bg); }
button.ghost, .btn.ghost { border-color: transparent; background: transparent; }
button.ghost:hover, .btn.ghost:hover { background: var(--glass-2); }
button.pill, .btn.pill { border-radius: 999px; height: 30px; padding: 0 14px; font-size: 12.5px; }
button.link { border: 0; background: none; color: var(--accent-2); padding: 0; height: auto; font-weight: 550; }
button.link:hover { background: none; text-decoration: underline; }
button:disabled { cursor: not-allowed; opacity: .55; }
/* Meşgul durumu: genişlik korunur, metin gizlenir, döner simge görünür */
button.busy, .btn.busy { color: transparent !important; pointer-events: none; opacity: 1 !important; }
button.busy > *, .btn.busy > * { visibility: hidden; }
button.busy::after, .btn.busy::after {
  content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--ink) 30%, transparent); border-top-color: var(--ink); animation: spin .7s linear infinite;
}
button.primary.busy::after { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
@keyframes spin { to { transform: rotate(360deg); } }
.iconbtn { width: var(--ctl); padding: 0; }

input, select, textarea {
  font: 13.5px/1.2 var(--font); color: var(--ink); background: var(--field); border: 1px solid var(--stroke-2); border-radius: 11px;
  height: var(--ctl); padding: 0 12px; max-width: 100%; transition: border-color .15s, box-shadow .15s;
}
input[type="checkbox"], input[type="radio"] { height: auto; accent-color: var(--accent); width: 16px; height: 16px; }
select { padding-right: 30px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
select option { background: var(--bg-1); color: var(--ink); }
textarea { width: 100%; min-height: 110px; height: auto; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input::placeholder { color: var(--faint); }
label { display: block; font-size: 12.5px; color: var(--muted); margin: 12px 0 5px; font-weight: 500; }
label.inline { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: var(--ink-2); font-size: 13px; }
form .actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 14px; }
.field-row input, .field-row select { width: 100%; }

/* Segment anahtarı (ör. 14 / 28 gün) */
.seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--glass); border: 1px solid var(--stroke); gap: 2px; }
.seg button { height: 30px; border: 0; background: transparent; color: var(--muted); border-radius: 9px; padding: 0 14px; }
.seg button.on { background: var(--glass-3); color: var(--ink); box-shadow: 0 1px 0 var(--hl) inset, 0 4px 12px rgba(0, 0, 0, .2); }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; background: var(--neutral-bg); color: var(--ink-2); }
.b-ok { background: var(--ok-bg); color: var(--ok); }
.b-warn { background: var(--warn-bg); color: var(--warn); }
.b-bad { background: var(--bad-bg); color: var(--bad); }
.b-info { background: var(--info-bg); color: var(--info); }
.b-accent { background: var(--accent-soft); color: var(--accent-2); }

.notice { padding: 11px 14px; border-radius: 12px; margin: 0 0 14px; background: var(--info-bg); color: var(--info); border: 1px solid color-mix(in srgb, currentColor 18%, transparent); }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice.ok { background: var(--ok-bg); color: var(--ok); }
.tabs { display: flex; gap: 2px; flex-wrap: wrap; padding: 4px; margin-bottom: 18px; border-radius: 14px; background: var(--glass); border: 1px solid var(--stroke); width: fit-content; max-width: 100%; }
.tabs a { height: 32px; display: inline-flex; align-items: center; padding: 0 14px; text-decoration: none; color: var(--muted); border-radius: 10px; font-weight: 550; font-size: 13px; transition: background .15s, color .15s; }
.tabs a:hover { color: var(--ink); background: var(--glass-2); }
.tabs a.on { color: var(--ink); background: var(--glass-3); box-shadow: 0 1px 0 var(--hl) inset; }
.copybox { background: var(--field); border: 1px solid var(--stroke); border-radius: 12px; padding: 11px 13px; white-space: pre-wrap; word-break: break-word; font-size: 13.5px; max-height: 260px; overflow: auto; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* Avatar */
.av { --h: 220; width: 34px; height: 34px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 75% 62%), hsl(calc(var(--h) + 40) 70% 45%)); box-shadow: 0 0 0 2px var(--bg-1); }
.av.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avs { display: inline-flex; }
.avs .av + .av { margin-left: -8px; }

/* Bildirim (toast) ve iletişim kutusu */
#toasts { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 80; pointer-events: none; }
.toast { min-width: 240px; max-width: min(420px, 90vw); padding: 11px 14px; border-radius: 12px; background: var(--glass-3); color: var(--ink); border: 1px solid var(--stroke); box-shadow: var(--shadow-lg); backdrop-filter: blur(24px); font-size: 13.5px; display: flex; gap: 10px; align-items: center; animation: toastin .26s var(--ease) both; }
:root:not([data-theme="light"]) .toast { background: rgba(16, 28, 72, .94); }
.toast::before { content: "✓"; width: 20px; height: 20px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: var(--st-good); color: #fff; }
.toast.err::before { content: "!"; background: var(--st-critical); }
.toast.out { animation: toastout .2s ease-in both; }
@keyframes toastin { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes toastout { to { opacity: 0; transform: translateX(16px); } }

dialog { border: 1px solid var(--stroke); border-radius: 20px; background: var(--glass-3); color: var(--ink); max-width: 560px; width: calc(100% - 32px); padding: 0; box-shadow: var(--shadow-lg); backdrop-filter: blur(28px) saturate(150%); }
:root:not([data-theme="light"]) dialog { background: rgba(14, 24, 64, .92); }
dialog[open] { animation: dlgin .22s var(--ease); }
dialog.closing { animation: dlgout .16s ease-in both; }
dialog::backdrop { background: rgba(2, 6, 22, .55); backdrop-filter: blur(4px); }
@keyframes dlgin { from { opacity: 0; transform: translateY(10px) scale(.97); } }
@keyframes dlgout { to { opacity: 0; transform: translateY(6px) scale(.98); } }
dialog .dlg-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 22px 0; }
dialog .dlg-b { padding: 14px 22px 22px; }
.pick { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow: auto; margin: 6px 0 0; }
.pick label { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 12px 14px; border: 1px solid var(--stroke); border-radius: 13px; cursor: pointer; color: var(--ink); font-size: 13.5px; background: var(--glass); transition: border-color .15s, background .15s; }
.pick label:hover { background: var(--glass-2); }
.pick input { margin-top: 2px; }
.pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* ---------- Genel bakış ---------- */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 4px 0 20px; }
/* Sol: üstte eşit genişlikte "Önümüzdeki 3 gün" + "Durum", hemen altında yayın takvimi. Sağ: ekip ve akışlar. */
.dgrid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.dgrid > * { min-width: 0; margin: 0; }
.dmain { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dmain > .card { margin: 0; }
.dtop { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.dtop > .card { margin: 0; }
.a-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.a-side > .card { margin: 0; }
@media (max-width: 1240px) { .dgrid { grid-template-columns: minmax(0, 1fr); } .a-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); align-items: start; } }
@media (max-width: 760px) { .dtop { grid-template-columns: minmax(0, 1fr); } }

.hero .big { font: 300 54px/1 var(--font-display); letter-spacing: -1.5px; margin: 10px 0 6px; font-variant-numeric: tabular-nums; }
.hero .big small { font-size: 18px; color: var(--muted); letter-spacing: 0; margin-left: 6px; font-weight: 400; }
.distbar { display: flex; gap: 3px; height: 10px; margin: 18px 0 12px; border-radius: 6px; overflow: hidden; }
.distbar span { display: block; height: 100%; border-radius: 3px; transition: flex-grow .5s var(--ease); min-width: 3px; }
.distleg { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink-2); }
.distleg span { display: inline-flex; align-items: center; gap: 6px; }
.distleg i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.distleg b { font-variant-numeric: tabular-nums; }
.s-bg-EMPTY { background: var(--st-critical); } .s-bg-RESERVED { background: var(--st-warning); } .s-bg-REPORTED { background: var(--st-info); }
.s-bg-VERIFIED { background: var(--st-good); } .s-bg-PROBLEM { background: var(--st-serious); }

.mini { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
#stats .ministat { padding: 12px; }
#stats .ministat .v { margin-top: 6px; font-size: 22px; }
.ministat {
  text-align: left; display: block; height: auto; padding: 14px; border-radius: 14px; border: 1px solid var(--stroke); background: var(--glass);
  color: var(--ink); cursor: pointer; transition: border-color .15s, background .15s, transform .15s var(--ease); font-weight: 400; white-space: normal;
}
.ministat:hover { background: var(--glass-2); transform: translateY(-1px); }
.ministat.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(75, 110, 245, .25); }
.ministat .lbl { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); font-weight: 550; }
.ministat .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; background: var(--glass-2); }
.ministat .ic.tone-good { background: var(--ok-bg); color: var(--ok); }
.ministat .ic.tone-warning { background: var(--warn-bg); color: var(--warn); }
.ministat .ic.tone-critical { background: var(--bad-bg); color: var(--bad); }
.ministat .ic.tone-info { background: var(--info-bg); color: var(--info); }
.ministat .v { font: 600 24px/1.1 var(--font-display); margin-top: 10px; font-variant-numeric: tabular-nums; letter-spacing: -.4px; }
.ministat .h { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

.team { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.team li { display: flex; align-items: center; gap: 11px; }
.team .t { min-width: 0; flex: 1; line-height: 1.25; }
.team .t b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team .t span { font-size: 11.5px; color: var(--muted); }
.team .n { font-size: 12px; color: var(--muted); text-align: right; font-variant-numeric: tabular-nums; }
.team .n b { display: block; color: var(--ink); font-size: 14px; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.search { position: relative; }
.search input { padding-left: 34px; width: 210px; }
.search::before { content: "⌕"; position: absolute; left: 12px; top: 50%; transform: translateY(-54%); color: var(--muted); font-size: 15px; z-index: 1; }
.legend { display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 12px; color: var(--ink-2); margin: 0 0 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* Isı haritası (kanal × gün) */
.hm-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px 4px; }
.hm { display: grid; gap: 4px 3px; align-items: center; min-width: max-content; }
.hm-h { font-size: 11px; color: var(--muted); text-align: center; line-height: 1.25; padding: 2px 0 6px; font-variant-numeric: tabular-nums; }
.hm-h b { display: block; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.hm-h.today, .hm-h.today b { color: var(--accent-2); }
.hm-h.we b { color: var(--muted); }
.hm-ch { position: sticky; left: -18px; z-index: 2; padding: 4px 12px 4px 0; min-width: 0; display: flex; align-items: center; gap: 10px; height: 100%; transition: background .2s; }
/* Yalnızca yatay kaydırılınca isim sütunu arkasındaki hücreleri örter */
.hm-wrap.scrolled .hm-ch { background: linear-gradient(90deg, color-mix(in srgb, var(--bg-1) 96%, transparent) 88%, transparent); }
.hm-ch .t { min-width: 0; }
.hm-ch a { display: block; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hm-ch a:hover { color: var(--accent-2); }
.hm-ch .meta { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.hm-day { display: flex; gap: 2px; justify-content: center; height: 32px; border-radius: 9px; padding: 1px; }
.hm-day.today { background: var(--accent-soft); }
.hm-cell { flex: 1; min-width: 30px; max-width: 42px; height: 30px; border: 0; border-radius: 8px; padding: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; cursor: pointer; color: #fff; line-height: 1; transition: transform .14s var(--ease), box-shadow .14s; }
.hm-cell:hover { transform: translateY(-1px) scale(1.06); box-shadow: 0 0 0 2px var(--ink-2), 0 6px 16px rgba(0, 0, 0, .35); background-image: none; }
.hm-cell:active { transform: scale(.97); }
.hm-cell.none { background: transparent; cursor: default; }
.hm-cell.none::after { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--stroke-2); }
.hm-cell.none:hover { transform: none; box-shadow: none; }
.c-EMPTY { background: color-mix(in srgb, var(--st-critical) 14%, transparent); color: var(--st-critical); box-shadow: inset 0 0 0 1.5px var(--st-critical); font-size: 17px; font-weight: 500; }
.c-EMPTY.later { background: transparent; color: color-mix(in srgb, var(--st-critical) 75%, var(--muted)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--st-critical) 40%, transparent); font-size: 15px; }
.c-EMPTY.past { background: transparent; color: var(--faint); box-shadow: inset 0 0 0 1px var(--stroke-2); }
.c-RESERVED { background: var(--st-warning); color: #1b1400; }
.c-REPORTED { background: var(--st-info); }
.c-VERIFIED { background: var(--st-good); }
.c-PUBLISHED { background: var(--st-good-2); }
.c-MISMATCH { background: var(--st-critical); }
.c-UNVERIFIABLE { background: var(--st-serious); color: #1f0b00; }
.c-overdue { background: var(--st-critical); color: #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--st-critical) 35%, transparent); }
.sw { width: 16px; height: 16px; flex: none; border-radius: 5px; display: inline-grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; }
.sw.c-EMPTY { font-size: 12px; }

.tip { position: fixed; z-index: 60; pointer-events: none; background: var(--glass-3); color: var(--ink); border: 1px solid var(--stroke); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow-lg); backdrop-filter: blur(24px); font-size: 12.5px; max-width: 290px; line-height: 1.5; }
:root:not([data-theme="light"]) .tip { background: rgba(14, 24, 64, .94); }
.tip b { display: block; font-size: 13px; }

/* Akış listeleri */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--stroke); font-size: 13px; align-items: flex-start; }
.feed li:last-child { border-bottom: 0; padding-bottom: 0; }
.feed li:first-child { padding-top: 0; }
.feed .sev { flex: none; width: 22px; height: 22px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; }
.sev-critical { background: var(--st-critical); }
.sev-serious { background: var(--st-serious); color: #1f0b00 !important; }
.sev-warning { background: var(--st-warning); color: #1b1400 !important; }
.sev-info { background: var(--st-info); }
.sev-good { background: var(--st-good); }
.feed .t { min-width: 0; flex: 1; }
.feed .t a { font-weight: 600; text-decoration: none; color: var(--ink); }
.feed .t a:hover { color: var(--accent-2); }
.feed .t .d { color: var(--muted); font-size: 12px; margin-top: 1px; }
.feed .when { flex: none; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; padding-top: 2px; }
.more { display: block; margin: 10px auto 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* İskelet yükleme */
.skel { background: linear-gradient(90deg, var(--glass), var(--glass-2), var(--glass)); background-size: 200% 100%; animation: sh 1.3s infinite linear; border-radius: 12px; }
@keyframes sh { to { background-position: -200% 0; } }
.sk-tile { height: 96px; } .sk-xl { height: 340px; } .sk-lg { height: 170px; } .sk-md { height: 120px; }

/* Kanal sayfası takvim kartları */
.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.slot { border: 1px solid var(--stroke); border-left: 3px solid var(--stroke-2); border-radius: 13px; padding: 11px 13px; background: var(--glass); font-size: 13px; transition: background .15s; }
.slot:hover { background: var(--glass-2); }
.slot.past { opacity: .5; }
.slot .when { font-weight: 600; margin-bottom: 4px; }
.s-EMPTY { border-left-color: var(--st-critical); }
.s-RESERVED { border-left-color: var(--st-warning); }
.s-REPORTED { border-left-color: var(--st-info); }
.s-VERIFIED { border-left-color: var(--st-good); }
.s-PUBLISHED { border-left-color: var(--st-good-2); }
.s-MISMATCH { border-left-color: var(--st-critical); }
.s-UNVERIFIABLE { border-left-color: var(--st-serious); }

/* Giriş ekranı */
.auth { max-width: 410px; margin: 12vh auto; }
.auth .logo { width: 48px; height: 48px; border-radius: 15px; background: var(--grad); display: grid; place-items: center; color: #fff; font-size: 20px; margin-bottom: 18px; box-shadow: 0 10px 30px rgba(75, 110, 245, .5); }
.auth input { width: 100%; }
.auth button[type="submit"] { width: 100%; }

@media (max-width: 640px) {
  th, td { padding: 9px 10px; }
  .search input { width: 100%; }
  .hello { font-size: 26px; }
  .hero .big { font-size: 44px; }
  .hm-ch { max-width: 140px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  ::view-transition-old(page), ::view-transition-new(page) { animation: none; }
}
@media (forced-colors: active) { .hm-cell { border: 1px solid CanvasText; } }
/* Avatar renk tonları (kimliğe göre sabit; CSP satır içi stile izin vermediği için sınıfla) */
.h0 { --h: 220; } .h1 { --h: 265; } .h2 { --h: 190; } .h3 { --h: 330; } .h4 { --h: 150; } .h5 { --h: 25; } .h6 { --h: 290; } .h7 { --h: 205; }

/* Kanal profil resmi */
.chav { position: relative; width: 36px; height: 36px; flex: none; border-radius: 50%; overflow: hidden; display: inline-grid; place-items: center;
  font-size: 12.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, hsl(var(--h) 70% 58%), hsl(calc(var(--h) + 50) 65% 40%));
  box-shadow: 0 0 0 1.5px var(--stroke-2), 0 4px 12px rgba(0, 0, 0, .25); }
.chav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s; }
.chav img.ok { opacity: 1; }
.chav.sm { width: 24px; height: 24px; font-size: 9.5px; }
.chav.lg { width: 52px; height: 52px; font-size: 17px; }
.chrow { display: flex; align-items: center; gap: 12px; min-width: 0; }
.chrow.lg { gap: 14px; margin-top: 4px; }
.hm-ch .meta .avs { margin-left: 4px; }
.av.xs { width: 18px; height: 18px; font-size: 8px; box-shadow: 0 0 0 1.5px var(--bg-1); }
.avs .av.xs + .av.xs { margin-left: -5px; }
.hm-ch .owner { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.hm-ch .owner b { color: var(--muted); font-weight: 600; }
.hm-ch .owner.none { color: var(--warn); }
/* Linkten kanal ekleme */
.lookup-row { display: flex; gap: 10px; }
.lookup-row input { flex: 1; min-width: 0; }
.preview { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(220px, 300px); gap: 18px; align-items: center; margin-top: 16px; padding: 16px; border-radius: 16px; background: var(--glass); border: 1px solid var(--stroke); }
.preview .pv-name { font: 600 19px/1.2 var(--font-display); }
.preview .pv-stats { display: flex; gap: 16px; margin: 8px 0; font-size: 13px; color: var(--muted); }
.preview .pv-stats b { color: var(--ink); font-size: 15px; }
.pv-auto { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--muted); }
.pv-auto li::before { content: "○"; margin-right: 8px; color: var(--faint); }
.pv-auto li.ok { color: var(--ink-2); }
.pv-auto li.ok::before { content: "✓"; color: var(--st-good); font-weight: 800; }
.lookup + .grid { margin-top: 0; }
#lookup-out .notice { margin: 10px 0 0; }
.chav.xl { width: 72px; height: 72px; font-size: 22px; }
@media (max-width: 760px) { .preview { grid-template-columns: auto minmax(0, 1fr); } .pv-auto { grid-column: 1 / -1; } .lookup-row { flex-direction: column; } }
/* Bot talimatı */
.bot-text { max-height: 520px; font-size: 12.5px; line-height: 1.6; margin: 0; }
.steps { margin: 6px 0 12px; padding-left: 20px; color: var(--ink-2); }
.steps li { margin: 5px 0; }
/* Gelir paneli */
.revpanel { margin-bottom: 16px; }
.revgrid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 22px; align-items: end; }
.revk { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rk { padding: 4px 14px 2px 0; border-right: 1px solid var(--stroke); min-width: 0; }
.rk:last-child { border-right: 0; }
.rk .l { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.rk .v { font: 300 30px/1.1 var(--font-display); letter-spacing: -.6px; margin: 6px 0 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rk .v small { font-size: 15px; color: var(--muted); margin-left: 4px; }
.rk .h { font-size: 11.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.revfoot { margin-top: 12px; }
.rchart { display: block; width: 100%; height: auto; overflow: visible; }
.rchart .b { fill: var(--accent); opacity: .85; transition: opacity .12s; }
.rchart .rbar:hover .b { opacity: 1; fill: var(--accent-2); }
.raxis { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 6px; font-variant-numeric: tabular-nums; }
.rev4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
.ministat.static { cursor: default; }
.ministat.static:hover { transform: none; }
.segl { height: 30px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 550; font-size: 13px; }
.segl.on { background: var(--glass-3); color: var(--ink); box-shadow: 0 1px 0 var(--hl) inset; }
.sortlink { color: inherit; text-decoration: none; }
.sortlink.on { color: var(--ink); }
.monsel { height: 30px; font-size: 12.5px; font-weight: 600; }
.monsel.mon-ON { border-color: color-mix(in srgb, var(--st-good) 55%, transparent); color: var(--ok); }
.monsel.mon-OFF { border-color: color-mix(in srgb, var(--st-critical) 55%, transparent); color: var(--bad); }
@media (max-width: 1100px) { .revgrid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .revk, .rev4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .rk:nth-child(2) { border-right: 0; } .rk .v { font-size: 24px; } }
/* Sade kanal listesi */
.chtools { margin-bottom: 14px; }
.chtable td { padding-top: 12px; padding-bottom: 12px; }
.chtable .chrow strong { font-weight: 600; }
.chtable .chrow a { color: var(--ink); text-decoration: none; }
.clickrow { cursor: pointer; }
.clickrow:hover .chrow a { color: var(--accent-2); }
.chtable th .sortlink { font: inherit; text-transform: inherit; letter-spacing: inherit; color: var(--muted); }
.chtable th .sortlink.on { color: var(--ink); }
.chtable th.num .sortlink { margin-left: auto; }
/* Sayı sütunlarında başlık ve değer aynı hizada (sağa yaslı) */
th.num { text-align: right; }
.chtable { table-layout: fixed; }
.chtable th:nth-child(1) { width: auto; }
.chtable th:nth-child(2) { width: 17%; }
.chtable th.num { width: 12%; }
.chtable th .sortlink { display: inline-flex; height: auto; padding: 0; }
.chtable td.nm { min-width: 0; }
.chtable .chrow { overflow: hidden; }
.chtable .chrow a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 760px) { .chtable { table-layout: auto; } .chtable th:nth-child(2) { width: auto; } }
/* Takvim: üç durum (Boş · Üstlenildi · Planlandı) */
.s3-EMPTY { background: color-mix(in srgb, var(--st-critical) 12%, transparent); color: var(--st-critical); box-shadow: inset 0 0 0 1.5px var(--st-critical); font-size: 17px; font-weight: 500; }
.s3-EMPTY.past { background: transparent; color: var(--faint); box-shadow: inset 0 0 0 1px var(--stroke-2); }
.s3-RESERVED { background: var(--st-warning); color: #1b1400; }
.s3-PLANNED { background: var(--st-good); color: #fff; }
.s3-RESERVED.past, .s3-PLANNED.past { opacity: .55; }
.sw.s3-EMPTY { font-size: 12px; }
.s-bg-PLANNED { background: var(--st-good); }
/* Gösterge kutucukları: simge tam ortada (.legend span kuralı içteki kutucuğa da uygulanıyordu) */
.legend .sw, .distleg .sw { display: inline-grid; place-items: center; gap: 0; line-height: 1; padding: 0; text-align: center; }
.sw { line-height: 1; font-size: 10px; }
.sw.s3-EMPTY { font-size: 13px; font-weight: 600; }
.sw.s3-RESERVED { font-size: 9px; }
/* İşlerim */
.steps-inline { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.steps-inline b { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); font-size: 11px; margin-right: 6px; }
.task { padding: 14px 16px; margin-bottom: 10px; }
.task-main { display: flex; align-items: center; gap: 12px; }
.task-t { min-width: 0; flex: 1; }
.task-title { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task .notice { margin: 10px 0 0; }
.task-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.task-actions .small-btn { margin-left: auto; color: var(--muted); font-size: 12.5px; }
.task-manual { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--stroke); }
.task-manual input[name=video_url] { flex: 1; min-width: 220px; }
/* Gelir sayfası: günlük grafik basık */
.revday { padding-bottom: 14px; }
.revday .card-h { margin-bottom: 8px; }
