/*
  Ketaks ortak stilleri (genel site, takip sayfası ve admin paneli) — tasarım belgesi: docs/TASARIM.md.
  Geist / Geist Mono; gece yeşili + marka yeşili + küpe sarısı; ince çizgiler, yumuşak köşeler, hap düğmeler.
  Ölçüler rem tabanlı; 4K'ya kadar ölçeklenir.
*/
:root {
  /* Zemin ve yüzey */
  --bg: #FAFAF7;
  --bg-subtle: #F3F2EC;
  --surface: #FFFFFF;
  --surface-2: #F7F7F3;
  --line: #E9E7E0;
  --line-strong: #D9D6CC;
  /* Yazı */
  --ink: #0B120D;
  --ink-2: #2C3A31;
  --muted: #5D6A62;
  --faint: #8A958E;
  /* Gece (koyu bölümler) */
  --night: #050B07;
  --night-2: #0A1610;
  --night-3: #10221A;
  --night-line: rgba(255, 255, 255, 0.08);
  --night-text: #E7EFE9;
  --night-muted: #93A699;
  /* Marka */
  --brand: #15803D;
  --brand-hover: #166534;
  --brand-soft: #E8F5EC;
  --brand-line: #BFE3CB;
  --mint: #4ADE80;
  --tag: #F5C542;
  --tag-top: #FAD86A;
  --tag-ink: #0B120D;
  /* Durumlar */
  --green: #15803D;
  --green-bg: #E8F5EC;
  --amber: #B45309;
  --amber-bg: #FEF3C7;
  --red: #DC2626;
  --red-live: #E5484D;
  --red-bg: #FDECEC;
  --violet: #6D4AE8;
  --violet-bg: #F1EEFF;
  --gray-bg: #F0EFEA;
  /* Açık zemindeki küçük durum yazıları (rozet): en az 4,5:1 kontrast için biraz koyu tonlar */
  --green-ink: #14783A;
  --red-ink: #C9363B;
  --violet-ink: #6243E0;
  /* Eski adlar (admin görünümleri) */
  --primary: var(--brand);
  --primary-dark: var(--brand-hover);
  --soft: var(--brand-soft);
  --navy: var(--night-2);
  --navy-2: var(--night-3);
  --navy-ink: var(--night-muted);
  --purple: var(--violet);
  --purple-bg: var(--violet-bg);
  /* Biçim */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;
  --radius: var(--r-lg);
  --radius-sm: var(--r-md);
  --shadow: 0 1px 2px rgba(11, 18, 13, 0.04);
  --shadow-md: 0 1px 2px rgba(11, 18, 13, 0.04), 0 12px 32px -12px rgba(11, 18, 13, 0.14);
  --shadow-lg: 0 1px 2px rgba(11, 18, 13, 0.04), 0 32px 64px -24px rgba(11, 18, 13, 0.28);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Yazı tipleri */
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', 'Cascadia Mono', Consolas, monospace;
  --font-tag: 'Barlow Condensed', 'Geist', sans-serif;
  --font-head: var(--font);
}

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (min-width: 1920px) { html { font-size: 17px; } }
@media (min-width: 2560px) { html { font-size: 20px; } }
@media (min-width: 3200px) { html { font-size: 24px; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink-2); font-family: var(--font); font-size: 0.9375rem; line-height: 1.55; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); text-decoration: underline; text-underline-offset: 0.2em; }
h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -0.025em; font-weight: 700; }
h1 { font-size: 1.875rem; letter-spacing: -0.035em; }
h2 { font-size: 1.1875rem; }
h3 { font-size: 1rem; }
p { margin: 0; }
code, .mono { font-family: var(--font-mono); font-size: 0.875em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(74, 222, 128, 0.35); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }

/* ---------- Küpe numarası (imza) ---------- */
.tag { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 2.35em; padding: 0.74em 0.45em 0.3em; background: linear-gradient(180deg, var(--tag-top), var(--tag)); color: var(--tag-ink); font-family: var(--font-tag); font-weight: 800; font-size: 1.125rem; line-height: 1; letter-spacing: 0; border-radius: 0.75em 0.75em 0.45em 0.45em; font-variant-numeric: tabular-nums; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.45); flex: none; }
.tag::before { content: ""; position: absolute; top: 0.22em; left: 50%; width: 0.3em; height: 0.3em; margin-left: -0.15em; border-radius: 50%; background: var(--tag-hole, var(--bg)); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.2); }
.tag-sm { font-size: 0.9375rem; padding: 0.66em 0.4em 0.26em; }
.tag-sm::before { top: 0.17em; width: 0.26em; height: 0.26em; margin-left: -0.13em; }
.tag-lg { font-size: 1.5rem; }
.tag-xl { font-size: 3rem; }

/* ---------- Admin kabuğu ---------- */
.shell { min-height: 100vh; display: flex; }
.side { width: 16rem; flex: 0 0 16rem; background: var(--night-2); background-image: radial-gradient(28rem 20rem at 0% 0%, rgba(74, 222, 128, 0.14), transparent 60%); color: var(--night-text); padding: 1.25rem 0.875rem; display: flex; flex-direction: column; gap: 1.5rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--night-line); }
.brand { display: flex; align-items: center; gap: 0.625rem; padding: 0 0.5rem; color: #FFF; }
.brand:hover { color: #FFF; text-decoration: none; }
.brand-mark { width: 2.25rem; height: 2.25rem; display: flex; align-items: center; justify-content: center; flex: none; }
.brand-mark img { width: 100%; height: 100%; display: block; }
.brand-name { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.05em; line-height: 1; }
.brand-name .taks { color: var(--mint); }
.brand-tag { font-family: var(--font-mono); font-size: 0.625rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--tag-ink); background: var(--tag); border-radius: var(--r-full); padding: 0.1875rem 0.5rem; }
.nav { display: flex; flex-direction: column; gap: 0.125rem; }
.nav-label { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: #6F8577; padding: 0.875rem 0.75rem 0.375rem; }
.nav a { display: flex; align-items: center; gap: 0.75rem; padding: 0.5625rem 0.75rem; border-radius: var(--r-sm); color: #C3D2C8; font-weight: 500; transition: background 0.15s, color 0.15s; }
.nav a svg { flex: none; opacity: 0.8; }
.nav a:hover { background: rgba(255, 255, 255, 0.05); color: #FFF; text-decoration: none; }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.08); color: #FFF; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.nav a[aria-current="page"] svg { color: var(--mint); opacity: 1; }
.nav a .count { margin-left: auto; font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 600; color: var(--tag-ink); background: var(--tag); padding: 0.0625rem 0.4375rem; border-radius: var(--r-full); }
.side-foot { margin-top: auto; display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 0.5rem 0; border-top: 1px solid var(--night-line); }
.side-foot .who { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.side-foot .who strong { font-size: 0.875rem; color: #FFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot .who span { font-size: 0.75rem; color: var(--night-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-foot form { margin: 0; }
.icon-btn { width: 2.25rem; height: 2.25rem; border-radius: var(--r-full); border: 0; background: rgba(255, 255, 255, 0.07); color: #FFF; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: background 0.15s; }
.icon-btn:hover { background: rgba(255, 255, 255, 0.14); }
.avatar { width: 2.25rem; height: 2.25rem; border-radius: var(--r-full); background: linear-gradient(135deg, #25A85B, #0E6431); color: #FFF; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; flex: none; }
.avatar.sm { width: 1.75rem; height: 1.75rem; font-size: 0.625rem; }

.main { flex: 1; min-width: 0; padding: 2rem clamp(1rem, 2.5vw, 3rem) 3rem; display: flex; flex-direction: column; gap: 1.5rem; max-width: 120rem; }
.topbar { display: none; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.page-head .titles { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; }
.page-head h1 { font-size: 2rem; letter-spacing: -0.04em; }
.page-head .sub { color: var(--muted); }
.crumbs { font-family: var(--font-mono); font-size: 0.75rem; color: var(--faint); letter-spacing: 0.02em; }
.crumbs a { color: var(--faint); }
.actions { display: flex; flex-wrap: wrap; gap: 0.625rem; align-items: center; }

@media (max-width: 900px) {
  .shell { flex-direction: column; }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--night-2); color: #FFF; padding: 0.75rem 1rem; position: sticky; top: 0; z-index: 20; }
  .side { display: none; position: fixed; inset: 3.75rem 0 0 0; width: auto; height: auto; z-index: 19; }
  body[data-menu="open"] .side { display: flex; }
  .side > .brand { display: none; }
  .main { padding-top: 1.25rem; }
  h1 { font-size: 1.5rem; }
}

/* ---------- Kartlar ve ızgaralar ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.375rem; display: flex; flex-direction: column; gap: 1rem; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.card-head h2 { font-size: 1.0625rem; letter-spacing: -0.02em; }
.card-head .hint { font-size: 0.8125rem; color: var(--muted); }
.card.flush { padding: 0; gap: 0; overflow: hidden; }
.card.flush > .card-head { padding: 1.125rem 1.375rem; border-bottom: 1px solid var(--line); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr)); gap: 1.5rem; align-items: start; }
.cols { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: flex-start; }
.cols > .grow { flex: 999 1 34rem; min-width: 0; display: flex; flex-direction: column; gap: 1.5rem; }
.cols > .aside { flex: 1 1 22rem; min-width: 0; display: flex; flex-direction: column; gap: 1.5rem; }

.stat { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem 1.375rem; display: flex; flex-direction: column; gap: 0.375rem; box-shadow: var(--shadow); }
.stat .label { font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); }
.stat .value { font-family: var(--font-mono); font-size: 2rem; font-weight: 600; line-height: 1.1; letter-spacing: -0.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat .note { font-size: 0.8125rem; color: var(--muted); }
.stat.dark { background: var(--night-2); border-color: var(--night-2); color: #FFF; background-image: radial-gradient(20rem 12rem at 100% 0%, rgba(74, 222, 128, 0.16), transparent 60%); }
.stat.dark .value { color: #FFF; }
.stat.dark .label, .stat.dark .note { color: var(--night-muted); }
.stat .value.amber { color: var(--amber); }
.stat .value.red { color: var(--red); }
.stat .value.green { color: var(--green); }
a.stat { color: inherit; transition: border-color 0.15s, box-shadow 0.2s var(--ease), transform 0.2s var(--ease); }
a.stat:hover { text-decoration: none; border-color: var(--brand-line); box-shadow: var(--shadow-md); transform: translateY(-1px); }

.bar { height: 0.5rem; border-radius: var(--r-full); background: var(--gray-bg); overflow: hidden; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #25A85B); border-radius: var(--r-full); }
.bars { display: flex; flex-direction: column; gap: 0.75rem; }
.bars .row { display: grid; grid-template-columns: minmax(6rem, 10rem) 1fr auto; gap: 0.75rem; align-items: center; font-size: 0.875rem; }
.bars .row b { font-family: var(--font-mono); font-weight: 600; }

/* ---------- Rozetler ---------- */
.badge { display: inline-flex; align-items: center; gap: 0.375rem; font-size: 0.75rem; font-weight: 600; padding: 0.1875rem 0.625rem; border-radius: var(--r-full); white-space: nowrap; border: 1px solid transparent; }
.badge-green { color: var(--green-ink); background: var(--green-bg); border-color: #CFEBD8; }
.badge-amber { color: var(--amber); background: var(--amber-bg); border-color: #FBE3A1; }
.badge-red { color: var(--red-ink); background: var(--red-bg); border-color: #F8CFCF; }
.badge-purple { color: var(--violet-ink); background: var(--violet-bg); border-color: #DCD3FD; }
.badge-blue { color: var(--brand-hover); background: var(--brand-soft); border-color: var(--brand-line); }
.badge-gray { color: var(--muted); background: var(--gray-bg); border-color: var(--line); }
.badge-dark { color: #FFFFFF; background: var(--ink); }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th { text-align: left; font-family: var(--font-mono); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
td { padding: 0.875rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 0.12s; }
tbody tr:hover td { background: #FBFBF8; }
td .primary-text { font-weight: 600; color: var(--ink); }
td .secondary-text { font-size: 0.8125rem; color: var(--muted); }
td.num, th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
td.nowrap { white-space: nowrap; }
.row-link { color: inherit; display: flex; flex-direction: column; }
.row-link:hover { text-decoration: none; }
.row-link:hover .primary-text { color: var(--brand); }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.empty strong { color: var(--ink); }

/* Tanım listesi */
.facts { display: grid; grid-template-columns: minmax(8rem, max-content) 1fr; gap: 0.625rem 1.25rem; margin: 0; font-size: 0.875rem; }
.facts dt { color: var(--muted); font-weight: 500; }
.facts dd { margin: 0; font-weight: 600; color: var(--ink); min-width: 0; overflow-wrap: anywhere; }

/* ---------- Düğmeler ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; height: 2.75rem; padding: 0 1.25rem; border-radius: var(--r-full); border: 1px solid transparent; font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.01em; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background 0.15s, box-shadow 0.2s var(--ease), border-color 0.15s, transform 0.2s var(--ease), color 0.15s; }
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--brand); color: #FFF; box-shadow: 0 1px 2px rgba(11, 18, 13, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 8px 20px -8px rgba(21, 128, 61, 0.55); }
.btn-primary:hover { background: var(--brand-hover); color: #FFF; box-shadow: 0 1px 2px rgba(11, 18, 13, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 12px 28px -10px rgba(21, 128, 61, 0.6); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow); }
.btn-ghost:hover { border-color: #BDB8AA; color: var(--ink); background: #FFF; }
.btn-dark { background: var(--ink); color: #FFF; }
.btn-dark:hover { background: #1B261F; color: #FFF; }
.btn-white { background: #FFF; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 10px 30px -10px rgba(255, 255, 255, 0.35); }
.btn-white:hover { background: #F2F5F3; color: var(--ink); }
.btn-glass { background: rgba(255, 255, 255, 0.06); color: #FFF; border-color: rgba(255, 255, 255, 0.14); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.btn-glass:hover { background: rgba(255, 255, 255, 0.12); color: #FFF; }
.btn-soft { background: var(--brand-soft); color: var(--brand-hover); }
.btn-soft:hover { background: #D7EEDF; color: var(--brand-hover); }
.btn-danger { background: var(--red-bg); color: var(--red); }
.btn-danger:hover { background: #FBD9D9; color: var(--red); }
.btn-success { background: var(--green); color: #FFF; }
.btn-success:hover { background: var(--brand-hover); color: #FFF; }
.btn-sm { height: 2.125rem; padding: 0 0.875rem; font-size: 0.8125rem; }
.btn-lg { height: 3.25rem; padding: 0 1.625rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn .arrow { transition: transform 0.2s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.link-btn { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.inline-form { display: inline; margin: 0; }

/* ---------- Formlar ---------- */
.form { display: flex; flex-direction: column; gap: 1rem; }
.form-grid { display: grid; gap: 1rem 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.field { display: flex; flex-direction: column; gap: 0.375rem; min-width: 0; }
.field.span-all { grid-column: 1 / -1; }
.field > label, .field > .label { font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.field .help { font-size: 0.8125rem; color: var(--faint); }
.input, .field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  width: 100%; min-height: 2.875rem; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); padding: 0.5rem 0.9375rem; font-size: 0.9375rem; color: var(--ink); box-shadow: inset 0 1px 1px rgba(11, 18, 13, 0.03); transition: border-color 0.15s, box-shadow 0.15s;
}
.field select { appearance: none; -webkit-appearance: none; padding-right: 2.5rem; 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='%235D6A62' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.875rem center; }
.field textarea { min-height: 6rem; resize: vertical; }
.input:hover, .field input:hover, .field select:hover, .field textarea:hover { border-color: #C6C1B4; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.14); }
.field input[readonly] { background: var(--surface-2); color: var(--muted); }
.check { display: flex; align-items: flex-start; gap: 0.625rem; font-weight: 500; cursor: pointer; font-size: 0.9375rem; }
.check input { width: 1.125rem; height: 1.125rem; margin: 0.1875rem 0 0; accent-color: var(--brand); flex: none; }
.check .help { display: block; font-weight: 400; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.875rem 0; border-bottom: 1px solid var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .text { display: flex; flex-direction: column; gap: 0.125rem; }
.switch-row .text strong { font-weight: 600; color: var(--ink); }
.switch-row .text span { font-size: 0.8125rem; color: var(--faint); }
.switch { position: relative; width: 2.75rem; height: 1.5rem; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: var(--r-full); background: #D6D3CA; transition: background 0.18s; }
.switch span::after { content: ""; position: absolute; top: 0.1875rem; left: 0.1875rem; width: 1.125rem; height: 1.125rem; border-radius: 50%; background: #FFF; box-shadow: 0 1px 3px rgba(11, 18, 13, 0.25); transition: transform 0.2s var(--ease); }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::after { transform: translateX(1.25rem); }
.switch input:focus-visible + span { box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.22); }
.form-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; }
.validation { background: var(--red-bg); color: var(--red); border: 1px solid #F8CFCF; border-radius: var(--r-md); padding: 0.75rem 1rem; font-weight: 500; font-size: 0.875rem; }
.validation ul { margin: 0; padding-left: 1.125rem; }
.validation:empty, .validation.validation-summary-valid { display: none; }
.filters { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.filters .field { flex: 1 1 12rem; }
.filters .field.search { flex: 3 1 18rem; }

/* ---------- Bildirim şeritleri ---------- */
.flash { border-radius: var(--r-md); padding: 0.875rem 1.125rem; font-weight: 600; display: flex; gap: 0.75rem; align-items: center; border: 1px solid transparent; }
.flash.ok { background: var(--green-bg); color: var(--green); border-color: #CFEBD8; }
.flash.err { background: var(--red-bg); color: var(--red); border-color: #F8CFCF; }
.notice { border-radius: var(--r-md); padding: 0.875rem 1.125rem; background: var(--brand-soft); color: #14532D; border: 1px solid var(--brand-line); font-size: 0.875rem; display: flex; flex-direction: column; gap: 0.25rem; }
.notice.amber { background: var(--amber-bg); color: #78350F; border-color: #FBE3A1; }
.notice.red { background: var(--red-bg); color: #7F1D1D; border-color: #F8CFCF; }
.charge-box { border: 1px solid #FBE3A1; background: #FFFBEB; border-radius: var(--r-md); padding: 1rem; display: flex; flex-direction: column; gap: 0.75rem; }
.charge-box.late { border-color: #F8CFCF; background: #FEF6F6; }
.charge-box .facts { margin: 0; }

/* ---------- Listeler ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 0.875rem; padding: 0.875rem 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list-item:last-child { border-bottom: 0; }
.list-item .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.125rem; }
.list-item .body strong { font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .body span { font-size: 0.8125rem; color: var(--muted); }
.timeline { position: relative; display: flex; flex-direction: column; gap: 0.875rem; }
.timeline .ev { display: flex; gap: 0.75rem; font-size: 0.875rem; }
.timeline .ev::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); margin-top: 0.4375rem; flex: none; }
.timeline .ev .meta { color: var(--faint); font-family: var(--font-mono); font-size: 0.75rem; }

/* Sekmeler (sayfa içi bağlantılar) */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.25rem; background: var(--gray-bg); border: 1px solid var(--line); border-radius: var(--r-full); }
.tabs a { padding: 0.4375rem 0.875rem; border-radius: var(--r-full); font-size: 0.8125rem; font-weight: 600; color: var(--muted); }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-md); }

details.more { border: 1px solid var(--line); border-radius: var(--r-md); padding: 0.75rem 1rem; background: var(--surface-2); }
details.more summary { cursor: pointer; font-weight: 600; }
details.more[open] summary { margin-bottom: 0.75rem; }

/* ---------- Giriş sayfaları ---------- */
.auth { position: relative; overflow: hidden; isolation: isolate; min-height: 100vh; display: grid; place-items: center; padding: 2rem 1rem; background: var(--night); }
.auth::before { content: ""; position: absolute; z-index: -1; inset: -20%; background: radial-gradient(36rem 28rem at 20% 10%, rgba(74, 222, 128, 0.22), transparent 60%), radial-gradient(30rem 24rem at 85% 90%, rgba(245, 197, 66, 0.14), transparent 60%); }
.auth::after { content: ""; position: absolute; z-index: -1; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%); mask-image: radial-gradient(ellipse at center, #000 10%, transparent 70%); }
.auth-card { width: min(100%, 27rem); background: var(--surface); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: var(--r-xl); padding: 2.25rem; display: flex; flex-direction: column; gap: 1.25rem; box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.6); }
.auth-card .brand { color: var(--ink); padding: 0; }
.auth-card .brand:hover { color: var(--ink); }
.auth-card .brand-name .taks { color: var(--brand); }
.auth-card h1 { font-size: 1.625rem; }
.auth-card .sub { color: var(--muted); font-size: 0.9375rem; }
.auth-card .btn-primary { border-radius: var(--r-full); }
.qr { align-self: center; width: 13rem; height: 13rem; border-radius: var(--r-md); border: 1px solid var(--line); padding: 0.5rem; background: #FFF; }
.secret { font-family: var(--font-mono); font-size: 1rem; letter-spacing: 0.06em; background: var(--surface-2); border: 1px dashed var(--line-strong); border-radius: var(--r-md); padding: 0.625rem 0.875rem; text-align: center; overflow-wrap: anywhere; }
.code-input { text-align: center; font-family: var(--font-mono); font-size: 1.5rem !important; letter-spacing: 0.4em; font-weight: 600; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 0.8125rem; }
.stack { display: flex; flex-direction: column; gap: 0.5rem; }
.row-gap { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.right { margin-left: auto; }
.mt-0 { margin-top: 0; }
.danger-zone { border-color: #F8CFCF; }
.swatch { width: 1rem; height: 1rem; border-radius: 50%; display: inline-block; vertical-align: middle; }
pre.mail { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 0.75rem; font-family: var(--font-mono); font-size: 0.8125rem; max-height: 20rem; overflow: auto; margin: 0; }

/* Destek yazışması */
.thread { display: flex; flex-direction: column; gap: 0.875rem; }
.msg { max-width: min(46rem, 92%); align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: 1.125rem 1.125rem 1.125rem 0.375rem; padding: 0.75rem 1rem; display: flex; flex-direction: column; gap: 0.375rem; }
.msg.mine { align-self: flex-end; background: var(--brand-soft); border-color: var(--brand-line); border-radius: 1.125rem 1.125rem 0.375rem 1.125rem; }
.msg-meta { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: baseline; font-size: 0.8125rem; }
.msg-meta span { color: var(--faint); font-family: var(--font-mono); font-size: 0.75rem; }
.msg-body { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9375rem; }

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