/* ===========================================================================
   Sosyal CRM — tema
   Renk ve bileşen dili, pdfRapor "Medya Analiz" modülünden çıkarıldı
   (kaynak: src/server.js → buildAnalizPageHtml). Yeni sınıf eklerken
   önce buradaki token'ları kullan.
   =========================================================================== */

:root {
  /* marka */
  --navy: #1a2048;
  --navy-600: #252d63;
  --navy-700: #2b3670;
  --navy-soft: #40436f;
  --brand-red: #ed1c24;

  /* yüzeyler */
  --bg: #f0f2f5;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f3f4f6;
  --line: #e5e7eb;
  --line-soft: #eef0f4;
  --line-strong: #d1d5db;

  /* metin */
  --text: #1f2937;
  --text-2: #374151;
  --muted: #6b7280;
  --muted-2: #9ca3af;

  /* durum */
  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #d97706;
  --amber-bg: #fffbeb;
  --green-bg: #f0fdf4;
  --red-bg: #fef2f2;
  --blue-bg: #eff6ff;

  /* mecra */
  --fb: #1877f2;
  --x: #000000;
  --li: #0a66c2;
  --yt: #ff0000;
  --gbp: #4285f4;
  --ig: linear-gradient(45deg, #e1306c 0%, #c13584 50%, #833ab4 100%);

  /* biçim */
  --r-card: 14px;
  --r-btn: 9px;
  --r-input: 8px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-md: 0 6px 18px rgba(16, 24, 40, .09);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .3);

  --topbar-h: 64px;
  --sidebar-w: 254px;   /* TR etiketleri ("Yorum Gelen Kutusu") tek satıra sığsın */
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; }
a { color: var(--blue); }

/* ---------- üst bar ---------- */
.top-bar {
  background: var(--navy);
  height: var(--topbar-h);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 60;
}
/* logo kutusunun altında "p" iniş payı var — görünen yazı yüksekliği kutunun ~%72'si */
.top-bar-logo { height: 34px; width: auto; display: block; }
/* logo bağlantısı — tıklanabilir olduğu belli olsun, ama bağlantı mavisi olmasın */
.top-bar-home { display: block; border-radius: 8px; padding: 3px 5px; margin-left: -5px; transition: background .14s; }
.top-bar-home:hover { background: rgba(255, 255, 255, .1); }
.top-bar-home:focus-visible { outline: 2px solid rgba(255, 255, 255, .6); outline-offset: 1px; }
.top-bar-sep { width: 1px; height: 26px; background: rgba(255, 255, 255, .2); }
.top-bar-spacer { flex: 1; }
.top-bar-right { display: flex; align-items: center; gap: 12px; }

/* mod rozeti (mock ↔ canlı) */
.mode-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: var(--r-pill);
  font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, .28); color: #fff; background: rgba(255, 255, 255, .08);
  cursor: pointer;
}
.mode-badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.mode-badge.live .dot { background: #34d399; }
.mode-badge:hover { background: rgba(255, 255, 255, .16); }

.lang-switch { display: flex; border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--r-pill); overflow: hidden; }
.lang-switch button {
  background: transparent; border: none; color: rgba(255, 255, 255, .7);
  font-size: 11.5px; font-weight: 800; padding: 5px 11px; cursor: pointer;
}
.lang-switch button.on { background: #fff; color: var(--navy); }
/* açık zeminde (giriş ekranı) aynı bileşen — beyaz üstü beyaz olmasın */
.lang-switch.on-light { border-color: var(--line-strong); }
.lang-switch.on-light button { color: var(--muted); }
.lang-switch.on-light button:hover { color: var(--navy); }
.lang-switch.on-light button.on { background: var(--navy); color: #fff; }

.user-chip { display: flex; align-items: center; gap: 9px; color: #fff; }
/* tıklanabilir profil düğmesi */
button.user-chip { background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 4px 8px 4px 4px; cursor: pointer; font: inherit; text-align: left; }
button.user-chip:hover { background: rgba(255, 255, 255, .12); }
button.user-chip[aria-expanded="true"] { background: rgba(255, 255, 255, .16); border-color: rgba(255, 255, 255, .22); }
button.user-chip .caret { width: 14px; height: 14px; color: rgba(255, 255, 255, .6); transition: transform .15s; }
button.user-chip[aria-expanded="true"] .caret { transform: rotate(180deg); }
.user-chip .avatar { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; }
.user-chip .who { line-height: 1.25; }
.user-chip .who b { display: block; font-size: 13px; font-weight: 700; }
.user-chip .who span { font-size: 11px; color: rgba(255, 255, 255, .6); }
.icon-ghost { background: transparent; border: none; color: rgba(255, 255, 255, .65); cursor: pointer; padding: 7px; border-radius: 8px; display: flex; }
/* viewBox'lı SVG'nin kendi ölçüsü yok — sınıf başına vermek zorunlu, yoksa 0×0 çizilir */
.icon-ghost svg { width: 19px; height: 19px; display: block; }
.icon-ghost:hover { color: #fff; background: rgba(255, 255, 255, .12); }

/* ---------- açılır menü (profil) ---------- */
.menu-pop {
  position: fixed; top: calc(var(--topbar-h) - 4px); right: 18px; z-index: 90;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-md); min-width: 262px; padding: 6px; display: none;
}
.menu-pop.open { display: block; }
.menu-head { padding: 11px 12px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; display: flex; gap: 11px; align-items: center; }
.menu-head .who b { display: block; font-size: 13.5px; font-weight: 700; color: var(--navy); }
.menu-head .who span { font-size: 12px; color: var(--muted); word-break: break-all; }
.menu-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 12px;
  border: none; background: none; border-radius: 9px; font-size: 13.5px; font-weight: 600;
  color: var(--text-2); cursor: pointer; text-align: left;
}
.menu-item svg { width: 16px; height: 16px; color: var(--muted); flex: none; }
.menu-item:hover { background: var(--surface-3); }
.menu-item.danger { color: var(--red); }
.menu-item.danger svg { color: var(--red); }
.menu-item.danger:hover { background: var(--red-bg); }
.menu-sep { height: 1px; background: var(--line-soft); margin: 6px 4px; }
/* menü içi ayar satırı (tıklanabilir değil, içinde kontrol taşır) */
.menu-row { display: flex; align-items: center; gap: 11px; padding: 8px 12px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.menu-row svg { width: 16px; height: 16px; color: var(--muted); flex: none; display: block; }
.menu-row .spacer { flex: 1; }
.menu-row .lang-switch button { padding: 4px 10px; }
.menu-pop.wide { min-width: 360px; max-width: 92vw; right: 74px; }

/* ---------- bildirim zili ---------- */
.icon-ghost.bell { position: relative; }
.bell-count {
  position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: var(--r-pill); background: var(--brand-red); color: #fff;
  font-size: 10px; font-weight: 800; line-height: 16px; text-align: center;
}
.notif-item {
  display: flex; gap: 10px; width: 100%; padding: 10px 12px; border: none; background: none;
  border-radius: 10px; cursor: pointer; text-align: left; align-items: flex-start;
}
.notif-item:hover { background: var(--surface-3); }
.notif-item.unread { background: #f5f7ff; }
.notif-item .fdot { width: 26px; height: 26px; border-radius: 8px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--surface-3); }
.notif-item .fdot svg { width: 13px; height: 13px; color: var(--muted); }
.notif-item .ntext { font-size: 13px; line-height: 1.45; color: var(--text-2); min-width: 0; }
.notif-item .ntext b { color: var(--navy); }
.notif-item .nsub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.notif-item .ntime { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }

/* ---------- ayarlar penceresi ---------- */
.set-tabs { display: flex; gap: 18px; padding: 0 20px; border-bottom: 1px solid var(--line-soft); flex-shrink: 0; }
.set-tabs button { background: none; border: none; padding: 12px 0; font-size: 13px; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.set-tabs button.on { color: var(--navy); border-bottom-color: var(--navy); }
.set-pane { display: none; }
.set-pane.on { display: block; }
.set-row { display: flex; align-items: flex-start; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.set-row:last-child { border-bottom: none; }
.set-row .sbody { flex: 1; min-width: 0; }
.set-row .sname { font-size: 13.5px; font-weight: 700; color: var(--text); }
.set-row .sdesc { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.set-row .sctrl { flex: none; }
.set-row select, .set-row input[type=text], .set-row input[type=email] {
  padding: 8px 11px; border: 1px solid var(--line-strong); border-radius: 8px;
  font-size: 13px; background: #fff; color: var(--text); min-width: 190px;
}
.set-row input[readonly] { background: var(--surface-3); color: var(--muted); }

/* ---------- kabuk ---------- */
.shell { display: flex; min-height: calc(100vh - var(--topbar-h)); }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; background: var(--surface);
  border-right: 1px solid var(--line); padding: 16px 12px;
  display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: var(--topbar-h); height: calc(100vh - var(--topbar-h)); overflow-y: auto;
}
.side-group { font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); padding: 14px 10px 6px; }
.side-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--text-2); cursor: pointer;
  border: none; background: none; width: 100%; text-align: left; position: relative;
}
.side-item svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.side-item > span:not(.count) { flex: 1; min-width: 0; }
.side-item:hover { background: var(--surface-3); }
.side-item.on { background: var(--navy); color: #fff; }
.side-item.on svg { color: #fff; }
.side-item .count {
  margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: var(--r-pill);
  background: var(--brand-red); color: #fff; font-size: 11px; font-weight: 800; text-align: center;
}
.side-item.on .count { background: rgba(255, 255, 255, .22); }
.side-item.soon { opacity: .45; cursor: not-allowed; }
.side-item.soon .count { background: var(--surface-3); color: var(--muted); }

.sidebar { transition: width .18s ease, padding .18s ease; }

/* sol menünün dibine sabitlenen aç/kapa satırı */
.side-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft); }
.side-toggle {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 11px;
  border: none; background: none; border-radius: 10px;
  font-size: 12.5px; font-weight: 700; color: var(--muted-2); cursor: pointer; text-align: left;
}
.side-toggle svg { width: 18px; height: 18px; flex: none; }
.side-toggle:hover { background: var(--surface-3); color: var(--navy); }
body.sidebar-collapsed .side-toggle { justify-content: center; padding: 10px 0; }
body.sidebar-collapsed .side-toggle > span { display: none; }

/* ---------- daraltılmış sol menü ---------- */
body.sidebar-collapsed { --sidebar-w: 68px; }
body.sidebar-collapsed .sidebar { padding: 16px 10px; }
body.sidebar-collapsed .side-item { justify-content: center; padding: 11px 0; }
body.sidebar-collapsed .side-item > span:not(.count) { display: none; }
body.sidebar-collapsed .side-item .count {
  position: absolute; top: 1px; right: 4px; margin: 0;
  min-width: 17px; height: 17px; padding: 0 4px; line-height: 17px; font-size: 10px;
}
/* Faz 2 rozeti daraltılmışken metin sığmaz — kilit ikonu yeter */
body.sidebar-collapsed .side-item.soon .count { display: none; }
body.sidebar-collapsed .side-group { font-size: 0; padding: 12px 6px 6px; }
body.sidebar-collapsed .side-group::after { content: ''; display: block; height: 1px; background: var(--line); }

.main { flex: 1; min-width: 0; padding: 24px 28px 56px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 21px; font-weight: 800; color: var(--navy); letter-spacing: -.015em; }
.page-sub { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* ---------- kart ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 22px 24px; }
.card.tight { padding: 0; overflow: hidden; }
.card h2 { font-size: 15px; font-weight: 800; color: var(--navy); margin-bottom: 14px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 15px 20px; border-bottom: 1px solid var(--line-soft); background: linear-gradient(180deg, #fafbff, #fff); }
.card-head h2 { margin: 0; }
.card-body { padding: 18px 20px; }
.grid { display: grid; gap: 16px; }

/* ---------- buton ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border: 1px solid transparent; border-radius: var(--r-btn);
  font-size: 13.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy-600); }
.btn-outline { background: #fff; border-color: var(--line-strong); color: var(--text-2); }
.btn-outline:hover:not(:disabled) { background: var(--surface-3); }
.btn-danger { background: var(--brand-red); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #cc161d; }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }

.icon-btn {
  width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 8px;
  background: #fff; cursor: pointer; color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover:not(:disabled) { background: var(--surface-3); }
.icon-btn:disabled { opacity: .35; cursor: not-allowed; }

/* ---------- form ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.input, .field input[type=text], .field input[type=password], .field input[type=email],
.field input[type=date], .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line-strong);
  border-radius: var(--r-input); font-size: 14px; background: #fff; color: var(--text);
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(26, 32, 72, .09);
}
.select-sm { padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); background: #fff; cursor: pointer; }
.muted { font-size: 12px; color: var(--muted-2); }
.hint { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* arama kutusu */
.search { position: relative; flex: 1; min-width: 180px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted-2); }
.search input { width: 100%; padding: 9px 12px 9px 34px; border: 1px solid var(--line-strong); border-radius: var(--r-input); font-size: 13.5px; background: #fff; }
.search input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(26, 32, 72, .09); }

/* toggle */
.toggle { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-2); }
.toggle input { display: none; }
.toggle .track { width: 38px; height: 21px; border-radius: var(--r-pill); background: #cbd2dd; position: relative; transition: .16s; flex: none; }
.toggle .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: .16s; box-shadow: var(--shadow-sm); }
.toggle input:checked + .track { background: var(--navy); }
.toggle input:checked + .track::after { transform: translateX(17px); }

/* ---------- rozet / çip ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px;
  border-radius: var(--r-pill); font-size: 11px; font-weight: 800; line-height: 1.7;
  background: var(--surface-3); color: var(--text-2);
}
/* viewBox'lı SVG'nin kendi ölçüsü yok — verilmezse 0×0 çizilir ve ikon hiç
   görünmez (reklam rozetindeki megafon böyle kayıptı). */
.badge svg { width: 12px; height: 12px; flex: none; display: block; }
.badge.open { background: var(--blue-bg); color: #1d4ed8; }
.badge.assigned { background: var(--amber-bg); color: #b45309; }
.badge.closed { background: var(--green-bg); color: #15803d; }
.badge.ad { background: #f5f3ff; color: #6d28d9; }
.badge.hidden-b { background: var(--surface-3); color: var(--muted); }
.badge.danger { background: var(--red-bg); color: var(--red); }
.badge.soon { background: var(--surface-3); color: var(--muted-2); }

.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: #fff;
  font-size: 12.5px; font-weight: 700; color: var(--text-2); cursor: pointer;
}
.chip:hover { border-color: var(--navy); }
.chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip:disabled { opacity: .4; cursor: not-allowed; }
.chip .pcolor { width: 9px; height: 9px; border-radius: 50%; flex: none; }

/* mecra ikon rozeti */
.pbadge { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.pbadge svg { width: 13px; height: 13px; color: #fff; }
.pbadge.instagram { background: var(--ig); }
.pbadge.facebook { background: var(--fb); }
.pbadge.x { background: var(--x); }
.pbadge.linkedin { background: var(--li); }
.pbadge.youtube { background: var(--yt); }
.pbadge.gbp { background: var(--gbp); }
.pbadge.lg { width: 30px; height: 30px; border-radius: 8px; }
.pbadge.lg svg { width: 17px; height: 17px; }

/* avatar */
.avatar-sq {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: #fff; background: var(--navy-soft);
}
.avatar-sq.sm { width: 30px; height: 30px; border-radius: 8px; font-size: 11px; }
/* Gerçek profil fotoğrafı baş harfin ÜSTÜNE oturur; yüklenemezse kendini
   kaldırır ve harf ortaya çıkar (bkz. ui.js avatarSq). */
.avatar-sq { position: relative; overflow: hidden; }
.avatar-sq > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* ---------- tablo ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted-2); padding: 10px 14px;
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }

/* ---------- KPI ---------- */
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px 20px; }
.kpi .label { font-size: 11px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); }
.kpi .value { font-size: 30px; font-weight: 800; color: var(--navy); line-height: 1.15; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi .foot { font-size: 12px; color: var(--muted); margin-top: 6px; }
.kpi .foot b.up { color: var(--green); }
.kpi .foot b.down { color: var(--red); }

/* ölçüm çubuğu */
.meter { height: 7px; border-radius: var(--r-pill); background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--navy); border-radius: var(--r-pill); }
.meter > i.warn { background: var(--amber); }
.meter > i.crit { background: var(--red); }

/* ---------- boş durum ---------- */
.empty { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty svg { width: 38px; height: 38px; color: var(--line-strong); margin-bottom: 12px; }
.empty b { display: block; font-size: 14.5px; color: var(--text-2); margin-bottom: 5px; }

/* ---------- toast ---------- */
.toast-wrap { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 10000; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.toast {
  background: var(--navy); color: #fff; padding: 12px 20px; border-radius: 12px;
  font-size: 13.5px; font-weight: 600; box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
  max-width: 460px; text-align: center; opacity: 0; transform: translateY(-12px);
  transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast.err { background: #b91c1c; }
.toast.ok { background: #15803d; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .6); display: none; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--r-card); width: min(560px, 96vw); max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg); }
.modal-head { padding: 16px 20px; font-size: 15.5px; font-weight: 800; color: var(--navy); border-bottom: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: space-between; }
.modal-head button { background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted-2); }
.modal-body { padding: 18px 20px; overflow: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- yardımcılar ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
