:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --line: #e6e2dc;
  --text: #1d1a1b;
  --text-2: #57524f;
  --muted: #8a847f;
  --brand: #231f20;
  --brand-text: #f4f2ef;
  --accent: #e2531f;
  --accent-ink: #ffffff;
  --accent-soft: #fdeee7;
  --danger: #c4262f;
  --danger-soft: #fbe9ea;
  --ok: #2d7a2d;
  --warn-soft: #fff6dc;
  --warn-line: #ecd48a;
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 2px 8px rgba(0, 0, 0, .04);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
/* Sayfa kaydırma çubuğunun yeri de hep ayrılı: içerik uzayıp kısalınca sayfa genişliği değişmez */
html { scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #cfc9c2 transparent; }
body {
  font: 14px/1.45 "Inter Variable", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
}
button, input, select { font: inherit; color: inherit; }
a { color: var(--accent); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Yerleşim ---------- */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--brand); color: var(--brand-text);
  padding: 18px 6px 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  /* Kaydırma çubuğunun yeri baştan ayrılır: liste açılınca menü daralmaz */
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .22) transparent;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 6px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .38); }
.sidebar .brand { display: flex; justify-content: center; padding: 4px 6px 18px; }
.sidebar .brand img { width: 130px; height: auto; }
.nav-title { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .5; margin: 18px 8px 6px; }
.nav a {
  display: block; padding: 8px 10px; border-radius: 7px; color: inherit; text-decoration: none;
  opacity: .82; font-size: 15px;
}
.nav-group { margin-top: 14px; }
.nav-group summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 7px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .6;
}
.nav-group summary::-webkit-details-marker { display: none; }
.nav-group summary::after { content: "▾"; font-size: 14px; transition: transform .15s; transform: rotate(-90deg); }
.nav-group[open] summary::after { transform: none; }
.nav-group summary:hover { background: rgba(255, 255, 255, .07); opacity: 1; }
.nav-sub { padding-left: 8px; }
.nav a:hover { background: rgba(255, 255, 255, .07); opacity: 1; }
.nav a.active { background: var(--accent); color: var(--accent-ink); opacity: 1; }
.nav a small { opacity: .55; margin-right: 6px; }

.main { min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  padding: 10px 24px; background: var(--brand); color: var(--brand-text);
  position: sticky; top: 0; z-index: 5;
}
.topbar .who { margin-right: auto; color: var(--brand-text); opacity: .75; font-size: 13px; }
.topbar .who b { color: var(--brand-text); }
.topbar .btn { background: transparent; color: var(--brand-text); border-color: rgba(255, 255, 255, .22); }
.topbar .btn:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .4); }
.topbar .btn.ghost { border-color: transparent; }
.topbar .menu-btn { display: none; }
.content { padding: 26px 32px 64px; max-width: 1640px; }
h1 { font-size: 24px; margin: 0 0 4px; letter-spacing: -.01em; font-weight: 650; }
h2 { font-size: 16px; margin: 0 0 10px; }
.lead { color: var(--text-2); margin: 0 0 18px; max-width: 80ch; }

/* ---------- Bileşenler ---------- */
.btn {
  border: 1px solid var(--line); background: var(--surface); padding: 7px 13px; border-radius: 8px;
  cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 500;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.btn:hover { border-color: #cfc9c2; background: #fbfaf9; }
.btn:focus-visible, .ikon-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(226, 83, 31, .28); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(226, 83, 31, .25); }
.btn.primary:hover { background: #cf4716; border-color: #cf4716; }
.btn.buyuk { padding: 9px 16px; font-size: 14px; border-radius: 9px; }
.btn.small { padding: 3px 9px; font-size: 12.5px; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { border-color: var(--danger); background: var(--danger-soft); }
.btn.ghost { border-color: transparent; background: transparent; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; margin-bottom: 18px;
}
.card .card-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.card .card-head h2 { margin: 0; }
.card .card-head .hint { color: var(--muted); font-size: 12.5px; }
.card .card-head .spacer { margin-left: auto; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 14px; }
.field label, .field .etiket { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 6px; font-weight: 550; }
.field .req { color: var(--accent); }
.field input[type=text], .field input[type=date], .field input[type=week], .field input[type=password], .field select {
  width: 100%; padding: 8px 11px; border: 1px solid #ddd8d2; border-radius: 8px; background: var(--surface);
  min-height: 40px; transition: border-color .12s, box-shadow .12s;
}
.field input::placeholder, .field textarea::placeholder { color: #a9a39d; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #c9c3bc; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(226, 83, 31, .14);
}
.field input:disabled, .field select:disabled { background: var(--surface-2); }
.field.kapali { opacity: .5; }
.field .sub { font-size: 12px; color: var(--muted); margin-top: 5px; min-height: 0; }
.field .sub:empty { display: none; }
.field.hatali label, .field.hatali .etiket { color: var(--danger); }
.field.hatali input, .field.hatali textarea, .field.hatali .ts-control, .field.hatali .segment { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(196, 38, 47, .12); }
.field.check { display: flex; align-items: center; gap: 8px; padding-top: 22px; }
.field.check label { margin: 0; }
.form-actions { display: flex; gap: 8px; align-items: center; margin-top: 14px; }
.form-actions .msg { font-size: 13px; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--ok); }

/* Uzun metin, fotoğraf ve durum alanları */
.field.genis { grid-column: span 2; }
.field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #ddd8d2; border-radius: 8px; background: var(--surface);
  resize: vertical; min-height: 40px; font: inherit; color: inherit; transition: border-color .12s, box-shadow .12s;
}
.fotolar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.fotolar:empty { display: none; }
.foto-kutu { position: relative; }
.foto-kutu img { width: 72px; height: 72px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); cursor: zoom-in; display: block; }
.foto-kutu button {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px; border-radius: 50%; border: 0;
  background: var(--brand); color: #fff; cursor: pointer; font-size: 14px; line-height: 22px; padding: 0;
}
.field label.foto-ekle { display: inline-block; cursor: pointer; font-size: 12.5px; color: var(--text); margin: 0; font-weight: 500; }
.thumbs { display: inline-flex; gap: 4px; align-items: center; }
.thumbs img { width: 36px; height: 36px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); cursor: zoom-in; }
.thumbs b { font-size: 12px; color: var(--text-2); }
.thumbs.buyuk { flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.thumbs.buyuk img { width: 110px; height: 110px; border-radius: 8px; }
.uzun { display: inline-block; max-width: 260px; }
.durum { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 99px; white-space: nowrap; vertical-align: middle; }
.durum::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; background: currentColor; }
.d-kirmizi { background: #fde8e8; color: #b42323; }
.d-sari { background: #fff3d6; color: #8a5a00; }
.d-yesil { background: #e3f4e3; color: #26702a; }
.d-gri { background: var(--surface-2); color: var(--text-2); }
a.kpi-link { color: inherit; text-decoration: none; }
a.kpi-link:hover { border-color: var(--accent); }

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .85); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px; cursor: zoom-out; padding: 16px;
}
.lightbox img { max-width: 100%; max-height: calc(100vh - 70px); border-radius: 6px; }
.lightbox span { color: #ddd; font-size: 12px; }

.modal-arka { position: fixed; inset: 0; z-index: 60; background: rgba(20, 18, 19, .55); display: flex; justify-content: center; align-items: flex-start; padding: 40px 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 12px; width: 100%; max-width: 760px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.modal-bas { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 12px; border-bottom: 1px solid var(--line); }
.modal-bas h2 { margin: 0 0 4px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.modal-bas .hint { color: var(--muted); font-size: 13px; }
.modal-ic { padding: 16px 20px 20px; }
.modal-ic p { margin: 0 0 12px; white-space: pre-wrap; }
.bildir { background: var(--surface-2); box-shadow: none; }
.zaman-cizgisi { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.zaman-cizgisi li { position: relative; padding: 0 0 14px 12px; }
.zaman-cizgisi .zc-not { white-space: pre-wrap; }
.zaman-cizgisi li::before { content: ""; position: absolute; left: -21px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--accent); }
.zaman-cizgisi .zc-ust { margin-bottom: 3px; }
.zaman-cizgisi .hint { color: var(--muted); font-size: 12.5px; margin-left: 6px; }
.zaman-cizgisi .thumbs { margin-top: 6px; }

/* Tarih seçici: takvim simgesi + marka renkleri */
.field input.tarih-input, .field input.hafta {
  cursor: pointer; 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='%238a847f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.flatpickr-calendar { font-family: inherit; box-shadow: 0 8px 28px rgba(0, 0, 0, .16); border-radius: 10px; }
.flatpickr-day { border-radius: 7px; }
.flatpickr-day.today { border-color: var(--accent); }
.flatpickr-day.selected, .flatpickr-day.selected:hover, .flatpickr-day.startRange, .flatpickr-day.endRange,
.flatpickr-day.week.selected {
  background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: none;
}
.flatpickr-day.inRange { background: var(--accent-soft); border-color: var(--accent-soft); box-shadow: none; }
.flatpickr-months .flatpickr-month, .flatpickr-current-month { font-size: 15px; }
.fp-alt { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.fp-alt button {
  flex: 1; border: 1px solid var(--line); background: var(--surface-2); border-radius: 7px;
  padding: 6px 4px; font-size: 13px; cursor: pointer;
}
.fp-alt button:hover { border-color: var(--accent); color: var(--accent); }

.filters { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; margin-bottom: 12px; }
.filters .field { min-width: 150px; }
.filters .quick { display: flex; gap: 6px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface-2); font-weight: 600; color: var(--text-2); font-size: 12px; position: sticky; top: 0; white-space: nowrap; }
tbody tr:hover td { background: var(--surface-2); }
tbody tr.editing td { background: var(--accent-soft); }
tfoot td { font-weight: 600; background: var(--surface-2); border-bottom: 0; }
td.actions { white-space: nowrap; text-align: right; width: 1%; }
td .tag { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); color: var(--text-2); }
tr.subtotal td { font-weight: 600; background: var(--surface-2); }
.neg { color: var(--danger); }
.pos { color: var(--ok); }
.empty { color: var(--muted); padding: 18px; text-align: center; }

.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.kpi .k { font-size: 12px; color: var(--text-2); }
.kpi .v { font-size: 24px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--muted); margin-top: 2px; }

.alerts { background: var(--warn-soft); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 10px 14px 10px 14px; margin-bottom: 18px; }
.alerts b { display: block; margin-bottom: 4px; }
.alerts ul { margin: 0; padding-left: 18px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-2 > .card { margin-bottom: 0; }
.stack > * + * { margin-top: 14px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 4px 11px; cursor: pointer; font-size: 12.5px; }
.seg button.on { background: var(--brand); color: var(--brand-text); }

/* Grafik */
.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gridline { stroke: var(--line); stroke-width: 1; }
.chart .axis-text { fill: var(--muted); font-size: 11px; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.tooltip {
  position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .14); border-radius: 8px; padding: 8px 10px; font-size: 12.5px;
  min-width: 170px; z-index: 3; display: none;
}
.tooltip .t { font-weight: 600; margin-bottom: 4px; }
.tooltip .r { display: flex; justify-content: space-between; gap: 14px; color: var(--text-2); }
.tooltip .r b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

.toast {
  position: fixed; bottom: 20px; right: 20px; background: var(--brand); color: var(--brand-text);
  padding: 10px 16px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); z-index: 50;
  max-width: min(520px, calc(100vw - 32px));
}

/* ---------- Giriş sayfası ---------- */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--brand); }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border-radius: 14px; padding: 28px 26px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.login-card .logo { display: block; width: 140px; margin: 0 auto 10px; }
.login-card h1 { text-align: center; font-size: 18px; margin-bottom: 2px; }
.login-card .lead { text-align: center; font-size: 13px; margin-bottom: 20px; }
.ms-btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer;
  font-weight: 600; text-decoration: none; color: var(--text);
}
.ms-btn:hover { border-color: var(--muted); }
.ms-btn[aria-disabled=true] { opacity: .5; pointer-events: none; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.login-card .field { margin-bottom: 10px; }
.login-card .btn.primary { width: 100%; padding: 9px; }
.login-err { background: var(--danger-soft); color: var(--danger); border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 14px; }
.login-note { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 20; width: 250px; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .topbar .menu-btn { display: inline-block; margin-right: auto; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .topbar .who { display: none; }
  .content { padding: 16px 16px 60px; }
  .grid-2 { grid-template-columns: 1fr; }
  .field.genis { grid-column: auto; }
  .modal-arka { padding: 12px 8px; }
}

/* =========================================================
   Veri giriş sayfaları (başlık, özet, araç çubuğu, tablo, çekmece form)
   ========================================================= */
.sayfa-bas { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.sayfa-bas .lead { margin: 6px 0 0; font-size: 13.5px; max-width: 90ch; }
.kirinti { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.bilgi-kutu {
  display: flex; gap: 10px; align-items: flex-start; background: #f4f7fb; border: 1px solid #dce5f0; color: #2f4a66;
  border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-size: 13.5px;
}
.bilgi-kutu svg { flex: none; margin-top: 1px; }

.ozet-kartlar { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
.ozet-kart { border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: var(--surface); }
.ozet-kart .k { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.ozet-kart .v { font-size: 20px; font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

.tablo-kart { padding: 0; overflow: hidden; }
.arac-cubugu { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.ara-kutu { position: relative; flex: 1 1 240px; max-width: 360px; }
.ara-kutu svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.ara-kutu input, .tarih-aralik input {
  width: 100%; height: 36px; border: 1px solid #ddd8d2; border-radius: 8px; padding: 0 11px 0 34px; background: var(--surface);
}
.ara-kutu input:focus, .tarih-aralik input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(226, 83, 31, .14); }
.tarih-aralik { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.tarih-aralik input { width: 140px; padding-left: 11px; cursor: pointer; }
.tarih-aralik input.tarih-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%238a847f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.hizli { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 2px; }
.hizli button { border: 0; background: transparent; padding: 5px 10px; border-radius: 6px; font-size: 12.5px; cursor: pointer; color: var(--text-2); font-weight: 500; }
.hizli button:hover { color: var(--text); }
.hizli button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.adet { margin-left: auto; font-size: 12.5px; color: var(--muted); }

.table-wrap.modern { border: 0; border-radius: 0; }
.table-wrap.modern table { font-size: 13.5px; }
.table-wrap.modern th {
  background: #faf9f7; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line);
}
.table-wrap.modern td { padding: 11px 14px; border-bottom: 1px solid #f0ede9; vertical-align: middle; }
.table-wrap.modern tbody tr { transition: background .1s; }
.table-wrap.modern tbody tr:hover td { background: #fcfbfa; }
.table-wrap.modern tbody tr:last-child td { border-bottom: 0; }
.table-wrap.modern tfoot td { border-top: 1px solid var(--line); background: #faf9f7; padding: 10px 14px; }
.table-wrap.modern td.actions { white-space: nowrap; text-align: right; }
.table-wrap.modern td.actions > * { vertical-align: middle; }
.table-wrap.modern th.actions { width: 1%; }
tbody tr.vurgu td { animation: vurgu 2.2s ease-out; }
@keyframes vurgu { 0%, 30% { background: #fff1e9; } 100% { background: transparent; } }

.ikon-btn {
  width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: var(--text-2); cursor: pointer; transition: background .12s, color .12s; padding: 0;
}
.ikon-btn:hover { background: #f2efec; color: var(--text); }
.ikon-btn.tehlike:hover { background: var(--danger-soft); color: var(--danger); }

.bos-durum { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 48px 16px; text-align: center; color: var(--muted); }
.bos-durum svg { color: #c9c3bc; margin-bottom: 4px; }
.bos-durum b { color: var(--text); font-size: 15px; }
.bos-durum .btn { margin-top: 10px; }

/* Sağdan açılan form paneli */
body.kilitli { overflow: hidden; }
.cekmece-arka {
  position: fixed; inset: 0; z-index: 70; background: rgba(28, 24, 25, 0); transition: background .2s;
  display: flex; justify-content: flex-end;
}
.cekmece-arka.acik { background: rgba(28, 24, 25, .38); }
.cekmece {
  width: min(540px, 100vw); height: 100%; background: var(--surface); box-shadow: -12px 0 40px rgba(0, 0, 0, .16);
  transform: translateX(24px); opacity: 0; transition: transform .2s ease, opacity .2s ease;
}
.cekmece-arka.acik .cekmece { transform: none; opacity: 1; }
.cekmece form { display: flex; flex-direction: column; height: 100%; }
.cekmece-bas { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--line); }
.cekmece-bas h2 { margin: 0; font-size: 19px; letter-spacing: -.01em; }
.cekmece-ic { flex: 1; overflow-y: auto; padding: 20px 24px 28px; }
.cekmece .form-grid { grid-template-columns: 1fr 1fr; gap: 16px 14px; }
.cekmece .field { grid-column: 1 / -1; min-width: 0; }
.cekmece .field.yarim { grid-column: span 1; }
.cekmece-alt { display: flex; align-items: center; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--line); background: #fcfbfa; flex-wrap: wrap; }
.cekmece-alt .msg { flex: 1 1 100%; font-size: 13px; }
.cekmece-alt .msg:empty { display: none; }
.cekmece-alt .kisayol { margin-right: auto; font-size: 12px; color: var(--muted); }

/* Birimli sayı alanı */
.girdi-ek { position: relative; }
.girdi-ek input { padding-right: 64px !important; text-align: right; font-variant-numeric: tabular-nums; }
.girdi-ek .ek { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-size: 12.5px; color: var(--muted); pointer-events: none; }
.girdi-ek .ek:empty { display: none; }

/* Tek tıkla seçilen düğme grubu */
.segment { display: flex; background: var(--surface-2); border: 1px solid #ddd8d2; border-radius: 9px; padding: 3px; gap: 3px; }
.field .segment label { flex: 1; margin: 0; font-size: 13.5px; color: var(--text-2); font-weight: 500; position: relative; }
.segment input { position: absolute; opacity: 0; pointer-events: none; }
.segment span {
  display: flex; align-items: center; justify-content: center; gap: 7px; padding: 7px 8px; border-radius: 7px; cursor: pointer;
  transition: background .12s, color .12s; white-space: nowrap;
}
.segment span:hover { color: var(--text); background: rgba(0, 0, 0, .03); }
.segment input:checked + span { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.segment input:focus-visible + span { box-shadow: 0 0 0 3px rgba(226, 83, 31, .28); }
.nokta { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.nokta.d-kirmizi { background: #c73232; }
.nokta.d-sari { background: #d99a00; }
.nokta.d-yesil { background: #2f8a33; }

/* Aç/kapa anahtarı */
.field label.anahtar { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--text); margin: 0; position: relative; }
.anahtar input { position: absolute; opacity: 0; }
.anahtar-iz { width: 36px; height: 20px; border-radius: 99px; background: #d6d1cb; position: relative; transition: background .15s; flex: none; }
.anahtar-iz::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s; }
.anahtar input:checked + .anahtar-iz { background: var(--accent); }
.anahtar input:checked + .anahtar-iz::after { transform: translateX(16px); }
.anahtar input:focus-visible + .anahtar-iz { box-shadow: 0 0 0 3px rgba(226, 83, 31, .28); }

/* Aranabilir seçim kutusu (Tom Select) */
.ts-wrapper { width: 100%; }
.ts-wrapper.single .ts-control, .ts-wrapper .ts-control {
  min-height: 40px; padding: 8px 32px 8px 11px; border: 1px solid #ddd8d2; border-radius: 8px; background: var(--surface);
  box-shadow: none; font-size: 14px; line-height: 22px; color: var(--text); cursor: pointer;
}
.ts-wrapper.single .ts-control::after { border-color: #8a847f transparent transparent; right: 13px; }
.ts-wrapper.single.dropdown-active .ts-control::after { border-color: transparent transparent #8a847f; }
.ts-wrapper .ts-control:hover { border-color: #c9c3bc; }
.ts-wrapper.focus .ts-control { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(226, 83, 31, .14); }
.ts-wrapper.disabled .ts-control { background: var(--surface-2); opacity: 1; }
.ts-control input { font-size: 14px !important; }
.field .ts-control input, .field .ts-control input:focus, .field .ts-control input:hover {
  border: 0 !important; padding: 0 !important; min-height: 0 !important; box-shadow: none !important; background: transparent !important; width: auto;
}
.ts-control input::placeholder { color: #a9a39d; }
.ts-dropdown {
  z-index: 1000; border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; overflow: hidden;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14); font-size: 14px; font-family: inherit; color: var(--text);
}
.ts-dropdown .ts-dropdown-content { max-height: 300px; padding: 4px; }
.ts-dropdown .option { padding: 8px 10px; border-radius: 6px; }
.ts-dropdown .active { background: var(--accent-soft); color: var(--text); }
.ts-dropdown .selected { font-weight: 600; }
.ts-dropdown .optgroup-header {
  font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600;
  padding: 10px 10px 4px; background: transparent;
}
.ts-dropdown .no-results { padding: 10px; color: var(--muted); }
.ts-dropdown [data-selectable] .highlight { background: rgba(226, 83, 31, .18); border-radius: 2px; }

@media (max-width: 900px) {
  .content { padding: 18px 16px 60px; }
  .sayfa-bas { align-items: stretch; }
  .sayfa-bas .btn.buyuk { width: 100%; }
  .ara-kutu { max-width: none; }
  .tarih-aralik input { width: 120px; }
  .adet { margin-left: 0; }
  .cekmece .field.yarim { grid-column: 1 / -1; }
  .cekmece-alt .kisayol { display: none; }
  .cekmece-alt .btn { flex: 1; }
}
