/* ==========================================================================
   Kampanya Paneli — tasarım sistemi
   Grafit yüzeyler, tek vurgu rengi, Geist. Bağımlılık yok.
   Tüm renk/ölçü değerleri token'dan gelir; bileşenlerde sabit renk yoktur.
   ========================================================================== */

/* ---------- 1. Token'lar ---------- */
:root {
    /* Tipografi */
    --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    --fs-2xs: 11px;  /* overline, tablo başlığı */
    --fs-xs: 12px;   /* caption, hint */
    --fs-sm: 13px;   /* label, küçük metin, tablo */
    --fs-md: 14px;   /* gövde */
    --fs-lg: 16px;   /* kart / bölüm başlığı */
    --fs-xl: 18px;   /* sayfa başlığı (mobil) */
    --fs-2xl: 20px;  /* sayfa başlığı */
    --fs-kpi: 26px;
    --lh-tight: 1.25; --lh: 1.5;

    /* Boşluk: 4'ün katları */
    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
    --sp-6: 24px; --sp-8: 32px; --sp-10: 40px; --sp-12: 48px; --sp-16: 64px;

    /* Köşe */
    --r-sm: 6px;   /* rozet, küçük kontrol */
    --r-md: 8px;   /* buton, input */
    --r-lg: 12px;  /* kart */
    --r-xl: 16px;  /* modal */
    --r-full: 999px;

    /* Ölçüler */
    --control-sm: 30px; --control: 36px; --control-lg: 42px;
    --sidebar-w: 248px; --rail-w: 68px; --topbar-h: 56px; --tabbar-h: 60px;
    --content-max: 1280px;

    /* Hareket */
    --ease: cubic-bezier(.2, .8, .2, 1);
    --dur-fast: 120ms; --dur: 180ms; --dur-slow: 240ms;

    /* Katman */
    --z-sticky: 10; --z-tabbar: 30; --z-backdrop: 40; --z-menu: 55; --z-toast: 60; --z-tip: 70;
}

/* Koyu tema (varsayılan) — saf siyah değil, hafif soğuk grafit */
:root, [data-theme="dark"] {
    --bg:             #0c0d10;
    --bg-subtle:      #0f1014;   /* sidebar, tab bar */
    --surface:        #141519;   /* kart */
    --surface-2:      #1a1b20;   /* input, ikincil panel */
    --surface-hover:  #1e2026;
    --surface-active: #24262d;
    --elevated:       #1b1c22;   /* menü, modal, toast */
    --border:         rgba(255, 255, 255, .07);
    --border-strong:  rgba(255, 255, 255, .12);
    --border-focus:   #5b8cff;

    --text-primary:   #ededf0;
    --text-secondary: #a3a5ae;
    --text-muted:     #7f828d;
    --text-inverse:   #0c0d10;

    --primary:        #3f73f2;
    --primary-hover:  #5584f5;
    --primary-text:   #82a6ff;   /* bağlantı, vurgulu metin */
    --primary-soft:   rgba(91, 140, 255, .14);
    --on-primary:     #ffffff;

    --success: #3ec486;  --success-soft: rgba(62, 196, 134, .13);
    --warning: #e8ae45;  --warning-soft: rgba(232, 174, 69, .14);
    --danger:  #f16a6a;  --danger-soft:  rgba(241, 106, 106, .13);
    --danger-solid: #d93f3f;
    --info:    #5cb8e0;  --info-soft:    rgba(92, 184, 224, .13);

    --backdrop: rgba(4, 5, 8, .62);
    --shimmer: rgba(255, 255, 255, .05);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .55);
    --shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, .7), 0 0 0 1px var(--border);
    --topbar-bg: rgba(12, 13, 16, .82);
    color-scheme: dark;
}

[data-theme="light"] {
    --bg:             #f6f6f7;
    --bg-subtle:      #fbfbfc;
    --surface:        #ffffff;
    --surface-2:      #f4f4f6;
    --surface-hover:  #f1f1f4;
    --surface-active: #e9e9ee;
    --elevated:       #ffffff;
    --border:         rgba(16, 18, 27, .08);
    --border-strong:  rgba(16, 18, 27, .15);
    --border-focus:   #2f62e6;

    --text-primary:   #111318;
    --text-secondary: #4d505b;
    --text-muted:     #6a6d79;
    --text-inverse:   #ffffff;

    --primary:        #2f62e6;
    --primary-hover:  #2453cf;
    --primary-text:   #2451c9;
    --primary-soft:   rgba(47, 98, 230, .09);
    --on-primary:     #ffffff;

    --success: #13804e;  --success-soft: rgba(19, 128, 78, .09);
    --warning: #a4610a;  --warning-soft: rgba(196, 124, 16, .11);
    --danger:  #cc3131;  --danger-soft:  rgba(204, 49, 49, .08);
    --danger-solid: #cc3131;
    --info:    #0a6d9a;  --info-soft:    rgba(10, 109, 154, .09);

    --backdrop: rgba(17, 19, 24, .38);
    --shimmer: rgba(255, 255, 255, .7);
    --shadow-sm: 0 1px 2px rgba(16, 18, 27, .05);
    --shadow-md: 0 1px 2px rgba(16, 18, 27, .05), 0 8px 24px -8px rgba(16, 18, 27, .16);
    --shadow-lg: 0 24px 64px -16px rgba(16, 18, 27, .28), 0 0 0 1px var(--border);
    --topbar-bg: rgba(246, 246, 247, .85);
    color-scheme: light;
}

/* ---------- 2. Temel ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
    margin: 0; min-height: 100dvh;
    font: 400 var(--fs-md)/var(--lh) var(--font); color: var(--text-primary); background: var(--bg);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    font-feature-settings: "ss01", "cv11";
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: var(--lh-tight); letter-spacing: -.011em; text-wrap: balance; }
h1 { font-size: var(--fs-2xl); } h2 { font-size: var(--fs-xl); } h3 { font-size: var(--fs-md); } h4 { font-size: var(--fs-sm); }
p { margin: 0 0 var(--sp-3); } p:last-child { margin-bottom: 0; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
strong { font-weight: 600; }
code, .mono { font-family: var(--mono); font-size: .92em; }
code { background: var(--surface-2); border: 1px solid var(--border); padding: 1px 5px; border-radius: 4px; color: var(--text-primary); }
pre {
    margin: 0; font: 12px/1.6 var(--mono); background: var(--surface-2); color: var(--text-primary);
    border: 1px solid var(--border); padding: var(--sp-3); border-radius: var(--r-md); overflow: auto; max-height: 320px;
}
ul { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { max-width: 100%; }
::selection { background: var(--primary-soft); }
:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 2px; border-radius: var(--r-sm); }
[hidden] { display: none !important; }
.ti { line-height: 1; }

/* Yardımcılar */
.muted { color: var(--text-secondary); } .faint { color: var(--text-muted); }
.small { font-size: var(--fs-sm); } .tiny { font-size: var(--fs-xs); }
.fw { font-weight: 600; } .num { font-variant-numeric: tabular-nums; }
.text-ok { color: var(--success); } .text-err { color: var(--danger); } .text-warn { color: var(--warning); } .text-info { color: var(--info); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.row { display: flex; align-items: center; gap: var(--sp-2); } .wrap { flex-wrap: wrap; } .grow { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.mt { margin-top: var(--sp-4); } .mb { margin-bottom: var(--sp-4); } .ml-auto { margin-left: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hide-mobile { display: none !important; }
@media (min-width: 768px) { .hide-mobile { display: revert !important; } .hide-desktop { display: none !important; } }
kbd {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
    font: 500 var(--fs-2xs)/1 var(--mono); color: var(--text-muted);
    background: var(--surface); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px;
}

.skip-link { position: absolute; left: var(--sp-3); top: -60px; z-index: var(--z-toast); padding: var(--sp-2) var(--sp-3); background: var(--elevated); border-radius: var(--r-md); box-shadow: var(--shadow-md); color: var(--text-primary); }
.skip-link:focus { top: var(--sp-3); }

/* ---------- 3. Uygulama iskeleti ---------- */
.app { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--topbar-h) 1fr; }
.sidebar { display: none; }

.topbar {
    position: sticky; top: 0; z-index: var(--z-sticky); min-width: 0;
    display: flex; align-items: center; gap: var(--sp-3); padding: 0 var(--sp-4);
    background: var(--topbar-bg); border-bottom: 1px solid var(--border);
    -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
}
.topbar .brand-mark { display: grid; }
.topbar .title { min-width: 0; flex: 1; }
.topbar .title .pre { font-size: var(--fs-2xs); font-weight: 500; color: var(--text-muted); line-height: 1.2; display: flex; align-items: center; gap: 6px; }
.topbar .title h1 { font-size: var(--fs-lg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .actions { display: flex; align-items: center; gap: var(--sp-2); flex: none; }
.topbar .actions .btn > span { display: none; }
.topbar .divider-v { width: 1px; height: 20px; background: var(--border-strong); margin: 0 var(--sp-1); }

.main {
    width: 100%; max-width: var(--content-max); margin: 0 auto; min-width: 0;
    padding: var(--sp-4) var(--sp-4) calc(var(--tabbar-h) + env(safe-area-inset-bottom) + var(--sp-6));
}
.main > * + * { margin-top: var(--sp-4); }

.tabbar {
    position: fixed; inset: auto 0 0 0; z-index: var(--z-tabbar);
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    background: var(--topbar-bg); border-top: 1px solid var(--border);
    -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
}
.tabbar a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    color: var(--text-muted); font-size: var(--fs-2xs); font-weight: 500; text-decoration: none;
    transition: color var(--dur-fast);
}
.tabbar a i { font-size: 22px; }
.tabbar a.active { color: var(--text-primary); }
.tabbar a.active::before { content: ""; position: absolute; top: 0; left: 50%; width: 20px; height: 2px; margin-left: -10px; border-radius: 0 0 2px 2px; background: var(--primary-text); }
.tabbar a:active { color: var(--text-secondary); }

@media (min-width: 768px) {
    .app { grid-template-columns: var(--rail-w) minmax(0, 1fr); }
    .tabbar, .topbar .brand-mark { display: none; }
    .sidebar {
        display: flex; flex-direction: column; grid-row: 1 / -1;
        position: sticky; top: 0; height: 100dvh; padding: var(--sp-3) var(--sp-2);
        background: var(--bg-subtle); border-right: 1px solid var(--border);
    }
    .topbar, .main { grid-column: 2; }
    .topbar { padding: 0 var(--sp-6); }
    .topbar .actions .btn > span { display: inline; }
    .main { padding: var(--sp-6); }
}
@media (min-width: 1024px) { .main { padding: var(--sp-6) var(--sp-8) var(--sp-10); } }
@media (min-width: 1280px) {
    .app { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
    .sidebar { padding: var(--sp-3); }
}

/* Sidebar */
.brand { display: flex; align-items: center; gap: 10px; padding: var(--sp-1) var(--sp-2); height: 40px; color: var(--text-primary); text-decoration: none; font-weight: 600; font-size: var(--fs-md); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.logo {
    width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; font-size: 16px;
    color: var(--on-primary); background: linear-gradient(160deg, var(--primary-hover), var(--primary));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 1px 2px rgba(0, 0, 0, .25);
}
.nav-group { margin-top: var(--sp-5); }
.nav-label { padding: 0 var(--sp-3) var(--sp-2); font-size: var(--fs-2xs); font-weight: 500; color: var(--text-muted); letter-spacing: .02em; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
    position: relative; display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 var(--sp-3);
    border-radius: var(--r-md); color: var(--text-secondary); font-weight: 500; font-size: var(--fs-sm); text-decoration: none;
    transition: background var(--dur-fast), color var(--dur-fast);
}
.nav a i { font-size: 18px; width: 18px; flex: none; color: var(--text-muted); transition: color var(--dur-fast); }
.nav a:hover { background: var(--surface-hover); color: var(--text-primary); text-decoration: none; }
.nav a:hover i { color: var(--text-secondary); }
.nav a.active { background: var(--surface-active); color: var(--text-primary); }
.nav a.active i { color: var(--primary-text); }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary-text); }
.sidebar .user { margin-top: auto; display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-3) var(--sp-1) 0; border-top: 1px solid var(--border); }
.sidebar .user .who { line-height: 1.3; }
.sidebar .user .who .fw { font-size: var(--fs-sm); }
.avatar {
    width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center;
    font-weight: 600; font-size: var(--fs-xs); color: var(--text-primary);
    background: var(--surface-active); border: 1px solid var(--border-strong);
}
button.avatar { padding: 0; }

/* Rail (768–1279): yalnız ikon */
@media (min-width: 768px) and (max-width: 1279.98px) {
    .sidebar .brand { justify-content: center; padding: var(--sp-1) 0; }
    .sidebar .brand > span:not(.logo), .nav-label, .nav a span, .sidebar .user .who { display: none; }
    .nav-group { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--border); }
    .nav-group:first-of-type { border-top: 0; padding-top: 0; }
    .nav a { justify-content: center; padding: 0; height: 40px; }
    .nav a.active::before { left: -8px; }
    .sidebar .user { flex-direction: column; padding-inline: 0; }
}

/* ---------- 4. Buton ---------- */
.btn {
    --btn-bg: var(--surface); --btn-fg: var(--text-primary); --btn-bd: var(--border-strong); --btn-hover: var(--surface-hover);
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: var(--control); padding: 0 14px; border-radius: var(--r-md);
    background: var(--btn-bg); color: var(--btn-fg); border: 1px solid var(--btn-bd);
    font-size: var(--fs-sm); font-weight: 500; line-height: 1; white-space: nowrap; text-decoration: none; user-select: none;
    box-shadow: var(--shadow-sm);
    transition: background var(--dur-fast), border-color var(--dur-fast), color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast);
}
.btn i { font-size: 16px; color: inherit; }
.btn:hover { background: var(--btn-hover); text-decoration: none; }
.btn:active { transform: translateY(.5px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; box-shadow: none; }

/* Varyantlar: primary · secondary (varsayılan) · outline · ghost · danger */
.btn-primary { --btn-bg: var(--primary); --btn-fg: var(--on-primary); --btn-bd: transparent; --btn-hover: var(--primary-hover); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), var(--shadow-sm); }
.btn-outline { --btn-bg: transparent; --btn-hover: var(--surface-hover); box-shadow: none; }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--text-secondary); --btn-bd: transparent; --btn-hover: var(--surface-hover); box-shadow: none; }
.btn-ghost:hover { color: var(--text-primary); }
.btn-danger, .btn-err.solid { --btn-bg: var(--danger-solid); --btn-fg: #fff; --btn-bd: transparent; --btn-hover: var(--danger-solid); }
.btn-danger:hover, .btn-err.solid:hover { filter: brightness(1.08); }
/* Yumuşak durum varyantları (tablo içi başlat/durdur, toplu işlemler) */
.btn-ok, .btn-err, .btn-warn, .btn-info { --btn-bd: transparent; box-shadow: none; }
.btn-ok   { --btn-bg: var(--success-soft); --btn-fg: var(--success); --btn-hover: var(--success-soft); }
.btn-err  { --btn-bg: var(--danger-soft);  --btn-fg: var(--danger);  --btn-hover: var(--danger-soft); }
.btn-warn { --btn-bg: var(--warning-soft); --btn-fg: var(--warning); --btn-hover: var(--warning-soft); }
.btn-info { --btn-bg: var(--info-soft);    --btn-fg: var(--info);    --btn-hover: var(--info-soft); }
.btn-ok:hover, .btn-err:not(.solid):hover, .btn-warn:hover, .btn-info:hover { box-shadow: inset 0 0 0 1px currentColor; }
.btn-ghost.text-err { --btn-fg: var(--danger); }
.btn-ghost.text-err:hover { --btn-hover: var(--danger-soft); color: var(--danger); }

/* Boyutlar */
.btn-sm { height: var(--control-sm); padding: 0 10px; font-size: var(--fs-xs); border-radius: var(--r-sm); gap: 5px; }
.btn-sm i { font-size: 15px; }
.btn-lg { height: var(--control-lg); padding: 0 18px; font-size: var(--fs-md); }
.btn-icon { width: var(--control); padding: 0; }
.btn-icon.btn-sm { width: var(--control-sm); }
.btn-block { width: 100%; }

/* Yükleniyor: içerik görünmez olur, genişlik korunur */
.btn .spin, .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; flex: none; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading > * { visibility: hidden; }
.btn.is-loading::after {
    content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 14px;
    border: 2px solid var(--btn-fg); border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite;
}

/* ---------- 5. Kart ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.card-head { display: flex; align-items: center; gap: var(--sp-3); min-height: 52px; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card-head h3 { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-md); }
.card-head h3 i { color: var(--text-muted); font-size: 17px; }
.card-head .desc { font-size: var(--fs-xs); color: var(--text-muted); margin-top: 2px; font-weight: 400; }
.card-body { padding: var(--sp-4); }
.card-foot { display: flex; align-items: center; gap: var(--sp-3); min-height: 52px; padding: var(--sp-3) var(--sp-4); border-top: 1px solid var(--border); color: var(--text-secondary); font-size: var(--fs-sm); flex-wrap: wrap; }
.card-foot.actions-end { justify-content: flex-end; background: var(--bg-subtle); border-radius: 0 0 var(--r-lg) var(--r-lg); }
@media (min-width: 768px) { .card-head, .card-body, .card-foot { padding-inline: var(--sp-5); } }

/* ---------- 6. KPI ---------- */
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.stats.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 1024px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-4); } .stats.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat { padding: var(--sp-4); display: flex; flex-direction: column; gap: 6px; }
.stat .label { display: flex; align-items: center; gap: 6px; color: var(--text-secondary); font-size: var(--fs-sm); font-weight: 500; }
.stat .label i { color: var(--text-muted); font-size: 16px; }
.stat .value { font-size: var(--fs-kpi); font-weight: 600; letter-spacing: -.025em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .value .unit { font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); margin-left: 4px; letter-spacing: 0; }
.stat .value.pending { color: var(--text-muted); }
.stat .meta { font-size: var(--fs-xs); color: var(--text-muted); display: flex; align-items: center; gap: 6px; min-height: 18px; }
@media (max-width: 479.98px) {
    .stats.cols-3 { gap: var(--sp-2); }
    .stats.cols-3 .stat { padding: var(--sp-3); }
    .stats.cols-3 .stat .label i { display: none; }
    .stats.cols-3 .stat .label { font-size: var(--fs-xs); }
    .stats.cols-3 .stat .value { font-size: var(--fs-2xl); }
}
.trend { display: inline-flex; align-items: center; gap: 2px; height: 18px; padding: 0 6px; border-radius: var(--r-sm); font-weight: 600; font-size: var(--fs-2xs); font-variant-numeric: tabular-nums; }
.trend.up { background: var(--success-soft); color: var(--success); }
.trend.down { background: var(--danger-soft); color: var(--danger); }
.trend.flat { background: var(--surface-2); color: var(--text-secondary); }

/* ---------- 7. Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field .label { font-size: var(--fs-sm); font-weight: 500; color: var(--text-primary); }
.req::after { content: " *"; color: var(--danger); }
.field .hint { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.45; }
.field .error { display: flex; align-items: center; gap: 4px; font-size: var(--fs-xs); color: var(--danger); font-weight: 500; animation: rise var(--dur) var(--ease); }
.field .error i { font-size: 14px; }
.input, .select, .textarea {
    width: 100%; height: var(--control); padding: 0 var(--sp-3); border-radius: var(--r-md);
    border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text-primary);
    font-size: var(--fs-md); transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background var(--dur-fast);
}
.textarea { height: auto; min-height: 88px; padding: var(--sp-2) var(--sp-3); resize: vertical; }
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:hover, .select:hover { border-color: var(--text-muted); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--border-focus); box-shadow: 0 0 0 3px var(--primary-soft); background: var(--surface); }
.input[aria-invalid="true"], .select[aria-invalid="true"] { border-color: var(--danger); }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--danger-soft); }
.input[readonly] { color: var(--text-secondary); background: var(--surface); }
.input:disabled, .select:disabled { opacity: .55; cursor: not-allowed; }
.input.sm, .select.sm { height: var(--control-sm); font-size: var(--fs-sm); border-radius: var(--r-sm); }
.input[type="number"] { font-variant-numeric: tabular-nums; }
.input.mono:placeholder-shown { font-family: var(--font); }
.input[type="search"]::-webkit-search-cancel-button { filter: grayscale(1); opacity: .5; }
.select {
    appearance: none; padding-right: 32px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a8d98' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 6.5 3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 8px center; background-size: 16px;
}
.input-group { display: flex; min-width: 0; }
.input-group .input { border-radius: var(--r-md) 0 0 var(--r-md); min-width: 0; }
.input-group .btn { border-radius: 0 var(--r-md) var(--r-md) 0; margin-left: -1px; height: var(--control); box-shadow: none; flex: none; }
.input-icon { position: relative; min-width: 0; }
.input-icon > i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; font-size: 16px; }
.input-icon .input { padding-left: 34px; }
.input-icon kbd { position: absolute; right: 7px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.input-icon .input:focus ~ kbd, .input-icon .input:not(:placeholder-shown) ~ kbd { display: none; }
.form-grid { display: grid; gap: var(--sp-4); }
@media (min-width: 640px) { .form-grid.cols-2 { grid-template-columns: 1fr 2fr; } }

.check { display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer; font-size: var(--fs-sm); color: var(--text-secondary); user-select: none; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); width: 16px; height: 16px; margin: 0; cursor: pointer; }
input[type="checkbox"]:disabled { cursor: not-allowed; opacity: .35; }

.switch { position: relative; display: inline-flex; align-items: center; gap: var(--sp-2); cursor: pointer; font-size: var(--fs-sm); color: var(--text-secondary); user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.switch .track { position: relative; flex: none; width: 32px; height: 18px; border-radius: 9px; background: var(--surface-active); box-shadow: inset 0 0 0 1px var(--border-strong); transition: background var(--dur); }
.switch .track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform var(--dur) var(--ease); }
.switch input:checked + .track { background: var(--primary); box-shadow: none; }
.switch input:checked + .track::after { transform: translateX(14px); }
.switch input:focus-visible + .track { outline: 2px solid var(--border-focus); outline-offset: 2px; }
.switch input:disabled + .track { opacity: .5; }

.progress { height: 4px; background: var(--surface-active); border-radius: 2px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: var(--primary); border-radius: inherit; transition: width var(--dur-slow) var(--ease), background var(--dur-slow); }
.progress > .ok { background: var(--success); } .progress > .warn { background: var(--warning); } .progress > .err { background: var(--danger); }

/* Ayar sayfaları: solda açıklama, sağda form kartı */
.section { display: grid; gap: var(--sp-4); }
.section + .section { margin-top: var(--sp-8); padding-top: var(--sp-8); border-top: 1px solid var(--border); }
.section-intro h2 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.section-intro p { color: var(--text-secondary); font-size: var(--fs-sm); max-width: 44ch; }
.section-intro .note { margin-top: var(--sp-4); }
@media (min-width: 1024px) { .section { grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: var(--sp-10); align-items: start; } .section > .card { max-width: 720px; } }

.callout { display: flex; gap: var(--sp-3); padding: var(--sp-3); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--border); font-size: var(--fs-xs); color: var(--text-secondary); line-height: 1.55; }
.callout > i { font-size: 16px; color: var(--text-muted); margin-top: 1px; }
.callout code { font-size: 11px; word-break: break-all; }

/* ---------- 8. Rozet, nokta, segment ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-sm);
    font-size: var(--fs-xs); font-weight: 500; white-space: nowrap; line-height: 1;
    background: var(--surface-2); color: var(--text-secondary); box-shadow: inset 0 0 0 1px var(--border);
}
.badge-ok     { background: var(--success-soft); color: var(--success); box-shadow: none; }
.badge-err    { background: var(--danger-soft);  color: var(--danger);  box-shadow: none; }
.badge-warn   { background: var(--warning-soft); color: var(--warning); box-shadow: none; }
.badge-info   { background: var(--info-soft);    color: var(--info);    box-shadow: none; }
.badge-accent { background: var(--primary-soft); color: var(--primary-text); box-shadow: none; }
.badge.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.badge .dot { width: 6px; height: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }
.dot.live { animation: pulse 2s infinite; box-shadow: 0 0 0 0 currentColor; }

.chips { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
    height: 26px; padding: 0 10px; border-radius: var(--r-sm); border: 0; background: transparent; flex: none;
    color: var(--text-secondary); font-size: var(--fs-sm); font-weight: 500; white-space: nowrap;
    display: inline-flex; align-items: center; gap: 6px; transition: background var(--dur-fast), color var(--dur-fast);
}
.chip:hover { color: var(--text-primary); }
.chip.active { background: var(--surface); color: var(--text-primary); box-shadow: var(--shadow-sm), 0 0 0 1px var(--border-strong); }
.chip .count { font-size: var(--fs-2xs); color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* ---------- 9. Tablo ---------- */
.table-wrap { overflow-x: auto; min-width: 0; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.table th {
    position: sticky; top: 0; z-index: 1; height: 36px; padding: 0 var(--sp-3); text-align: left; white-space: nowrap;
    font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted);
    background: var(--bg-subtle); border-bottom: 1px solid var(--border);
}
.table td { height: 52px; padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: var(--sp-4); }
.table th:last-child, .table td:last-child { padding-right: var(--sp-4); }
@media (min-width: 768px) { .table th:first-child, .table td:first-child { padding-left: var(--sp-5); } .table th:last-child, .table td:last-child { padding-right: var(--sp-5); } }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur-fast); }
.table tbody tr:hover { background: var(--surface-hover); }
.table tbody tr.selected { background: var(--primary-soft); }
.table tbody tr.clickable { cursor: pointer; }
.table .r { text-align: right; }
.table td.actions { text-align: right; white-space: nowrap; }  /* td flex olmaz: tablo hücresi davranışı bozulur */
.table td.actions > * + * { margin-left: 2px; }
.table .cb { width: 1%; padding-right: 0; }
.table .sub { color: var(--text-muted); font-size: var(--fs-xs); margin-top: 2px; }
.table .sub a { color: var(--text-muted); }
.table .sub a:hover { color: var(--primary-text); }
/* Sabit düzen: kolon genişlikleri başlıktan gelir, ana kolon kalanı alır ve uzun metni kırpar */
.table.fixed { table-layout: fixed; }
.table .col-cb { width: 48px; } .table .col-status { width: 128px; } .table .col-num { width: 96px; } .table .col-pool { width: 76px; }
.table .col-assign { width: 168px; } .table .col-date { width: 124px; } .table .col-actions { width: 132px; }
.table .cell-main { min-width: 0; }
.table th.sortable { padding: 0; }
.table th.sortable button {
    all: unset; box-sizing: border-box; display: inline-flex; align-items: center; gap: 4px; width: 100%; height: 36px; padding: 0 var(--sp-3);
    cursor: pointer; color: inherit; font: inherit;
}
.table th.sortable.r button { justify-content: flex-start; flex-direction: row-reverse; }
.table th.sortable button:hover { color: var(--text-primary); }
.table th.sortable button:focus-visible { outline: 2px solid var(--border-focus); outline-offset: -2px; border-radius: var(--r-sm); }
.table th.sortable i { font-size: 13px; opacity: 0; transition: opacity var(--dur-fast); }
.table th.sortable button:hover i { opacity: .6; }
.table th[aria-sort="ascending"] i, .table th[aria-sort="descending"] i { opacity: 1; color: var(--text-primary); }
.table th[aria-sort] button { color: var(--text-primary); }
.table th.sortable:first-child button { padding-left: var(--sp-4); }
.table tr.state-row:hover { background: transparent; }
.table tr.state-row td { height: auto; }

.bulkbar {
    display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; padding: var(--sp-2) var(--sp-4);
    background: var(--primary-soft); border-bottom: 1px solid var(--border); animation: fade var(--dur) var(--ease);
}
@media (min-width: 768px) { .bulkbar { padding-inline: var(--sp-5); } }

.toolbar { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); }
.toolbar .search { flex: 1 1 220px; max-width: 320px; margin-left: auto; }
.toolbar .select { width: auto; min-width: 140px; }
@media (min-width: 768px) { .toolbar { padding-inline: var(--sp-5); } }
@media (max-width: 639.98px) {
    .toolbar .search { max-width: none; margin-left: 0; order: -1; flex-basis: 100%; }
    .toolbar .select { flex: 1 1 0; min-width: 0; }
    .toolbar h3.grow { flex-basis: 100%; }
}

.meta-strip { display: flex; align-items: center; gap: var(--sp-2) var(--sp-4); flex-wrap: wrap; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-secondary); }
.meta-strip .sep { width: 1px; height: 14px; background: var(--border-strong); }
@media (min-width: 768px) { .meta-strip { padding-inline: var(--sp-5); } }

/* Dar ekran: satırlar kart düzenine geçer */
@media (min-width: 1024px) { .lg-hide { display: none !important; } .act-link { width: var(--control-sm); padding: 0; } }
@media (max-width: 1279.98px) { .xl-only { display: none !important; } }
@media (max-width: 1023.98px) {
    .table.fixed { table-layout: auto; }
    .table.responsive thead { display: none; }
    .table.responsive, .table.responsive tbody { display: block; }
    .table.responsive tr { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px var(--sp-3); padding: var(--sp-4); border-bottom: 1px solid var(--border); }
    .table.responsive tr:last-child { border-bottom: 0; }
    .table.responsive td { display: block; height: auto; padding: 0 !important; border: 0; grid-column: 1 / -1; min-width: 0; }
    .table.responsive td.cb { grid-column: 1; grid-row: 1; padding-top: 2px !important; width: auto; }
    .table.responsive td.cb:empty { display: none; }
    .table.responsive td.cb ~ td { grid-column: 2; }
    .table.responsive td.cb:empty ~ td { grid-column: 1 / -1; }
    .table.responsive td.primary { font-size: var(--fs-md); margin-bottom: 4px; }
    .table.responsive td[data-label] { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); min-height: 24px; text-align: right; }
    .table.responsive td[data-label]::before { content: attr(data-label); flex: none; color: var(--text-muted); font-size: var(--fs-xs); text-align: left; }
    .table.responsive td[data-label] > * { min-width: 0; }
    .table.responsive td.actions { display: flex; align-items: center; justify-content: flex-start; margin-top: var(--sp-2); padding-top: var(--sp-3) !important; border-top: 1px dashed var(--border); gap: var(--sp-1); }
    .table.responsive td.actions > * + * { margin-left: 0; }
    .table.responsive tbody tr:hover { background: transparent; }
    .table.responsive td.hm { display: none; }
    .table.responsive tr.state-row { display: block; padding: 0; }
}

/* ---------- 10. Durum: boş / hata / yükleniyor ---------- */
.empty, .state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: var(--sp-12) var(--sp-4); color: var(--text-secondary); }
.state .icon, .empty > i {
    width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: var(--sp-4); font-size: 22px;
    border-radius: var(--r-lg); color: var(--text-secondary); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--border);
}
.state.error .icon { color: var(--danger); background: var(--danger-soft); box-shadow: none; }
.state h4, .empty h2 { font-size: var(--fs-md); color: var(--text-primary); margin-bottom: 4px; }
.state p { font-size: var(--fs-sm); color: var(--text-muted); max-width: 40ch; margin: 0; }
.state .btn, .empty .btn { margin-top: var(--sp-4); }
.state.compact { padding: var(--sp-8) var(--sp-4); }

.skeleton { position: relative; overflow: hidden; display: inline-block; max-width: 100%; vertical-align: middle; background: var(--surface-2); border-radius: var(--r-sm); color: transparent !important; line-height: 1.1; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, var(--shimmer), transparent); animation: shimmer 1.4s infinite; }
.skeleton-block { display: block; width: 100%; }
.spinner { width: 20px; height: 20px; border: 2px solid var(--border-strong); border-top-color: var(--primary-text); border-radius: 50%; animation: spin .7s linear infinite; margin: var(--sp-8) auto; }

/* ---------- 11. Açıklama listesi ---------- */
.dg { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; }
.dg > div { background: var(--surface); padding: var(--sp-3); min-width: 0; }
.dg .k { font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: 4px; }
.dg .v { font-weight: 500; font-size: var(--fs-sm); overflow-wrap: anywhere; }
.sync-list { grid-template-columns: minmax(0, 1fr); max-height: 260px; overflow: auto; }
.sync-list > div { display: flex; align-items: baseline; gap: var(--sp-3); padding: var(--sp-2) var(--sp-3); }
.sync-list .k { margin: 0; min-width: 64px; }
.detail-section h4 { font-size: var(--fs-xs); font-weight: 500; color: var(--text-muted); margin-bottom: var(--sp-2); }

/* ---------- 12. Sayfalama ---------- */
.pager { display: flex; gap: 2px; }
.pager button {
    height: var(--control-sm); min-width: var(--control-sm); padding: 0 var(--sp-2); border-radius: var(--r-sm);
    border: 1px solid transparent; background: transparent; color: var(--text-secondary); font-size: var(--fs-sm);
    font-variant-numeric: tabular-nums; display: inline-grid; place-items: center; transition: background var(--dur-fast), color var(--dur-fast);
}
.pager button i { font-size: 16px; }
.pager button:hover { background: var(--surface-hover); color: var(--text-primary); }
.pager button.active { background: var(--surface); color: var(--text-primary); font-weight: 600; border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.pager button:disabled { opacity: .35; pointer-events: none; }
@media (max-width: 479.98px) { .pager button:not(:first-child):not(:last-child):not(.active) { display: none; } }

/* ---------- 13. Diyalog: modal + yan panel ---------- */
dialog { border: 0; padding: 0; background: transparent; color: inherit; max-width: none; max-height: none; overflow: visible; }
dialog::backdrop { background: var(--backdrop); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal {
    margin: auto; width: min(520px, calc(100vw - 32px)); display: flex; flex-direction: column; max-height: calc(100dvh - 48px);
    background: var(--elevated); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); overflow: hidden;
}
.modal.lg { width: min(720px, calc(100vw - 32px)); }
.modal.sm { width: min(420px, calc(100vw - 32px)); }
.modal-head { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4) var(--sp-5); border-bottom: 1px solid var(--border); flex: none; }
.modal-head h3 { flex: 1; font-size: var(--fs-lg); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-head .btn { margin-right: -6px; }
.modal-body { padding: var(--sp-5); overflow: auto; flex: 1 1 auto; overscroll-behavior: contain; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--sp-2); padding: var(--sp-3) var(--sp-5); border-top: 1px solid var(--border); background: var(--bg-subtle); flex: none; }

/* Onay diyaloğu */
.modal.confirm .modal-body { display: flex; gap: var(--sp-4); padding: var(--sp-6) var(--sp-5) var(--sp-5); }
.modal.confirm .confirm-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 20px; background: var(--danger-soft); color: var(--danger); }
.modal.confirm .confirm-icon.warn { background: var(--warning-soft); color: var(--warning); }
.modal.confirm h3 { font-size: var(--fs-lg); margin: 6px 0 var(--sp-2); }
.modal.confirm p { font-size: var(--fs-sm); color: var(--text-secondary); margin: 0; }
.modal.confirm .modal-foot { border-top: 0; background: transparent; padding-top: 0; padding-bottom: var(--sp-5); }

@media (max-width: 639.98px) {
    .modal:not(.sm) { margin: auto 0 0; width: 100%; max-height: 92dvh; border-radius: var(--r-xl) var(--r-xl) 0 0; }
    .modal:not(.sm)::before { content: ""; display: block; width: 36px; height: 4px; margin: 8px auto 0; border-radius: 2px; background: var(--border-strong); flex: none; }
    .modal:not(.sm) .modal-head { border-bottom: 0; padding-top: var(--sp-2); }
    .modal-foot { padding-bottom: calc(var(--sp-3) + env(safe-area-inset-bottom)); }
    .modal-foot .btn { flex: 1; }
    .modal.confirm .modal-body { flex-direction: column; align-items: center; text-align: center; gap: var(--sp-2); }
}
.sheet { margin: 0 0 0 auto; width: min(520px, 100vw); height: 100dvh; background: var(--elevated); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; }
.sheet .modal-body { flex: 1; }
dialog[open] .modal { animation: pop var(--dur-slow) var(--ease); }
dialog[open] .sheet { animation: slide-in var(--dur-slow) var(--ease); }
dialog[open]::backdrop { animation: fade var(--dur) ease-out; }
@media (max-width: 639.98px) { dialog[open] .modal:not(.sm) { animation: sheet-up var(--dur-slow) var(--ease); } }

/* ---------- 14. Menü (açılır) + ipucu ---------- */
.menu {
    position: fixed; z-index: var(--z-menu); min-width: 200px; max-width: calc(100vw - 16px); padding: var(--sp-1);
    background: var(--elevated); border-radius: var(--r-md); box-shadow: var(--shadow-lg);
    animation: menu-in var(--dur-fast) var(--ease); transform-origin: top right;
}
.menu.up { transform-origin: bottom right; }
.menu-head { padding: var(--sp-2) var(--sp-3) var(--sp-2); font-size: var(--fs-xs); color: var(--text-muted); border-bottom: 1px solid var(--border); margin-bottom: var(--sp-1); }
.menu-head strong { display: block; color: var(--text-primary); font-size: var(--fs-sm); }
.menu button, .menu a {
    display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border: 0; border-radius: var(--r-sm);
    background: transparent; color: var(--text-primary); font-size: var(--fs-sm); text-align: left; text-decoration: none; white-space: nowrap;
}
.menu button i, .menu a i { font-size: 16px; color: var(--text-muted); width: 16px; }
.menu button:hover, .menu button:focus-visible, .menu a:hover, .menu a:focus-visible { background: var(--surface-hover); outline: none; text-decoration: none; }
.menu .danger, .menu .danger i { color: var(--danger); }
.menu .danger:hover, .menu .danger:focus-visible { background: var(--danger-soft); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: var(--sp-1) 0; }
.menu .shortcut { margin-left: auto; font-size: var(--fs-xs); color: var(--text-muted); }

.tip {
    position: fixed; z-index: var(--z-tip); pointer-events: none; max-width: 240px; padding: 5px 8px; border-radius: var(--r-sm);
    background: var(--text-primary); color: var(--text-inverse); font-size: var(--fs-xs); font-weight: 500; line-height: 1.3;
    box-shadow: var(--shadow-md); opacity: 0; transform: translateY(2px); transition: opacity var(--dur-fast), transform var(--dur-fast);
}
.tip.show { opacity: 1; transform: none; }

/* ---------- 15. Toast ---------- */
.toasts { position: fixed; z-index: var(--z-toast); left: var(--sp-3); right: var(--sp-3); top: calc(var(--sp-3) + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: var(--sp-2); pointer-events: none; }
@media (min-width: 640px) { .toasts { left: auto; top: auto; bottom: var(--sp-5); right: var(--sp-5); width: 380px; flex-direction: column-reverse; } }
.toast {
    pointer-events: auto; display: flex; align-items: flex-start; gap: 10px; padding: var(--sp-3) var(--sp-3) var(--sp-3) 14px;
    background: var(--elevated); border-radius: var(--r-md); box-shadow: var(--shadow-lg); animation: rise var(--dur-slow) var(--ease);
}
.toast.out { animation: fadeout var(--dur) ease-in forwards; }
.toast > i { font-size: 18px; margin-top: 1px; flex: none; }
.toast.ok > i { color: var(--success); } .toast.err > i { color: var(--danger); } .toast.info > i { color: var(--info); }
.toast .msg { flex: 1; font-size: var(--fs-sm); line-height: 1.45; padding-top: 1px; overflow-wrap: anywhere; }
.toast button { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--r-sm); background: none; border: 0; color: var(--text-muted); padding: 0; }
.toast button:hover { background: var(--surface-hover); color: var(--text-primary); }

/* ---------- 16. İşlem perdesi ---------- */
/* Etkileşimi kilitler; kısa işlemlerde görünmemesi için 150ms gecikmeyle belirir. */
.overlay { position: fixed; inset: 0; z-index: var(--z-backdrop); display: none; place-items: center; background: transparent; cursor: progress; }
.overlay.show { display: grid; animation: overlay-in var(--dur) ease-out 150ms both; }
.overlay .spinner { margin: 0; }
.overlay .pill { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--r-full); background: var(--elevated); box-shadow: var(--shadow-lg); font-size: var(--fs-sm); font-weight: 500; }
.overlay .pill .spinner { width: 16px; height: 16px; }

/* ---------- 17. Giriş ---------- */
.auth {
    min-height: 100dvh; display: grid; place-items: center; padding: var(--sp-6) var(--sp-4);
    background:
        radial-gradient(60% 50% at 50% 0%, var(--primary-soft), transparent 70%),
        var(--bg);
}
.auth-inner { width: min(380px, 100%); }
.auth .brand { justify-content: center; margin-bottom: var(--sp-6); }
.auth .card { box-shadow: var(--shadow-md); }
.auth .card-body { padding: var(--sp-6); }
.auth-title { margin-bottom: var(--sp-6); }
.auth-title h1 { font-size: var(--fs-2xl); margin-bottom: 6px; }
.auth-title p { font-size: var(--fs-sm); color: var(--text-secondary); }
.auth-foot { margin-top: var(--sp-6); text-align: center; font-size: var(--fs-xs); color: var(--text-muted); display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ---------- 18. Sayfa özel: dashboard ---------- */
.dash-grid { display: grid; gap: var(--sp-4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1100px) { .dash-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
.chart-box { height: 260px; margin: 0 calc(var(--sp-2) * -1); }
.rank { list-style: none; padding: 0; margin: 0; }
.rank li { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: var(--sp-3); align-items: center; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--border); }
.rank li:last-child { border-bottom: 0; }
.rank li.full { display: block; padding: 0; }
.chart-box > .skeleton-block { height: 100%; }
@media (min-width: 768px) { .rank li { padding-inline: var(--sp-5); } }
.rank .pos { font-size: var(--fs-xs); color: var(--text-muted); font-variant-numeric: tabular-nums; text-align: center; }
.rank .name { font-weight: 500; font-size: var(--fs-sm); }
.rank .bar { height: 3px; margin-top: 6px; border-radius: 2px; background: var(--surface-active); overflow: hidden; }
.rank .bar > span { display: block; height: 100%; background: var(--primary-text); border-radius: inherit; opacity: .8; transform-origin: left; animation: grow var(--dur-slow) var(--ease) both; }
.rank .val { font-weight: 600; font-size: var(--fs-sm); font-variant-numeric: tabular-nums; }

/* Şifre kuralları */
.rules { list-style: none; padding: 0; display: grid; gap: 6px var(--sp-4); grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-top: var(--sp-1); }
.rules li { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--text-muted); transition: color var(--dur-fast); }
.rules li i { font-size: 14px; }
.rules li.ok { color: var(--text-primary); }
.rules li.ok i { color: var(--success); }

/* ---------- 19. Animasyon ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { transform: translateX(100%); } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes slide-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes menu-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeout { to { opacity: 0; transform: translateY(4px); } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 4px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
