/* Punto Servis — Apple HIG tabanlı arayüz
   Renkler rol adıyla tanımlı; açık/koyu görünüm ve yüksek kontrast otomatik. */
:root {
  color-scheme: light dark;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", "Helvetica Neue", "Segoe UI", Inter, Roboto, Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", "Segoe UI", Inter, Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  /* Yüzeyler */
  --bg: #f2f2f7;                 /* systemGroupedBackground */
  --surface: #ffffff;            /* secondarySystemGroupedBackground */
  --surface-2: #f2f2f7;
  --sidebar: rgba(236, 236, 241, .78);
  --bar: rgba(242, 242, 247, .8);
  --hover: rgba(0, 0, 0, .045);
  --selected: rgba(0, 0, 0, .08);
  --fill: rgba(118, 118, 128, .12);   /* tertiarySystemFill */
  --fill-strong: rgba(118, 118, 128, .2);
  --separator: rgba(60, 60, 67, .18);
  --separator-strong: rgba(60, 60, 67, .29);
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 16px rgba(0, 0, 0, .04);
  --shadow-sheet: 0 20px 60px rgba(0, 0, 0, .28), 0 0 0 .5px rgba(0, 0, 0, .12);

  /* Metin — tümü beyaz zemin üzerinde ≥ 4.5:1 */
  --label: #1d1d1f;              /* 16.8:1 */
  --label-2: #6e6e73;            /* 5.1:1 */
  --label-3: #86868b;            /* yalnızca ikincil ipuçları, büyük metin */

  /* Vurgu: tek anlam — eylem / seçim */
  --accent: #0071e3;             /* beyaz üzerinde 4.6:1, üzerinde beyaz 4.6:1 */
  --accent-text: #0066cc;        /* 5.6:1 */
  --accent-tint: rgba(0, 113, 227, .12);
  --on-accent: #ffffff;

  /* Durum (renk + metin + simge birlikte; yalnız renge dayanmaz) */
  --gray: #6e6e73;  --gray-bg: rgba(118,118,128,.14);
  --blue: #0066cc;  --blue-bg: rgba(0,113,227,.12);
  --indigo: #4b48c9; --indigo-bg: rgba(88,86,214,.13);
  --orange: #a35200; --orange-bg: rgba(255,149,0,.16);
  --green: #1a7f37; --green-bg: rgba(52,199,89,.16);
  --red: #d70015;   --red-bg: rgba(255,59,48,.12);

  --input-bg: #ffffff;
  --seg-on: #ffffff;
  --scrim: rgba(0,0,0,.32);
  --logo: #000000;

  --radius: 12px;
  --radius-sm: 8px;
  --ctl-h: 34px;
  --sidebar-w: 248px;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --sidebar: rgba(30, 30, 32, .78);
    --bar: rgba(0, 0, 0, .72);
    --hover: rgba(255, 255, 255, .06);
    --selected: rgba(255, 255, 255, .1);
    --fill: rgba(118, 118, 128, .24);
    --fill-strong: rgba(118, 118, 128, .36);
    --separator: rgba(84, 84, 88, .55);
    --separator-strong: rgba(84, 84, 88, .8);
    --shadow: none;
    --shadow-sheet: 0 20px 60px rgba(0,0,0,.6), 0 0 0 .5px rgba(255,255,255,.12);
    --label: #f5f5f7;
    --label-2: #a1a1a6;            /* #1c1c1e üzerinde 6.4:1 */
    --label-3: #8d8d93;
    --accent: #0a84ff;
    --accent-text: #4aa3ff;        /* 6.3:1 */
    --accent-tint: rgba(10,132,255,.2);
    --gray: #a1a1a6;  --gray-bg: rgba(142,142,147,.22);
    --blue: #4aa3ff;  --blue-bg: rgba(10,132,255,.22);
    --indigo: #8e8cff; --indigo-bg: rgba(94,92,230,.26);
    --orange: #ffb340; --orange-bg: rgba(255,159,10,.2);
    --green: #4ade80; --green-bg: rgba(48,209,88,.2);
    --red: #ff6961;   --red-bg: rgba(255,69,58,.2);
    --input-bg: #2c2c2e;
    --seg-on: #636366;
    --scrim: rgba(0,0,0,.55);
    --logo: #ffffff;
    color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000;
    --surface: #1c1c1e;
    --surface-2: #2c2c2e;
    --sidebar: rgba(30, 30, 32, .78);
    --bar: rgba(0, 0, 0, .72);
    --hover: rgba(255, 255, 255, .06);
    --selected: rgba(255, 255, 255, .1);
    --fill: rgba(118, 118, 128, .24);
    --fill-strong: rgba(118, 118, 128, .36);
    --separator: rgba(84, 84, 88, .55);
    --separator-strong: rgba(84, 84, 88, .8);
    --shadow: none;
    --shadow-sheet: 0 20px 60px rgba(0,0,0,.6), 0 0 0 .5px rgba(255,255,255,.12);
    --label: #f5f5f7;
    --label-2: #a1a1a6;            /* #1c1c1e üzerinde 6.4:1 */
    --label-3: #8d8d93;
    --accent: #0a84ff;
    --accent-text: #4aa3ff;        /* 6.3:1 */
    --accent-tint: rgba(10,132,255,.2);
    --gray: #a1a1a6;  --gray-bg: rgba(142,142,147,.22);
    --blue: #4aa3ff;  --blue-bg: rgba(10,132,255,.22);
    --indigo: #8e8cff; --indigo-bg: rgba(94,92,230,.26);
    --orange: #ffb340; --orange-bg: rgba(255,159,10,.2);
    --green: #4ade80; --green-bg: rgba(48,209,88,.2);
    --red: #ff6961;   --red-bg: rgba(255,69,58,.2);
    --input-bg: #2c2c2e;
    --seg-on: #636366;
    --scrim: rgba(0,0,0,.55);
    --logo: #ffffff;
    color-scheme: dark;
  }
}
@media (prefers-contrast: more) {
  :root { --separator: rgba(60,60,67,.45); --label-2: #3a3a3c; --accent: #0050a8; --accent-text: #0050a8; }
}
@media (prefers-contrast: more) {
  :root[data-theme="dark"] { --separator: rgba(160,160,170,.7); --label-2: #d1d1d6; --accent: #409cff; --accent-text: #6cb4ff; }
}
@media (prefers-contrast: more) and (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --separator: rgba(160,160,170,.7); --label-2: #d1d1d6; --accent: #409cff; --accent-text: #6cb4ff; }
}
@media (pointer: coarse) { :root { --ctl-h: 44px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--label);
  font: 15px/1.4 var(--font); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 55%, transparent); outline-offset: 1px; border-radius: 6px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Kabuk ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 14px 10px 10px; background: var(--sidebar);
  -webkit-backdrop-filter: saturate(180%) blur(24px); backdrop-filter: saturate(180%) blur(24px);
  border-right: .5px solid var(--separator); overflow-y: auto; z-index: 20;
}
.logo { display: block; width: 92px; height: 40px; margin: 6px 8px 14px; background: var(--logo);
  -webkit-mask: url(/punto-logo.png) left center / contain no-repeat; mask: url(/punto-logo.png) left center / contain no-repeat; }
.auth .logo { width: 140px; height: 60px; margin: 4px auto 10px; -webkit-mask-position: center; mask-position: center; }
.search-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 32px; padding: 0 10px; margin-bottom: 8px;
  border: 0; border-radius: var(--radius-sm); background: var(--fill); color: var(--label-2); cursor: text; text-align: left; font-size: 14px;
}
.search-btn kbd { margin-left: auto; font: 12px var(--font); color: var(--label-3); }
.nav-group { margin-top: 10px; }
.nav-title { padding: 0 10px 4px; font-size: 11px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .04em; }
.nav a {
  display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: var(--radius-sm);
  color: var(--label); font-size: 14px; text-decoration: none;
}
.nav a svg.i { color: var(--accent-text); }
.nav a:hover { background: var(--hover); }
.nav a[aria-current="page"] { background: var(--selected); font-weight: 600; }
.nav a .count { margin-left: auto; font-size: 13px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.nav a.primary-nav { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.nav a.primary-nav svg.i { color: var(--on-accent); }
.nav a.primary-nav:hover { filter: brightness(1.06); }
.nav a.primary-nav[aria-current="page"] { box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.sidebar-foot { margin-top: auto; padding-top: 10px; border-top: .5px solid var(--separator); }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--label); }
.me:hover { background: var(--hover); text-decoration: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(180deg, #a1a1a6, #7c7c80); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }
.me b { font-size: 13px; display: block; }
.me small { font-size: 12px; color: var(--label-2); }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 10; display: none; align-items: center; gap: 8px; height: 52px; padding: 0 12px;
  background: var(--bar); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--separator);
}
.topbar .title { font-weight: 600; font-size: 17px; }
.content { max-width: 1120px; margin: 0 auto; padding: 28px 32px 64px; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head h1 { margin: 0; font: 700 30px/1.15 var(--font-display); letter-spacing: -.025em; }
.page-head .sub { color: var(--label-2); margin-top: 4px; font-size: 15px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 2px; font-size: 15px; margin-bottom: 8px; color: var(--accent-text); }
.back svg.i { width: 16px; height: 16px; }

/* ---------- Kartlar / gruplar ---------- */
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card, .section + .section { margin-top: 20px; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 0 4px 8px; font-size: 13px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: .03em; }
.section-title .actions { margin-left: auto; display: flex; gap: 6px; text-transform: none; letter-spacing: -.01em; }
.card-pad { padding: 16px 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-2 > .section + .section { margin-top: 0; }

/* Satırlı liste (inset grouped) */
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 16px; position: relative; }
.row + .row::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--separator); }
.row .k { color: var(--label-2); flex: 0 0 150px; font-size: 14px; }
.rows.wide-k .row .k { flex-basis: 250px; }
.row .k small { font-size: 12px; }
.row .v { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.row .v.mono { font-family: var(--mono); font-size: 14px; letter-spacing: 0; }
.row .trail { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.empty { padding: 28px 16px; text-align: center; color: var(--label-2); }
.empty b { display: block; color: var(--label); font-size: 16px; margin-bottom: 4px; }

/* Tablo listeleri */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--label-2); padding: 10px 16px 8px; border-bottom: .5px solid var(--separator); white-space: nowrap; }
.table td { padding: 11px 16px; border-bottom: .5px solid var(--separator); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.link { cursor: pointer; }
.table tbody tr.link:hover td { background: var(--hover); }
.table tbody tr.link:first-child:hover td:first-child { border-top-left-radius: 0; }
.table .num { font-variant-numeric: tabular-nums; color: var(--label-2); white-space: nowrap; }
.table .mono { font-family: var(--mono); font-size: 13.5px; letter-spacing: 0; }
.table .strong { font-weight: 600; }
.table .chev { width: 28px; color: var(--label-3); text-align: right; }
.table .r { text-align: right; }
.table td.muted { color: var(--label-2); }

/* Durum rozeti */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.gray { color: var(--gray); background: var(--gray-bg); }
.pill.blue { color: var(--blue); background: var(--blue-bg); }
.pill.indigo { color: var(--indigo); background: var(--indigo-bg); }
.pill.orange { color: var(--orange); background: var(--orange-bg); }
.pill.green { color: var(--green); background: var(--green-bg); }
.pill.red { color: var(--red); background: var(--red-bg); }
.pill.lg { font-size: 15px; padding: 5px 14px 5px 11px; }

/* ---------- Kontroller ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: var(--ctl-h); padding: 0 14px;
  border: 0; border-radius: var(--radius-sm); background: var(--fill); color: var(--label);
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: filter .12s, background .12s;
}
.btn:hover { background: var(--fill-strong); text-decoration: none; }
.btn:active { filter: brightness(.94); }
.btn svg.i { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn.primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn.tinted { background: var(--accent-tint); color: var(--accent-text); font-weight: 600; }
.btn.danger { color: var(--red); }
.btn.danger-fill { background: var(--red); color: #fff; font-weight: 600; }
.btn.plain { background: transparent; color: var(--accent-text); padding: 0 8px; }
.btn.plain:hover { background: var(--hover); }
.btn.plain.danger { color: var(--red); }
.field > .seg { justify-self: start; }
.btn.icon { width: var(--ctl-h); padding: 0; }
.btn.lg { height: 44px; padding: 0 22px; font-size: 16px; border-radius: 10px; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 13px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

.field { display: grid; gap: 6px; }
.field > label, .field > .label { font-size: 13px; font-weight: 600; color: var(--label-2); }
.field .req { color: var(--red); margin-left: 2px; }
.hint, .field .hint { font-size: 13px; color: var(--label-2); }
.input, select.input, textarea.input {
  width: 100%; min-height: var(--ctl-h); padding: 7px 11px; border: .5px solid var(--separator-strong);
  border-radius: var(--radius-sm); background: var(--input-bg); color: var(--label); font-size: 15px; outline: none;
  transition: box-shadow .12s, border-color .12s;
}
.input::placeholder { color: var(--label-3); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--accent) 28%, transparent); }
textarea.input { resize: vertical; min-height: 84px; line-height: 1.45; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10l5-5 5 5M7 14l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.input.upper { text-transform: uppercase; font-family: var(--mono); letter-spacing: .02em; }
.input.upper::placeholder { text-transform: none; font-family: var(--font); letter-spacing: -.01em; }
.input.lgx { font-size: 17px; min-height: 44px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; align-items: start; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 4px; }

/* Segmented control */
.seg { display: inline-flex; padding: 2px; border-radius: 9px; background: var(--fill); gap: 2px; }
.seg button { border: 0; background: transparent; height: calc(var(--ctl-h) - 4px); padding: 0 14px; border-radius: 7px; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--label); }
.seg button[aria-pressed="true"] { background: var(--seg-on); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px rgba(0,0,0,.04); font-weight: 600; }

/* Uyarı bandı */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.banner svg.i { margin-top: 1px; }
.banner b { display: block; }
.banner.red { background: var(--red-bg); color: var(--red); }
.banner.red .t { color: var(--label); }
.banner.blue { background: var(--blue-bg); }
.banner.blue svg.i { color: var(--blue); }
.banner.green { background: var(--green-bg); }
.banner.green svg.i { color: var(--green); }
.banner .actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; }

/* Araç çubuğu */
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.search-field { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search-field svg.i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--label-2); }
.search-field .input { padding-left: 33px; background: var(--fill); border-color: transparent; }
.search-field .input:focus { background: var(--surface); }
.toolbar .spacer { flex: 1; }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-top: .5px solid var(--separator); color: var(--label-2); font-size: 13px; gap: 10px; }

/* Bilgi şeridi (onarım detayı) */
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.fact { padding: 14px 18px; position: relative; }
.fact + .fact::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; border-left: .5px solid var(--separator); }
.fact .k { font-size: 12px; color: var(--label-2); font-weight: 500; }
.fact .v { font-size: 16px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; }
.fact .v a { font-weight: 500; font-size: 13px; margin-left: 4px; }

/* Müşteri seçici sonuçları */
.picker { border: .5px solid var(--separator-strong); border-radius: 10px; overflow: hidden; max-height: 280px; overflow-y: auto; background: var(--surface); }
.picker button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 12px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.picker button + button { border-top: .5px solid var(--separator); }
.picker button:hover, .picker button:focus-visible { background: var(--hover); outline: none; }
.picker .meta { margin-left: auto; color: var(--label-2); font-size: 13px; white-space: nowrap; }
.chosen { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: var(--accent-tint); }
.chosen b { display: block; }
.chosen small { color: var(--label-2); font-size: 13px; }
.chosen .btn { margin-left: auto; }

/* Fotoğraflar */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; padding: 14px 16px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--fill); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: 0; transition: opacity .12s; }
.thumb:hover button, .thumb button:focus-visible { opacity: 1; }
.thumb button svg.i { width: 14px; height: 14px; }
@media (pointer: coarse) { .thumb button { opacity: 1; } }

/* Not akışı */
.note { padding: 12px 16px; position: relative; }
.note + .note::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; border-top: .5px solid var(--separator); }
.note .meta { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--label-2); margin-bottom: 3px; }
.note .meta .btn { margin-left: auto; }
.note p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.composer { display: flex; gap: 8px; padding: 12px 16px; border-top: .5px solid var(--separator); align-items: flex-end; }
.composer textarea { min-height: 38px; height: 38px; }

/* Toplamlar */
.totals { display: grid; grid-template-columns: auto auto; justify-content: end; gap: 4px 28px; padding: 12px 16px 14px; border-top: .5px solid var(--separator); font-variant-numeric: tabular-nums; }
.totals .k { color: var(--label-2); text-align: right; }
.totals .v { text-align: right; min-width: 110px; }
.totals .grand { font-weight: 700; font-size: 17px; color: var(--label); }

/* ---------- Sayfa (sheet) / iletişim kutusu ---------- */
.scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 100; display: grid; place-items: center; padding: 24px; animation: fade .18s ease-out; }
.sheet { width: min(560px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-sheet); animation: rise .22s cubic-bezier(.2,.9,.3,1.1); }
.sheet.wide { width: min(780px, 100%); }
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 12px 14px; border-bottom: .5px solid var(--separator); gap: 8px; }
.sheet-head h2 { margin: 0; font-size: 17px; font-weight: 600; text-align: center; }
.sheet-head .l { justify-self: start; } .sheet-head .r { justify-self: end; }
.sheet-body { padding: 18px; overflow-y: auto; display: grid; gap: 16px; }
.sheet-body p { margin: 0; }
.alert { width: min(320px, 100%); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-sheet); text-align: center; overflow: hidden; animation: rise .2s ease-out; }
.alert .t { padding: 20px 18px 16px; }
.alert h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.alert p { margin: 0; font-size: 14px; color: var(--label-2); }
.alert .acts { display: grid; grid-template-columns: 1fr 1fr; border-top: .5px solid var(--separator); }
.alert .acts button { height: 46px; border: 0; background: transparent; font-size: 16px; color: var(--accent-text); cursor: pointer; }
.alert .acts button + button { border-left: .5px solid var(--separator); font-weight: 600; }
.alert .acts button.destructive { color: var(--red); }
.alert .acts button:hover { background: var(--hover); }
.radio-list { display: grid; gap: 2px; }
.radio-list label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 9px; cursor: pointer; }
.radio-list label:hover { background: var(--hover); }
.radio-list input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; }
.radio-list label:has(input:checked) { background: var(--accent-tint); }

/* Bildirim (toast) */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; justify-items: center; pointer-events: none; }
.toast { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-radius: 12px; background: rgba(40,40,42,.92); color: #fff; font-size: 14px; font-weight: 500; box-shadow: 0 8px 30px rgba(0,0,0,.25); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); animation: rise .2s ease-out; pointer-events: auto; }
.toast.err { background: rgba(215,0,21,.95); }
.toast svg.i { width: 16px; height: 16px; }

/* Arama paleti */
.palette { width: min(640px, 100%); align-self: start; margin-top: 10vh; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-sheet); overflow: hidden; animation: rise .18s ease-out; }
.palette .search-field { max-width: none; margin: 0; }
.palette .search-field .input { height: 52px; font-size: 18px; border: 0; border-radius: 0; background: transparent; padding-left: 44px; box-shadow: none; border-bottom: .5px solid var(--separator); }
.palette .search-field svg.i { left: 16px; width: 20px; height: 20px; }
.palette .results { max-height: 60vh; overflow-y: auto; padding: 6px; }
.palette .group { padding: 8px 10px 4px; font-size: 12px; font-weight: 600; color: var(--label-2); }
.palette a { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 8px; color: var(--label); }
.palette a:hover, .palette a.active { background: var(--accent); color: var(--on-accent); text-decoration: none; }
.palette a:hover .meta, .palette a.active .meta, .palette a.active .pill, .palette a:hover .pill { color: var(--on-accent); background: rgba(255,255,255,.2); }
.palette a .meta { margin-left: auto; color: var(--label-2); font-size: 13px; }
.palette .hint { padding: 18px; color: var(--label-2); text-align: center; font-size: 14px; }

/* Giriş */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth .card { width: min(380px, 100%); padding: 28px 26px 24px; display: grid; gap: 14px; }
.auth h1 { margin: 0; text-align: center; font: 700 24px/1.2 var(--font-display); letter-spacing: -.02em; }
.auth p { margin: 0; text-align: center; color: var(--label-2); font-size: 14px; }
.auth .err { color: var(--red); font-size: 14px; text-align: center; min-height: 20px; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media (prefers-reduced-transparency: reduce) { .sidebar, .topbar, .toast { -webkit-backdrop-filter: none; backdrop-filter: none; } .sidebar { background: var(--surface-2); } }

/* ---------- Duyarlı yerleşim ---------- */
@media (max-width: 980px) {
  .grid-2 { grid-template-columns: 1fr; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3)::before { display: none; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--shadow-sheet); background: var(--surface); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.3); z-index: 15; }
  .topbar { display: flex; }
  .content { padding: 18px 14px 60px; }
  .page-head h1 { font-size: 26px; }
  .form-grid { grid-template-columns: 1fr; }
  .row { flex-wrap: wrap; } .row .k, .rows.wide-k .row .k { flex-basis: 100%; font-size: 13px; }
  .table.resp thead { display: none; }
  .table.resp tr { display: grid; grid-template-columns: 1fr auto; padding: 10px 16px; border-bottom: .5px solid var(--separator); gap: 2px 10px; }
  .table.resp tbody tr:last-child { border-bottom: 0; }
  .table.resp td { padding: 0; border: 0; }
  .table.resp td[data-c="hide"] { display: none; }
  .table.resp td.chev { display: none; }
  .sheet-body { padding: 14px; }
}
@media print { .sidebar, .topbar, .toolbar, .actions { display: none !important; } .app { display: block; } }

/* Yönetim paneli */
a.fact { display: block; border-radius: var(--radius); }
a.fact[href]:hover { background: var(--hover); }
@media (max-width: 820px) { .card.facts[style] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
