/* ==========================================================================
   AI Spam Gateway — tasarım sistemi
   Koyu tema varsayılan; [data-theme="light"] açık tema. Bağımlılık yok.
   ========================================================================== */

@view-transition { navigation: auto; }

:root {
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;

  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --sidebar-w: 248px;
}

:root, [data-theme="dark"] {
  color-scheme: dark;
  --bg: #07080d;
  --bg-2: #0c0e15;
  --surface: #11141d;
  --surface-2: #161a25;
  --surface-3: #1d2230;
  --border: rgba(255, 255, 255, .07);
  --border-strong: rgba(255, 255, 255, .13);
  --text: #eceef4;
  --text-2: #b5bbcb;
  --muted: #7d859a;
  --primary: #8b5cf6;
  --primary-2: #22d3ee;
  --primary-soft: rgba(139, 92, 246, .14);
  --primary-text: #c4b5fd;
  --grad: linear-gradient(135deg, #8b5cf6 0%, #6366f1 45%, #22d3ee 100%);
  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, .13);
  --danger: #f43f5e;
  --danger-soft: rgba(244, 63, 94, .13);
  --warning: #f59e0b;
  --warning-soft: rgba(245, 158, 11, .14);
  --info: #38bdf8;
  --info-soft: rgba(56, 189, 248, .13);
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .75), 0 0 0 1px var(--border);
  --glow: 0 0 0 1px rgba(139, 92, 246, .35), 0 8px 40px -8px rgba(139, 92, 246, .45);
  --skeleton: linear-gradient(90deg, rgba(255,255,255,.03) 0%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.03) 100%);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f5f9;
  --bg-2: #eceef5;
  --surface: #ffffff;
  --surface-2: #f7f8fb;
  --surface-3: #eef0f6;
  --border: rgba(15, 23, 42, .08);
  --border-strong: rgba(15, 23, 42, .15);
  --text: #0f1424;
  --text-2: #3b4256;
  --muted: #6b7288;
  --primary-soft: rgba(139, 92, 246, .1);
  --primary-text: #6d28d9;
  --success-soft: rgba(34, 197, 94, .12);
  --danger-soft: rgba(244, 63, 94, .1);
  --warning-soft: rgba(245, 158, 11, .14);
  --info-soft: rgba(56, 189, 248, .12);
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -12px rgba(15, 23, 42, .15);
  --shadow-lg: 0 30px 80px -20px rgba(15, 23, 42, .3), 0 0 0 1px var(--border);
  --glow: 0 0 0 1px rgba(139, 92, 246, .25), 0 8px 30px -10px rgba(139, 92, 246, .35);
  --skeleton: linear-gradient(90deg, rgba(15,23,42,.04) 0%, rgba(15,23,42,.09) 50%, rgba(15,23,42,.04) 100%);
}

/* ── Temel ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 var(--font);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
body::before { /* hafif renk ışıması */
  content: ""; position: fixed; inset: -20vh -10vw auto auto; width: 70vw; height: 70vh; pointer-events: none; z-index: 0;
  background: radial-gradient(closest-side, rgba(139, 92, 246, .10), transparent 70%);
}
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 600; }
p { margin: 0; }
code, kbd, pre { font-family: var(--mono); font-size: 12.5px; }
[hidden] { display: none !important; }
::selection { background: rgba(139, 92, 246, .35); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.grow { flex: 1; }
.spacer { flex: 1; }
.row { display: flex; align-items: center; }
.row.gap { gap: 8px; }
.row.wrap { flex-wrap: wrap; gap: 8px; }
.row.end { justify-content: flex-end; margin-top: 14px; }
.row.between { justify-content: space-between; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; margin: 14px 0 0; }

.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ico.spin { animation: spin 1s linear infinite; }

/* ── Kabuk ─────────────────────────────────────────────────────────────── */
.shell { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-right: 1px solid var(--border); padding: 18px 14px; z-index: 40;
  transition: transform .35s var(--ease);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: var(--grad);
  box-shadow: 0 6px 20px -6px rgba(139, 92, 246, .7), inset 0 1px 0 rgba(255,255,255,.25);
}
.brand-mark .ico { width: 20px; height: 20px; }
.brand-mark.lg { width: 56px; height: 56px; border-radius: 16px; }
.brand-mark.lg .ico { width: 28px; height: 28px; }
.brand-text { font-size: 16px; letter-spacing: -.02em; }
.brand-text strong { font-weight: 750; }
.brand-text small { margin-left: 6px; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--primary-soft); color: var(--primary-text); vertical-align: 2px; }
/* Menü kenara kadar uzanır: aktif çizgi ve hover kayması taşma/yatay kaydırma çubuğu üretmez */
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-x: hidden; overflow-y: auto; margin: 0 -14px; padding: 0 14px; scrollbar-width: thin; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 10px 6px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 10px; color: var(--text-2); font-weight: 500;
  position: relative; transition: background .2s, color .2s, transform .2s var(--ease);
}
.nav-item:hover { background: var(--surface-2); color: var(--text); text-decoration: none; transform: translateX(2px); }
.nav-item.active { background: var(--primary-soft); color: var(--text); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav-item.active .ico { color: var(--primary-text); }
.sidebar-foot { border-top: 1px solid var(--border); padding-top: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 6px; }
.user-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.user-meta strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: var(--muted); font-size: 12px; }
.user-chip form { margin: 0; }

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 14px 28px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.page-title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.search-trigger {
  display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 12px; min-width: 240px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border); color: var(--muted); font: inherit; cursor: pointer; transition: border-color .2s, background .2s;
}
.search-trigger:hover { border-color: var(--border-strong); background: var(--surface-2); }
.search-trigger kbd { margin-left: auto; font-size: 11px; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); }
.content { padding: 24px 28px 48px; max-width: 1480px; width: 100%; display: flex; flex-direction: column; gap: 20px; }
.only-mobile { display: none; }
.sidebar-backdrop { display: none; }

/* ── Kartlar ───────────────────────────────────────────────────────────── */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; box-shadow: var(--shadow);
  position: relative; animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms);
}
.card.flush { padding: 0; overflow: hidden; }
.card.glow { background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--grad) border-box; border: 1px solid transparent; box-shadow: var(--glow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.card-head h3 { display: flex; align-items: center; gap: 8px; }
.card-head h3 .ico { color: var(--primary-text); }
.link { display: inline-flex; gap: 4px; align-items: center; font-weight: 500; font-size: 13px; }
.grid { display: grid; gap: 20px; }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.cards-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.settings-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); align-items: start; }
.hero { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 26px 28px; }
.hero h2 { font-size: 22px; margin-bottom: 4px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 8px 0 14px; }
.section-head h2 { display: flex; gap: 8px; align-items: center; }
section { display: flex; flex-direction: column; gap: 0; }

/* KPI */
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi { padding: 18px 20px; min-height: 118px; overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow), var(--glow); }
.kpi .kpi-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.kpi .kpi-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.kpi .kpi-icon.danger { background: var(--danger-soft); color: var(--danger); }
.kpi .kpi-icon.success { background: var(--success-soft); color: var(--success); }
.kpi .kpi-icon.warning { background: var(--warning-soft); color: var(--warning); }
.kpi .kpi-value { font-size: 28px; font-weight: 750; letter-spacing: -.03em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.kpi .kpi-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.kpi::after { /* köşe ışıltısı */
  content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(139, 92, 246, .18), transparent); pointer-events: none;
}

/* ── Butonlar ──────────────────────────────────────────────────────────── */
.btn {
  --b-bg: var(--surface-2); --b-fg: var(--text); --b-bd: var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px;
  background: var(--b-bg); color: var(--b-fg); border: 1px solid var(--b-bd); font: 600 13.5px/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .25s, background .2s, border-color .2s, opacity .2s; position: relative; overflow: hidden; user-select: none;
}
.btn:hover { text-decoration: none; background: var(--surface-3); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.loading { opacity: .6; pointer-events: none; }
.btn .ico { width: 16px; height: 16px; }
.btn-primary { --b-bg: var(--grad); --b-fg: #fff; --b-bd: transparent; background-size: 160% 100%; box-shadow: 0 6px 20px -8px rgba(139, 92, 246, .8), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-primary:hover { background: var(--grad); background-position: 100% 0; box-shadow: 0 10px 28px -8px rgba(139, 92, 246, .9), inset 0 1px 0 rgba(255,255,255,.25); transform: translateY(-1px); }
.btn-soft { --b-bg: var(--primary-soft); --b-fg: var(--primary-text); --b-bd: transparent; }
.btn-soft:hover { background: rgba(139, 92, 246, .22); }
.btn-ghost { --b-bg: transparent; --b-bd: transparent; --b-fg: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { --b-bg: var(--danger-soft); --b-fg: var(--danger); --b-bd: transparent; }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-success { --b-bg: var(--success-soft); --b-fg: var(--success); --b-bd: transparent; }
.btn-success:hover { background: var(--success); color: #fff; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn .ripple { position: absolute; border-radius: 50%; transform: scale(0); background: rgba(255,255,255,.35); animation: ripple .6s ease-out; pointer-events: none; }
.btn.loading::after {
  content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite;
}
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px; background: transparent; border: 1px solid transparent; color: var(--text-2);
  cursor: pointer; transition: background .2s, color .2s, transform .15s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn.success:hover { background: var(--success-soft); color: var(--success); }
.icon-btn.warn:hover { background: var(--warning-soft); color: var(--warning); }
.icon-btn .ico { width: 17px; height: 17px; }

/* ── Form ──────────────────────────────────────────────────────────────── */
input, select, textarea { font: inherit; color: inherit; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field small { color: var(--muted); font-size: 12px; }
.field input, .field select, .field textarea, .select, .add-row textarea, .input-icon input, .dur-custom input {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border-strong); outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.field textarea, .add-row textarea { height: auto; min-height: 38px; padding: 9px 12px; resize: vertical; line-height: 1.45; }
.field input:focus, .field select:focus, .field textarea:focus, .select:focus, .add-row textarea:focus, .input-icon input:focus, .dur-custom input:focus {
  border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); background: var(--surface);
}
.select { width: auto; min-width: 180px; padding-right: 32px; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237d859a' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon > .ico { position: absolute; left: 12px; color: var(--muted); pointer-events: none; width: 16px; height: 16px; }
.input-icon input { padding-left: 38px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.add-row { display: flex; gap: 10px; align-items: flex-start; }
.add-row textarea { flex: 1; }
.filter-row { margin: 14px 0 6px; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; font-weight: 500; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 38px; height: 22px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--border-strong); position: relative; transition: background .25s; flex: none; }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.4); transition: transform .3s var(--spring); }
.switch input:checked + .track { background: var(--grad); border-color: transparent; }
.switch input:checked + .track::after { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid var(--primary); outline-offset: 2px; }

.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px; background: var(--bg-2); border: 1px solid var(--border); }
.segmented button {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font: 600 13px var(--font); cursor: pointer; transition: background .25s var(--ease), color .2s;
}
.segmented button .ico { width: 15px; height: 15px; }
.segmented button:hover { color: var(--text); }
.segmented button.active { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.25); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; background: none; border: 0; color: var(--muted); font: 600 13.5px var(--font);
  cursor: pointer; position: relative; white-space: nowrap; transition: color .2s;
}
.tabs button em { font-style: normal; font-size: 11.5px; padding: 1px 7px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--text); }
.tabs button.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--grad); animation: grow-x .35s var(--ease); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.option-card { display: flex; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--bg-2); cursor: pointer; transition: border-color .2s; }
.option-card:hover { border-color: var(--primary); }
.option-card strong { display: flex; align-items: center; gap: 6px; }
.option-card small { color: var(--muted); display: block; margin-top: 2px; }
.option-card input { margin-top: 3px; accent-color: var(--primary); }

.copy-field { display: flex; align-items: center; gap: 6px; background: var(--bg-2); border: 1px solid var(--border-strong); border-radius: 10px; padding: 6px 6px 6px 12px; }
.copy-field code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }

/* ── Rozetler / uyarılar ───────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge .ico { width: 12px; height: 12px; }
.badge.spam, .badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.clean, .badge.success { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.primary { background: var(--primary-soft); color: var(--primary-text); }
.badge.pop { animation: pop .45s var(--spring); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13.5px; }
.alert-error { background: var(--danger-soft); color: var(--danger); }
.alert-success { background: var(--success-soft); color: var(--success); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-warn { background: var(--warning-soft); color: var(--warning); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin: 0 4px 0 10px; }
.dot.spam { background: var(--danger); }
.dot.clean { background: var(--primary-2); }
.legend { font-size: 12.5px; color: var(--muted); }

/* ── Tablo ─────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background .15s; animation: fade-in .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 18ms); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: 0; }
.table .sub { display: block; color: var(--muted); font-size: 12.5px; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table .actions { text-align: right; white-space: nowrap; }

/* ── Grafik ────────────────────────────────────────────────────────────── */
.chart { height: 240px; position: relative; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .bar-spam { fill: url(#gSpam); }
.chart .bar-clean { fill: url(#gClean); }
.chart rect.bar { transform-box: fill-box; transform-origin: bottom; animation: bar-grow .8s var(--ease) both; }
.chart .axis { fill: var(--muted); font-size: 10.5px; }
.chart .gridline { stroke: var(--border); stroke-dasharray: 3 4; }
.chart .hit { fill: transparent; cursor: default; }
.chart .hit:hover + g rect, .chart g.col:hover rect { filter: brightness(1.25); }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: 10px; padding: 8px 10px; font-size: 12px; box-shadow: var(--shadow-lg); white-space: nowrap; transform: translate(-50%, -110%); opacity: 0; transition: opacity .15s; z-index: 5; }
.chart-tip.show { opacity: 1; }
.stage-bars { display: flex; flex-direction: column; gap: 12px; min-height: 180px; }
.stage-bar .top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.stage-bar .top span:last-child { color: var(--muted); font-variant-numeric: tabular-nums; }
.stage-bar .track { height: 8px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.stage-bar .fill { height: 100%; border-radius: inherit; background: var(--grad); transform-origin: left; animation: grow-x 1s var(--ease) both; }
.stage-bar.free .fill { background: linear-gradient(90deg, #22c55e, #22d3ee); }

.feed { display: flex; flex-direction: column; min-height: 120px; }
.feed-item { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); animation: fade-in .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .meta { flex: 1; min-width: 0; }
.feed-item .meta strong, .feed-item .meta span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item .meta span { color: var(--muted); font-size: 12.5px; }
.feed-item time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.system { display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.sys-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.sys-row .ico { color: var(--muted); }
.sys-row .grow small { display: block; color: var(--muted); font-size: 12px; }
.sys-row.ok .ico { color: var(--success); }
.sys-row.warn .ico { color: var(--warning); }
.sys-row.bad .ico { color: var(--danger); }

/* ── Posta kutusu ──────────────────────────────────────────────────────── */
.mail-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0fr); gap: 0; transition: grid-template-columns .45s var(--ease), gap .45s var(--ease); min-height: calc(100vh - 140px); }
.mail-layout.has-preview { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 16px; }
.mail-main { display: flex; flex-direction: column; min-width: 0; }
.mail-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.mail-toolbar .select { min-width: 200px; height: 34px; }
.scan-controls { display: flex; gap: 8px; }
.scan-progress { display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: center; padding: 12px 16px; background: linear-gradient(90deg, var(--primary-soft), transparent); border-bottom: 1px solid var(--border); animation: slide-down .35s var(--ease); }
.scan-info { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-width: 0; }
.scan-stats { display: flex; gap: 6px; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 0 rgba(139, 92, 246, .6); animation: pulse 1.6s infinite; }
.scan-progress.paused .pulse { animation: none; background: var(--warning); }
.progress { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.progress .bar { height: 100%; width: 0; background: var(--grad); background-size: 200% 100%; border-radius: inherit; transition: width .45s var(--ease); animation: shimmer-bar 2s linear infinite; }
.bulk-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; background: var(--surface-2); border-bottom: 1px solid var(--border); animation: slide-down .25s var(--ease); }
.check-all { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 13px; cursor: pointer; }
input[type="checkbox"] { accent-color: var(--primary); width: 16px; height: 16px; cursor: pointer; }

.mail-list { flex: 1; overflow-y: auto; }
.mail-row {
  display: grid; grid-template-columns: 22px 36px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--border);
  cursor: pointer; position: relative; transition: background .15s, opacity .35s, transform .35s var(--ease); animation: fade-in .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 14ms);
}
.mail-row:hover { background: var(--surface-2); }
.mail-row.active { background: var(--primary-soft); }
.mail-row.active::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); }
.mail-row.unread .from, .mail-row.unread .subject { font-weight: 700; color: var(--text); }
.mail-row.unread::after { content: ""; position: absolute; left: 5px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--primary-2); }
.mail-row.scanning { background: linear-gradient(90deg, var(--primary-soft), transparent 60%); }
.mail-row.scanning .avatar { animation: pulse-ring 1.2s infinite; }
.mail-row.removing { opacity: 0; transform: translateX(40px); }
.mail-row .body { min-width: 0; }
.mail-row .line1 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mail-row .from { font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row .email { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mail-row .subject { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.mail-row .right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.mail-row time { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mail-row .row-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: var(--surface-2); padding: 3px; border-radius: 10px; box-shadow: var(--shadow); }
.mail-row:hover .row-actions { opacity: 1; }
.mail-row .verdict { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.avatar { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; flex: none; background: var(--av, var(--grad)); text-transform: uppercase; }
.user-chip .avatar { width: 34px; height: 34px; }

.pager { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 12px; border-top: 1px solid var(--border); }
.pager button { min-width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; font: 600 12.5px var(--font); transition: all .2s; }
.pager button:hover:not([disabled]) { border-color: var(--primary); color: var(--text); }
.pager button.active { background: var(--grad); color: #fff; border-color: transparent; }
.pager button[disabled] { opacity: .4; cursor: default; }
.pager .info { color: var(--muted); font-size: 12.5px; margin: 0 8px; }

.mail-preview { display: flex; flex-direction: column; min-width: 0; opacity: 0; transform: translateX(20px); transition: opacity .35s var(--ease), transform .45s var(--ease); position: sticky; top: 84px; max-height: calc(100vh - 110px); }
.has-preview .mail-preview { opacity: 1; transform: none; }
.preview-empty { flex: 1; display: grid; place-items: center; align-content: center; gap: 8px; color: var(--muted); padding: 40px; }
.preview-empty .ico { width: 40px; height: 40px; stroke-width: 1.4; }
.preview-head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.preview-head h2 { font-size: 17px; line-height: 1.35; }
.preview-from { display: flex; gap: 12px; align-items: center; }
.preview-from .meta { flex: 1; min-width: 0; }
.preview-from .meta strong { display: block; }
.preview-from .meta span { color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; }
.preview-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.preview-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.preview-frame { flex: 1; background: #fff; min-height: 320px; position: relative; }
.preview-frame iframe { width: 100%; height: 100%; border: 0; display: block; min-height: 320px; }
.preview-note { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; background: var(--warning-soft); color: var(--warning); font-size: 12.5px; }
.decision-panel { margin: 0 18px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface-2); overflow: hidden; animation: rise .45s var(--ease); }
.decision-panel .dp-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.decision-panel .dp-head .grow strong,
.decision-panel .dp-head .grow small { display: block; }
.decision-panel .dp-head .grow span { color: var(--muted); font-size: 12.5px; }
.decision-panel.spam .dp-head { background: linear-gradient(90deg, var(--danger-soft), transparent); }
.decision-panel.clean .dp-head { background: linear-gradient(90deg, var(--success-soft), transparent); }
.decision-panel.uncertain .dp-head { background: linear-gradient(90deg, var(--warning-soft), transparent); }
.conf-ring { --p: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 11.5px; font-weight: 700;
  background: conic-gradient(var(--ring, var(--primary)) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; transition: --p 1s; }
.conf-ring::before { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--surface-2); }
.conf-ring span { position: relative; }
.trace { list-style: none; margin: 0; padding: 6px 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.trace li { display: grid; grid-template-columns: 20px 110px 1fr auto; gap: 8px; align-items: center; font-size: 12.5px; padding: 5px 0; color: var(--text-2); animation: fade-in .3s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.trace li .ico { width: 14px; height: 14px; }
.trace li.win { color: var(--text); font-weight: 600; }
.trace li.skip { color: var(--muted); }
.trace li small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trace li time { color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── Kurallar ──────────────────────────────────────────────────────────── */
.rule-list { display: flex; flex-direction: column; }
.rule-item { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--border); animation: fade-in .3s var(--ease) both; animation-delay: calc(min(var(--i, 0), 30) * 12ms); transition: background .15s, opacity .3s, transform .3s var(--ease); border-radius: 8px; }
.rule-item:hover { background: var(--surface-2); }
.rule-item.removing { opacity: 0; transform: translateX(20px); }
.rule-item .text { flex: 1; min-width: 0; word-break: break-word; }
.rule-item time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.rule-item .ico.lead { color: var(--muted); }
.rule-item.important .ico.lead { color: var(--warning); fill: var(--warning); }
.empty { display: grid; place-items: center; text-align: center; gap: 10px; padding: 40px 20px; color: var(--muted); }
.empty .ico { width: 36px; height: 36px; stroke-width: 1.5; color: var(--muted); }
.empty.big { padding: 80px 20px; }
.empty.big .ico { width: 56px; height: 56px; color: var(--primary-text); }
.empty h2 { color: var(--text); }

/* ── Hesap / sağlayıcı kartları ────────────────────────────────────────── */
.acc-card { display: flex; flex-direction: column; gap: 14px; transition: transform .3s var(--ease), box-shadow .3s; }
.acc-card:hover { transform: translateY(-3px); box-shadow: var(--shadow), var(--glow); }
.acc-card .acc-top { display: flex; gap: 12px; align-items: center; }
.acc-card .acc-top .grow { min-width: 0; }
.acc-card .acc-top strong { display: block; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-card .acc-top .grow span { color: var(--muted); font-size: 12.5px; }
.acc-card .acc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.acc-card .acc-stats div { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.acc-card .acc-stats b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.acc-card .acc-stats small { color: var(--muted); font-size: 11.5px; }
.acc-card .acc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid var(--border); padding-top: 12px; }
.acc-card.disabled { opacity: .6; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.status-dot.err { background: var(--danger); box-shadow: 0 0 0 4px var(--danger-soft); }
.status-dot.idle { background: var(--muted); box-shadow: 0 0 0 4px var(--surface-3); }

.flow { display: flex; align-items: center; gap: 6px; padding: 16px 18px; overflow-x: auto; }
.flow-step { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 86px; padding: 10px 8px; border-radius: 12px; background: var(--surface-2); text-align: center; font-weight: 600; font-size: 12.5px; }
.flow-step .ico { color: var(--primary-text); }
.flow-step small { color: var(--muted); font-weight: 500; font-size: 11px; }
.flow-step.accent { background: var(--grad); color: #fff; }
.flow-step.accent .ico, .flow-step.accent small { color: rgba(255,255,255,.9); }
.flow > i { flex: 1; min-width: 14px; height: 2px; background: linear-gradient(90deg, var(--border-strong), var(--primary)); border-radius: 2px; position: relative; overflow: hidden; }
.flow > i::after { content: ""; position: absolute; inset: 0; width: 40%; background: linear-gradient(90deg, transparent, var(--primary-2), transparent); animation: flow 2.2s linear infinite; }

.provider-chain { display: flex; flex-direction: column; gap: 10px; }
.prov-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.prov-card .grip { cursor: grab; color: var(--muted); }
.prov-card .order { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); font-weight: 700; font-size: 12px; }
.prov-card .grow { min-width: 0; }
.prov-card .grow strong { display: block; }
.prov-card .grow span { color: var(--muted); font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prov-card.dragging { opacity: .5; }
.prov-card.drop-target { box-shadow: var(--glow); }
.prov-card.off { opacity: .55; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button { border: 1px solid var(--border-strong); background: var(--bg-2); color: var(--text-2); border-radius: 999px; padding: 5px 11px; font: 600 12px var(--font); cursor: pointer; transition: all .2s; }
.presets button:hover, .presets button.active { border-color: var(--primary); color: var(--text); background: var(--primary-soft); }
.test-steps { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.test-step { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); animation: rise .35s var(--ease) both; animation-delay: calc(var(--i, 0) * 120ms); }
.test-step.ok .ico { color: var(--success); }
.test-step.bad .ico { color: var(--danger); }
.test-step .grow small { display: block; color: var(--muted); font-size: 12px; word-break: break-word; }
.test-step .hint { color: var(--warning); }

.pipeline-editor { display: flex; flex-direction: column; gap: 8px; margin: 10px 0 4px; }
.pipe-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.pipe-row .thr { grid-column: 2; }
.pipe-row .thr:empty { display: none; }
.pipe-row .desc strong { display: block; font-size: 13.5px; }
.pipe-row .desc small { color: var(--muted); font-size: 12px; }
.pipe-row input[type="range"] { width: 120px; accent-color: var(--primary); }
.pipe-row .thr { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.checklist { display: flex; flex-direction: column; gap: 6px; }
.check { display: grid; grid-template-columns: 20px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); font-size: 13px; }
.check small { color: var(--muted); font-size: 12px; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check.ok .ico { color: var(--success); }
.check.warn .ico { color: var(--warning); }
.check.bad .ico { color: var(--danger); }
.bayes-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 14px; }
.bayes-stats div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.bayes-stats b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.bayes-stats small { color: var(--muted); font-size: 12px; }

/* ── Modal ─────────────────────────────────────────────────────────────── */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(3, 4, 8, .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade-in .2s ease both; }
.modal-backdrop.closing { animation: fade-out .2s ease both; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg); animation: modal-in .4s var(--spring) both; }
.modal.wide { width: min(760px, 100%); }
.modal-backdrop.closing .modal { animation: modal-out .2s ease both; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 0; }
.modal-head h3 { font-size: 16px; display: flex; gap: 8px; align-items: center; }
.modal-body { padding: 16px 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); }
.modal-foot .left { margin-right: auto; }

/* ── Komut paleti ──────────────────────────────────────────────────────── */
.palette { width: min(620px, 100%); align-self: start; margin-top: 12vh; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); overflow: hidden; animation: modal-in .35s var(--spring) both; }
.palette .input-icon input { height: 54px; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; font-size: 15px; padding-left: 46px; box-shadow: none; }
.palette .input-icon > .ico { left: 16px; width: 18px; height: 18px; }
.palette ul { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.palette li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; color: var(--text-2); }
.palette li small { margin-left: auto; color: var(--muted); font-size: 12px; }
.palette li.active { background: var(--primary-soft); color: var(--text); }
.palette li.active .ico { color: var(--primary-text); }
.palette .group { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 10px 12px 4px; cursor: default; }

/* ── Bildirimler ───────────────────────────────────────────────────────── */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; min-width: 280px; max-width: 420px; padding: 12px 14px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); animation: toast-in .45s var(--spring) both; position: relative; overflow: hidden; }
.toast.out { animation: toast-out .3s ease both; }
.toast .ico { margin-top: 1px; }
.toast.success .ico { color: var(--success); }
.toast.error .ico { color: var(--danger); }
.toast.info .ico { color: var(--info); }
.toast.warn .ico { color: var(--warning); }
.toast .grow small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.toast .timer { position: absolute; left: 0; bottom: 0; height: 2px; background: currentColor; opacity: .3; animation: timer linear both; }

/* ── İskelet ───────────────────────────────────────────────────────────── */
.skeleton, .skeleton-block:empty { background-image: var(--skeleton); background-size: 200% 100%; animation: shimmer 1.4s linear infinite, rise .5s var(--ease) both; }
.skeleton-block:empty { border-radius: 12px; min-height: 160px; }
.card.skeleton.tall { min-height: 230px; }
.skel-line { height: 12px; border-radius: 6px; background-image: var(--skeleton); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }

/* ── Giriş / kurulum ───────────────────────────────────────────────────── */
body.guest { display: grid; place-items: center; min-height: 100vh; padding: 24px; overflow-x: hidden; }
.guest-bg { position: fixed; inset: 0; overflow: hidden; z-index: 0; }
.guest-bg span { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; animation: float 16s ease-in-out infinite; }
.guest-bg span:nth-child(1) { width: 480px; height: 480px; background: #7c3aed; top: -120px; left: -80px; }
.guest-bg span:nth-child(2) { width: 420px; height: 420px; background: #0891b2; bottom: -140px; right: -60px; animation-delay: -5s; }
.guest-bg span:nth-child(3) { width: 300px; height: 300px; background: #4f46e5; top: 40%; left: 55%; animation-delay: -10s; opacity: .35; }
.guest-main { position: relative; z-index: 1; width: 100%; display: grid; place-items: center; }
.auth-card { width: min(420px, 100%); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--border-strong); border-radius: 24px; padding: 34px 32px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 18px; animation: modal-in .6s var(--spring) both; }
.auth-card.wide { width: min(560px, 100%); }

/* Müşteri izni ekranı (e-postadaki bağlantı) */
.access-card p { margin: 0; }
.access-reason { margin: 0; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-style: italic; }
.access-reason .ico { flex: none; margin-top: 3px; color: var(--muted); }
.access-scope { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.access-scope > div { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); }
.access-scope b { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-bottom: 4px; }
.access-scope p { margin: 0; }
.dur-grid { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dur-grid legend { font-weight: 600; font-size: 13px; margin-bottom: 8px; padding: 0; }
.dur-chip { position: relative; cursor: pointer; }
.dur-chip input { position: absolute; opacity: 0; pointer-events: none; }
.dur-chip span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 13px; transition: background .15s, border-color .15s, color .15s; }
.dur-chip input:checked + span { background: var(--primary); border-color: var(--primary); color: #fff; }
.dur-chip input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.dur-custom { display: none; align-items: center; gap: 8px; flex-wrap: wrap; }
.dur-custom input { width: 90px; }
.dur-custom .select { min-width: 120px; }
.access-card:has(input[value=custom]:checked) .dur-custom { display: flex; }
.access-actions { justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.access-result { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.access-result > .ico { width: 44px; height: 44px; }
.access-result.ok > .ico { color: var(--success); }
.access-result.no > .ico { color: var(--muted); }
.access-result h2 { margin: 0; }
.center { text-align: center; }
@media (max-width: 520px) { .access-scope { grid-template-columns: 1fr; } }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; margin-bottom: 4px; }
.auth-brand h1 { font-size: 26px; letter-spacing: -.03em; }
.auth-brand h1 span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-brand p { color: var(--muted); }

.auth-logo { height: 56px; max-width: 240px; object-fit: contain; filter: drop-shadow(0 8px 24px rgba(139, 92, 246, .35)); }
.guest-top { position: fixed; top: 16px; right: 16px; z-index: 5; }
.guest-home { position: fixed; top: 16px; left: 16px; z-index: 5; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  color: var(--text-2); font-size: 13.5px; font-weight: 500; text-decoration: none; background: var(--surface); border: 1px solid var(--border); transition: color .2s, border-color .2s, transform .2s var(--ease); }
.guest-home:hover { color: var(--text); border-color: var(--border-strong); transform: translateX(-2px); }
.guest-home .ico { width: 16px; height: 16px; }
@media (max-width: 480px) { .guest-home span { display: none; } .guest-home { padding: 9px; } }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check-row input { margin-top: 2px; }

/* ── Marka / dil / bildirim ────────────────────────────────────────────── */
.brand-img { height: 34px; max-width: 170px; object-fit: contain; object-position: left center; }
/* Varsayılan yazılı logo: koyu temada beyaz, açık temada koyu metinli sürüm */
.logo-on-light { display: none !important; }
[data-theme="light"] .logo-on-dark { display: none !important; }
[data-theme="light"] .logo-on-light { display: inline-block !important; }
.lang-switch { position: relative; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: 9px; background: transparent; border: 1px solid var(--border); color: var(--text-2); font: 600 12.5px var(--font); cursor: pointer; transition: background .2s, border-color .2s; }
.lang-btn:hover { background: var(--surface-2); color: var(--text); }
.lang-btn .ico { width: 15px; height: 15px; }
.lang-btn .caret { width: 13px; height: 13px; transition: transform .25s var(--ease); }
.lang-switch.open .caret { transform: rotate(180deg); }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; padding: 6px; border-radius: 12px; background: var(--surface-3); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); z-index: 60;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none; transition: opacity .18s, transform .22s var(--ease); }
.lang-switch.open .dropdown-menu { opacity: 1; transform: none; pointer-events: auto; }
.dropdown-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text-2); font-weight: 500; }
.dropdown-menu a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.dropdown-menu a.active { color: var(--text); background: var(--primary-soft); }
.lang-code { font: 700 10.5px var(--mono); padding: 2px 5px; border-radius: 5px; background: var(--surface); color: var(--primary-text); }
.bell { position: relative; }
.bell-dot { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--danger); color: #fff; font: 700 10px/16px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--bg); animation: pop .4s var(--spring); }
.notif-pop { position: fixed; z-index: 80; width: min(380px, calc(100vw - 24px)); max-height: 70vh; display: flex; flex-direction: column; background: var(--surface-3); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow-lg); animation: modal-in .3s var(--spring); overflow: hidden; }
.notif-head { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.notif-list { overflow-y: auto; }
.notif { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.notif.unread { background: var(--primary-soft); }
.notif p { color: var(--text-2); font-size: 13px; margin: 2px 0; }
.notif time { color: var(--muted); font-size: 11.5px; }

/* ── Panel bileşenleri ─────────────────────────────────────────────────── */
.kpi-value.small-value { font-size: 20px; }
.meter { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 10px; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--grad); transform-origin: left; animation: grow-x .9s var(--ease) both; }
.meter.hot span { background: linear-gradient(90deg, #f59e0b, #f97316); }
.meter.full span { background: linear-gradient(90deg, #f43f5e, #e11d48); }
.ai-cell { min-width: 130px; font-size: 12.5px; }
.ai-cell .meter { margin-top: 5px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.quick { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); transition: transform .25s var(--ease), border-color .2s, box-shadow .25s; }
.quick:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--primary); box-shadow: var(--glow); }
.quick .ico { width: 22px; height: 22px; color: var(--primary-text); margin-bottom: 6px; }
.quick small { color: var(--muted); }
.plan-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.plan-option { position: relative; display: flex; gap: 12px; padding: 16px; border-radius: 14px; border: 1.5px solid var(--border-strong); background: var(--bg-2); cursor: pointer; transition: border-color .2s, box-shadow .25s, transform .2s var(--ease); }
.plan-option:hover { transform: translateY(-2px); }
.plan-option.selected { border-color: var(--primary); box-shadow: var(--glow); }
.plan-option input { accent-color: var(--primary); margin-top: 4px; }
.plan-option > div { display: flex; flex-direction: column; gap: 2px; }
.plan-option .price { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.plan-option .price small { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.save-pill { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #04130a; background: linear-gradient(90deg, #4ade80, #22d3ee); white-space: nowrap; }
.plan-option .save-pill { position: absolute; top: -11px; right: 12px; }
.plan-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.plan-summary > div { display: flex; flex-direction: column; gap: 2px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.fx-note { display: flex; gap: 8px; align-items: flex-start; justify-content: flex-end; margin: 10px 0 0; text-align: right; }
.fx-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.fx-inline { margin-top: 4px; font-size: 11.5px; }
.plan-summary b { font-size: 16px; }
.plan-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 14px 0 6px; }
.stepper output { font-size: 34px; font-weight: 800; min-width: 60px; text-align: center; font-variant-numeric: tabular-nums; }
.stepper output.bump { animation: pop .35s var(--spring); }
.stepper .icon-btn { width: 42px; height: 42px; border: 1px solid var(--border-strong); border-radius: 12px; }
.method-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.method { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.method small { display: block; }
.method-icon { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.card-sub { margin-top: 6px; padding: 14px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; }
.card-sub h4 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; }
.brand-uploads { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.brand-upload { display: flex; gap: 14px; align-items: center; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.brand-upload small { display: block; margin-bottom: 8px; }
.brand-preview { width: 120px; height: 56px; border-radius: 10px; display: grid; place-items: center; background: repeating-conic-gradient(var(--surface-3) 0 25%, transparent 0 50%) 0 / 14px 14px; }
.brand-preview.favicon { width: 56px; }
.brand-preview img { max-width: 90%; max-height: 80%; object-fit: contain; }
.save-bar { grid-column: 1 / -1; position: sticky; bottom: 16px; display: flex; justify-content: flex-end; z-index: 5; }
.save-bar .btn { box-shadow: var(--shadow-lg), 0 10px 30px -8px rgba(139, 92, 246, .8); }
.feed-icon { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.feed-icon.danger { background: var(--danger-soft); color: var(--danger); }
.feed-icon.success { background: var(--success-soft); color: var(--success); }
.prov-badge { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--grad); color: #fff; flex: none; }
.log-pre { white-space: pre-wrap; background: var(--bg-2); padding: 12px; border-radius: 12px; max-height: 50vh; overflow: auto; margin: 0; }
.portal-hero h2 { font-size: 24px; }

/* ── Animasyonlar ──────────────────────────────────────────────────────── */
.page-enter { animation: page-in .5s var(--ease) both; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes modal-out { to { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px); } }
@keyframes timer { from { width: 100%; } to { width: 0; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes shimmer-bar { from { background-position: 200% 0; } to { background-position: 0 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(139, 92, 246, .55); } 70% { box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); } 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); } }
@keyframes pulse-ring { 0%, 100% { box-shadow: 0 0 0 0 rgba(139, 92, 246, .6); } 50% { box-shadow: 0 0 0 5px rgba(139, 92, 246, 0); } }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes grow-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes bar-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
@keyframes flow { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(40px, -30px) scale(1.08); } 66% { transform: translate(-30px, 20px) scale(.95); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  @view-transition { navigation: none; }
}

/* ── Duyarlı ───────────────────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1 { grid-template-columns: minmax(0, 1fr); }
  .mail-layout.has-preview { grid-template-columns: minmax(0, 1fr); }
  .mail-layout.has-preview .mail-main { display: none; }
  .mail-preview { position: static; max-height: none; }
  .mail-preview .preview-back { display: inline-grid !important; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: none; }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.5); animation: fade-in .2s; }
  .main { margin-left: 0; }
  .only-mobile { display: inline-grid; }
  .search-trigger { min-width: 0; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .content { padding: 16px; }
  .topbar { padding: 12px 16px; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .plan-pick, .quick-grid { grid-template-columns: minmax(0, 1fr); }
  .topbar .lang-btn span { display: none; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .mail-row { grid-template-columns: 22px minmax(0, 1fr) auto; }
  .mail-row .avatar { display: none; }
  .hero { flex-direction: column; align-items: flex-start; }
  .scan-controls .btn span { display: none; }
}
.preview-back { display: none !important; }

/* ── Yönetim paneli etiketi ve "müşteri gözünden bak" şeridi ───────────── */
.brand-tag { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--primary); background: color-mix(in srgb, var(--primary) 14%, transparent); border: 1px solid color-mix(in srgb, var(--primary) 35%, transparent); padding: 3px 7px; border-radius: 999px; }
.imp-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 999px;
  background: color-mix(in srgb, var(--warning) 92%, #000); color: #1a1205; box-shadow: 0 12px 40px rgba(0,0,0,.35); font-size: 13.5px; max-width: calc(100vw - 32px); animation: imp-in .45s var(--ease) both; }
@keyframes imp-in { from { opacity: 0; transform: translate(-50%, 24px); } to { opacity: 1; transform: translate(-50%, 0); } }
.imp-bar svg { width: 17px; height: 17px; flex: none; }
.imp-bar form { margin: 0; }
.imp-bar .btn { background: rgba(0,0,0,.82); color: #fff; border-color: transparent; }
.imp-bar .btn:hover { background: #000; }
body.impersonating .toasts { bottom: 80px; }
@media (max-width: 600px) { .imp-bar { font-size: 12px; } .imp-bar .btn span { display: none; } }

/* ── Hesap silme bağlantısı: erişilebilir ama göze batmayan ───────────── */
.quiet-exit { margin: 56px 0 8px; text-align: center; }
.link-quiet { background: none; border: 0; padding: 4px 6px; color: var(--muted); font: inherit; font-size: 12px; opacity: .5; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; transition: opacity .2s; }
.link-quiet:hover, .link-quiet:focus-visible { opacity: .9; }
.del-list { list-style: none; padding: 0; margin: 14px 0 18px; display: grid; gap: 8px; }
.del-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.del-list svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--muted); }

/* ── Robot koruması: bal küpü alanı (ekran okuyucu ve klavye için de görünmez) ── */
.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.auth-links { display: grid; gap: 6px; margin-top: 14px; }
.auth-links p { margin: 0; }

/* ── Bakım modu ───────────────────────────────────────────────────────── */
.maint-card { text-align: center; display: grid; justify-items: center; gap: 10px; }
.maint-card h2 { margin: 6px 0 0; font-size: 24px; letter-spacing: -.02em; }
.maint-card p { margin: 0; max-width: 380px; }
.maint-icon { position: relative; width: 84px; height: 84px; display: grid; place-items: center; margin: 8px 0 4px; }
.maint-icon span { position: absolute; inset: 0; border-radius: 50%; background: var(--primary-soft); animation: maint-pulse 2.4s var(--ease) infinite; }
.maint-icon svg { position: relative; width: 38px; height: 38px; color: var(--primary); animation: spin 9s linear infinite; }
@keyframes maint-pulse { 0%, 100% { transform: scale(.9); opacity: .7; } 50% { transform: scale(1.08); opacity: 1; } }
.maint-note { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 13.5px; color: var(--success); margin-top: 6px !important; }
.maint-note svg { width: 16px; height: 16px; flex: none; }
.maint-bar { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 95; display: flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: color-mix(in srgb, var(--warning) 18%, var(--surface)); border: 1px solid color-mix(in srgb, var(--warning) 55%, transparent); color: var(--text); font-size: 12.5px; box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.3)); max-width: calc(100vw - 32px); }
.maint-bar svg { width: 15px; height: 15px; color: var(--warning); flex: none; }
.maint-bar a { color: inherit; text-decoration: underline; }
body.impersonating .maint-bar { bottom: 74px; }
@media (max-width: 600px) { .maint-bar { font-size: 11.5px; } }

/* Profil → Destek erişimi */
.access-panel { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }
.access-panel > p { margin: 0; }
.access-live { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.access-live > span { flex: 1; min-width: 200px; }
.access-none { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.table.compact td, .table.compact th { padding-top: 8px; padding-bottom: 8px; }

/* Bildirim paneli: tek tek ve toplu silme */
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notif { position: relative; padding-right: 34px; }
.notif .notif-del { position: absolute; top: 8px; right: 6px; opacity: 0; transition: opacity .15s; }
.notif:hover .notif-del, .notif .notif-del:focus-visible { opacity: 1; }
@media (hover: none) { .notif .notif-del { opacity: .7; } }
.notif.removing { opacity: 0; transform: translateX(12px); transition: opacity .2s, transform .2s; }

/* Kullanıcılar: müşteri izni durumu */
.imp-btn.ok { color: var(--success); background: var(--success-soft); }
.imp-btn.pending { color: var(--warning); background: var(--warning-soft); }

/* Müşteri gözünden bakma: kalan süre (sunucu denetler, bu sadece gösterim) */
.imp-timer { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(0,0,0,.18); font-variant-numeric: tabular-nums; }
.imp-timer b { font-weight: 700; letter-spacing: .02em; }
.imp-bar.ending { background: var(--danger); color: #fff; animation: imp-pulse 1.6s ease-in-out infinite; }
@keyframes imp-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--danger) 30%, transparent); } }
@media (prefers-reduced-motion: reduce) { .imp-bar.ending { animation: none; } }

/* Süre doldu ekranı */
.expired-wrap { display: grid; place-items: center; min-height: 60vh; }
.expired-card { width: min(520px, 100%); display: flex; flex-direction: column; gap: 14px; text-align: center; padding: 32px; }
.expired-card h2, .expired-card p { margin: 0; }
.expired-card .stack, .expired-card .alert { text-align: left; }
.expired-icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 16px; display: grid; place-items: center; background: var(--warning-soft); color: var(--warning); }
.expired-icon .ico { width: 26px; height: 26px; }
.expired-actions { justify-content: center; gap: 10px; flex-wrap: wrap; }
.access-start { display: flex; align-items: center; gap: 6px; margin: 0; }

/* Profil fotoğrafı */
.avatar.has-img { background: var(--surface-3); overflow: hidden; padding: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.avatar-edit { display: flex; align-items: center; gap: 16px; padding: 4px 0 16px; margin-bottom: 14px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.avatar-edit p { margin: 2px 0 8px; }
.avatar-edit .avatar { width: 72px; height: 72px; border-radius: 20px; font-size: 24px; }
.avatar-edit .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.avatar-edit input[type=file] { display: none; }

/* Yönetim → Faturalar */
.inv-toolbar { flex-wrap: wrap; }
.inv-toolbar .input-icon { min-width: 240px; flex: 1 1 240px; max-width: 340px; }
.date-field { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.date-field input, .seq-form input { height: 38px; padding: 0 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--border-strong); outline: none; color-scheme: dark; }
:root[data-theme="light"] .date-field input, :root[data-theme="light"] .seq-form input { color-scheme: light; }
.date-field input:focus, .seq-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
#inv-table th.check, #inv-table td.check { width: 36px; padding-right: 0; }
#inv-table tr.selected td { background: var(--primary-soft); }
.seq-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.seq-series { font-weight: 700; font-variant-numeric: tabular-nums; }
.seq-form input { width: 110px; font-variant-numeric: tabular-nums; }
#inv-seq { margin-top: 18px; }
@media (max-width: 720px) { .inv-toolbar .input-icon { max-width: none; } .date-field { flex: 1 1 45%; } .date-field input { flex: 1; } }

/* Müşteri → Abonelik: hizmetler ayrı kartlar */
.usage-strip { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.usage-text { display: flex; flex-direction: column; gap: 2px; min-width: 220px; }
.usage-bar { flex: 1 1 200px; height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.usage-bar span { display: block; height: 100%; border-radius: inherit; background: var(--primary); transition: width .6s var(--ease); }
.usage-bar span.over { background: var(--danger); }
h3.section-title { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 22px 0 12px; }
.svc-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 18px; }
.svc { display: flex; flex-direction: column; gap: 14px; }
.svc-head { display: flex; align-items: flex-start; gap: 12px; }
.svc-head b { display: block; font-size: 15px; }
.svc-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; background: var(--primary-soft); color: var(--primary-text); }
.svc-icon.extra { background: var(--success-soft); color: var(--success); }
.svc-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; }
.svc-facts div { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.svc-facts dt { font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.svc-facts dd { margin: 0; font-weight: 600; font-size: 13px; font-variant-numeric: tabular-nums; }
.svc-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 12.5px; color: var(--text-2); }
.svc-note svg { width: 14px; height: 14px; flex: none; margin-top: 2px; }
.svc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
#extra-order .plan-pick { margin-top: 12px; }
.extra-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.extra-qty { display: flex; flex-direction: column; gap: 6px; }
.extra-total { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; }
.extra-total b { font-size: 20px; font-variant-numeric: tabular-nums; }
.svc-admin { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.svc-admin-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.svc-admin-row .grow small { display: block; }
.svc-grant { display: grid; grid-template-columns: 1.3fr .7fr 1fr; gap: 10px; align-items: end; }
.svc-grant .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .svc-facts { grid-template-columns: 1fr; } .svc-grant { grid-template-columns: 1fr; } }
.extra-qty .stepper { margin: 0; gap: 10px; justify-content: flex-start; }
.extra-qty .stepper output { font-size: 24px; min-width: 40px; }
.extra-qty .stepper .icon-btn { width: 36px; height: 36px; }
.svc-grant-box > summary { list-style: none; display: inline-flex; cursor: pointer; }
.svc-grant-box > summary::-webkit-details-marker { display: none; }
.svc-grant-box[open] > summary { margin-bottom: 12px; }
.svc-admin-row .svc-icon { width: 32px; height: 32px; border-radius: 9px; }
@media (max-width: 720px) { .svc-admin-row { flex-wrap: wrap; } }
.credit-preview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 12px 0 14px; }
.credit-preview div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.credit-preview b { font-variant-numeric: tabular-nums; }
@media (max-width: 600px) { .credit-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
#inv-table td.num { white-space: nowrap; }

/* BTW numarası anlık kontrol (kayıt + profil) */
.vat-input { position: relative; display: block; }
.vat-input input { padding-right: 40px !important; }
.vat-state { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; line-height: 1; pointer-events: none; }
.vat-state:empty { display: none; }
.vat-state[data-state="valid"] { background: var(--success-soft); color: var(--success); }
.vat-state[data-state="invalid"], .vat-state[data-state="format"], .vat-state[data-state="country"] { background: var(--danger-soft); color: var(--danger); }
.vat-state[data-state="unknown"] { background: var(--warning-soft); color: var(--warning); }
.vat-state[data-state="checking"] { color: var(--muted); animation: vat-blink 1s ease-in-out infinite; }
@keyframes vat-blink { 50% { opacity: .3; } }
.vat-msg { display: block; min-height: 0; font-size: 12px; }
.vat-msg:empty { display: none; }
.vat-msg[data-state="valid"] { color: var(--success); }
.vat-msg[data-state="invalid"], .vat-msg[data-state="format"], .vat-msg[data-state="country"] { color: var(--danger); }
.vat-msg[data-state="unknown"] { color: var(--warning); }

/* ── Çerez izni bandı (Google Analytics) ── */
.cookie-bar { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 300; width: min(640px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 16px; padding: 14px 16px; border-radius: var(--radius-lg);
  background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--text); box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
  animation: cookie-in .35s var(--ease) both; }
.cookie-bar p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--text-2); flex: 1; }
.cookie-bar strong { color: var(--text); }
.cookie-bar a { color: var(--primary-text); white-space: nowrap; }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }
@keyframes cookie-in { from { opacity: 0; transform: translate(-50%, 12px); } }
@media (max-width: 560px) {
  .cookie-bar { flex-direction: column; align-items: stretch; bottom: 12px; }
  .cookie-actions .btn { flex: 1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) { .cookie-bar { animation: none; } }
body.impersonating .cookie-bar { bottom: 80px; }

/* ── Posta programı eklentileri (Hesaplar sayfası) ── */
.integrations { margin-top: 36px; }
.integrations .section-head { display: block; margin-bottom: 14px; }
.integrations .section-head h2 { display: flex; align-items: center; gap: 10px; font-size: 17px; margin: 0 0 4px; }
.integrations .section-head h2 .ico { color: var(--primary-text); }
.addon-card { display: flex; flex-direction: column; gap: 14px; }
.addon-card.soon { opacity: .75; }
.addon-top { display: flex; align-items: center; gap: 12px; }
.addon-top .grow { display: flex; flex-direction: column; min-width: 0; }
.addon-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); flex-shrink: 0; }
.addon-icon .ico { width: 22px; height: 22px; }
.addon-features { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; color: var(--text-2); }
.addon-features li { display: flex; gap: 8px; align-items: flex-start; }
.addon-features .ico { width: 15px; height: 15px; color: var(--success); flex-shrink: 0; margin-top: 2px; }
.addon-card > .btn { align-self: flex-start; max-width: 100%; height: auto; min-height: 36px; padding-block: 9px; white-space: normal; line-height: 1.3; text-align: left; }
.addon-card > .btn .ico { flex-shrink: 0; }
.addon-steps { border-top: 1px solid var(--border); padding-top: 12px; }
.addon-steps summary { display: flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 600; color: var(--text-2); list-style: none; }
.addon-steps summary::-webkit-details-marker { display: none; }
.addon-steps summary .ico { width: 16px; height: 16px; color: var(--primary-text); }
.addon-steps[open] summary { margin-bottom: 10px; }
.addon-steps ol { margin: 0 0 10px; padding-left: 20px; display: grid; gap: 6px; color: var(--text-2); font-size: 13.5px; line-height: 1.55; }
