/* =====================================================================
   Picks — tek CSS dosyası. Framework yok.
   Tasarım: koyu tema öncelikli (OLED-dostu lacivert), açık tema desteği,
   mavi birincil + amber vurgu, Inter (latin + latin-ext: Türkçe glifler).
   ===================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Tokenlar ---------- */
:root {
  color-scheme: dark light;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px; --s-12: 48px;
  --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-full: 999px;
  --dur: 180ms; --dur-slow: 320ms; --ease: cubic-bezier(.2, .8, .2, 1);
  --z-header: 40; --z-nav: 40; --z-toast: 100;
  --container: 1200px; --header-h: 60px; --bottomnav-h: 64px;

  /* Koyu tema (varsayılan) */
  --bg: #0b1020; --bg-2: #0f172a;
  --surface: #131c31; --surface-2: #1a2540; --surface-3: #22304f;
  --border: #253352; --border-strong: #34467a;
  --text: #e7ecf7; --text-2: #a8b3cf; --text-3: #7683a6;
  --primary: #3b82f6; --primary-strong: #2563eb; --primary-soft: rgba(59, 130, 246, .16); --primary-text: #8ab4ff; --on-primary: #fff;
  --accent: #f59e0b; --accent-soft: rgba(245, 158, 11, .16); --accent-text: #fbbf24;
  --success: #22c55e; --success-soft: rgba(34, 197, 94, .16); --success-text: #4ade80;
  --warning: #f59e0b; --warning-soft: rgba(245, 158, 11, .16); --warning-text: #fbbf24;
  --danger: #ef4444; --danger-strong: #dc2626; --danger-soft: rgba(239, 68, 68, .16); --danger-text: #f87171; --on-danger: #fff;
  --ring: #60a5fa;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-2: 0 8px 24px -8px rgba(0, 0, 0, .55);
  --glow: 0 0 0 1px rgba(96, 165, 250, .25), 0 0 24px -6px rgba(59, 130, 246, .45);
  --header-bg: rgba(11, 16, 32, .82);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f4f6fb; --bg-2: #e9eef7;
    --surface: #ffffff; --surface-2: #f3f6fb; --surface-3: #e8edf6;
    --border: #dbe2ee; --border-strong: #c3cddf;
    --text: #0f172a; --text-2: #475569; --text-3: #64748b;
    --primary: #2563eb; --primary-strong: #1d4ed8; --primary-soft: rgba(37, 99, 235, .10); --primary-text: #1d4ed8;
    --accent: #d97706; --accent-soft: rgba(217, 119, 6, .12); --accent-text: #b45309;
    --success: #16a34a; --success-soft: rgba(22, 163, 74, .12); --success-text: #15803d;
    --warning: #d97706; --warning-soft: rgba(217, 119, 6, .12); --warning-text: #b45309;
    --danger: #dc2626; --danger-strong: #b91c1c; --danger-soft: rgba(220, 38, 38, .10); --danger-text: #b91c1c;
    --ring: #2563eb;
    --shadow-1: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-2: 0 8px 24px -10px rgba(15, 23, 42, .18);
    --glow: 0 0 0 1px rgba(37, 99, 235, .18), 0 0 24px -8px rgba(37, 99, 235, .30);
    --header-bg: rgba(244, 246, 251, .85);
  }
}
:root[data-theme="light"] {
  --bg: #f4f6fb; --bg-2: #e9eef7;
  --surface: #ffffff; --surface-2: #f3f6fb; --surface-3: #e8edf6;
  --border: #dbe2ee; --border-strong: #c3cddf;
  --text: #0f172a; --text-2: #475569; --text-3: #64748b;
  --primary: #2563eb; --primary-strong: #1d4ed8; --primary-soft: rgba(37, 99, 235, .10); --primary-text: #1d4ed8;
  --accent: #d97706; --accent-soft: rgba(217, 119, 6, .12); --accent-text: #b45309;
  --success: #16a34a; --success-soft: rgba(22, 163, 74, .12); --success-text: #15803d;
  --warning: #d97706; --warning-soft: rgba(217, 119, 6, .12); --warning-text: #b45309;
  --danger: #dc2626; --danger-strong: #b91c1c; --danger-soft: rgba(220, 38, 38, .10); --danger-text: #b91c1c;
  --ring: #2563eb;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-2: 0 8px 24px -10px rgba(15, 23, 42, .18);
  --glow: 0 0 0 1px rgba(37, 99, 235, .18), 0 0 24px -8px rgba(37, 99, 235, .30);
  --header-bg: rgba(244, 246, 251, .85);
}

/* ---------- Sıfırlama / temel ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.5;
  color: var(--text); background: var(--bg); min-height: 100dvh;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: var(--primary-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.015em; font-weight: 700; }
h1 { font-size: clamp(24px, 2.4vw + 12px, 30px); }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 var(--s-3); }
p:last-child { margin-bottom: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--s-6) 0; }
code, kbd { font-family: var(--font-mono); font-size: .9em; background: var(--surface-2); padding: 1px 6px; border-radius: 6px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--primary-soft); }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -100px; left: var(--s-3); z-index: 200; padding: 10px 14px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); }
.skip-link:focus { top: var(--s-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- Yardımcılar ---------- */
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--font-mono); }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.flex { display: flex; gap: var(--s-2); align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--s-2); }
.row { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; }
.right { margin-left: auto; }
.center { text-align: center; }
.mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.mb-2 { margin-bottom: var(--s-2); } .mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); }
.hide-mobile { display: none !important; }
@media (min-width: 768px) { .hide-mobile { display: revert !important; } .hide-desktop { display: none !important; } }

.icon { width: 20px; height: 20px; flex: 0 0 auto; stroke-width: 2; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 28px; height: 28px; }
.icon-xl { width: 44px; height: 44px; stroke-width: 1.5; }

/* ---------- Üst çubuk ---------- */
.app-header {
  position: sticky; top: 0; z-index: var(--z-header); height: var(--header-h);
  background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.app-header__inner { max-width: var(--container); margin: 0 auto; padding: 0 var(--s-4); height: 100%; display: flex; align-items: center; gap: var(--s-3); }
@media (min-width: 768px) { .app-header__inner { padding: 0 var(--s-6); } }
@media (min-width: 1024px) { .app-header__inner { padding: 0 var(--s-8); } }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.02em; color: var(--text); min-height: 44px; }
.brand:hover { text-decoration: none; }
.brand__mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%); display: grid; place-items: center; color: #fff; box-shadow: var(--glow); }
.brand__mark .icon { width: 18px; height: 18px; }
.topnav { display: none; align-items: center; gap: 2px; margin-left: var(--s-3); }
@media (min-width: 768px) { .topnav { display: flex; } }
.topnav a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; min-height: 40px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 500; font-size: 15px; transition: background var(--dur) var(--ease), color var(--dur) var(--ease); }
.topnav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.topnav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-text); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-1); }
.user-chip { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 14px; padding: 0 6px; max-width: 180px; }
.user-chip .avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: 0 0 auto; text-transform: uppercase; }

/* ---------- Alt gezinme (mobil) ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-nav);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--header-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: var(--bottomnav-h); font-size: 11px; font-weight: 500; color: var(--text-3); transition: color var(--dur) var(--ease); }
.bottom-nav a:hover { text-decoration: none; color: var(--text-2); }
.bottom-nav a[aria-current="page"] { color: var(--primary-text); }
.bottom-nav .icon { width: 22px; height: 22px; }
@media (min-width: 768px) { .bottom-nav { display: none; } }

/* ---------- Sayfa düzeni ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: var(--s-5) var(--s-4) calc(var(--bottomnav-h) + var(--s-8) + env(safe-area-inset-bottom)); }
@media (min-width: 768px) { .container { padding: var(--s-8) var(--s-6); } }
@media (min-width: 1024px) { .container { padding: var(--s-10) var(--s-8); } }
.container--narrow { max-width: 720px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-6); }
.page-head .sub { color: var(--text-2); margin-top: var(--s-1); }
.section { margin-top: var(--s-8); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.grid { display: grid; gap: var(--s-4); }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Kart ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-1); padding: var(--s-4); }
@media (min-width: 768px) { .card { padding: var(--s-5); } }
.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; align-items: center; gap: var(--s-2); padding-bottom: var(--s-3); margin-bottom: var(--s-3); border-bottom: 1px solid var(--border); }
.card--flush .card__head { padding: var(--s-4); margin: 0; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap; text-decoration: none;
  background: var(--surface-2); color: var(--text); touch-action: manipulation; user-select: none;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease), transform 80ms var(--ease), opacity var(--dur);
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--primary-strong); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary); }
.btn-secondary { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--danger-strong); color: var(--on-danger); }
.btn-danger:hover { background: var(--danger); }
.btn-danger-soft { background: var(--danger-soft); color: var(--danger-text); }
.btn-danger-soft:hover { background: var(--danger-strong); color: var(--on-danger); }
.btn-success-soft { background: var(--success-soft); color: var(--success-text); }
.btn-success-soft:hover { background: var(--success); color: #062b12; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn-sm .icon { width: 16px; height: 16px; }
.btn-icon { width: 44px; padding: 0; }
.btn-icon.btn-sm { width: 36px; }
.btn-block { width: 100%; }
.btn .htmx-indicator { display: none; }
.btn.htmx-request .htmx-indicator { display: inline-flex; }
.btn.htmx-request .btn__label { opacity: .6; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 14px; font-weight: 600; color: var(--text-2); }
.help { font-size: 13px; color: var(--text-3); }
.error-text { font-size: 13px; color: var(--danger-text); display: flex; align-items: center; gap: 6px; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--bg-2); border: 1px solid var(--border-strong); color: var(--text);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.input::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.input-sm { min-height: 36px; padding: 6px 10px; font-size: 14px; }
.select { appearance: none; padding-right: 36px; 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='%237683a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-with-icon { position: relative; }
.input-with-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-with-icon .input { padding-left: 40px; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-2); }
.inline-form { display: inline; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.checkbox input { width: 20px; height: 20px; accent-color: var(--primary); }

/* ---------- Uyarı / bildirim ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid; font-size: 14px; }
.alert .icon { margin-top: 1px; }
.alert-info { background: var(--primary-soft); border-color: transparent; color: var(--text); }
.alert-success { background: var(--success-soft); border-color: transparent; color: var(--success-text); }
.alert-warning { background: var(--warning-soft); border-color: transparent; color: var(--warning-text); }
.alert-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger-text); }
.banner { position: sticky; top: var(--header-h); z-index: 30; margin: 0 0 var(--s-4); }
.toast-area { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--bottomnav-h) + var(--s-4) + env(safe-area-inset-bottom)); z-index: var(--z-toast); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 768px) { .toast-area { bottom: var(--s-6); left: auto; right: var(--s-6); transform: none; } }
.toast { pointer-events: auto; box-shadow: var(--shadow-2); animation: toast-in var(--dur-slow) var(--ease); background: var(--surface); }
.toast.is-leaving { animation: toast-out 220ms var(--ease) forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

/* ---------- Rozet / çip ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; min-height: 22px; border-radius: var(--radius-full); font-size: 12px; font-weight: 600; letter-spacing: .01em; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge .icon { width: 13px; height: 13px; }
.badge-primary { background: var(--primary-soft); color: var(--primary-text); }
.badge-success { background: var(--success-soft); color: var(--success-text); }
.badge-warning { background: var(--warning-soft); color: var(--warning-text); }
.badge-danger { background: var(--danger-soft); color: var(--danger-text); }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); }
.badge-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-pulse::before { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-full); border: 1px solid var(--border-strong); font-size: 13px; color: var(--text-2); background: var(--surface); min-height: 32px; cursor: pointer; transition: background var(--dur) var(--ease), color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-text); }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--border); }
.table th { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); background: var(--surface-2); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; }
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--text); }
.table th[aria-sort="ascending"]::after { content: " ↑"; }
.table th[aria-sort="descending"]::after { content: " ↓"; }
/* Mobilde satırlar kart olur */
@media (max-width: 767px) {
  .table--cards thead { display: none; }
  .table--cards, .table--cards tbody, .table--cards tr, .table--cards td { display: block; width: 100%; }
  .table--cards tr { padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--border); }
  .table--cards tr:last-child { border-bottom: 0; }
  .table--cards td { border: 0; padding: 4px 0; display: flex; justify-content: space-between; gap: var(--s-3); align-items: center; text-align: left; }
  .table--cards td.num { text-align: right; }
  .table--cards td[data-label]::before { content: attr(data-label); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); flex: 0 0 auto; }
  .table--cards td.td-title { display: block; font-weight: 600; font-size: 15px; padding-bottom: 6px; }
  .table--cards td.td-actions { justify-content: flex-end; padding-top: 8px; }
  .table--cards td.td-actions::before { display: none; }
}

/* ---------- İlerleme / spinner / iskelet ---------- */
.progress { position: relative; height: 8px; border-radius: var(--radius-full); background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary-strong), var(--primary)); transition: width var(--dur-slow) var(--ease); }
.progress-lg { height: 12px; }
.progress--warn > span { background: linear-gradient(90deg, #b45309, var(--warning)); }
.progress--danger > span { background: linear-gradient(90deg, var(--danger-strong), var(--danger)); }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border-strong); border-top-color: var(--primary); animation: spin .8s linear infinite; flex: 0 0 auto; }
.spinner-sm { width: 16px; height: 16px; }
@keyframes spin { to { transform: rotate(360deg); } }
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline-flex; }
.loading-box { display: flex; align-items: center; justify-content: center; gap: 10px; padding: var(--s-8); color: var(--text-2); }
.skeleton { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm); min-height: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Boş durum ---------- */
.empty { text-align: center; padding: var(--s-10) var(--s-4); color: var(--text-2); }
.empty .icon-xl { margin: 0 auto var(--s-3); color: var(--text-3); }
.empty h3 { color: var(--text); margin-bottom: var(--s-1); }

/* ---------- Anahtar-değer listesi ---------- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }

/* ---------- Kota çubuğu ---------- */
.quota { display: grid; gap: 8px; }
.quota__meta { display: flex; justify-content: space-between; font-size: 14px; }

/* ---------- Giriş ---------- */
.auth { min-height: calc(100dvh - var(--header-h)); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--s-6) var(--s-4) calc(var(--s-6) + env(safe-area-inset-bottom)); }
.auth > #hx-errors:empty { display: none; }
.auth__card { width: 100%; max-width: 400px; }
.auth__brand { display: flex; flex-direction: column; align-items: center; gap: var(--s-3); margin-bottom: var(--s-6); text-align: center; }
.auth__brand .brand__mark { width: 52px; height: 52px; border-radius: 14px; }
.auth__brand .brand__mark .icon { width: 28px; height: 28px; }

/* ---------- Film kartları ---------- */
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: var(--s-3); }
@media (min-width: 768px) { .poster-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: var(--s-4); } }
.movie-card { display: block; position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); color: var(--text); transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease); }
.movie-card:hover { text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.movie-card .poster { aspect-ratio: 2 / 3; height: auto; background: var(--surface-2); object-fit: cover; width: 100%; }
.movie-card .poster--empty { display: grid; place-items: center; color: var(--text-3); }
.movie-card__body { padding: 10px 12px 12px; }
.movie-card__title { font-weight: 600; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.movie-card__meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.movie-card__flag { position: absolute; top: 8px; left: 8px; box-shadow: var(--shadow-1); backdrop-filter: blur(6px); }

.movie-hero { display: grid; grid-template-columns: 1fr; gap: var(--s-4); }
@media (min-width: 640px) { .movie-hero { grid-template-columns: 180px 1fr; gap: var(--s-6); } }
.movie-hero .poster { width: 140px; height: auto; border-radius: var(--radius); aspect-ratio: 2 / 3; object-fit: cover; background: var(--surface-2); }
.movie-hero .poster--empty { display: grid; place-items: center; color: var(--text-3); }
@media (min-width: 640px) { .movie-hero .poster { width: 100%; } }

/* ---------- Release tablosu ---------- */
.release-title { font-weight: 500; overflow-wrap: anywhere; }
.release-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-bottom: var(--s-3); }
.toolbar .input, .toolbar .select { width: auto; min-width: 140px; }
.score-pos, .success-text { color: var(--success-text); }
.score-neg { color: var(--danger-text); }
.hint-list { margin: 4px 0 0; padding: 0; list-style: none; font-size: 12px; color: var(--warning-text); }

/* ---------- Durum satırları (indirmeler) ---------- */
.dl-item { display: grid; gap: 8px; padding: var(--s-4); border-bottom: 1px solid var(--border); }
.dl-item:last-child { border-bottom: 0; }
.dl-item__head { display: flex; justify-content: space-between; gap: var(--s-3); align-items: flex-start; }
.dl-item__stats { display: flex; flex-wrap: wrap; gap: var(--s-3); font-size: 13px; color: var(--text-2); }

/* ---------- Detay / açılır ---------- */
details.disclosure > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 6px; min-height: 44px; color: var(--text-2); font-weight: 500; }
details.disclosure > summary::-webkit-details-marker { display: none; }
details.disclosure[open] > summary .chev { transform: rotate(180deg); }
.chev { transition: transform var(--dur) var(--ease); }

/* ---------- Tema geçişi ---------- */
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- HTMX geçişleri ---------- */
.htmx-swapping { opacity: 0; transition: opacity 120ms ease-in; }
.htmx-settling { animation: fade-in var(--dur) var(--ease); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fade-in var(--dur-slow) var(--ease); }
