/* ════════════════════════════════════════════════════════════
   LOTDEFTERİ — "Sade arayüz" tasarım sistemi (2026-11)
   Ayrıntı ve kurallar: TASARIM-SISTEMI.md (depo kökü)

   Katmanlar:
     1. Yazı tipleri ve ikon yazı tipi (depoda barındırılır, CDN yok)
     2. Jetonlar (:root) ve eski jeton adlarının yeni jetonlara bağlanması
     3. Temel, iskelet (yan menü, üst çubuk), ortak bileşenler
     4. Ekrana özgü bileşenler (mal kabul, izleme, denetim modu, SKT panosu …)
     5. Kabuksuz sayfalar (giriş, belge doğrulama, KVKK, tanıtım)

   Önceki "Technical Editorial" dili (krem zemin, sıfır köşe, mono büyük harf etiketler,
   koyu yeşil yan menü, siyah çizgiler) Kasım 2026'da emekliye ayrıldı.
   Kapsam dışı: PDF belgeleri (QuestPDF, PdfTheme) kendi kimliğini korur.
   ════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════
   KENDİNDE BARINDIRILAN YAZI TİPLERİ (OFL 1.1)
   🔴 Google Fonts ya da başka bir CDN KULLANILMAZ: depoda internet olmayabilir ve
   ziyaretçinin IP adresi üçüncü tarafa gitmemelidir. Kesimler PDF ile paylaşılır
   (wwwroot/fonts/pdf); lisans aynı klasörde OFL-IBMPlex.txt.
   Arayüz tek aile kullanır: IBM Plex Sans. IBM Plex Mono yalnız kod benzeri değerlerde
   (parti numarası, doğrulama kodu, barkod). Archivo artık yalnız PDF'lerde kullanılır.
   ════════════════════════════════════════════════════════════ */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/pdf/IBMPlexSans-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/pdf/IBMPlexSans-Italic.ttf') format('truetype');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/pdf/IBMPlexSans-Medium.ttf') format('truetype');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/pdf/IBMPlexSans-SemiBold.ttf') format('truetype');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/pdf/IBMPlexSans-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/pdf/IBMPlexMono-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/pdf/IBMPlexMono-Medium.ttf') format('truetype');
}

/* ════════════════════════════════════════════════════════════
   MATERIAL SYMBOLS OUTLINED — ikon yazı tipi (Apache-2.0)
   🔴 CDN YOK. Kesim yalnız FİİLEN KULLANILAN ikonlarla alt kümelenmiştir (132 KB).
   Yeni bir ikon eklenirse alt küme YENİDEN üretilmelidir, yoksa ikon boş kare görünür.
   font-display: block → swap DEĞİL: ikon yazı tipinde swap, yazı tipi yüklenene kadar
   ikon ADINI ("dashboard") ham metin olarak bastırır.
   ════════════════════════════════════════════════════════════ */
@font-face {
  font-family: 'Material Symbols Outlined';
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
  src: url('../fonts/MaterialSymbolsOutlined-Subset.woff2') format('woff2');
}

/* Kullanım: <span class="ico" aria-hidden="true">dashboard</span>
   🔴 aria-hidden zorunlu: ikon adı ekran okuyucuda anlamsız metindir. */
.ico {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  flex-shrink: 0;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 20;
  user-select: none;
}
.ico--sm { font-size: 16px; }
.ico--lg { font-size: 24px; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.ico--xl { font-size: 32px; font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 40; }
.ico--fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 20; }

/* ════════════════════════════════════════════════════════════
   JETONLAR
   Renk, köşe, gölge ve yazı tipi YALNIZ buradan gelir. Görünümlerde hex, rgb() ya da
   sabit köşe değeri yazılmaz.
   ════════════════════════════════════════════════════════════ */
:root {
  color-scheme: light;

  /* ── Yüzeyler ── */
  --bg:            #F7F7F5;   /* sayfa zemini */
  --surface:       #FFFFFF;   /* kart, panel, girdi */
  --surface-2:     #FAFAF8;   /* tablo başlığı, satır üzeri, ikincil panel */
  --surface-3:     #F1F1EE;   /* nötr seçili, basılı */
  --overlay:       rgba(17, 20, 16, 0.38);

  /* ── Çizgiler ── */
  --border:        #E6E5E0;
  --border-strong: #D4D3CC;

  /* ── Metin ── */
  --text:          #1B1B18;
  --text-2:        #5F5E58;   /* ikincil metin, etiket */
  --text-3:        #8C8B84;   /* ipucu, yer tutucu, meta */
  --text-on-accent:#FFFFFF;

  /* ── Marka yeşili (yalnız eylem, seçim, olumlu durum) ── */
  --accent:        #2A5224;
  --accent-hover:  #21421C;
  --accent-2:      #3F7537;   /* grafik, ikincil vurgu */
  --accent-soft:   #EAF2E7;   /* seçili satır/menü, yumuşak zemin */
  --accent-line:   #C3D8BC;
  --accent-text:   #2A5224;

  /* ── Durum renkleri (yalnız durum bildirir, süs değildir) ── */
  --success:       #2F6B2A;  --success-bg: #E8F3E5;  --success-line: #C3DDBB;
  --warning:       #8A5A0B;  --warning-bg: #FBF2DE;  --warning-line: #EFDAAE;
  --danger:        #A32D2D;  --danger-bg:  #FCECEC;  --danger-line:  #F1C8C8;
  --info:          #3C5A78;  --info-bg:    #EBF1F7;  --info-line:    #C9D7E5;
  --neutral-bg:    #F1F1EE;  --neutral-fg: #5F5E58;

  /* ── Tipografi ── */
  --font-sans:     'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono:     'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;
  --fs-xs: 11px; --fs-sm: 12.5px; --fs-md: 14px; --fs-lg: 16px; --fs-xl: 20px; --fs-2xl: 24px;

  /* ── Köşe ── */
  --radius-sm:     6px;    /* rozet, küçük denetim */
  --radius:        8px;    /* düğme, girdi */
  --radius-lg:     12px;   /* kart, pencere */
  --radius-pill:   999px;  /* nokta, sayaç */

  /* ── Derinlik (yalnız yüzen katmanlar: açılır menü, pencere, bildirim) ── */
  --shadow-xs:     0 1px 2px rgba(17, 20, 16, 0.05);
  --shadow-pop:    0 12px 32px -8px rgba(17, 20, 16, 0.18), 0 2px 6px rgba(17, 20, 16, 0.06);
  --ring:          0 0 0 3px rgba(42, 82, 36, 0.18);
  --ring-danger:   0 0 0 3px rgba(163, 45, 45, 0.16);

  /* ── Ölçüler ── */
  --sidebar-w:     240px;
  --topbar-h:      56px;
  --control-h:     36px;
  --control-h-sm:  30px;
  --control-h-touch: 44px;   /* depoda telefonla kullanılan alanlar */

  /* ════ Eski jeton adları ("Technical Editorial" dönemi) ════
     Görünümlerdeki satır içi stiller ve betikler bu adları hâlâ kullanıyor olabilir;
     yeni değerlere bağlandılar. YENİ KODDA KULLANILMAZ. */
  --green:        var(--accent-2);
  --green-deep:   var(--accent);
  --green-dark:   var(--accent-hover);
  --green-soft:   var(--accent-2);
  --green-lite:   var(--accent-soft);
  --ink:          var(--text);
  --ink-soft:     var(--text-2);
  --paper:        var(--bg);
  --status-neutral-bg:  var(--neutral-bg);
  --status-neutral-fg:  var(--neutral-fg);
  --status-success-bg:  var(--success-bg);
  --status-success-fg:  var(--success);
  --status-danger-bg:   var(--danger-bg);
  --status-danger-fg:   var(--danger);
  --status-expired-bg:  var(--warning-bg);
  --status-expired-fg:  var(--warning);
  --font-display: var(--font-sans);
  --font-body:    var(--font-sans);
}

/* ════════════════════════════════════════════════════════════
   TEMEL
   ════════════════════════════════════════════════════════════ */
* { box-sizing: border-box; }
/* hidden niteliği, display veren bileşenlerde (.note, .form-row, esnek kutular) de kazansın. */
[hidden] { display: none !important; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: 1.5;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-sans); font-weight: 600; color: var(--text); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
hr { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }
/* Form denetimleri tarayıcının kendi yazı tipine (Arial) düşmesin. */
button, input, select, textarea { font-family: inherit; font-size: inherit; }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
main:focus { outline: none; }

/* ── Küçük etiket ──
   Adı tarihsel: artık mono DEĞİL. Sayfa üst etiketi, kart ve alan başlığı gibi KISA etiketlerde
   kullanılır. Büyük harf CSS'ten gelmez, kaynaktan gelir: kısa etiket kaynakta büyük harfle
   yazılır ("PARTİ NUMARASI"), cümle gibi uzun olan cümle düzeninde yazılır ("Zincirin kopuk
   halkaları"). Cümle taşıyan ipucu ve açıklamanın yeri .form-hint ve .cell-sub'dır. */
.label-mono, .eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--text-3);
}

/* ── Yardımcılar ── */
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 0.93em; }
.ta-r { text-align: right; }
.ta-c { text-align: center; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.cluster { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.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;
}

/* ════════════════════════════════════════════════════════════
   İSKELET
   ════════════════════════════════════════════════════════════ */
.app { display: flex; min-height: 100vh; }

/* ── Yan menü: açık yüzey, seçili öğe yumuşak yeşil ── */
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  flex: 0 0 var(--sidebar-w); width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  z-index: 50;
}
.sidebar a { color: inherit; text-decoration: none; }
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 0 16px; min-height: var(--topbar-h); flex: none; }

/* Marka işareti: yeşil kare içinde açık küçük kare. Tanıtım ve belge sayfaları da kullanır. */
.sidebar__logo { position: relative; flex: none; width: 26px; height: 26px; border-radius: var(--radius-sm); background: var(--accent); }
.sidebar__logo span { position: absolute; right: 6px; bottom: 6px; width: 9px; height: 9px; border-radius: 2px; background: var(--text-on-accent); }
.sidebar__wordmark, .doc-wordmark, .login-wordmark { font-family: var(--font-sans); font-weight: 600; font-size: 15px; letter-spacing: -0.01em; color: var(--text); }

/* min-height:0 olmadan esnek çocuk kendi içeriğine göre taşar ve kaydırma oluşmaz. */
.sidebar__nav { display: flex; flex-direction: column; gap: 1px; padding: 4px 8px 12px; min-height: 0; overflow: hidden auto; flex: 1 1 auto; scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
.sidebar__nav .nav-section { font-size: var(--fs-xs); font-weight: 500; color: var(--text-3); padding: 12px 10px 3px; user-select: none; }
.sidebar .nav-item {
  display: flex; align-items: center; gap: 10px;
  min-height: 30px; padding: 0 10px;
  border-radius: var(--radius);
  color: var(--text-2); font-size: var(--fs-md); font-weight: 500;
}
.sidebar .nav-item:hover { background: var(--surface-3); color: var(--text); }
.sidebar .nav-item.active { background: var(--accent-soft); color: var(--accent-text); }
.sidebar__nav .nav-item span { line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar__nav .nav-item .ico { font-size: 18px; color: var(--text-3); overflow: visible; }
.sidebar__nav .nav-item:hover .ico { color: var(--text-2); }
.sidebar__nav .nav-item.active .ico { color: var(--accent-text); }

/* ── Yan menü kullanıcı alanı ── */
.sidebar__user { margin-top: auto; padding: 12px 16px 14px; border-top: 1px solid var(--border); flex: none; }
.sidebar__user-name { font-size: var(--fs-sm); font-weight: 500; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__user-role { margin-top: 2px; }
.sidebar__logout { margin-top: 10px; }
.sidebar__logout form { margin: 0; }
.sidebar__logout button {
  display: inline-flex; align-items: center; gap: 6px;
  height: var(--control-h-sm); padding: 0 10px; margin-left: -10px;
  background: none; border: 0; border-radius: var(--radius);
  color: var(--text-2); font: inherit; font-size: var(--fs-sm); font-weight: 500; cursor: pointer;
}
.sidebar__logout button:hover { background: var(--surface-3); color: var(--text); }

/* min-width:0 — esnek öğenin varsayılan min-width:auto değeri geniş tabloyla .main'i büyütüp
   sayfa kökünü yatay kaydırıyordu (1280 px'te dört liste 150 px taşıyordu). Sıfırlanınca
   taşma kendi çerçevesinde (.table-wrap) kalır; her ekran genişliğinde geçerlidir. */
.main { flex: 1 1 auto; display: flex; flex-direction: column; min-width: 0; }

/* ── Üst çubuk ── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  min-height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar__left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__left .label-mono { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar__menu {
  display: none; flex: none; width: 34px; height: 34px; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: var(--radius); cursor: pointer; color: var(--text-2); padding: 0;
}
.topbar__menu:hover { background: var(--surface-3); color: var(--text); }
.topbar__menu svg { width: 20px; height: 20px; }
.topbar__user { font-size: var(--fs-sm); color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── İçerik ── */
.content { padding: 28px 32px 48px; flex: 1 1 auto; min-width: 0; width: 100%; max-width: 1440px; }

/* ── Mobil iskelet ── */
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .2s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-pop); }
  .topbar { padding: 0 16px; }
  .topbar__menu { display: inline-flex; }
  .content { padding: 20px 16px 36px; }
}
@media (max-width: 560px) {
  .topbar__user { display: none; }
}

/* ════════════════════════════════════════════════════════════
   SAYFA BAŞLIĞI
   ════════════════════════════════════════════════════════════ */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head > div:first-child { min-width: 0; }
.page-title { font-weight: 600; font-size: var(--fs-2xl); letter-spacing: -0.02em; line-height: 1.2; margin-top: 4px; }
.page-sub { margin: 6px 0 0; color: var(--text-2); font-size: var(--fs-md); }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-head--ruled { padding-bottom: 20px; border-bottom: 1px solid var(--border); }

/* Sayfa türünü söyleyen küçük etiket (MAL KABUL, GERİ ÇAĞIRMA DOSYASI). */
.label-mono--chip { display: inline-block; padding: 3px 8px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-text); }
.label-mono--chip-dark { display: inline-block; padding: 3px 8px; border-radius: var(--radius-sm); background: var(--accent); color: var(--text-on-accent); }

/* ── Sayfa içi bölüm başlığı ── */
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; margin: 32px 0 12px; }
.section-head:first-child { margin-top: 0; }
.section-head__title { font-weight: 600; font-size: var(--fs-lg); letter-spacing: -0.01em; margin: 0; color: var(--text); }
.section-head > .ico { align-self: center; margin-right: -4px; color: var(--text-2); }
/* Başlığın sağındaki çizgi eski dilin süsüydü; bölümü artık boşluk ayırır. */
.section-head__rule { display: none; }
.section-head__meta { font-size: var(--fs-sm); color: var(--text-3); white-space: nowrap; }
.section-head__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.section-head--ruled { padding-bottom: 10px; border-bottom: 1px solid var(--border); }
.section-head--rail { padding-left: 12px; border-left: 3px solid var(--accent-2); }
@media (max-width: 860px) {
  .section-head__actions { margin-left: 0; }
}

/* ════════════════════════════════════════════════════════════
   KART
   ════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.card--flush { padding: 0; overflow: hidden; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.card__title { font-weight: 600; font-size: var(--fs-md); color: var(--text); }
.card__meta { display: flex; align-items: center; gap: 8px; font-size: var(--fs-sm); color: var(--text-3); }
.card__body { padding: 20px; }
.card--flush > .table-wrap { border: 0; border-radius: 0; }   /* çift çerçeve olmasın */
@media (max-width: 860px) {
  .card__head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .card__body { padding: 16px; }
}

/* ════════════════════════════════════════════════════════════
   DÜĞME
   Bir ekranda en fazla bir .btn-primary; gerisi .btn-outline.
   ════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: var(--control-h); padding: 6px 14px;
  border-radius: var(--radius); border: 1px solid transparent;
  font-family: var(--font-sans); font-weight: 500; font-size: var(--fs-md); line-height: 1.2;
  text-decoration: none; cursor: pointer; user-select: none;
  transition: background-color .12s, border-color .12s, color .12s, box-shadow .12s;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn .ico { font-size: 18px; }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-outline:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn-danger { background: var(--danger); color: var(--text-on-accent); border-color: var(--danger); }
.btn-danger:hover { filter: brightness(0.92); }
.btn-sm { min-height: var(--control-h-sm); padding: 4px 10px; font-size: var(--fs-sm); gap: 6px; }
.btn-sm .ico { font-size: 16px; }
/* Büyük düğme: denetim modu araması ve tanıtım sayfası çağrısı. */
.btn-xl { min-height: 48px; padding: 10px 22px; font-size: var(--fs-lg); font-weight: 600; }
.btn-xl .ico { font-size: 22px; }

/* Denetim modu belge bloğundaki iki düğme. Adları koyu zemin dönemindendir; blok artık açık
   yüzey olduğu için birincil ve ikincil düğmenin görünümünü alırlar. */
.btn-invert { background: var(--accent); color: var(--text-on-accent); border-color: var(--accent); }
.btn-invert:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn.is-disabled { background: var(--surface-3); color: var(--text-3); border-color: var(--border); box-shadow: none; pointer-events: none; cursor: default; }

/* ── "Denetçi Sordu" — panodaki tek büyük çağrı ──
   Ürünün tek cümlelik vaadinin ekran karşılığıdır; panoda BİR TANEDİR. Sayfadaki tek dolu
   yeşil yüzey budur: göz önce buraya gider. */
.btn-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  width: 100%; padding: 22px 24px; margin-bottom: 24px; text-decoration: none;
  background: var(--accent); color: var(--text-on-accent);
  border: 1px solid var(--accent); border-radius: var(--radius-lg);
  transition: background-color .12s, border-color .12s;
}
.btn-hero:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-hero:focus-visible { outline: none; box-shadow: var(--ring); }
.btn-hero__text { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.btn-hero__title { font-weight: 600; font-size: var(--fs-xl); letter-spacing: -0.01em; line-height: 1.2; }
.btn-hero__desc { font-size: var(--fs-md); line-height: 1.5; color: var(--accent-soft); max-width: 64ch; }
.btn-hero__cue {
  flex: none; display: inline-flex; align-items: center; min-height: var(--control-h); padding: 6px 14px;
  border-radius: var(--radius); background: var(--surface); color: var(--accent-text);
  font-size: var(--fs-md); font-weight: 500; white-space: nowrap;
}
@media (max-width: 720px) {
  .btn-hero { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px; }
}

/* ════════════════════════════════════════════════════════════
   FORM
   ════════════════════════════════════════════════════════════ */
.form-control {
  display: block; width: 100%;
  min-height: var(--control-h); padding: 7px 11px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-family: var(--font-sans); font-size: var(--fs-md); line-height: 1.4;
  outline: none; transition: border-color .12s, box-shadow .12s;
}
.form-control:hover { border-color: var(--text-3); }
.form-control:focus { border-color: var(--accent); box-shadow: var(--ring); }
.form-control::placeholder { color: var(--text-3); }
.form-control:disabled, .form-control[readonly] { background: var(--surface-2); color: var(--text-2); }
textarea.form-control { min-height: 84px; resize: vertical; }
select.form-control {
  appearance: none; -webkit-appearance: none; padding-right: 32px;
  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='%238C8B84' 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 9px center;
}
select.form-control[multiple] { background-image: none; padding-right: 11px; }
.form-control.input-validation-error { border-color: var(--danger); }
.form-control.input-validation-error:focus { box-shadow: var(--ring-danger); }

/* Büyük dokunma hedefi: mal kabul depoda telefonla, eldivenle kullanılır. */
.form-control--touch { min-height: var(--control-h-touch); font-size: 15px; }
/* Kod giriş alanı: doğrulama kodunu elle yazan kabul birimi için. */
.form-control--code { font-family: var(--font-mono); font-size: 16px; letter-spacing: .1em; text-transform: uppercase; min-height: var(--control-h-touch); }
/* Zorunlu alan: yoğun kalem satırında etiketteki yıldız kaybolur; ince sol şerit ikinci işarettir. */
.form-control--req { box-shadow: inset 3px 0 0 var(--accent-line); }
.form-control--req:focus { box-shadow: inset 3px 0 0 var(--accent-2), var(--ring); }
.form-control--req.input-validation-error { box-shadow: inset 3px 0 0 var(--danger); }

.form-label { display: block; font-weight: 500; font-size: var(--fs-sm); color: var(--text); margin-bottom: 6px; }
.form-label--req::after { content: " *"; color: var(--danger); }
.form-hint { display: block; margin-top: 6px; font-size: var(--fs-sm); line-height: 1.45; color: var(--text-3); }
.field-validation-error { display: block; margin-top: 6px; font-size: var(--fs-sm); line-height: 1.4; color: var(--danger); }
.field-validation-error:empty { display: none; }
.validation-summary-errors { margin-bottom: 16px; padding: 10px 14px; background: var(--danger-bg); border: 1px solid var(--danger-line); border-radius: var(--radius); color: var(--danger); font-size: var(--fs-md); }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-errors a { color: var(--danger); text-decoration: underline; }
.validation-summary-valid { display: none; }

.form-row { margin-bottom: 16px; }
.form-row--span-all { grid-column: 1 / -1; }
.form-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
/* Izgara içindeki satır kendi alt boşluğunu taşımaz; aralığı ızgara verir. */
.form-grid-2 > .form-row, .form-grid-3 > .form-row { margin-bottom: 0; }
.form-grid-2:not(:last-child), .form-grid-3:not(:last-child) { margin-bottom: 16px; }

/* ── Form bölümü (_FormSection.cshtml) ── */
.form-section { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; }
.form-section__head { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.form-section__head--row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.form-section__title { font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-2); }
.form-section__no { display: inline-block; min-width: 20px; margin-right: 8px; padding: 1px 6px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-text); font-size: var(--fs-xs); font-weight: 600; text-align: center; letter-spacing: 0; }
.form-section__meta { font-size: var(--fs-sm); color: var(--text-3); white-space: nowrap; }
.form-section__desc { margin: 6px 0 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--text-2); }
.form-section .form-row:last-child { margin-bottom: 0; }
/* Bölüm düzeyinde hata işareti: uzun formda hatalı bölüm sayfanın tepesinden seçilebilsin. */
.form-section--invalid { border-color: var(--danger-line); }
.form-section--invalid .form-section__head { border-bottom-color: var(--danger-line); }
.form-section__errors { margin-top: 8px; font-size: var(--fs-sm); color: var(--danger); }

/* ── Form yerleşimi ── */
.form-narrow { max-width: 760px; }
.form-wide { max-width: 1180px; }
.form-actions { display: flex; align-items: center; gap: 8px; }
/* Uzun formların altında yüzen eylem çubuğu. Çubuk ile .content arasında overflow taşıyan
   bir ata OLMAMALIDIR, yoksa yapışmaz. */
.form-actions--sticky {
  position: sticky; bottom: 12px; z-index: 20;
  flex-wrap: wrap; margin-top: 20px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
}
.form-actions--sticky .form-hint { margin-top: 0; }
.form-actions__context { display: flex; flex-wrap: wrap; gap: 6px 24px; margin-right: auto; }
/* Kaydet formu ile silme formunu yan yana tutan sarmalayıcı (iki <form> iç içe geçemez). */
.form-actions--split { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 24px; }
.form-actions__danger { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; margin-left: auto; }
.form-actions__danger form { margin: 0; }
.form-actions__danger .form-hint { margin: 0; max-width: 46ch; text-align: right; }

/* ── Onay kutusu ve seçilebilir kart ── */
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
input[type="file"] { font: inherit; font-size: var(--fs-sm); color: var(--text-2); max-width: 100%; }
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 500; color: var(--text); background: var(--surface);
  min-height: var(--control-h-sm); padding: 4px 10px; margin-right: 10px; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
}
input[type="file"]::file-selector-button:hover { background: var(--surface-2); }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row label { margin: 0; font-size: var(--fs-md); }
.check-block { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); }
.check-block--accent { background: var(--accent-soft); border-color: var(--accent-line); }
.check-block input[type="checkbox"] { flex: none; margin: 2px 0 0; }
.check-block__body { min-width: 0; }
.check-block__label { display: block; font-weight: 500; font-size: var(--fs-md); margin: 0; }
.check-block .form-hint { margin-top: 4px; }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.choice-card { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); cursor: pointer; transition: background-color .12s, border-color .12s; }
.choice-card:hover { background: var(--surface-2); }
/* :has() desteklenmezse kart seçilmemiş görünür: işlev kaybı yok, yalnız vurgu. */
.choice-card:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice-card:has(input:disabled) { background: var(--surface-3); cursor: not-allowed; }
.choice-card:has(input:focus-visible) { box-shadow: var(--ring); }
.choice-card input { flex: none; margin: 2px 0 0; }
.choice-card__title { display: block; font-weight: 500; font-size: var(--fs-md); }
.choice-card__desc { display: block; margin-top: 3px; font-size: var(--fs-sm); line-height: 1.45; color: var(--text-3); }
.choice-card__lock { margin-left: auto; color: var(--text-3); }
/* Segment hâli: 3-4 seçenekli tekil seçim. Radyo görsel olarak kalkar, klavyede kalır. */
.choice-card--segment { justify-content: center; text-align: center; }
.choice-card--segment input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-card--segment:has(input:checked) .choice-card__title { color: var(--accent-text); }
.choice-card--segment.choice-card--warn:has(input:checked) { background: var(--warning-bg); border-color: var(--warning); }
.choice-card--segment.choice-card--warn:has(input:checked) .choice-card__title { color: var(--warning); }
.choice-card--segment.choice-card--danger:has(input:checked) { background: var(--danger-bg); border-color: var(--danger); }
.choice-card--segment.choice-card--danger:has(input:checked) .choice-card__title { color: var(--danger); }

/* ── Alana yapışık birim ve yandaş düğme ── */
.input-group { display: flex; align-items: stretch; }
.input-group .form-control { flex: 1 1 auto; min-width: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .form-control:focus { position: relative; z-index: 1; }
.input-group__unit, .input-group__btn {
  display: inline-flex; align-items: center; justify-content: center;
  flex: none; padding: 0 12px;
  border: 1px solid var(--border-strong); border-left: 0;
  border-top-right-radius: var(--radius); border-bottom-right-radius: var(--radius);
  font-size: var(--fs-sm); color: var(--text-2);
}
.input-group__unit { background: var(--surface-2); }
.input-group__btn { background: var(--surface); color: var(--text); font-weight: 500; cursor: pointer; }
.input-group__btn:hover { background: var(--surface-2); }

/* ── Çok satırlı form bölümü (alerjenler, reçete kalemleri, kabul kalemleri) ── */
.line-table { margin-top: 12px; border-top: 1px solid var(--border); }
.line-row { display: grid; grid-template-columns: 1fr 1.4fr 1fr 1fr auto; gap: 12px; align-items: end; padding: 12px 0; border-bottom: 1px solid var(--border); }
.line-row .form-row { margin: 0; }
.line-row .label-mono { display: block; margin-bottom: 6px; }
.line-row__actions { padding-bottom: 2px; }
.line-row--wide { grid-template-columns: 1.6fr 1fr .8fr .8fr .6fr auto; }
.line-row--trio { grid-template-columns: 1fr 2.4fr auto; }
/* Kolon başlığı: her satır kendi etiketini tekrar etmesin. Değerler .line-row ile aynı kalmalı. */
.line-head { display: grid; grid-template-columns: 1fr 1.4fr 1fr 1fr auto; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.line-head--wide { grid-template-columns: 1.6fr 1fr .8fr .8fr .6fr auto; }
.line-head--trio { grid-template-columns: 1fr 2.4fr auto; }
.line-head--receipt { grid-template-columns: 1.6fr .8fr 1.1fr .7fr .7fr .9fr 1fr auto; }
.line-head > span { font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); }
/* Başlık varsa satır içi etiket masaüstünde gizlenir; ekran okuyucudan SİLİNMEZ. */
.line-table--headed .line-row .label-mono { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; margin: 0; }
.line-table__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 0 0; }
.line-table__count { margin-left: auto; }
.line-table__empty { padding: 16px 0; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-3); }

/* Mal kabul kalem satırı: 7 alan + tam genişlik ayrıntı bloğu. */
.receipt-line { grid-template-columns: 1.6fr .8fr 1.1fr .7fr .7fr .9fr 1fr auto; }
.receipt-line > .line-detail { grid-column: 1 / -1; }
.receipt-line__product { min-width: 0; }
.line-detail { margin-top: 8px; border-top: 1px dashed var(--border); padding-top: 8px; }
.line-detail__summary { font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); cursor: pointer; padding: 4px 0; }
.line-detail__summary:hover { color: var(--text); }
.line-detail__body { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 20px; padding: 12px 0 4px; }
.line-detail__body .form-row { margin: 0; }
.line-detail__body .line-row--wide { grid-column: 1 / -1; display: block; padding: 0; border: 0; }
.upload-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px; margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.upload-row .form-row { margin: 0; flex: 1 1 220px; }
.upload-row .form-actions { margin: 0; }

@media (max-width: 1100px) {
  .receipt-line, .line-head--receipt { grid-template-columns: 1fr 1fr 1fr auto; }
}
@media (max-width: 860px) {
  .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
  .line-row, .line-row--wide, .line-row--trio, .receipt-line { grid-template-columns: 1fr; }
  .line-head, .line-head--wide, .line-head--trio, .line-head--receipt { display: none; }
  .line-table--headed .line-row .label-mono { position: static; width: auto; height: auto; overflow: visible; clip: auto; margin-bottom: 6px; }
  .upload-row { flex-direction: column; align-items: stretch; }
  .form-actions { flex-wrap: wrap; }
  .form-actions--split { flex-direction: column; }
  .form-actions__danger { align-items: flex-start; margin-left: 0; }
  .form-actions__danger .form-hint { text-align: left; }
}

/* ════════════════════════════════════════════════════════════
   ROZET (kaydın durumu) ve ÇİP (veri)
   Rozet DURUM taşır (yumuşak renkli zemin); çip VERİ taşır (beyaz zemin, ince çerçeve:
   bir ürün adı, bir alerjen, bir tesis). İkisi karıştırılmaz.
   ════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  min-height: 22px; padding: 2px 8px; border-radius: var(--radius-sm);
  font-family: var(--font-sans); font-size: 12px; font-weight: 500; line-height: 1.2;
  white-space: nowrap; border: 1px solid transparent;
  background: var(--neutral-bg); color: var(--neutral-fg);
}
.badge .ico { font-size: 14px; }
.badge-neutral  { background: var(--neutral-bg); color: var(--neutral-fg); }
.badge-sent     { background: var(--accent-soft); color: var(--accent-text); }
.badge-success  { background: var(--success-bg); color: var(--success); }
.badge-danger   { background: var(--danger-bg); color: var(--danger); }
.badge-expired  { background: var(--warning-bg); color: var(--warning); }
/* Kritik kova: uyarıdan bir kademe ağır, dolu zemin. */
.badge-critical { background: var(--warning); color: var(--text-on-accent); }

.chip-list { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-pill); font-size: var(--fs-sm); line-height: 1.3; color: var(--text); }
.chip .ico { font-size: 14px; }
.chip--strong { border-color: var(--text-3); }
.chip--muted { color: var(--text-3); border-style: dashed; }
a.chip { text-decoration: none; }
a.chip:hover { background: var(--surface-2); border-color: var(--text-3); }

/* ════════════════════════════════════════════════════════════
   TABLO
   ════════════════════════════════════════════════════════════ */
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--fs-md); }
thead th {
  font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-3); text-align: left; white-space: nowrap;
  padding: 10px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
tbody td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--surface-2); }
tfoot td { padding: 11px 14px; border-top: 1px solid var(--border); font-weight: 500; }

/* Sayısal kolon: sağa hizalı, eş genişlikli rakam. Başlık da hücreyle birlikte sağa alınır. */
th.col-num, td.col-num { text-align: right; }
td.col-num { font-variant-numeric: tabular-nums; }
th.col-center, td.col-center { text-align: center; }
.col-num__unit { margin-left: 4px; font-size: var(--fs-xs); color: var(--text-3); }

/* ── Hücre içi ikincil satır ── */
.cell-sub { margin-top: 3px; font-size: var(--fs-sm); line-height: 1.4; color: var(--text-3); }
.cell-sub a { color: var(--accent-text); }
.cell-sub--plain { font-size: 13px; line-height: 1.5; color: var(--text-2); margin-top: 4px; }
.cell-sub--cite { font-style: italic; }
.cell-sub--warn { color: var(--warning); }
.cell-sub .ico { font-size: 14px; vertical-align: -2px; margin-right: 4px; }
.cell-stack { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cell-stack__main { font-weight: 500; color: var(--text); }
.cell-stack .cell-sub { margin-top: 0; }
.cell-badges { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cell-badges .badge { flex: none; }
.cell-lock { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--text-3); }
.cell-lock .ico { font-size: 14px; }

/* ── Satır durumu ──
   Zemin verilmez: satır üzeri rengi tehlike zeminini örterdi. İlk hücrenin solundaki ince
   şerit fare üzerindeyken de görünür kalır. */
tbody tr.is-flagged > td:first-child { box-shadow: inset 3px 0 0 var(--border-strong); }
tbody tr.is-danger  > td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
tbody tr.is-warning > td:first-child { box-shadow: inset 3px 0 0 var(--warning); }
/* Pasif kayıt: satır soluklaşır. Üstü çizili YAZILMAZ ("kayıt silindi" okunur). */
tbody tr.is-passive td { color: var(--text-3); }
tbody tr.is-passive .cell-stack__main { color: var(--text-2); font-weight: 400; }
/* Kilitli sistem satırı: eylem sunmaz, tıklanabilir görünmemeli. */
tbody tr.is-locked td, tbody tr.is-locked:hover td { background: var(--surface-2); }

/* ── Satır eylemleri ──
   Daima görünür: dokunmatikte ve klavyede fare üzeri yoktur; görünmeyen eylem olmayan eylemdir. */
.row-actions { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 2px; }
.row-actions form { margin: 0; }
.row-actions a, .row-actions button {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; min-height: 28px; padding: 4px; border-radius: var(--radius-sm);
  background: none; border: 0; color: var(--text-3); cursor: pointer; text-decoration: none;
}
.row-actions a:hover, .row-actions button:hover { color: var(--text); background: var(--surface-3); }
.row-actions a:focus-visible, .row-actions button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.row-actions .ico { font-size: 18px; }
.row-actions svg { width: 16px; height: 16px; }
.row-actions--text a, .row-actions--text button { padding: 4px 8px; font-family: var(--font-sans); font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); }
.row-actions--text .is-primary { color: var(--accent-text); }
.row-actions__sep { display: none; }
.expiry-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.expiry-actions form { margin: 0; }

/* ── Tablo çerçevesi, yoğunluk, üst ve alt şerit ── */
.table-wrap { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow-x: auto; }
.table-wrap table { min-width: 640px; }
/* İlk kolon kaydın kimliğidir (parti no, fiş no); tire yerinden ikiye bölünmez. Cümle taşıyan
   hücre (td.cell-prose) bu kuralın dışındadır. */
.table-wrap td:first-child:not(.cell-prose) { white-space: nowrap; }
/* Çok kolonlu operasyon listeleri sıkışmaz, çerçevenin içinde yana kayar. 960 px: 1280 px
   genişliğindeki ekranda (yan menü çıkınca 976 px) kaydırma gerektirmeden sığar. */
.table-wrap--wide table { min-width: 960px; }
.table--dense thead th { padding: 9px 12px; }
.table--dense tbody td { padding: 8px 12px; font-size: 13px; }

/* Şerit .table-wrap'in İÇİNE konulamaz (yatay kaydırmada tabloyla birlikte kayardı);
   KARDEŞ elemandır ve tabloyla tek çerçeve gibi durur. */
.table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--border); border-bottom: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.table-toolbar__count { margin-left: auto; font-size: var(--fs-sm); color: var(--text-3); white-space: nowrap; }
.table-toolbar + .table-wrap { border-top-left-radius: 0; border-top-right-radius: 0; }
.table-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 10px 16px; background: var(--surface-2); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.table-wrap:has(+ .table-foot) { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.table-foot > .pager { margin: 0; width: 100%; }

/* ── Sayfalayıcı (_Pager.cshtml) ── */
.pager { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 14px; font-size: var(--fs-sm); color: var(--text-2); }
.pager__info { color: var(--text-2); }
.pager__links { display: flex; flex-wrap: wrap; gap: 4px; }
.pager__link { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; height: 30px; padding: 0 9px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); font-size: var(--fs-sm); color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }
.pager__link:hover { background: var(--surface-2); }
.pager__link.is-active { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); font-weight: 600; }
.pager__link.is-disabled { background: var(--surface-2); border-color: var(--border); color: var(--text-3); pointer-events: none; }
.pager__link--icon { min-width: 30px; padding: 0; }
.pager__link--icon .ico { font-size: 18px; }
.pager__gap { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 30px; color: var(--text-3); }
.pager__size { display: flex; align-items: center; gap: 8px; }
.pager__size select { width: auto; min-width: 0; min-height: var(--control-h-sm); padding: 3px 28px 3px 9px; font-size: var(--fs-sm); }

/* ── Filtre çubuğu (_ListToolbar.cshtml) ── */
.filter-bar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; margin-bottom: 16px; }
.filter-bar .form-control, .filter-bar select { min-width: 170px; width: auto; }
.filter-bar__field { display: flex; flex-direction: column; gap: 4px; }
.filter-bar__actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.search-field { position: relative; flex: 1 1 260px; min-width: 220px; }
.search-field .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 18px; color: var(--text-3); pointer-events: none; }
.search-field .form-control { padding-left: 36px; }
.filter-bar .search-field .form-control { width: 100%; }
/* Çerçeveli panel: üç ve daha çok süzgeçli listelerde. Az süzgeçli listede çıplak çubuk kalır. */
.filter-bar--panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 16px; }
/* Yatay etiket. Depoda telefonla kullanılan ekranlarda KULLANILMAZ (dokunma tabanının altında). */
.filter-bar--inline { align-items: center; gap: 10px 20px; }
.filter-bar--inline .filter-bar__field { flex-direction: row; align-items: center; gap: 8px; }

/* ── Dar ekran: sayfa yana taşmaz, tablo kendi çerçevesinde kayar ──
   Çerçevesiz tablo blok olup kendi içinde kayar. Çerçeveli tablo gerçek tablo kalır; tek
   kaydırma alanı çerçevedir. Dar ekranda hücreler bölünmez; CÜMLE taşıyan hücreye
   td.cell-prose verilir (satır kırar, en az 260 px yer tutar). */
@media (max-width: 860px) {
  .content table { display: block; overflow-x: auto; white-space: nowrap; }
  .table-wrap > table { display: table; overflow-x: visible; }
  .table-wrap .modal-overlay { white-space: normal; }
  .table-wrap td.cell-prose { white-space: normal; min-width: 260px; }
  .table-wrap .form-actions { flex-wrap: nowrap; }
  .table-toolbar { padding: 12px; }
  .table-toolbar__count { margin-left: 0; width: 100%; }
  /* Esneme alanın SARMALAYICISINA verilir: denetim, sütun yönlü .filter-bar__field'in çocuğudur;
     ona flex-basis vermek genişliği değil yüksekliği büyütür. */
  .filter-bar__field, .filter-bar > .form-control, .filter-bar > select { flex: 1 1 140px; min-width: 0; }
  .filter-bar .form-control, .filter-bar select { min-width: 0; width: 100%; }
  .filter-bar--panel { padding: 12px; }
  .filter-bar--inline { align-items: stretch; }
  .filter-bar--inline .filter-bar__field { flex-direction: column; align-items: stretch; gap: 4px; }
  .filter-bar__actions { margin-left: 0; }
}

/* ════════════════════════════════════════════════════════════
   SEKME
   ════════════════════════════════════════════════════════════ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.tabs::-webkit-scrollbar { display: none; }
.tabs .tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px;
  padding: 10px; margin-bottom: -1px;
  font-weight: 500; font-size: var(--fs-md); color: var(--text-2); text-decoration: none; white-space: nowrap;
  border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; font-family: inherit;
}
.tabs .tab:hover { color: var(--text); }
.tabs .tab.active { color: var(--text); border-bottom-color: var(--accent); }
.tabs--section { margin-bottom: 20px; }
.tab__count { margin-left: 2px; padding: 1px 7px; border-radius: var(--radius-pill); background: var(--surface-3); font-size: var(--fs-xs); color: var(--text-3); }
.tab.active .tab__count { color: var(--accent-text); background: var(--accent-soft); }
.tab-pane { display: none; padding-top: 20px; }
.tab-pane.active { display: block; }

/* ════════════════════════════════════════════════════════════
   İSTATİSTİK KARTI
   ════════════════════════════════════════════════════════════ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; min-width: 0; }
.stat__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stat__head .stat__label { flex: 1 1 auto; min-width: 0; }
.stat__label { font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); }
.stat__value { font-weight: 600; font-size: 26px; letter-spacing: -0.02em; line-height: 1.15; margin-top: 6px; color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.stat__meta { font-size: var(--fs-sm); line-height: 1.4; color: var(--text-3); margin-top: 4px; }
.stat__icon { flex: none; color: var(--text-3); }
.stat__icon--danger { color: var(--danger); }
.stat__icon--warn { color: var(--warning); }
.stat__icon--good { color: var(--success); }
/* Ölçülmüş büyüklük (kg, süre, tarih): eş genişlikli rakam, aile değişmez. Adı tarihseldir. */
.stat__value--mono { font-variant-numeric: tabular-nums; }
/* Kod benzeri değer (parti numarası maskesi) tek aralıklı basılır. */
.stat__value--code { font-family: var(--font-mono); font-weight: 500; font-size: var(--fs-xl); letter-spacing: 0; line-height: 1.4; }
/* Renk tek taşıyıcı değildir: etiket metni anlamı zaten yazar. */
.stat__value--danger { color: var(--danger); }
.stat__value--warn { color: var(--warning); }
.stat__value--good { color: var(--success); }
.stat__unit { margin-left: 4px; font-size: var(--fs-sm); font-weight: 400; letter-spacing: 0; color: var(--text-3); }
.stat__foot { margin-top: 12px; }
/* Kova payı: yüzde sunucudan satır içi width ile verilir (veri, stil değil). */
.stat__meter { height: 4px; margin-top: 12px; background: var(--surface-3); border-radius: var(--radius-pill); overflow: hidden; }
.stat__meter > span { display: block; height: 100%; background: var(--accent-2); border-radius: inherit; }
.stat__meter--danger > span { background: var(--danger); }
.stat__meter--warn > span { background: var(--warning); }
/* Sol ince şeritle ton: hangi kart dikkat istiyor. */
.stat--accent { box-shadow: inset 3px 0 0 var(--accent-2); }
.stat--accent-danger { box-shadow: inset 3px 0 0 var(--danger); }
.stat--accent-warn { box-shadow: inset 3px 0 0 var(--warning); }
/* Vurgulu kart: yumuşak yeşil zemin. */
.stat--invert { background: var(--accent-soft); border-color: var(--accent-line); }
.stat--invert .stat__value { color: var(--accent-text); }
.stat--link { display: block; text-decoration: none; color: inherit; transition: border-color .12s, background-color .12s; }
.stat--link:hover { background: var(--surface-2); border-color: var(--border-strong); }

/* Bitişik ızgara: bir denklemin ya da tek dağılımın terimleri (GİRDİ / ÇIKTI / FİRE / DENGE). */
.stat-grid--joined { gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.stat-grid--joined > .stat { border: 0; border-radius: 0; }
.stat-grid--joined > .stat--result { background: var(--accent-soft); }
.stat--result .stat__label, .stat--result .stat__value { color: var(--accent-text); }
.stat-grid--joined > .stat--meta { background: var(--surface-2); }

/* Eğilim: yönü ikon, iyi ya da kötüyü renk taşır (fire düşmesi iyi haberdir). */
.trend { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 500; font-variant-numeric: tabular-nums; }
.trend .ico { font-size: 16px; }
.trend--good { color: var(--success); }
.trend--bad { color: var(--danger); }
.trend--flat { color: var(--text-3); }
.trend__note { font-weight: 400; color: var(--text-3); }

/* ════════════════════════════════════════════════════════════
   BOŞ DURUM
   ════════════════════════════════════════════════════════════ */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-2); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); }
.card .empty-state, .table-wrap .empty-state { border: 0; background: transparent; }
.empty-state__icon { width: 44px; height: 44px; margin: 0 auto 12px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-pill); background: var(--surface-3); color: var(--text-3); }
.empty-state__icon .ico { font-size: 22px; }
.empty-state__title { font-weight: 600; font-size: var(--fs-lg); color: var(--text); margin-bottom: 6px; }
.empty-state__desc { margin: 0 auto; max-width: 480px; font-size: var(--fs-md); line-height: 1.55; }
.empty-state__action { margin-top: 16px; }
/* Süzgeç sonucu boş kaldığında daha az yer tutar. */
.empty-state--compact { padding: 28px 24px; }
.empty-state--compact .empty-state__icon { width: 36px; height: 36px; margin-bottom: 10px; }
.empty-state--compact .empty-state__icon .ico { font-size: 18px; }

/* ════════════════════════════════════════════════════════════
   BİLGİ NOTU (uyarı kutusu)
   Tek bileşen, dört ton: bilgi (varsayılan), sönük, uyarı, tehlike. Geri dönüşü olmayan bir
   işlemin uyarısı .note--danger ya da .note--warn ile verilir, varsayılan tonla DEĞİL.
   ════════════════════════════════════════════════════════════ */
.note { margin-bottom: 16px; padding: 12px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); font-size: var(--fs-md); line-height: 1.55; color: var(--text-2); }
.note strong { color: var(--text); font-weight: 600; }
.note p { margin: 0 0 8px; }
.note p:last-child { margin-bottom: 0; }
.note--muted { background: transparent; }
.note--warn { background: var(--warning-bg); border-color: var(--warning-line); color: var(--warning); }
.note--warn strong, .note--warn .note__title { color: var(--warning); }
.note--danger { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }
.note--danger strong, .note--danger .note__title { color: var(--danger); }
.note--icon { display: flex; align-items: flex-start; gap: 10px; }
.note--icon > .ico { flex: none; font-size: 18px; margin-top: 1px; }
.note--icon > div { min-width: 0; }
.note__head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.note__head .ico { flex: none; font-size: 18px; }
.note__title { font-size: var(--fs-sm); font-weight: 600; letter-spacing: 0.02em; color: var(--text); }
.note__list { margin: 8px 0 0; padding-left: 18px; }
.note__list li + li { margin-top: 4px; }

/* ════════════════════════════════════════════════════════════
   PENCERE (modal) ve BİLDİRİM (toast)
   Gölge yalnız bu yüzen katmanlarda kullanılır.
   ════════════════════════════════════════════════════════════ */
.modal-overlay { position: fixed; inset: 0; background: var(--overlay); z-index: 80; display: none; align-items: center; justify-content: center; padding: 24px; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); width: 100%; max-width: 560px; max-height: 88vh; overflow-y: auto; text-align: left; }
.modal-box__head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 600; }
.modal-box__body { padding: 20px; }
/* Pencere kapatma düğmesi (adı çekmece döneminden kalmadır). */
.drawer__close, .modal-box__close { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; background: none; border: 0; border-radius: var(--radius); cursor: pointer; color: var(--text-3); font-size: 20px; line-height: 1; }
.drawer__close:hover, .modal-box__close:hover { background: var(--surface-3); color: var(--text); }
.modal-box__foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; background: var(--surface-2); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

.toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 40px); }
.toast { max-width: 420px; padding: 11px 14px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-pop); font-size: var(--fs-md); line-height: 1.45; cursor: pointer; }
.toast-success { background: var(--success-bg); border-color: var(--success-line); color: var(--success); }
.toast-error { background: var(--danger-bg); border-color: var(--danger-line); color: var(--danger); }

/* ════════════════════════════════════════════════════════════
   KÜÇÜK PARÇALAR
   ════════════════════════════════════════════════════════════ */
/* İkon kutusu (dekoratif) ve ikon düğmesi (etkileşimli). */
.icon-box, .icon-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; background: var(--surface-3); border: 0; border-radius: var(--radius); color: var(--text-2); }
.icon-box--sm { width: 28px; height: 28px; }
.icon-box--lg { width: 52px; height: 52px; border-radius: var(--radius-lg); }
.icon-box--lg .ico { font-size: 26px; }
.icon-box--danger { background: var(--danger-bg); color: var(--danger); }
.icon-box--warning { background: var(--warning-bg); color: var(--warning); }
.icon-box--good { background: var(--success-bg); color: var(--success); }
.icon-btn { background: none; cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn--danger:hover { background: var(--danger-bg); color: var(--danger); }
.icon-btn[disabled], .icon-btn.is-disabled { color: var(--text-3); pointer-events: none; }

/* Kart içi açıklama paragrafı ve eylem satırı (hata sayfaları, ayar kartları). */
.page-note { margin: 0 0 12px; font-size: var(--fs-md); line-height: 1.6; color: var(--text-2); }
.page-note:last-child { margin-bottom: 0; }
.card__actions { margin-top: 16px; }
.card--spaced { margin-bottom: 20px; }
.section-title { font-size: var(--fs-lg); font-weight: 600; margin: 0 0 10px; }
/* Yönlendirme kartı (Tanımlar ana sayfası): etiket + başlık + açıklama + tek eylem. */
.stat__value--title { font-size: var(--fs-lg); letter-spacing: -0.01em; line-height: 1.3; }
.stat__desc { margin: 10px 0 0; font-size: 13px; line-height: 1.55; color: var(--text-2); }
.stat__actions { margin-top: 14px; }
/* Kod kutusu: parti numarası maskesi ve örnek numara gibi salt okunur kod değerleri. */
code { font-family: var(--font-mono); font-size: 0.93em; padding: 1px 5px; border-radius: var(--radius-sm); background: var(--surface-3); }
.code-box { padding: 8px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); font-family: var(--font-mono); font-size: var(--fs-md); overflow-wrap: anywhere; }
.code-box--lg { font-size: 18px; font-weight: 500; background: var(--surface); }
.modal-box__lot { font-family: var(--font-mono); font-size: var(--fs-lg); font-weight: 500; margin-top: 2px; }

/* Stok defteri miktar yönü: işaret ve ağırlık taşır, renk yardımcıdır. */
.qty-in { font-weight: 500; color: var(--success); }
.qty-out { font-weight: 500; color: var(--danger); }

/* ── Varlık kimlik bloğu ve tanım ızgarası (parti detayı) ── */
.entity-head { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; }
.entity-head__main { padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.entity-head__no { font-family: var(--font-mono); font-weight: 500; font-size: 26px; letter-spacing: 0; line-height: 1.2; color: var(--text); margin-top: 6px; overflow-wrap: anywhere; }
.entity-head__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.entity-head .note { margin-top: 16px; margin-bottom: 0; }
.def-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 24px; }
.def-item { min-width: 0; }
.def-label { font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); }
.def-value { font-size: var(--fs-md); color: var(--text); margin-top: 4px; overflow-wrap: anywhere; }
.def-value.num { font-variant-numeric: tabular-nums; }

/* ── Kayıt künyesi şeridi: kim oluşturdu, ne zaman ── */
.record-foot { display: flex; flex-wrap: wrap; gap: 16px 40px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--border); }
.record-foot .def-item { min-width: 0; }
.record-foot .def-value { font-size: var(--fs-sm); color: var(--text-2); margin-top: 2px; }
.record-foot__aside { margin-left: auto; text-align: right; }

/* ── Asimetrik detay yerleşimi ── */
.detail-split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 24px; }
.detail-split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-split--aside-first { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.detail-split--narrow-aside { grid-template-columns: minmax(0, 1fr) 380px; }
.detail-split__col { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.detail-split__col > *:last-child { margin-bottom: 0; }
/* Karar formu kaydırmada görünür kalır (yapışkan üst çubuğun altında). */
.detail-split__col--sticky { position: sticky; top: calc(var(--topbar-h) + 16px); }

/* ── Sıralı ödev kartları (geri çağırma dört ödevi) ── */
.duty-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 20px; }
.duty { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; }
.duty__ordinal { position: absolute; top: 12px; right: 14px; font-size: 20px; font-weight: 600; color: var(--border-strong); font-variant-numeric: tabular-nums; }
.duty__label { font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); }
.duty__title { font-weight: 600; font-size: 15px; line-height: 1.3; margin: 6px 32px 12px 0; color: var(--text); }
.duty__state { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); font-weight: 500; color: var(--success); }
.duty--pending { background: var(--danger-bg); border-color: var(--danger-line); }
.duty--pending .duty__label, .duty--pending .duty__state { color: var(--danger); }
.duty--pending .duty__ordinal { color: var(--danger-line); }
.duty--waiting .duty__state { color: var(--warning); }
.duty--locked { background: var(--surface-2); }
.duty--locked .duty__title, .duty--locked .duty__state { color: var(--text-3); }

/* ── Ek dosya listesi ── */
.file-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.file-row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: var(--surface-2); }
.file-row__icon { flex: none; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); background: var(--surface-3); color: var(--text-2); }
.file-row__body { flex: 1 1 auto; min-width: 0; }
.file-row__name { font-size: var(--fs-md); font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
.file-row__meta { margin-top: 2px; font-size: var(--fs-sm); color: var(--text-3); }
.file-row__actions { flex: none; display: flex; align-items: center; gap: 8px; }

/* ── Doğrulama kodu ve QR bloğu ── */
.verify-code { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 20px; }
.verify-code__body { flex: 1 1 240px; min-width: 0; }
.verify-code__value { font-family: var(--font-mono); font-weight: 500; font-size: 24px; letter-spacing: .1em; text-transform: uppercase; color: var(--text); margin-top: 6px; word-break: break-all; }
.verify-code__url { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); margin-top: 8px; word-break: break-all; }
.verify-code--inline { display: inline-flex; gap: 8px; padding: 6px 10px; margin: 0; background: var(--surface-3); border: 0; border-radius: var(--radius); font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.verify-code--inline .ico { flex: none; color: var(--accent-text); }
.qr-frame { flex: none; width: 132px; height: 132px; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.qr-frame img, .qr-frame svg { display: block; width: 100%; height: 100%; }
.qr-frame--lg { width: 180px; height: 180px; }

/* ── Zaman çizelgesi ── */
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-icon { flex: none; width: 30px; height: 30px; border-radius: var(--radius-pill); background: var(--surface-3); display: flex; align-items: center; justify-content: center; color: var(--text-2); }
.timeline-icon .ico { font-size: 16px; }
.timeline-body { flex: 1; min-width: 0; }
.timeline-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.timeline__time { font-size: var(--fs-sm); color: var(--text-3); white-space: nowrap; }
.timeline-item--now .timeline-icon { background: var(--accent-soft); color: var(--accent-text); }
.timeline-item--alert .timeline-icon { background: var(--danger-bg); color: var(--danger); }
.timeline-item--muted .timeline-icon { color: var(--text-3); }

@media (max-width: 1100px) {
  .detail-split, .detail-split--even, .detail-split--aside-first, .detail-split--narrow-aside { grid-template-columns: 1fr; }
  .detail-split__col--sticky { position: static; }
}
@media (max-width: 860px) {
  .entity-head { padding: 16px; }
  .entity-head__no { font-size: 22px; }
  .record-foot__aside { margin-left: 0; text-align: left; }
  .file-row { flex-wrap: wrap; }
  .timeline-head { flex-direction: column; align-items: flex-start; gap: 2px; }
}
@media (max-width: 640px) {
  .verify-code { gap: 16px; }
  .qr-frame { width: 108px; height: 108px; }
}

/* ════════════════════════════════════════════════════════════
   İZLEME EKRANLARI VE DENETİM MODU
   ════════════════════════════════════════════════════════════ */
/* Girintili zincir ağacı: girinti sunucudan satıra style="--depth:2" ile gelir (veri). */
.trace-tree { list-style: none; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.trace-tree__row { position: relative; display: flex; align-items: baseline; gap: 16px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.trace-tree__row:last-child { border-bottom: 0; }
.trace-tree__lot { font-family: var(--font-mono); font-size: 13px; font-weight: 500; min-width: 150px; }
.trace-tree__body { min-width: 0; }
.trace-tree__product { font-size: var(--fs-md); }
.trace-tree__meta { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 2px; }
.trace-tree__row--child { padding-left: calc(16px + var(--depth, 1) * 22px); }
.trace-tree__row--child::before { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; left: calc(8px + (var(--depth, 1) - 1) * 22px); background: var(--border); }
.trace-tree__arrow { flex: none; color: var(--accent-2); font-size: 18px; }
.trace-tree__row--root { background: var(--accent-soft); }
.trace-tree__row--root .trace-tree__lot { color: var(--accent-text); font-weight: 600; }

/* Denetim modu künyesi: denetçinin karşısında uzaktan okunacak büyüklükte. */
.audit-head { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 20px; }
.audit-head__no { font-family: var(--font-mono); font-size: 36px; font-weight: 500; letter-spacing: 0; line-height: 1.1; margin-top: 6px; overflow-wrap: anywhere; }
.audit-head__product { font-weight: 600; font-size: var(--fs-xl); margin-top: 8px; }
.audit-head__timing { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }

/* Dört hazır soru: seçili olan yumuşak yeşil zemin ve yeşil çerçeveyle ayrılır. */
.audit-questions { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px; margin-bottom: 20px; }
.audit-q { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; background: var(--surface); color: var(--text); text-decoration: none; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); transition: background-color .12s, border-color .12s; }
.audit-q:hover { background: var(--surface-2); }
.audit-q--active, .audit-q--active:hover { background: var(--accent-soft); border-color: var(--accent); }
.audit-q__index { font-size: 12px; }
.audit-q--active .audit-q__index { color: var(--accent-text); }
.audit-q__text { font-weight: 500; font-size: 15px; line-height: 1.35; }
.audit-q--active .audit-q__text { color: var(--accent-text); }

/* Tek soruya tek cevap bloğu. */
.audit-answer { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; }
.audit-answer__title { font-size: var(--fs-xl); margin-bottom: 16px; }
.audit-answer .stat-grid { margin-bottom: 20px; }
.audit-answer .table-wrap { margin-bottom: 16px; }
.audit-answer .trace-tree { margin-bottom: 16px; }

/* Belge indirme bloğu: denetim modu akışının sonu. Parti seçili değilken düğme PASİF basılır
   ve nedeni yazılır; kaybolan düğme, özelliğin olmadığını düşündürür. */
.audit-export { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-lg); padding: 24px; margin-top: 20px; }
.audit-export__label { font-size: var(--fs-xs); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent-text); }
.audit-export__title { font-weight: 600; font-size: var(--fs-xl); line-height: 1.2; margin-top: 6px; color: var(--text); }
.audit-export__desc { font-size: var(--fs-md); line-height: 1.55; color: var(--text-2); max-width: 72ch; margin-top: 8px; }
.audit-export__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

@media (max-width: 860px) {
  .trace-tree__row { flex-direction: column; gap: 2px; }
  .trace-tree__row--child { padding-left: calc(12px + var(--depth, 1) * 12px); }
  .audit-head, .audit-answer, .audit-export { padding: 16px; }
  .audit-head__no { font-size: 28px; }
}

/* ════════════════════════════════════════════════════════════
   ZİNCİR SAĞLIĞI VE TASARRUF DEFTERİ
   Grafikler satır içi SVG'dir; harici kütüphane ve CDN kullanılmaz.
   ════════════════════════════════════════════════════════════ */
.chain-score { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.chain-score__value { flex: 0 0 240px; background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius-lg); padding: 20px; }
.chain-score__number { font-weight: 600; font-size: 56px; line-height: 1; letter-spacing: -0.03em; margin: 8px 0 6px; color: var(--accent-text); font-variant-numeric: tabular-nums; }
.chain-score__trend { flex: 1 1 320px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }

.sparkline { display: block; width: 100%; height: 120px; }
.sparkline__axis { stroke: var(--border); stroke-width: 1; stroke-dasharray: 3 3; }
.sparkline__area { fill: var(--accent-soft); stroke: none; }
.sparkline__line { fill: none; stroke: var(--accent-2); stroke-width: 2; vector-effect: non-scaling-stroke; }
.sparkline__dot { fill: var(--accent); }
.sparkline__target { fill: none; stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 4 4; vector-effect: non-scaling-stroke; }
.sparkline__legend { display: flex; justify-content: space-between; margin-top: 8px; }
.sparkline__legend .label-mono { white-space: nowrap; }

.savings-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-bottom: 14px; }
.savings-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.savings-legend__swatch { width: 10px; height: 10px; display: inline-block; border-radius: 3px; }
.savings-legend__swatch--rescued { background: var(--accent-2); }
.savings-legend__swatch--wasted { background: var(--danger); }
.savings-legend__scale { margin-left: auto; }
.savings-chart { display: block; width: 100%; height: 200px; border-bottom: 1px solid var(--border); }
.savings-chart__bar--rescued { fill: var(--accent-2); }
.savings-chart__bar--wasted { fill: var(--danger); }
.savings-chart__axis { display: flex; margin-top: 8px; }
.savings-chart__tick { flex: 1 1 0; text-align: center; }

@media (max-width: 860px) {
  .chain-score__value { flex: 1 1 100%; }
  .chain-score__number { font-size: 44px; }
  .expiry-actions { flex-direction: column; align-items: stretch; }
}

/* ════════════════════════════════════════════════════════════
   KİRACI EKRANI (/Platform/Tenants)
   ════════════════════════════════════════════════════════════ */
.invite-card { margin-bottom: 24px; background: var(--accent-soft); border-color: var(--accent-line); }
.invite-card__title { margin: 4px 0 8px; font-size: var(--fs-lg); font-weight: 600; }
.invite-card__text { margin: 0 0 12px; font-size: var(--fs-md); line-height: 1.55; color: var(--text-2); }
.invite-card__text strong { color: var(--text); }
.invite-card__link { display: flex; gap: 8px; align-items: stretch; }
.invite-card__link .form-control { flex: 1; min-width: 0; font-family: var(--font-mono); font-size: 12px; }
.tenant-form { margin-bottom: 32px; }
.tenant-list-head { margin: 0 0 12px; }
.tenant-code { text-transform: none; letter-spacing: 0; overflow-wrap: anywhere; }

/* ════════════════════════════════════════════════════════════
   KABUKSUZ SAYFALAR — belge doğrulama, KVKK
   Ürünün dışarıya açık sayfaları: yan menü yok, dar okuma ölçüsü (760 px).
   ════════════════════════════════════════════════════════════ */
.doc-page { background: var(--bg); min-height: 100vh; }
.doc-top { background: var(--surface); border-bottom: 1px solid var(--border); padding: 0 32px; }
.doc-top-inner { max-width: 760px; margin: 0 auto; min-height: var(--topbar-h); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; }
.doc-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.doc-kicker { font-size: var(--fs-sm); color: var(--text-3); }
.doc-body { max-width: 760px; margin: 0 auto; padding: 40px 32px 72px; }
.doc-title { font-weight: 600; font-size: 28px; letter-spacing: -0.02em; line-height: 1.25; margin: 0 0 8px; color: var(--text); }
.doc-sub { font-size: 15px; line-height: 1.6; color: var(--text-2); margin: 0 0 28px; }
.doc-h { font-weight: 600; font-size: 18px; margin: 36px 0 10px; color: var(--text); }
.doc-h3 { font-weight: 600; font-size: 15px; margin: 24px 0 8px; color: var(--text); }
/* Uzun hukuki metnin okuma ölçüsü. */
.doc-body--prose > p:not(.doc-sub) { font-size: 15px; line-height: 1.7; color: var(--text); margin: 0 0 14px; }
.doc-body--prose > ul { font-size: 15px; line-height: 1.7; color: var(--text); margin: 0 0 14px; padding-left: 20px; }
.doc-body--prose > ul > li { margin-bottom: 6px; }

.doc-state { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 20px; margin-bottom: 24px; }
.doc-state__head { display: flex; align-items: center; gap: 10px; }
.doc-state h2 { font-weight: 600; font-size: var(--fs-lg); margin: 0 0 6px; }
.doc-state p { font-size: var(--fs-md); line-height: 1.6; margin: 0; }
.doc-state--ok { border-color: var(--success-line); background: var(--success-bg); }
.doc-state--ok h2 { color: var(--success); }
.doc-state--none { border-color: var(--danger-line); background: var(--danger-bg); color: var(--danger); }
.doc-state--none h2 { color: var(--danger); }
.doc-foot { display: flex; justify-content: space-between; gap: 8px 18px; flex-wrap: wrap; border-top: 1px solid var(--border); margin-top: 40px; padding-top: 16px; font-size: var(--fs-sm); color: var(--text-3); }

@media (max-width: 640px) {
  .doc-top { padding: 0 20px; }
  .doc-body { padding: 28px 20px 56px; }
  .doc-title { font-size: 24px; }
}

/* ════════════════════════════════════════════════════════════
   GİRİŞ VE ŞİFRE SAYFALARI (_AuthLayout.cshtml)
   Solda ürünü tek cümleyle anlatan yumuşak yeşil pano, sağda form.
   ════════════════════════════════════════════════════════════ */
.login-wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
.login-brand { background: var(--accent-soft); border-right: 1px solid var(--accent-line); padding: 32px 48px 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login-brand__mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.login-claim { font-size: 28px; line-height: 1.25; font-weight: 600; letter-spacing: -0.02em; margin: 0; max-width: 22ch; color: var(--text); }
.login-note { font-size: 15px; line-height: 1.6; color: var(--text-2); margin: 16px 0 0; max-width: 46ch; }
.login-deadline { font-size: var(--fs-sm); color: var(--accent-text); }
.login-form { background: var(--surface); padding: 48px; display: flex; align-items: center; justify-content: center; }
.login-form-inner { width: 100%; max-width: 380px; }
/* Dar ekranda sol pano gizlenir; marka formun üstünde küçük bir satır olarak kalır. */
.login-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 28px; text-decoration: none; }
.login-sub { font-size: var(--fs-md); line-height: 1.55; color: var(--text-2); margin: 0 0 24px; }
.login-field { margin-bottom: 16px; }
.login-submit { width: 100%; }
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.login-check { display: flex; align-items: center; gap: 8px; font-size: var(--fs-md); }
.login-link { font-size: var(--fs-md); color: var(--accent-text); text-decoration: none; }
.login-link:hover { text-decoration: underline; }
.login-error { border: 1px solid var(--danger-line); border-radius: var(--radius); background: var(--danger-bg); color: var(--danger); padding: 10px 14px; margin-bottom: 20px; font-size: var(--fs-md); }
.login-error ul { margin: 0; padding-left: 18px; }
.login-notice { border: 1px solid var(--success-line); border-radius: var(--radius); background: var(--success-bg); color: var(--success); padding: 10px 14px; margin-bottom: 20px; font-size: var(--fs-md); line-height: 1.5; }
.login-account { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); padding: 10px 14px; margin-bottom: 20px; font-size: var(--fs-md); line-height: 1.5; }
.login-account__mail { font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; }
.login-hint { font-size: var(--fs-sm); line-height: 1.45; color: var(--text-3); margin-top: 6px; }
.login-back { margin-top: 20px; }
.login-legal { margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px 20px; }
.login-legal a { font-size: var(--fs-sm); color: var(--text-3); text-decoration: none; }
.login-legal a:hover { color: var(--text); text-decoration: underline; }
@media (max-width: 900px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .login-form { padding: 40px 20px; align-items: flex-start; }
  .login-mobile-brand { display: inline-flex; }
}

/* ════════════════════════════════════════════════════════════
   TANITIM SAYFASI (oturumsuz ana sayfa — Home/Landing.cshtml)
   Belge değil vitrin: geniş ölçü (1120 px), büyük başlık, tam genişlikte ekran görüntüsü.
   Sayfaya özgü <style> bloğu yoktur. Sayfadaki tek dolu yeşil yüzey görüşme çağrısıdır.
   ════════════════════════════════════════════════════════════ */
.lp-page { background: var(--bg); min-height: 100vh; display: flex; flex-direction: column; }
.lp-page > main { flex: 1 1 auto; }
.lp-wrap { max-width: 1184px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.lp-page a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lp-band a:focus-visible { outline-color: var(--text-on-accent); }

/* ── Üst bant: marka + giriş ── */
.lp-top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--border); }
.lp-top__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 60px; }
.lp-brand { display: flex; align-items: center; gap: 10px; }
/* Adları koyu zemin dönemindendir: üst banttaki giriş düğmesi ikincil, görüşme bandındaki
   düğme yeşil zemin üzerinde açık renklidir. */
.btn.lp-btn-ondark { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn.lp-btn-ondark:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn.lp-btn-light { background: var(--surface); color: var(--accent-text); border-color: var(--surface); }
.btn.lp-btn-light:hover { background: var(--accent-soft); border-color: var(--accent-soft); }

/* ── Açılış ── */
.lp-hero { padding: 72px 0 64px; }
.lp-h1 { font-size: 48px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; max-width: 20ch; margin: 14px 0 18px; }
.lp-lead { font-size: 18px; line-height: 1.6; color: var(--text-2); max-width: 60ch; margin: 0 0 28px; }
.lp-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; margin-bottom: 52px; }
.lp-cta__note { font-size: var(--fs-md); color: var(--text-3); }
.lp-page .btn-xl { text-align: center; }

/* ── Ekran görüntüsü çerçevesi ── */
.lp-shot { margin: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.lp-shot img { display: block; width: 100%; height: auto; }
.lp-shot figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 14px; border-top: 1px solid var(--border); font-size: var(--fs-sm); color: var(--text-3); }
.lp-shot figcaption a { color: var(--accent-text); }
/* Yana kaydırma ipucu yalnız telefonda görünür. */
.lp-shot__hint { display: none; }

/* ── Bölümler ── */
.lp-section { padding: 72px 0; border-top: 1px solid var(--border); }
.lp-section--tint { background: var(--surface); border-bottom: 1px solid var(--border); }
.lp-section--tint + .lp-section { border-top: 0; }
.lp-h2 { font-size: 30px; line-height: 1.2; letter-spacing: -0.02em; font-weight: 600; max-width: 24ch; margin: 10px 0 18px; }
.lp-h3 { font-size: 20px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 600; margin: 8px 0 0; }
.lp-text p { font-size: 16px; line-height: 1.7; color: var(--text-2); max-width: 66ch; margin: 0 0 14px; }
.lp-text p:last-child { margin-bottom: 0; }
.lp-source a { font-size: var(--fs-md); }

/* ── Tebliğ: solda künye kartları, sağda metin ── */
.lp-law { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 56px; align-items: start; }
.lp-law__facts { display: grid; gap: 12px; }
.lp-section--tint .stat { background: var(--surface-2); }

/* ── Özellik ızgarası ── */
.lp-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 28px; }
.lp-feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px 22px 24px; }
.lp-feature__no { font-size: var(--fs-sm); font-weight: 500; color: var(--accent-text); }
.lp-feature h3 { font-size: 17px; line-height: 1.3; font-weight: 600; margin: 10px 0 8px; }
.lp-feature p { font-size: 15px; line-height: 1.6; color: var(--text-2); margin: 0; }

/* ── Ekran örneği: üstte iki sütunlu açıklama, altta tam genişlikte görüntü ── */
.lp-screen { margin-top: 44px; }
.lp-screen + .lp-screen { margin-top: 64px; }
.lp-screen__head { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 14px 56px; align-items: end; margin-bottom: 20px; }

/* ── Kimin için ── */
.lp-who { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px 56px; align-items: start; }
.lp-who .lp-h2 { margin-bottom: 0; }

/* ── Görüşme çağrısı: sayfadaki tek dolu yeşil bant ── */
.lp-band { background: var(--accent); color: var(--text-on-accent); padding: 56px 0; }
.lp-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.lp-band__label { font-size: var(--fs-sm); font-weight: 500; color: var(--accent-soft); }
.lp-band .lp-h2 { color: var(--text-on-accent); max-width: none; }
.lp-band p { font-size: 16px; line-height: 1.7; max-width: 60ch; margin: 0; color: var(--accent-soft); }
.lp-band p a { color: var(--text-on-accent); }

/* ── Ayak ── */
.lp-foot { padding: 28px 0 36px; }
.lp-foot__inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 48px; }
.lp-foot p { font-size: var(--fs-md); line-height: 1.6; color: var(--text-3); max-width: 60ch; margin: 0; }
.lp-foot__links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: var(--fs-md); }
.lp-foot__links a { color: var(--text-2); text-decoration: none; }
.lp-foot__links a:hover { color: var(--text); text-decoration: underline; }

@media (max-width: 960px) {
  .lp-h1 { font-size: 40px; }
  .lp-law, .lp-who, .lp-screen__head { grid-template-columns: 1fr; }
  .lp-law { gap: 28px; }
  /* Tek sütunda önce metin, sonra künye kartları okunur. */
  .lp-law__facts { order: 2; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .lp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .lp-wrap { padding-left: 20px; padding-right: 20px; }
  .lp-hero { padding: 40px 0 44px; }
  .lp-h1 { font-size: 32px; }
  .lp-lead { font-size: 16px; }
  .lp-h2 { font-size: 24px; }
  .lp-h3 { font-size: 18px; }
  .lp-section { padding: 44px 0; }
  .lp-band { padding: 44px 0; }
  .lp-cta { margin-bottom: 36px; }
  .lp-page .btn-xl { width: 100%; }
  .lp-features { grid-template-columns: 1fr; }
  .lp-law__facts .stat { padding: 14px 16px; }
  .lp-law__facts .stat__value { font-size: 22px; }
  .lp-screen + .lp-screen { margin-top: 48px; }
  /* 🔴 Masaüstü ekran görüntüsü 350 px'e sığdırılırsa yazılar okunmaz. Görüntü küçültülmez,
     çerçeve yana kaydırılır; sayfanın kendisi yatay taşmaz. */
  .lp-shot__scroll { overflow-x: auto; }
  .lp-shot__scroll img { width: 760px; max-width: none; }
  .lp-shot__hint { display: inline; }
}

/* ════════════════════════════════════════════════════════════
   SON KATMAN
   ════════════════════════════════════════════════════════════ */
/* Metin rengi yardımcıları dosyanın SONUNDA durur: bileşen kurallarından sonra gelsinler ki
   class="def-value text-danger" gerçekten kırmızı görünsün. */
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-accent { color: var(--accent-text); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
}

@media print {
  .sidebar, .topbar, .page-actions, .row-actions, .toast-wrap, .form-actions--sticky { display: none !important; }
  body, .content { background: #FFFFFF; padding: 0; }
  .content { max-width: none; }
}
