/* ==========================================================================
   Oto Servis Takip — Tasarım Sistemi
   Statik prototip. Gerçek uygulamada bu değerler Tailwind config'e taşınacak.
   ========================================================================== */

:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-2: #fafbfc;
  --border: #e2e6ea;
  --border-strong: #cfd6dd;
  --text: #16202b;
  --text-2: #55636f;
  --muted: #8b97a3;

  --accent: #1f5fd6;
  --accent-dark: #1a4fb3;
  --accent-soft: #e8f0fe;

  --ok: #1a7f4b;
  --ok-soft: #e4f5ec;
  --warn: #b26a00;
  --warn-soft: #fdf1de;
  --danger: #c0392b;
  --danger-soft: #fdeceb;
  --info: #0f6f8f;
  --info-soft: #e3f2f7;
  --purple: #6b3fa0;
  --purple-soft: #f0e9f9;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(22, 32, 43, .06), 0 1px 3px rgba(22, 32, 43, .04);
  --shadow-lg: 0 8px 28px rgba(22, 32, 43, .12);
  --sidebar-w: 236px;
  --topbar-h: 60px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Inter, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }

.mono { font-family: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace; }

/* ---------- Yerleşim -------------------------------------------------- */

.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: #10202f;
  color: #c7d3de;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  height: var(--topbar-h);
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  color: #fff;
  flex: 0 0 auto;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f7ef0, #1a4fb3);
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px; color: #fff;
  flex: 0 0 auto;
}
/* İkisi de blok olmalı — yoksa "Bozpet Oto ServisÜmraniye" diye bitişik çıkar */
.brand-name { display: block; font-weight: 600; font-size: 14px; line-height: 1.15; }
.brand-sub  { display: block; font-size: 11px; color: #7f93a6; line-height: 1.3; }

.nav { padding: 12px 10px; overflow-y: auto; flex: 1 1 auto; }
/* Menü uzayınca çıkan kaydırma çubuğu koyu zeminde ince ve sessiz olsun */
.nav { scrollbar-width: thin; scrollbar-color: #33475c transparent; }
.nav::-webkit-scrollbar { width: 8px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb { background: #2c3e52; border-radius: 4px; }
.nav::-webkit-scrollbar-thumb:hover { background: #3d5570; }
.nav-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #64798c;
  padding: 14px 10px 6px;
  font-weight: 600;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  color: #c7d3de;
  font-size: 13.5px;
  margin-bottom: 1px;
}
.nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav a.active { background: var(--accent); color: #fff; font-weight: 500; }
.nav a .ico { width: 17px; text-align: center; opacity: .9; flex: 0 0 auto; }
.nav a .count {
  margin-left: auto;
  background: rgba(255, 255, 255, .12);
  border-radius: 20px;
  padding: 1px 7px;
  font-size: 11px;
}
.nav a.active .count { background: rgba(0, 0, 0, .22); }

.sidebar-foot {
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding: 12px 14px;
  font-size: 12px;
  color: #7f93a6;
  flex: 0 0 auto;
}

.main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar .search {
  flex: 1 1 auto;
  max-width: 420px;
  position: relative;
}
.topbar .search input {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel-2);
  font-size: 13px;
  color: var(--text);
}
.topbar .search input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); background: #fff; }
.topbar .search .ico {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--muted); font-size: 13px;
}

/* Mobil menü düğmesi — yalnız dar ekranda görünür (bkz. 720px sorgusu) */
.menu-btn {
  display: none;
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: var(--radius-sm);
  font-size: 17px;
  line-height: 1;
  padding: 7px 10px;
  cursor: pointer;
}
.menu-btn:hover { background: var(--panel-2); }

.user-chip { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.user-chip .cikis {
  font-size: 12.5px;
  color: var(--text-2);
  border-left: 1px solid var(--border);
  padding-left: 11px;
  margin-left: 2px;
}
.user-chip .cikis:hover { color: var(--danger); text-decoration: none; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  display: grid; place-items: center; font-weight: 600; font-size: 12px;
  flex: 0 0 auto;
}
.user-chip .who { line-height: 1.2; }
.user-chip .who b { display: block; font-size: 13px; font-weight: 600; }
.user-chip .who span { font-size: 11.5px; color: var(--muted); }

.content { padding: 22px; max-width: 1360px; width: 100%; }

.page-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.page-head .sub { color: var(--text-2); font-size: 13px; margin-top: 2px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.breadcrumb { font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--text-2); }
.breadcrumb span { margin: 0 6px; }

/* ---------- Kart ------------------------------------------------------ */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2);
}
.card-head .actions { margin-left: auto; display: flex; gap: 8px; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }
/* Tablo altı açıklama bandı */
.card-not {
  padding: 11px 16px;
  font-size: 12.5px;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.card-not b { color: var(--text-2); }
.card-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--panel-2);
  display: flex;
  gap: 8px;
  align-items: center;
}

.grid { display: grid; gap: 18px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.main-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }

@media (max-width: 1100px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.main-side, .grid.cols-3, .grid.cols-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
  .content { padding: 14px; }

  /* Kenar çubuğu gizlenmez, ekran dışına alınır — ☰ ile üzerine kayar.
     Tamamen gizlenseydi telefonda hiçbir sayfadan diğerine geçilemezdi. */
  .menu-btn { display: block; }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform .18s ease;
    box-shadow: var(--shadow-lg);
  }
  body.menu-acik .sidebar { transform: translateX(0); }
  body.menu-acik::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 50;
    background: rgba(22, 32, 43, .45);
  }

  .user-chip .who { display: none; }
}

@media (max-width: 560px) {
  /* Üst bar tek satıra sığmıyor: arama gider, rol seçici kendi satırına iner.
     Rol seçici maketin en çok denenen aracı olduğu için daraltıp okunmaz
     hale getirmek yerine alt satıra alınıyor. */
  .topbar {
    height: auto;
    min-height: var(--topbar-h);
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 9px 14px;
  }
  .topbar .search { display: none; }
  .user-chip { order: 4; }
  #rol-secici { order: 5; flex: 1 1 100%; width: 100%; }
}

/* ---------- İstatistik kutusu ----------------------------------------- */

.stat {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow);
  display: block;
}
.stat:hover { text-decoration: none; border-color: var(--border-strong); }
.stat .label {
  font-size: 12px; color: var(--text-2); font-weight: 500;
  display: flex; align-items: center; gap: 7px;
}
.stat .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: 0 0 auto; }
.stat .value { font-size: 27px; font-weight: 650; letter-spacing: -.02em; margin-top: 8px; color: var(--text); }
.stat .value small { font-size: 14px; font-weight: 500; color: var(--muted); }
.stat .note { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat .note .up { color: var(--ok); font-weight: 600; }
.stat .note .down { color: var(--danger); font-weight: 600; }

/* ---------- Tablo ----------------------------------------------------- */

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data th {
  text-align: left;
  font-weight: 600;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .045em;
  color: var(--text-2);
  padding: 10px 14px;
  background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #f7f9fb; }
table.data td.num, table.data th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data .sub { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; }
/* İş emri / belge numaraları tireden bölünmesin (UMR-2026-0142 tek satırda kalsın) */
table.data .mono, table.data a.mono { white-space: nowrap; }

/* Tablo içinde gruplama başlığı (ör. depoları şubeye göre ayırmak) */
table.data tr.grup td {
  background: var(--panel-2);
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border);
  padding: 8px 14px;
  font-size: 12px; font-weight: 700;
  letter-spacing: .03em; color: var(--text-2);
}
table.data tr.grup:first-child td { border-top: 0; }
table.data tr.grup td .say { font-weight: 500; color: var(--muted); margin-left: 6px; }
table.data tr.grup:hover td { background: var(--panel-2); }
table.data tfoot td {
  padding: 10px 14px;
  background: var(--panel-2);
  font-weight: 600;
  border-top: 1px solid var(--border);
}

.plate {
  display: inline-block;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: .04em;
  background: #fff;
  border: 1.5px solid #2b3a4a;
  border-left: 7px solid #1f5fd6;
  border-radius: 4px;
  padding: 2px 8px 2px 6px;
  white-space: nowrap;
  color: #16202b;
}

.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--muted);
}
.empty .big { font-size: 30px; opacity: .35; margin-bottom: 8px; }

/* ---------- Rozetler -------------------------------------------------- */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  flex: 0 0 auto;
}
.badge.plain::before { display: none; }

.b-kabul      { background: var(--info-soft);   color: var(--info); }
.badge.b-teklif { background: var(--purple-soft); color: var(--purple); }
.b-islemde    { background: var(--accent-soft); color: var(--accent-dark); }
.b-parca      { background: var(--warn-soft);   color: var(--warn); }
.b-hazir      { background: var(--ok-soft);     color: var(--ok); }
.b-teslim     { background: #eef1f4;            color: #5b6b7a; }
.b-iptal      { background: var(--danger-soft); color: var(--danger); }

.b-rol-admin  { background: #17263a; color: #fff; }
.b-rol-dan    { background: var(--accent-soft); color: var(--accent-dark); }
.b-rol-tek    { background: var(--warn-soft); color: var(--warn); }

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  background: #eef1f4;
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 500;
}
.tag.warranty { background: var(--ok-soft); color: var(--ok); }
.tag.late { background: var(--danger-soft); color: var(--danger); }

/* ---------- Buton ----------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--panel-2); border-color: var(--muted); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn.success { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.success:hover { filter: brightness(.93); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: #eef1f4; }
.btn.danger { color: var(--danger); border-color: #f0c8c4; background: #fff; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.btn-group { display: inline-flex; }
.btn-group .btn { border-radius: 0; margin-left: -1px; }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ---------- Form ------------------------------------------------------ */

.field { margin-bottom: 14px; }
.field > label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 5px;
}
.field .req { color: var(--danger); }
/* .hint form alanı dışında da kullanılabilir (tablo altı açıklaması vb.) */
.hint { font-size: 12px; color: var(--muted); }
.field .hint { margin-top: 4px; }

input[type=text], input[type=password], input[type=number], input[type=date],
input[type=email], input[type=tel], input[type=search], select, textarea {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}
input[readonly], input:disabled, select:disabled, textarea[readonly] {
  background: #f2f4f6; color: var(--text-2);
}
textarea { resize: vertical; min-height: 78px; line-height: 1.55; }
select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%238b97a3' d='M2 4l4 4 4-4z'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }

.form-row { display: grid; gap: 14px; }
.form-row.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-row.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) {
  .form-row.c3, .form-row.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .form-row.c2, .form-row.c3, .form-row.c4 { grid-template-columns: minmax(0, 1fr); }
}

.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.check input { width: auto; }

.filters {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  flex-wrap: wrap;
}
.filters .field { margin-bottom: 0; min-width: 150px; }
.filters .grow { flex: 1 1 220px; }

.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-strong);
  background: #fff;
  font-size: 12.5px;
  color: var(--text-2);
  cursor: pointer;
  font-weight: 500;
}
.chip:hover { border-color: var(--muted); text-decoration: none; }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip .n { opacity: .7; margin-left: 4px; }

/* ---------- Tanım listesi (detay alanları) ---------------------------- */

.dl { display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 9px 14px; font-size: 13.5px; }
.dl dt { color: var(--text-2); font-weight: 500; }
.dl dd { margin: 0; font-weight: 500; }

/* ---------- Durum akışı (stepper) ------------------------------------- */

.flow { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }
.flow .step {
  display: flex; align-items: center; gap: 7px;
  padding: 5px 12px 5px 10px;
  font-size: 12.5px; font-weight: 600;
  color: var(--muted);
  background: #f0f3f5;
  border: 1px solid var(--border);
  border-right: 0;
  white-space: nowrap;
}
.flow .step:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.flow .step:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; border-right: 1px solid var(--border); }
.flow .step .n {
  width: 18px; height: 18px; border-radius: 50%;
  background: #dde3e9; color: #7d8b98;
  display: grid; place-items: center; font-size: 10.5px;
}
.flow .step.done { background: var(--ok-soft); color: var(--ok); border-color: #c6e6d5; }
.flow .step.done .n { background: var(--ok); color: #fff; }
.flow .step.now { background: var(--accent); color: #fff; border-color: var(--accent); }
.flow .step.now .n { background: rgba(0, 0, 0, .22); color: #fff; }

/* ---------- Zaman çizelgesi ------------------------------------------- */

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  position: relative;
  padding: 0 0 16px 22px;
  border-left: 2px solid var(--border);
  margin-left: 6px;
}
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute; left: -6px; top: 3px;
  width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2px solid var(--border-strong);
}
.timeline li.hi::before { border-color: var(--accent); background: var(--accent); }
.timeline .t-head { font-size: 13.5px; font-weight: 600; }
.timeline .t-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.timeline .t-note { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* ---------- Uyarı kutusu ---------------------------------------------- */

.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  border: 1px solid transparent;
  margin-bottom: 14px;
}
.alert .ico { flex: 0 0 auto; font-size: 15px; line-height: 1.35; }
.alert.info { background: var(--accent-soft); color: #17427f; border-color: #cfe0fb; }
.alert.warn { background: var(--warn-soft); color: #7d4a00; border-color: #f4dfba; }
.alert.ok { background: var(--ok-soft); color: #10603a; border-color: #c6e6d5; }
.alert.err { background: var(--danger-soft); color: #8e2b20; border-color: #f2ccc8; }

/* ---------- Sekmeler --------------------------------------------------- */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 16px; background: var(--panel-2); }
.tabs a {
  padding: 11px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

/* ---------- Sayfalama -------------------------------------------------- */

.pager {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-2);
  background: var(--panel-2);
}
.pager .spacer { margin-left: auto; }
.pager .pg {
  min-width: 30px; height: 30px; padding: 0 8px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--text-2); font-size: 13px;
}
.pager .pg.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pager .pg:hover { text-decoration: none; }

/* ---------- Toplam özeti ---------------------------------------------- */

.totals { font-size: 13.5px; }
.totals .line { display: flex; justify-content: space-between; padding: 6px 0; }
.totals .line span:last-child { font-variant-numeric: tabular-nums; font-weight: 600; }
.totals .line.muted span { color: var(--text-2); font-weight: 500; }
.totals .line.grand {
  border-top: 2px solid var(--text);
  margin-top: 6px; padding-top: 10px;
  font-size: 17px; font-weight: 700;
}

/* ---------- Depo / stok ------------------------------------------------ */

/* Stok seviyesi: mevcut adedin kritik seviyeye göre durumu */
.seviye { display: flex; align-items: center; gap: 9px; }
.seviye .adet {
  font-weight: 650; font-size: 14px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.seviye.ok .adet     { color: var(--text); }
.seviye.az .adet     { color: var(--warn); }
.seviye.yok .adet    { color: var(--danger); }
.seviye.eksi .adet   { color: var(--danger); }

.seviye-bar {
  width: 62px; height: 5px; border-radius: 3px;
  background: #eaeef2; overflow: hidden; flex: 0 0 auto;
}
.seviye-bar i { display: block; height: 100%; border-radius: 3px; }
.seviye.ok  .seviye-bar i { background: var(--ok); }
.seviye.az  .seviye-bar i { background: var(--warn); }
.seviye.yok .seviye-bar i { background: var(--danger); }

/* Raf yeri etiketi */
.raf {
  display: inline-block;
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 11.5px; font-weight: 600;
  background: #eef1f4; color: var(--text-2);
  border-radius: 4px; padding: 2px 7px;
  white-space: nowrap;
}

/* Stok hareket tipleri */
.h-giris  { background: var(--ok-soft);     color: var(--ok); }
.h-cikis  { background: var(--accent-soft); color: var(--accent-dark); }
.h-iade   { background: var(--warn-soft);   color: var(--warn); }
.h-sayim  { background: var(--purple-soft); color: var(--purple); }
.h-fire   { background: var(--danger-soft); color: var(--danger); }

/* Miktar sütunu: +/- işaretli */
.mik { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.mik.arti { color: var(--ok); }
.mik.eksi { color: var(--danger); }

/* Satır ekleme tablosu (alış girişi, sayım) */
table.data td.girdi { padding: 6px 8px; }
table.data td.girdi input,
table.data td.girdi select { padding: 6px 9px; font-size: 13px; }

/* Belge düzenleme: değişen ve silinen satırlar */
table.data tbody tr.degisti td { background: var(--warn-soft); }
table.data tbody tr.degisti td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
table.data tbody tr.silindi td { background: var(--danger-soft); opacity: .7; }
table.data tbody tr.silindi td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
table.data tbody tr.silindi .parca-ad { text-decoration: line-through; }

.eski {
  color: var(--muted);
  text-decoration: line-through;
  font-size: 12px;
  margin-right: 5px;
}
.yeni { color: var(--warn); font-weight: 650; }

/* Kaydederken sorulan neden listesi (modal içinde) */
.neden-satir {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  padding: 13px 15px;
  margin-bottom: 12px;
}
.neden-satir:last-child { margin-bottom: 0; }
.neden-satir.eksik { border-color: var(--danger); background: var(--danger-soft); }
.neden-satir .ust { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.neden-satir .parca { font-weight: 600; font-size: 14px; color: var(--text); }
.neden-satir .kod { font-size: 12px; color: var(--muted); }
.neden-satir .rozet {
  margin-left: auto;
  background: var(--warn-soft); color: var(--warn);
  border: 1px solid #f4dfba; border-radius: 20px;
  padding: 2px 11px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.neden-satir .etki { font-size: 12.5px; color: var(--text-2); margin-top: 7px; }
.neden-satir .chips { margin: 11px 0 9px; }
.neden-satir .chip { font-size: 12px; padding: 4px 10px; }
.neden-satir textarea { min-height: 56px; background: #fff; }
.neden-satir .uyari {
  display: none;
  font-size: 12px; color: var(--danger); font-weight: 600; margin-top: 5px;
}
.neden-satir.eksik .uyari { display: block; }

/* ---------- Modal ------------------------------------------------------ */

.modal-arka {
  position: fixed; inset: 0;
  background: rgba(16, 24, 33, .5);
  display: grid; place-items: center;
  z-index: 100; padding: 20px;
}
.modal-arka[hidden] { display: none; }
/* Başka bir pencerenin üstünde açılan pencere (ör. raf düzenleme) */
.modal-arka.ust { z-index: 120; background: rgba(16, 24, 33, .35); }

/* Satır satır düzenlenen liste (raf tanımları gibi) */
.satir-liste { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.satir-liste .baslik {
  display: grid; grid-template-columns: 78px 1fr 92px 38px;
  gap: 10px; align-items: center;
  padding: 8px 12px; background: var(--panel-2);
  border-bottom: 1px solid var(--border);
  font-size: 11px; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--text-2);
}
.satir-liste .satir {
  display: grid; grid-template-columns: 78px 1fr 92px 38px;
  gap: 10px; align-items: center;
  padding: 7px 12px; border-bottom: 1px solid var(--border);
}
.satir-liste .satir:last-child { border-bottom: 0; }
.satir-liste .satir:hover { background: #f7f9fb; }
.satir-liste .satir input { padding: 6px 9px; font-size: 13px; }
.satir-liste .satir .adet { text-align: right; font-size: 12.5px; color: var(--text-2); }
.satir-liste .satir .adet.dolu { color: var(--warn); font-weight: 600; }
.satir-liste .bos { padding: 26px 12px; text-align: center; color: var(--muted); font-size: 13px; }

.modal {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 540px;
  /* .genis: kaydederken açılan çok satırlı neden listesi için */
  overflow: hidden;
  max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
}
.modal.genis { max-width: 760px; }

.modal-head {
  padding: 15px 18px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  flex: 0 0 auto;
}
.modal-head .alt { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.modal-head h2 { font-size: 15.5px; }
.modal-head .kapat { margin-left: auto; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot {
  padding: 13px 18px;
  border-top: 1px solid var(--border);
  background: var(--panel-2);
  display: flex; gap: 8px; align-items: center;
  flex: 0 0 auto;
}
.modal-foot .sag { margin-left: auto; display: flex; gap: 8px; }

/* Modal içindeki "ne değişti" kutusu */
.degisim-kutu {
  background: var(--warn-soft);
  border: 1px solid #f4dfba;
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  margin-bottom: 16px;
}
.degisim-kutu .parca { font-weight: 600; font-size: 14px; color: var(--text); }
.degisim-kutu .kod { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.degisim-kutu .fark {
  display: flex; align-items: center; gap: 10px;
  margin-top: 10px; font-size: 15px;
}
.degisim-kutu .fark .alan { font-size: 12.5px; color: var(--text-2); }
.degisim-kutu .fark .ok { color: var(--warn); font-weight: 700; }
.degisim-kutu .fark .v-eski { color: var(--muted); text-decoration: line-through; }
.degisim-kutu .fark .v-yeni { color: var(--warn); font-weight: 700; }
.degisim-kutu .etki {
  margin-top: 9px; padding-top: 9px;
  border-top: 1px solid #f4dfba;
  font-size: 12.5px; color: var(--text-2);
}

/* ---------- Şube / çoklu depo ------------------------------------------ */

/* Üst bardaki aktif şube seçici */
.sube-secici {
  display: flex; align-items: center; gap: 7px;
  background: var(--accent-soft);
  border: 1px solid #cfe0fb;
  border-radius: 20px;
  padding: 3px 12px 3px 11px;
  flex: 0 0 auto;
}
.sube-secici .ico { font-size: 13px; }
.sube-secici select {
  width: auto; border: 0;
  font-size: 13px; font-weight: 600; color: var(--accent-dark);
  padding: 3px 22px 3px 0;
  /* DİKKAT: burada "background: transparent" kısayolu KULLANILMAZ —
     kısayol background-repeat'i repeat'e sıfırlar ve ok simgesi
     kutunun tamamına döşenip yazının arkasında noktalı bir şerit oluşturur. */
  background-color: transparent;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%231a4fb3' d='M2 4l4 4 4-4z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 12px 12px;
}
.sube-secici select:focus { outline: 2px solid #cfe0fb; }

/* Yazma yapan ekranlarda aktif şubeyi sabit gösteren bant */
.sube-bant {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  background: var(--accent-soft);
  border: 1px solid #cfe0fb;
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  font-size: 13px; color: #17427f;
  margin-bottom: 16px;
}
.sube-bant b { font-weight: 700; }
.sube-bant .kilit { margin-left: auto; font-size: 12px; color: var(--text-2); }

/* Şube ve depo etiketleri */
.sube-etiket, .depo-etiket {
  display: inline-block;
  font-size: 11.5px; font-weight: 600;
  border-radius: 4px; padding: 2px 8px; white-space: nowrap;
}
.sube-etiket { background: var(--accent-soft); color: var(--accent-dark); }
.depo-etiket { background: #eef1f4; color: var(--text-2); }
/* .raf adı raf-yeri etiketiyle çakışıyor; burada yazı tipi devralınmalı */
.depo-etiket.ana     { background: var(--info-soft);   color: var(--info);   font-family: inherit; }
.depo-etiket.raf     { background: var(--warn-soft);   color: var(--warn);   font-family: inherit; }
.depo-etiket.seyyar  { background: var(--purple-soft); color: var(--purple); font-family: inherit; }

/* ---------- Şube bloğu: şube kimliği + O ŞUBENİN depoları ---------------
   Depolar önce ayrı bir bölümde listeleniyordu; "hangi depo hangi şubenin"
   sorusu ancak grup başlığı okunarak cevaplanıyordu. Depolar şubenin kendi
   çerçevesine alınınca soru ortadan kalkıyor — bir deponun hangi şubeye ait
   olduğu, içinde durduğu bloktan belli.
   --------------------------------------------------------------------- */

.sube-blok {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  overflow: hidden;
}
.sube-blok.pasif  { border-left-color: var(--border-strong); }
.sube-blok.subesiz { border-left-color: var(--purple); }

.sube-blok-bas {
  display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap;
  padding: 16px 18px;
}
.sube-blok-bas .kimlik { flex: 1 1 250px; min-width: 0; }
.sube-blok-bas .ust { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sube-blok-bas h3 {
  font-size: 18px; font-weight: 600; letter-spacing: -.01em;
  margin-top: 8px;
}
.sube-blok.pasif .sube-blok-bas h3 { color: var(--muted); }
.sube-blok-bas .adres {
  font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.5;
}

.sube-blok-bas .rakamlar { display: flex; flex-wrap: wrap; }
.sube-blok-bas .rakamlar > div { padding: 0 16px; border-left: 1px solid var(--border); }
.sube-blok-bas .rakamlar > div:first-child { border-left: 0; }
.sube-blok-bas .rakamlar .k { font-size: 11px; color: var(--muted); white-space: nowrap; }
.sube-blok-bas .rakamlar .v {
  font-size: 15px; font-weight: 650; color: var(--text); margin-top: 3px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sube-blok-bas .rakamlar .v.kod { font-size: 12.5px; font-weight: 600; }
.sube-blok.pasif .rakamlar .v { color: var(--muted); font-weight: 500; }
.sube-blok-bas .eylem { margin-left: auto; display: flex; gap: 8px; }

/* Şubenin depo şeridi — blok içinde ayrı zeminde durur */
.sube-depolar {
  border-top: 1px solid var(--border);
  background: var(--panel-2);
  padding: 14px 18px 18px;
}
.sube-depolar .baslik {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 12px; font-size: 13px;
}
.sube-depolar .baslik b { color: var(--text); }
.sube-depolar .baslik .say { color: var(--muted); font-size: 12.5px; }
.sube-depolar .baslik .btn { margin-left: auto; }
.sube-depolar .bos {
  font-size: 13px; color: var(--muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 16px; text-align: center;
}

@media (max-width: 760px) {
  .sube-blok-bas .rakamlar { width: 100%; gap: 0 4px; }
  .sube-blok-bas .rakamlar > div { padding: 0 14px 0 0; border-left: 0; }
  .sube-blok-bas .eylem { margin-left: 0; width: 100%; }
}

/* ---------- Sayfa özeti şeridi ------------------------------------------ */

.ozet-serit {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 18px;
}
.ozet-serit > div { padding: 13px 16px; border-right: 1px solid var(--border); }
.ozet-serit > div:last-child { border-right: 0; }
.ozet-serit .lbl {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-2); font-weight: 500;
}
.ozet-serit .val {
  font-size: 21px; font-weight: 650; letter-spacing: -.02em;
  color: var(--text); margin-top: 5px;
  font-variant-numeric: tabular-nums;
}
.ozet-serit .not { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
@media (max-width: 1000px) {
  .ozet-serit { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ozet-serit > div { border-bottom: 1px solid var(--border); }
}
@media (max-width: 600px) { .ozet-serit { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Depo kartı (şube bloğunun içinde durur) --------------------- */

/* Kart ızgarası — sütun sayısı genişliğe göre kendi ayarlanır */
.depo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}

.depo-karti {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--info);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.depo-karti.t-raf    { border-top-color: var(--warn); }
.depo-karti.t-seyyar { border-top-color: var(--purple); }
.depo-karti.pasif    { border-top-color: var(--border-strong); background: var(--panel-2); }
.depo-karti.pasif .ad, .depo-karti.pasif .sayilar .v { color: var(--muted); }

.depo-karti .bas {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 15px 0;
}
.depo-karti .kod {
  font-family: "Cascadia Mono", Consolas, "SF Mono", Menlo, monospace;
  font-size: 11.5px; font-weight: 700; color: var(--text-2);
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
}
.depo-karti.pasif .kod { background: #fff; }
.depo-karti .bas .vars { margin-left: auto; }

.depo-karti .ad {
  padding: 9px 15px 0;
  font-size: 15px; font-weight: 600; color: var(--text);
  letter-spacing: -.01em;
}
.depo-karti .konum {
  padding: 3px 15px 12px;
  font-size: 12.5px; color: var(--muted); line-height: 1.45;
}

.depo-karti .sayilar { display: flex; border-top: 1px solid var(--border); }
.depo-karti .sayilar > div {
  flex: 1 1 0; padding: 9px 12px;
  border-right: 1px solid var(--border);
}
.depo-karti .sayilar > div:last-child { border-right: 0; }
.depo-karti .sayilar .k { font-size: 11px; color: var(--muted); }
.depo-karti .sayilar .v {
  font-size: 14.5px; font-weight: 650; color: var(--text); margin-top: 2px;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.depo-karti .sayilar .v.uyari { color: var(--warn); }
.depo-karti .sayilar .v.sonuk { color: var(--muted); font-weight: 500; }

.depo-karti .raflar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 15px;
  border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--text-2);
}

.depo-karti .islem {
  display: flex; align-items: center; gap: 8px;
  margin-top: auto;
  padding: 10px 15px;
  border-top: 1px solid var(--border);
  background: var(--panel-2);
  border-radius: 0 0 var(--radius) var(--radius);
}
.depo-karti.pasif .islem { background: #fff; }
.depo-karti .islem .durum { margin-left: auto; }

/* Parça × depo matrisi */
table.matris th.depo-bas { text-align: right; }
table.matris td.hucre {
  text-align: right; font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
table.matris td.hucre.bos    { color: var(--muted); }
table.matris td.hucre.az     { color: var(--warn);   font-weight: 650; }
table.matris td.hucre.yok    { color: var(--danger); font-weight: 650; }
table.matris td.hucre.aktif  { background: var(--accent-soft); font-weight: 650; }
table.matris td.hucre.yolda  { color: var(--purple); font-style: italic; }
table.matris td.toplam-h {
  text-align: right; font-weight: 700;
  background: var(--panel-2); font-variant-numeric: tabular-nums;
}

/* Transfer yönü göstergesi */
.transfer-yon {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600;
}
.transfer-yon .ok { color: var(--accent); font-size: 15px; }
.transfer-yon .kaynak { color: var(--text-2); }
.transfer-yon .hedef { color: var(--text); }

/* "Diğer şubede var" bilgi kutusu */
.baska-depoda {
  border: 1px solid var(--border);
  border-left: 3px solid var(--info);
  border-radius: var(--radius-sm);
  background: var(--panel-2);
  padding: 10px 13px;
  font-size: 12.5px;
  color: var(--text-2);
}
.baska-depoda b { color: var(--text); }
.baska-depoda .liste { margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Araç kabul: hasar krokisi ---------------------------------- */

.kroki-sar { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-start; }
.kroki { width: 290px; flex: 0 0 auto; }
.kroki svg { width: 100%; height: auto; display: block; }

.kroki .bolge {
  fill: #f3f6f9; stroke: #cfd6dd; stroke-width: 1.5;
  cursor: pointer; transition: fill .12s;
}
.kroki .bolge:hover { fill: #e4edf8; stroke: var(--accent); }
.kroki .z.h-cizik .bolge { fill: var(--warn-soft);   stroke: var(--warn); }
.kroki .z.h-gocuk .bolge { fill: #fae3cd;            stroke: #b5651a; }
.kroki .z.h-kirik .bolge { fill: var(--danger-soft); stroke: var(--danger); }
.kroki .z.h-boya  .bolge { fill: var(--purple-soft); stroke: var(--purple); }

.kroki .etiket {
  font-size: 8.5px; fill: #7b8894; text-anchor: middle;
  pointer-events: none; font-family: inherit;
}
.kroki .isaret {
  font-size: 14px; font-weight: 700; text-anchor: middle;
  pointer-events: none; font-family: inherit;
}
.kroki .z.h-cizik .isaret { fill: var(--warn); }
.kroki .z.h-gocuk .isaret { fill: #b5651a; }
.kroki .z.h-kirik .isaret { fill: var(--danger); }
.kroki .z.h-boya  .isaret { fill: var(--purple); }
.kroki .teker { fill: #33414f; }
.kroki .yon { font-size: 10px; fill: var(--muted); text-anchor: middle; font-weight: 600; }

.lejant { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.lejant span {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-2);
  border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px;
}
.lejant b {
  width: 18px; height: 18px; border-radius: 4px;
  display: grid; place-items: center; font-size: 11px;
}
.lejant .l-c { background: var(--warn-soft);   color: var(--warn); }
.lejant .l-g { background: #fae3cd;            color: #b5651a; }
.lejant .l-k { background: var(--danger-soft); color: var(--danger); }
.lejant .l-b { background: var(--purple-soft); color: var(--purple); }

.hasar-liste { flex: 1 1 300px; min-width: 280px; }

/* ---------- Yakıt seviyesi -------------------------------------------- */

.yakit { display: flex; gap: 4px; }
.yakit i {
  flex: 1; height: 30px; cursor: pointer;
  border: 1px solid var(--border-strong); border-radius: 4px;
  background: #fff; font-style: normal;
  display: grid; place-items: center;
  font-size: 11px; color: var(--muted);
}
.yakit i.dolu { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ---------- Fotoğraflar ------------------------------------------------ */

.foto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 11px;
}
.foto {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--panel);
}
.foto .gorsel {
  height: 104px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #e9eef3, #d9e1ea);
  color: #8b97a3; font-size: 26px;
  position: relative;
}
.foto .gorsel .sil {
  position: absolute; top: 5px; right: 5px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255, 255, 255, .9); border: 1px solid var(--border);
  display: grid; place-items: center; font-size: 12px;
  color: var(--danger); cursor: pointer;
}
.foto .ad {
  padding: 7px 9px; font-size: 11.5px; color: var(--text-2);
  border-top: 1px solid var(--border); line-height: 1.4;
}
.foto .ad small { display: block; color: var(--muted); font-size: 10.5px; margin-top: 2px; }

.foto-ekle {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  min-height: 140px;
  display: grid; place-items: center;
  color: var(--muted); font-size: 12.5px; text-align: center;
  background: var(--panel-2); cursor: pointer;
}
.foto-ekle:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.foto-ekle .buyuk { font-size: 22px; display: block; margin-bottom: 5px; opacity: .6; }

/* ---------- İmza alanı ------------------------------------------------- */

.imza-alani {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  height: 118px;
  display: grid; place-items: center;
  color: var(--muted); font-size: 12.5px; text-align: center;
  background: #fff;
}
.imza-alani.imzali {
  border-style: solid; border-color: var(--ok);
  background: var(--ok-soft); color: var(--ok); font-weight: 600;
}

/* ---------- Rol bazlı görünürlük --------------------------------------
   data-roles="ADMIN,DANISMAN" olan öğe, aktif rol listede yoksa gizlenir.
   Gerçek uygulamada bu ayrım sunucu tarafında da uygulanacak.
   --------------------------------------------------------------------- */

body[data-role="ADMIN"]     [data-roles]:not([data-roles*="ADMIN"]),
body[data-role="DANISMAN"]  [data-roles]:not([data-roles*="DANISMAN"]),
body[data-role="TEKNISYEN"] [data-roles]:not([data-roles*="TEKNISYEN"]) {
  display: none !important;
}

.gizli-tutar {
  display: inline-block;
  color: var(--muted);
  letter-spacing: .12em;
  font-size: 12px;
}

/* ---------- Rol notu (prototip açıklaması) ---------------------------- */

.proto-note {
  display: flex; gap: 9px; align-items: flex-start;
  border: 1px dashed var(--border-strong);
  background: repeating-linear-gradient(45deg, #fbfcfd, #fbfcfd 8px, #f6f8fa 8px, #f6f8fa 16px);
  color: var(--text-2);
  border-radius: var(--radius-sm);
  padding: 10px 13px;
  font-size: 12.5px;
  margin-bottom: 16px;
}
.proto-note b { color: var(--text); }

/* ---------- Giriş ekranı ---------------------------------------------- */

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 480px;
  background: var(--panel);
}
.auth-hero {
  background: linear-gradient(155deg, #12263a 0%, #1b3f6b 55%, #1f5fd6 130%);
  color: #fff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-hero::after {
  content: "";
  position: absolute; right: -120px; bottom: -140px;
  width: 420px; height: 420px; border-radius: 50%;
  background: rgba(255, 255, 255, .05);
}
.auth-hero h2 { font-size: 30px; letter-spacing: -.02em; line-height: 1.25; max-width: 460px; }
.auth-hero p { color: #b9cbe0; max-width: 420px; font-size: 15px; margin-top: 14px; }
.auth-hero ul { list-style: none; padding: 0; margin: 30px 0 0; max-width: 430px; }
.auth-hero li { display: flex; gap: 11px; padding: 7px 0; color: #d5e2ef; font-size: 14px; }
.auth-hero li .ck { color: #6fd39b; font-weight: 700; }

.auth-form { padding: 56px 52px; display: flex; flex-direction: column; justify-content: center; }
.auth-form .brand-logo { width: 42px; height: 42px; font-size: 16px; border-radius: 11px; margin-bottom: 22px; }
.auth-form h1 { font-size: 23px; }
.auth-form .sub { color: var(--text-2); margin: 6px 0 26px; }
.auth-form .foot { margin-top: 26px; font-size: 12.5px; color: var(--muted); }

@media (max-width: 940px) {
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-hero { display: none; }
  .auth-form { padding: 34px 22px; }
}

/* ---------- Prototip indeksi ------------------------------------------ */

.index-wrap { max-width: 1040px; margin: 0 auto; padding: 46px 22px 70px; }
.index-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.index-card {
  display: block;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 15px 16px;
  box-shadow: var(--shadow);
}
.index-card:hover { text-decoration: none; border-color: var(--accent); box-shadow: var(--shadow-lg); }
.index-card b { display: block; color: var(--text); font-size: 14.5px; }
.index-card span { display: block; color: var(--text-2); font-size: 12.5px; margin-top: 4px; }
.index-card .k { font-size: 11px; color: var(--muted); font-family: Consolas, monospace; margin-top: 8px; display: block; }

/* ---------- Yazdırma --------------------------------------------------- */

.sheet {
  width: 210mm;
  min-height: 297mm;
  margin: 22px auto;
  background: #fff;
  padding: 14mm 14mm 12mm;
  box-shadow: var(--shadow-lg);
  color: #000;
  font-size: 11.5px;
}
.sheet h1 { font-size: 17px; }
.sheet table.data { font-size: 11px; }
.sheet table.data th, .sheet table.data td { padding: 6px 8px; }
.print-bar {
  position: sticky; top: 0; z-index: 30;
  background: var(--panel); border-bottom: 1px solid var(--border);
  padding: 10px 18px; display: flex; align-items: center; gap: 10px;
}

@media print {
  @page { size: A4; margin: 0; }
  body { background: #fff; }
  .print-bar, .sidebar, .topbar, .no-print { display: none !important; }
  .sheet { width: auto; margin: 0; box-shadow: none; padding: 10mm 12mm; }
}
