/* ===================================================================
   OSGB Araç Takip Sistemi — Tasarım Sistemi
   Lacivert + Kırmızı, açık tema
   =================================================================== */

:root {
  --navy: #16233e;
  --navy-900: #0f1a2f;
  --navy-800: #16233e;
  --navy-700: #1e2f50;
  --navy-600: #2a3d63;
  --brand: #e2231a;
  --brand-dark: #c11d15;
  --brand-soft: #fdeceb;
  --brand-ring: rgba(226, 35, 26, .18);

  --ink: #16233e;
  --ink-2: #5a6480;
  --ink-3: #939bb0;
  --line: #e8ecf4;
  --line-2: #f1f4f9;
  --bg: #f5f7fb;
  --card: #ffffff;

  --green: #16a34a;
  --green-soft: #e7f7ee;
  --amber: #d97706;
  --amber-soft: #fdf1e3;
  --blue: #2563eb;
  --blue-soft: #e9f0fe;
  --violet: #7c3aed;
  --violet-soft: #f0eafe;
  --danger: #dc2626;
  --danger-soft: #fdecec;

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(22, 35, 62, .05), 0 1px 3px rgba(22, 35, 62, .05);
  --shadow: 0 2px 8px rgba(22, 35, 62, .05), 0 8px 24px rgba(22, 35, 62, .05);
  --shadow-lg: 0 24px 60px rgba(15, 26, 47, .18);
  --sidebar-w: 214px;
  --sidebar-w-min: 72px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
svg.ico { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
svg.ico.sm { width: 16px; height: 16px; }
svg.ico.lg { width: 24px; height: 24px; }

/* ===== Kenar çubuğu ===== */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: var(--sidebar-w);
  padding: 20px 14px max(20px, env(safe-area-inset-bottom));
  color: var(--ink);
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  transition: width .2s ease, padding .2s ease;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 18px; }
.brand-logo { width: 100%; max-width: 168px; height: auto; display: block; }
.brand-mini { display: none; width: 44px; height: auto; }

nav { display: grid; gap: 4px; }
.nav-item {
  width: 100%; border: 0; background: transparent; color: var(--ink-2);
  padding: 11px 13px; border-radius: 11px; text-align: left;
  font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 11px;
  transition: background .15s ease, color .15s ease;
}
.nav-item:hover { background: var(--bg); color: var(--ink); }
.nav-item.active {
  background: var(--brand); color: #fff;
  box-shadow: 0 6px 16px rgba(226, 35, 26, .34);
}
.nav-item[hidden] { display: none !important; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
}
.nav-item.active .nav-badge { background: rgba(255,255,255,.25); }
.nav-badge[hidden] { display: none; }

.user-chip {
  margin-top: 16px; border: 1px solid var(--line); background: var(--bg);
  border-radius: var(--r); padding: 10px; display: flex; align-items: center; gap: 10px;
}
.user-chip[hidden] { display: none; }
.user-chip-text { min-width: 0; flex: 1; }
.user-chip-text strong { display: block; font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip-text small { display: block; margin-top: 1px; color: var(--ink-3); font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.user-chip button { border: 0; background: transparent; color: var(--ink-3); padding: 5px; border-radius: 8px; display: grid; place-items: center; }
.user-chip button:hover { background: var(--brand-soft); color: var(--brand); }

.support-card {
  margin-top: auto; padding: 14px; border-radius: var(--r);
  background: var(--brand-soft);
  border: 1px solid #f6d3d1; display: flex; align-items: center; gap: 11px;
}
.support-card svg { color: var(--brand); }
.support-card strong { display: block; font-size: 12.5px; color: var(--ink); }
.support-card small { display: block; color: var(--ink-3); font-size: 10.5px; margin-top: 2px; }

.user-avatar {
  width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%;
  background: var(--brand); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: .02em;
}
.user-avatar.large { width: 44px; height: 44px; font-size: 15px; }
.user-avatar.small { width: 30px; height: 30px; font-size: 11px; }

/* ===== Üst bar ===== */
.app-shell { margin-left: var(--sidebar-w); min-height: 100vh; transition: margin-left .2s ease; }
.topbar {
  height: 66px; padding: 0 26px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 25;
}
.menu-button { display: none; border: 0; background: none; color: var(--ink); padding: 6px; border-radius: 8px; }
.topbar-title { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.topbar-title span { color: var(--ink-3); font-weight: 400; }
.topbar-title em { font-style: normal; color: var(--ink-2); font-weight: 700; }
.search-wrap { position: relative; margin-left: auto; width: min(320px, 30vw); }
.search-wrap svg { position: absolute; left: 12px; top: 10px; color: var(--ink-3); }
.search-wrap input {
  width: 100%; height: 40px; padding: 0 14px 0 38px; border: 1px solid var(--line);
  border-radius: 11px; color: var(--ink); background: #f7f9fc; outline: none;
}
.search-wrap input:focus { border-color: var(--brand); background: #fff; box-shadow: 0 0 0 3px var(--brand-ring); }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-pill {
  position: relative; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); display: grid; place-items: center;
}
.icon-pill:hover { border-color: var(--brand); color: var(--brand); }
.icon-pill .count {
  position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--brand); color: #fff; font-size: 10.5px; font-weight: 800;
  display: grid; place-items: center; border: 2px solid #fff;
}
.icon-pill .count[hidden] { display: none; }
.topbar-user { display: flex; align-items: center; gap: 9px; padding-left: 10px; border-left: 1px solid var(--line); }
.topbar-user div { line-height: 1.25; }
.topbar-user strong { display: block; font-size: 13px; }
.topbar-user small { display: block; color: var(--ink-3); font-size: 11px; }

/* ===== Sayfa ===== */
main { padding: 24px clamp(16px, 2.4vw, 28px) 44px; }
.view { display: none; }
.view.active { display: block; animation: rise .22s ease-out; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; flex-wrap: wrap; }
.eyebrow { margin: 0 0 6px; color: var(--brand) !important; font-size: 10.5px !important; font-weight: 800; letter-spacing: .14em; }
.page-heading h1 { margin: 0; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.page-heading p { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; }
.heading-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.heading-actions[hidden], .panel[hidden] { display: none !important; }

/* ===== Butonlar ===== */
.primary-button, .secondary-button, .excel-button, .danger-button {
  min-height: 42px; padding: 0 16px; border-radius: 11px; border: 1px solid transparent;
  font-weight: 700; font-size: 13.5px; display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  transition: transform .1s ease, box-shadow .15s ease, background .15s ease;
}
.primary-button { color: #fff; background: var(--brand); box-shadow: 0 6px 16px rgba(226,35,26,.24); }
.primary-button:hover { background: var(--brand-dark); }
.primary-button:active { transform: translateY(1px); }
.primary-button:disabled { opacity: .5; cursor: wait; box-shadow: none; }
.secondary-button { color: var(--ink); background: #fff; border-color: var(--line); }
.secondary-button:hover { border-color: var(--ink-3); }
.excel-button {
  color: var(--green); background: var(--green-soft); border-color: #bfe8cf;
  min-height: 34px; padding: 0 11px; border-radius: 9px; font-size: 12px; gap: 6px; font-weight: 700;
}
.excel-button svg.ico { width: 15px; height: 15px; }
.excel-button:hover { background: #d9f2e3; border-color: #8fd8ac; }
.excel-button:active { transform: translateY(1px); }
.excel-button:disabled { opacity: .6; cursor: wait; }
.danger-button { color: #fff; background: var(--danger); }
.danger-button:hover { background: #b91c1c; }
.text-button { border: 0; background: none; color: var(--brand); font-weight: 700; font-size: 12.5px; display: inline-flex; align-items: center; gap: 5px; }
.icon-button {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-2); display: grid; place-items: center; font-size: 18px; padding: 0;
}
.icon-button:hover { border-color: var(--danger); color: var(--danger); }
.ghost-button {
  min-height: 34px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 12.5px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
}
.ghost-button:hover { border-color: var(--ink-3); color: var(--ink); }
.row-action {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-2); display: grid; place-items: center; padding: 0;
}
.row-action:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.row-action.danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }

/* ===== İstatistik kartları ===== */
.stat-grid, .vehicle-stat-grid, .license-stat-grid, .isper-stat-grid, .usage-stat-grid, .users-stat-grid {
  display: grid; gap: 14px; margin-bottom: 18px;
}
.stat-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1400px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.vehicle-stat-grid, .isper-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.usage-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.idle-info dt { white-space: nowrap; }
.license-stat-grid, .users-stat-grid, .users-stat-grid.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card {
  min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--card); display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow-sm);
}
.stat-card div { min-width: 0; }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { color: var(--ink-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.stat-card strong { font-size: 26px; margin-top: 2px; letter-spacing: -.02em; font-weight: 800; }
.stat-card .trend { font-size: 11px; font-weight: 700; margin-top: 2px; display: block; }
.stat-card .trend.up { color: var(--green); }
.stat-card .trend.down { color: var(--danger); }
.stat-card .trend.flat { color: var(--ink-3); }
.stat-icon { flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; }
.stat-icon.amber { color: var(--amber); background: var(--amber-soft); }
.stat-icon.green { color: var(--green); background: var(--green-soft); }
.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }
.stat-icon.violet { color: var(--violet); background: var(--violet-soft); }
.stat-icon.red { color: var(--brand); background: var(--brand-soft); }
.stat-card.clickable { cursor: pointer; transition: border-color .15s ease, transform .1s ease; }
.stat-card.clickable:hover { border-color: var(--brand); transform: translateY(-1px); }

/* ===== Panel ===== */
.panel { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card); overflow: hidden; box-shadow: var(--shadow-sm); }
.panel + .panel { margin-top: 16px; }
.panel-head { min-height: 62px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.panel-head h2 svg { color: var(--brand); }
.panel-head p { margin: 3px 0 0; color: var(--ink-3); font-size: 12px; }
.panel-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ===== Ana sayfa yerleşimi ===== */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 316px; gap: 16px; align-items: start; }
.dash-main { display: grid; gap: 16px; min-width: 0; }
.dash-side { display: grid; gap: 16px; }
.dash-split { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px; }

/* Donut */
.donut-wrap { padding: 18px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.donut { position: relative; flex: 0 0 auto; }
.donut svg { transform: rotate(-90deg); }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut-center strong { display: block; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.donut-center small { display: block; color: var(--ink-3); font-size: 11px; margin-top: 1px; }
.donut-legend { flex: 1; min-width: 150px; display: grid; gap: 10px; }
.donut-legend div { display: flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; }
.donut-legend i { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.donut-legend span { margin-left: auto; color: var(--ink-2); font-weight: 700; }

/* Son hareketler */
.activity-list { padding: 6px 0; max-height: 340px; overflow-y: auto; }
.activity-row { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line-2); }
.activity-row:last-child { border-bottom: 0; }
.activity-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: 0 0 auto; }
.activity-ico.blue { background: var(--blue-soft); color: var(--blue); }
.activity-ico.green { background: var(--green-soft); color: var(--green); }
.activity-ico.amber { background: var(--amber-soft); color: var(--amber); }
.activity-ico.red { background: var(--brand-soft); color: var(--brand); }
.activity-ico.violet { background: var(--violet-soft); color: var(--violet); }
.activity-main { min-width: 0; flex: 1; }
.activity-main strong { display: block; font-size: 13px; font-weight: 800; }
.activity-main small { display: block; color: var(--ink-2); font-size: 12px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-time { color: var(--ink-3); font-size: 11.5px; font-weight: 700; flex: 0 0 auto; }

/* Takvim */
.calendar { padding: 14px 16px 16px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.calendar-head strong { font-size: 13.5px; font-weight: 800; }
.calendar-nav { display: flex; gap: 4px; }
.calendar-nav button { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); display: grid; place-items: center; padding: 0; }
.calendar-nav button:hover { border-color: var(--brand); color: var(--brand); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.calendar-grid b { font-size: 10.5px; color: var(--ink-3); text-align: center; padding: 4px 0; font-weight: 700; }
.calendar-grid span { aspect-ratio: 1; display: grid; place-items: center; font-size: 12px; border-radius: 8px; color: var(--ink-2); font-weight: 600; position: relative; }
.calendar-grid span.today { background: var(--brand); color: #fff; font-weight: 800; }
.calendar-grid span.has-event::after { content: ""; position: absolute; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--amber); }
.calendar-grid span.today.has-event::after { background: #fff; }
.calendar-note { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--amber-soft); color: #92400e; font-size: 11.5px; font-weight: 700; display: flex; align-items: center; gap: 8px; }

/* Hatırlatmalar */
.reminder-list { padding: 4px 0 8px; }
.reminder-row { display: flex; align-items: center; gap: 11px; padding: 10px 16px; }
.reminder-row + .reminder-row { border-top: 1px solid var(--line-2); }
.reminder-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; }
.reminder-main { min-width: 0; flex: 1; }
.reminder-main strong { display: block; font-size: 12.5px; font-weight: 700; }
.reminder-main small { display: block; color: var(--ink-3); font-size: 11px; }
.reminder-date { font-size: 11px; font-weight: 800; flex: 0 0 auto; }

/* ===== Tablo ===== */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; min-width: 720px; }
table.data th {
  text-align: left; padding: 11px 14px; font-size: 11.5px; font-weight: 700; color: var(--ink-2);
  background: #f8fafd; border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.data td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); font-size: 13px; vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #fafbfe; }
table.data .plate { font-weight: 800; letter-spacing: .02em; white-space: nowrap; }
table.data .muted { color: var(--ink-2); }
table.data .actions { display: flex; gap: 6px; justify-content: flex-end; }
.table-vehicle { display: flex; align-items: center; gap: 10px; }
.table-thumb { width: 38px; height: 30px; border-radius: 7px; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; }
.table-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ===== Rozetler ===== */
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; white-space: nowrap;
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.pill.ok, .pill.green { background: var(--green-soft); color: #15803d; }
.pill.info, .pill.blue { background: var(--blue-soft); color: #1d4ed8; }
.pill.warn, .pill.amber { background: var(--amber-soft); color: #b45309; }
.pill.danger, .pill.red { background: var(--danger-soft); color: #b91c1c; }
.pill.muted { background: #f1f3f8; color: var(--ink-2); }
.pill.violet { background: var(--violet-soft); color: #6d28d9; }

/* ===== Boş durum ===== */
.empty-state { min-height: 200px; display: grid; place-items: center; padding: 34px 20px; text-align: center; }
.empty-state span { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%; background: var(--line-2); color: var(--ink-3); font-size: 22px; }
.empty-state strong { display: block; font-size: 15px; font-weight: 800; }
.empty-state p { margin: 5px 0 0; color: var(--ink-2); font-size: 12.5px; }

/* ===== Zimmet listesi ===== */
.record-list { min-height: 180px; }
.record-row {
  padding: 13px 18px; display: grid;
  grid-template-columns: 52px minmax(140px, 1.3fr) minmax(120px, 1fr) minmax(110px, .8fr) minmax(95px, .7fr) auto auto;
  gap: 14px; align-items: center; border-bottom: 1px solid var(--line-2);
}
.record-row:last-child { border-bottom: 0; }
.record-row:hover { background: #fafbfe; }
.record-thumb { width: 52px; height: 42px; border-radius: 9px; object-fit: cover; background: var(--line-2); }
.record-thumb.empty { display: grid; place-items: center; color: var(--ink-3); font-size: 17px; }
.record-main strong, .record-cell strong { display: block; font-size: 13.5px; font-weight: 800; }
.record-main small, .record-cell small { display: block; color: var(--ink-2); font-size: 11.5px; margin-top: 2px; }
.record-status { padding: 4px 10px; border-radius: 999px; background: var(--green-soft); color: #15803d; font-size: 11px; font-weight: 800; text-align: center; }
.view-record { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 17px; padding: 0; }
.view-record:hover { border-color: var(--brand); color: var(--brand); }

/* ===== Kart ızgaraları ===== */
.vehicle-grid, .isper-grid, .usage-grid, .users-grid, .license-grid {
  min-height: 200px; padding: 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; background: #fbfcfe;
}
.vehicle-card, .isper-card, .usage-card, .user-card, .license-card {
  min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: var(--r);
  background: #fff; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 12px;
}
.vehicle-card-head, .usage-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.vehicle-card-head strong, .usage-card-head strong { display: block; font-size: 19px; font-weight: 800; letter-spacing: .01em; }
.vehicle-card-head small, .usage-card-head small { display: block; margin-top: 3px; color: var(--ink-2); font-size: 11.5px; }
.vehicle-card-actions, .usage-card-actions, .user-card-actions, .isper-card-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 7px; margin-top: auto;
}
.vehicle-edit-button, .project-pdf-button, .pdf-button {
  min-height: 32px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; gap: 5px;
}
.vehicle-edit-button:hover, .project-pdf-button:hover, .pdf-button:hover { border-color: var(--brand); color: var(--brand); }
.vehicle-delete-button {
  width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: #fff;
  color: var(--ink-3); padding: 0; display: grid; place-items: center; font-size: 15px;
}
.vehicle-delete-button:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }

.vehicle-driver { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); background: #f7f9fc; }
.vehicle-driver > svg { color: var(--ink-3); }
.vehicle-driver small { display: block; color: var(--ink-3); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.vehicle-driver strong { display: block; font-size: 13px; margin-top: 1px; }
.vehicle-status-row { display: flex; flex-wrap: wrap; gap: 7px; }
.vehicle-status { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.vehicle-status.ok { background: var(--green-soft); color: #15803d; }
.vehicle-status.warning { background: var(--amber-soft); color: #b45309; }
.vehicle-status.danger { background: var(--danger-soft); color: #b91c1c; }
.vehicle-status.muted { background: #f1f3f8; color: var(--ink-2); }
.vehicle-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.vehicle-info-grid section { padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff; }
.vehicle-info-grid h3 { margin: 0 0 8px; font-size: 11.5px; font-weight: 800; color: var(--ink-2); }
.vehicle-info-grid dl { margin: 0; display: grid; gap: 5px; }
.vehicle-info-grid dl > div { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.vehicle-info-grid dt { color: var(--ink-3); }
.vehicle-info-grid dd { margin: 0; font-weight: 700; text-align: right; }
.vehicle-info-grid .target-row dd { color: var(--brand); }
.vehicle-last-km { padding: 10px 12px; border-radius: var(--r-sm); background: var(--blue-soft); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.vehicle-last-km span { color: #1d4ed8; font-size: 11px; font-weight: 700; }
.vehicle-last-km strong { margin-left: auto; font-size: 14px; font-weight: 800; color: #1d4ed8; }
.vehicle-last-km small { width: 100%; color: #3b6bd4; font-size: 10.5px; }
.vehicle-notes { margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.5; }

/* Kullanım kartı */
.usage-status { flex: 0 0 auto; padding: 5px 11px; border-radius: 999px; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.usage-status.active { background: var(--blue-soft); color: #1d4ed8; }
.usage-status.done { background: var(--green-soft); color: #15803d; }
.usage-user { display: flex; align-items: center; gap: 10px; }
.usage-user small { display: block; color: var(--ink-3); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.usage-user strong { display: block; font-size: 13.5px; }
.usage-info { margin: 0; display: grid; gap: 6px; }
.usage-info > div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 5px; }
.usage-info dt { color: var(--ink-2); font-size: 12px; font-weight: 600; }
.usage-info dd { margin: 0; font-size: 12.5px; font-weight: 700; text-align: right; }
.usage-damage-flag { margin: 0; padding: 9px 12px; border-radius: var(--r-sm); background: var(--danger-soft); color: #b91c1c; font-size: 12px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.usage-approvals { display: grid; gap: 6px; }
.usage-approval-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.usage-approval-row > span:first-child { color: var(--ink-2); font-size: 12px; font-weight: 600; margin-right: auto; }
.approval-chip { padding: 4px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; }
.approval-chip.ok { background: var(--green-soft); color: #15803d; }
.approval-chip.wait { background: var(--amber-soft); color: #b45309; }
.approve-button { min-height: 30px; padding: 0 12px; border-radius: 9px; border: 0; background: var(--brand); color: #fff; font-size: 12px; font-weight: 800; }
.approve-button:hover { background: var(--brand-dark); }

/* Kullanıcı & firma kartları */
.user-card-head { display: flex; align-items: center; gap: 11px; }
.user-card-name { min-width: 0; flex: 1; }
.user-card-name strong { display: block; font-size: 15px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card-name small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 11.5px; }
.user-role-chip { flex: 0 0 auto; padding: 4px 10px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.user-role-chip.admin { background: var(--brand-soft); color: #b91c1c; }
.user-role-chip.user { background: var(--blue-soft); color: #1d4ed8; }
.user-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.user-card-meta small { color: var(--ink-3); font-size: 11px; }
.user-active-chip { padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.user-active-chip.on { background: var(--green-soft); color: #15803d; }
.user-active-chip.off { background: #f1f3f8; color: var(--ink-2); }
.user-card.inactive { opacity: .6; }
.company-notes { margin: 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
.company-open-button { min-height: 36px; padding: 0 14px; font-size: 12.5px; margin-right: auto; }

/* İSG uzman kartı */
.isper-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.isper-person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.isper-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 800; font-size: 14px; flex: 0 0 auto; }
.isper-person strong { display: block; font-size: 15px; font-weight: 800; }
.isper-person small { display: block; color: var(--ink-2); font-size: 11.5px; margin-top: 2px; }
.isper-equipment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.isper-equipment { padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.isper-equipment-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.isper-equipment-head strong { font-size: 12.5px; font-weight: 800; }
.isper-equipment dl { margin: 0; display: grid; gap: 5px; }
.isper-equipment dl > div { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; }
.isper-equipment dt { color: var(--ink-3); }
.isper-equipment dd { margin: 0; font-weight: 700; text-align: right; }
.isper-photo-section { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px; }
.isper-photo-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; }
.isper-photo-section-head strong { font-size: 12px; font-weight: 800; }
.isper-photo-section-head small { color: var(--ink-3); font-size: 11px; }
.isper-photo-gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; }
.isper-photo-gallery button { position: relative; padding: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: none; aspect-ratio: 4/3; }
.isper-photo-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.isper-photo-gallery span { position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 5px; background: rgba(15,26,47,.78); color: #fff; font-size: 8.5px; font-weight: 700; }
.isper-signature-preview { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--green-soft); }
.isper-signature-preview img { width: 84px; height: 42px; object-fit: contain; background: #fff; border-radius: 7px; }
.isper-signature-preview strong { display: block; font-size: 12px; font-weight: 800; color: #15803d; }
.isper-signature-preview small { display: block; color: #3f8a5c; font-size: 10.5px; margin-top: 1px; }
.isper-signature-preview.pending { background: var(--amber-soft); color: #b45309; font-size: 12px; font-weight: 700; }
.isper-card-date { margin: 0; color: var(--ink-3); font-size: 10.5px; text-align: right; }

/* Ruhsat kartı */
.license-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.license-card-head strong { display: block; font-size: 18px; font-weight: 800; }
.license-card-head small { display: block; margin-top: 2px; color: var(--ink-2); font-size: 11.5px; }
.license-photo-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.license-photo-row button { position: relative; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: none; aspect-ratio: 3/2; }
.license-photo-row img { width: 100%; height: 100%; object-fit: cover; display: block; }
.license-photo-row span { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; background: rgba(15,26,47,.78); color: #fff; font-size: 9.5px; font-weight: 700; }

/* ===== Modal ===== */
.modal-backdrop {
  display: none; position: fixed; inset: 0; z-index: 90; padding: 20px;
  background: rgba(15, 26, 47, .55); backdrop-filter: blur(4px); align-items: center; justify-content: center;
}
.modal-backdrop.open { display: flex; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.wizard, .detail-dialog, .vehicle-dialog, .license-dialog, .isper-dialog, .usage-dialog, .user-dialog {
  width: min(1040px, 100%); max-height: calc(100vh - 40px); border-radius: var(--r-lg);
  background: #fff; box-shadow: var(--shadow-lg); overflow: hidden; display: flex; flex-direction: column;
}
.vehicle-dialog, .license-dialog, .isper-dialog, .user-dialog { width: min(760px, 100%); }
.usage-dialog { width: min(820px, 100%); }
.detail-dialog { width: min(920px, 100%); }
.wizard-head { padding: 16px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.wizard-head h2 { margin: 0; font-size: 19px; font-weight: 800; }

.stepper { display: flex; align-items: center; gap: 6px; padding: 14px 22px; border-bottom: 1px solid var(--line); background: #fafbfe; overflow-x: auto; }
.stepper button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0 2px; flex: 0 0 auto; }
.stepper button span {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: #e8ecf4; color: var(--ink-2); font-size: 12px; font-weight: 800;
}
.stepper button small { font-size: 10.5px; color: var(--ink-3); font-weight: 700; white-space: nowrap; }
.stepper button.active span { background: var(--brand); color: #fff; }
.stepper button.active small { color: var(--brand); }
.stepper button.done span { background: var(--green); color: #fff; }
.stepper i { flex: 1; height: 2px; background: var(--line); min-width: 14px; }

.wizard-body, .vehicle-form-body, .license-form-body, .isper-form-body, .usage-form-body, .user-form-body {
  min-height: 0; overflow-y: auto; padding: 22px 24px 26px;
}
.form-step { display: none; }
.form-step.active { display: block; }
.section-title { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.section-title > span {
  width: 32px; height: 32px; border-radius: 9px; background: var(--brand-soft); color: var(--brand);
  display: grid; place-items: center; font-size: 12px; font-weight: 800; flex: 0 0 auto;
}
.section-title h3 { margin: 0; font-size: 15px; font-weight: 800; }
.section-title p { margin: 3px 0 0; color: var(--ink-2); font-size: 12.5px; }
.vehicle-section-title, .license-section-title, .isper-section-title, .usage-section-title { margin-top: 24px; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid label, .damage-note-label, .license-vehicle-select { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.form-grid label.full, .full { grid-column: 1 / -1; }
input[type=text], input[type=number], input[type=tel], input[type=date], input[type=datetime-local],
input[type=search], input[type=password], input:not([type]), select, textarea {
  width: 100%; min-height: 42px; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff; color: var(--ink); outline: none; font-size: 14px; font-weight: 500;
}
textarea { min-height: 76px; resize: vertical; line-height: 1.5; }
select { appearance: none; 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='%235a6480' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-ring); }
input.invalid, select.invalid, textarea.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220,38,38,.14); }
input[readonly] { background: #f5f7fb; color: var(--ink-2); }
.suffix-input { position: relative; }
.suffix-input b { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); color: var(--ink-3); font-size: 12px; font-weight: 700; }
.suffix-input input { padding-right: 42px; }

.wizard-footer, .vehicle-form-footer {
  padding: 14px 22px; border-top: 1px solid var(--line); display: flex; align-items: center;
  justify-content: space-between; gap: 10px; background: #fff;
}
.vehicle-form-footer { justify-content: flex-end; }
#stepLabel { color: var(--ink-3); font-size: 12px; font-weight: 700; }

.hint {
  margin-top: 14px; padding: 11px 13px; border-radius: var(--r-sm); background: var(--blue-soft);
  color: #1d4ed8; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 9px;
}
.consent { display: flex; align-items: flex-start; gap: 11px; padding: 13px; border-radius: var(--r-sm); background: #f7f9fc; border: 1px solid var(--line); font-size: 12.5px; line-height: 1.5; }
.consent input[type=checkbox] { width: 19px; height: 19px; min-height: 0; margin-top: 1px; accent-color: var(--brand); flex: 0 0 auto; }
.responsibility-notice { padding: 15px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fafbfe; max-height: 190px; overflow-y: auto; }
.responsibility-notice strong { display: block; font-size: 12px; font-weight: 800; margin-bottom: 7px; }
.responsibility-notice p { margin: 0; color: var(--ink-2); font-size: 11.5px; line-height: 1.65; }
.signature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.project-signature-grid { grid-template-columns: minmax(0, 1fr); }
.signature-card { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; background: #fff; }
.signature-card > div { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.signature-card strong { font-size: 12.5px; font-weight: 800; }
.signature-card button { border: 0; background: none; color: var(--brand); font-size: 11.5px; font-weight: 700; }
.signature-card canvas { width: 100%; height: 150px; border: 1.5px dashed #cbd3e2; border-radius: var(--r-sm); background: #fbfcfe; touch-action: none; display: block; }
.signature-card small { display: block; margin-top: 6px; color: var(--ink-3); font-size: 11px; }
.local-guarantee { margin-top: 16px; padding: 13px; border-radius: var(--r-sm); background: var(--green-soft); display: flex; gap: 11px; align-items: flex-start; }
.local-guarantee strong { display: block; font-size: 12.5px; font-weight: 800; color: #15803d; }
.local-guarantee p { margin: 3px 0 0; font-size: 11.5px; color: #3f8a5c; line-height: 1.5; }
.review-content { display: grid; gap: 10px; }
.review-item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 13px; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 12.5px; }
.review-item span { color: var(--ink-2); }
.review-item strong { font-weight: 800; text-align: right; }
.review-responsibility { margin: 8px 0 0; font-size: 11px; color: var(--ink-2); line-height: 1.6; }

/* ===== Fotoğraf alanları ===== */
.photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.photo-slot, .license-photo-slot, .staff-equipment-photo-slot {
  min-height: 128px; border: 1.5px dashed #cbd3e2; border-radius: var(--r-sm); background: #fbfcfe;
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  overflow: hidden; position: relative; padding: 10px; cursor: pointer;
}
.photo-slot:hover, .license-photo-slot:hover, .staff-equipment-photo-slot:hover { border-color: var(--brand); background: var(--brand-soft); }
.photo-slot input, .license-photo-slot input, .staff-equipment-photo-slot input { display: none; }
.photo-slot .camera, .license-photo-slot .camera, .staff-equipment-photo-slot .camera { font-size: 22px; color: var(--ink-3); }
.photo-slot strong, .license-photo-slot strong, .staff-equipment-photo-slot strong { font-size: 11.5px; font-weight: 800; margin-top: 5px; }
.photo-slot small, .license-photo-slot small, .staff-equipment-photo-slot small { font-size: 10px; color: var(--ink-3); margin-top: 2px; }
.photo-slot img, .license-photo-slot img, .staff-equipment-photo-slot img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.photo-slot.has-photo, .license-photo-slot.has-photo, .staff-equipment-photo-slot.has-photo { border-style: solid; border-color: var(--green); }
.license-photo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.license-photo-slot { min-height: 200px; }
.staff-equipment-photo-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.staff-equipment-photo-grid.phone-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.staff-equipment-photo-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 16px 0 9px; }
.staff-equipment-photo-heading strong { font-size: 12.5px; font-weight: 800; }
.staff-equipment-photo-heading small { color: var(--ink-3); font-size: 11px; }

.usage-photo-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.usage-photo-slot { display: flex; flex-direction: column; gap: 7px; text-align: center; }
.usage-photo-slot > strong { font-size: 11.5px; font-weight: 800; }
.usage-photo-frame {
  position: relative; min-height: 112px; border: 1.5px dashed #cbd3e2; border-radius: var(--r-sm);
  background: #fbfcfe; display: grid; place-items: center; overflow: hidden; cursor: pointer;
}
.usage-photo-frame:hover { border-color: var(--brand); background: var(--brand-soft); }
.usage-photo-frame .camera { font-size: 22px; color: var(--ink-3); }
.usage-photo-frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.usage-photo-slot.has-photo .usage-photo-frame { border-style: solid; border-color: var(--green); }
.usage-photo-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.usage-photo-actions button {
  min-height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
  font-size: 11px; font-weight: 700; color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 4px;
}
.usage-photo-actions button:hover { border-color: var(--brand); color: var(--brand); }
.camera-only [data-photo-source="gallery"] { display: none; }
.camera-only .usage-photo-actions { grid-template-columns: 1fr; }
.damage-toggle { margin-top: 14px; }
.damage-fields { margin-top: 14px; display: grid; gap: 14px; }
.damage-fields[hidden] { display: none; }
.damage-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.usage-pickup-info { margin: 14px 0 0; padding: 11px 13px; border-radius: var(--r-sm); background: var(--blue-soft); color: #1d4ed8; font-size: 12.5px; font-weight: 700; }

/* ===== Detay ===== */
.detail-content { min-height: 0; overflow-y: auto; padding: 22px 24px 26px; }
.detail-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.detail-item { padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fafbfe; }
.detail-item small { display: block; color: var(--ink-3); font-size: 10.5px; font-weight: 700; }
.detail-item strong { display: block; font-size: 13px; font-weight: 700; margin-top: 3px; word-break: break-word; }
.detail-section { margin-bottom: 20px; }
.detail-section h3 { margin: 0 0 10px; font-size: 14px; font-weight: 800; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.gallery-item { position: relative; padding: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: none; aspect-ratio: 4/3; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-item span { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; background: rgba(15,26,47,.78); color: #fff; font-size: 9.5px; font-weight: 700; }
.compare-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.compare-col { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.compare-col h4 { margin: 0; padding: 8px 10px; font-size: 11.5px; font-weight: 800; background: #f8fafd; border-bottom: 1px solid var(--line); text-align: center; }
.compare-pair { display: grid; grid-template-rows: 1fr 1fr; }
.compare-pair figure { margin: 0; position: relative; aspect-ratio: 4/3; background: var(--line-2); }
.compare-pair figure + figure { border-top: 1px solid var(--line); }
.compare-pair img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.compare-pair figcaption { position: absolute; top: 5px; left: 5px; padding: 2px 7px; border-radius: 999px; font-size: 9.5px; font-weight: 800; background: rgba(15,26,47,.8); color: #fff; }
.compare-pair .missing { display: grid; place-items: center; height: 100%; color: var(--ink-3); font-size: 11px; }
.signature-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.signature-images figure { margin: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.signature-images img { width: 100%; height: 110px; object-fit: contain; background: #fff; display: block; }
.signature-images figcaption { padding: 7px 10px; background: #fafbfe; border-top: 1px solid var(--line); font-size: 11.5px; font-weight: 700; text-align: center; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 9px; justify-content: flex-end; padding-top: 8px; border-top: 1px solid var(--line); }

/* ===== Fotoğraf görüntüleyici ===== */
.photo-viewer-backdrop { background: rgba(9, 14, 26, .93); backdrop-filter: blur(2px); padding: 0; }
.photo-viewer { width: 100%; height: 100%; max-height: none; background: transparent; box-shadow: none; border-radius: 0; }
.photo-viewer-head { padding: max(16px, env(safe-area-inset-top)) 20px 12px; display: flex; align-items: center; justify-content: space-between; color: #fff; }
.photo-viewer-head strong { display: block; font-size: 14px; }
.photo-viewer-head small { display: block; color: #9aa5bb; font-size: 12px; margin-top: 2px; }
.viewer-close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.08); color: #fff; font-size: 22px; padding: 0; }
.photo-viewer-stage { flex: 1; min-height: 0; position: relative; display: grid; place-items: center; padding: 0 12px; }
.photo-viewer-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: var(--r-sm); }
.viewer-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2); background: rgba(15,26,47,.6); color: #fff; font-size: 24px; padding: 0;
}
.viewer-nav.previous { left: 14px; }
.viewer-nav.next { right: 14px; }
.viewer-nav:disabled { opacity: .28; }
.photo-viewer-hint { text-align: center; color: #7b869c; font-size: 11.5px; padding: 12px 0 max(16px, env(safe-area-inset-bottom)); margin: 0; }

/* ===== Şifre modalı ===== */
.security-pin-backdrop .security-pin-dialog {
  width: min(380px, 100%); background: #fff; border-radius: var(--r-lg); padding: 26px; text-align: center; box-shadow: var(--shadow-lg);
}
.security-pin-icon { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 22px; }
.security-pin-dialog h2 { margin: 6px 0 8px; font-size: 19px; font-weight: 800; }
.security-pin-dialog > p { margin: 0 0 16px; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; }
.security-pin-dialog label { display: grid; gap: 6px; text-align: left; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.security-pin-dialog input { text-align: center; letter-spacing: .5em; font-size: 20px; font-weight: 800; }
.security-pin-error { min-height: 18px; margin: 8px 0 0; color: var(--danger); font-size: 12px; font-weight: 700; }
.security-pin-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

/* ===== Giriş ekranı ===== */
.login-screen {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 22px;
  background: #ffffff;
}
.login-screen[hidden] { display: none; }
.login-card {
  width: min(420px, 100%); padding: 32px 30px 26px; border-radius: 22px; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(22, 35, 62, .10); text-align: left;
}
.login-logo { display: block; width: 190px; max-width: 70%; margin: 0 auto 20px; }
.login-card .eyebrow { text-align: center; }
.login-card h1 { margin: 0; font-size: 25px; font-weight: 800; text-align: center; }
.login-subtitle { margin: 8px 0 22px; color: var(--ink-2); font-size: 13px; line-height: 1.5; text-align: center; }
.login-card form { display: grid; gap: 13px; }
.login-card label { display: grid; gap: 6px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.login-card label[hidden] { display: none; }
.login-error { min-height: 17px; margin: 0; color: var(--danger); font-size: 12.5px; font-weight: 700; }
.login-submit { min-height: 48px; font-size: 15px; }
.login-note { margin: 18px 0 0; color: var(--ink-3); font-size: 11.5px; line-height: 1.6; text-align: center; }
.login-boot { display: none; margin: 16px auto 0; width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--brand); animation: bootspin .7s linear infinite; font-size: 0; }
@keyframes bootspin { to { transform: rotate(360deg); } }
.login-screen.boot .login-boot { display: block; }
.login-screen.boot .login-card { border: 0; box-shadow: none; }
.login-screen.boot .eyebrow, .login-screen.boot h1, .login-screen.boot .login-subtitle, .login-screen.boot form, .login-screen.boot .login-note { display: none; }

/* ===== Toast ===== */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 130%); z-index: 300;
  padding: 13px 20px; border-radius: 12px; background: var(--navy); color: #fff;
  font-size: 13px; font-weight: 700; box-shadow: var(--shadow-lg); transition: transform .25s ease;
  max-width: min(440px, calc(100vw - 32px)); text-align: center;
}
.toast.show { transform: translate(-50%, 0); }
.toast.error { background: var(--danger); }

.drawer-scrim { display: none; position: fixed; inset: 0; z-index: 35; background: rgba(15,26,47,.45); }
.drawer-scrim.open { display: block; }

/* ===== Daraltılmış menü ===== */
body.sidebar-collapsed .sidebar { width: var(--sidebar-w-min); padding-left: 10px; padding-right: 10px; }
body.sidebar-collapsed .app-shell { margin-left: var(--sidebar-w-min); }
body.sidebar-collapsed .brand { justify-content: center; padding-left: 0; padding-right: 0; }
body.sidebar-collapsed .brand-logo { display: none; }
body.sidebar-collapsed .brand-mini { display: block; }
body.sidebar-collapsed .nav-item { justify-content: center; padding: 12px 0; gap: 0; }
body.sidebar-collapsed .nav-item .label { display: none; }
body.sidebar-collapsed .nav-badge { position: absolute; top: 6px; right: 12px; }
body.sidebar-collapsed .user-chip { flex-direction: column; gap: 8px; padding: 9px 5px; }
body.sidebar-collapsed .user-chip-text { display: none; }
body.sidebar-collapsed .support-card { flex-direction: column; text-align: center; padding: 11px 6px; }
body.sidebar-collapsed .support-card div { display: none; }

/* ===== Duyarlı ===== */
@media (max-width: 1240px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-split { grid-template-columns: minmax(0, 1fr); }
  .vehicle-grid, .isper-grid, .usage-grid, .users-grid, .license-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search-wrap { width: 220px; }
}
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; width: var(--sidebar-w); padding-left: 14px; padding-right: 14px; }
  .sidebar.open { transform: none; }
  .app-shell { margin-left: 0; }
  .menu-button { display: grid; place-items: center; }
  body.sidebar-collapsed .sidebar { width: var(--sidebar-w); padding-left: 14px; padding-right: 14px; }
  body.sidebar-collapsed .app-shell { margin-left: 0; }
  body.sidebar-collapsed .brand-logo { display: block; }
  body.sidebar-collapsed .brand-mini { display: none; }
  body.sidebar-collapsed .nav-item { justify-content: flex-start; padding: 11px 13px; gap: 11px; }
  body.sidebar-collapsed .nav-item .label { display: inline; }
  body.sidebar-collapsed .nav-badge { position: static; }
  body.sidebar-collapsed .user-chip { flex-direction: row; padding: 10px; }
  body.sidebar-collapsed .user-chip-text { display: block; }
  body.sidebar-collapsed .support-card { flex-direction: row; text-align: left; padding: 14px; }
  body.sidebar-collapsed .support-card div { display: block; }
  .topbar { padding: 0 16px; gap: 10px; height: 60px; }
  .topbar-title em, .topbar-title span { display: none; }
  .search-wrap { width: auto; flex: 1; }
  .topbar-user div { display: none; }
  main { padding: 18px 14px 40px; }
  .dash-side { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .signature-grid, .vehicle-info-grid, .isper-equipment-grid, .signature-images { grid-template-columns: minmax(0, 1fr); }
  .photo-grid, .usage-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .staff-equipment-photo-grid, .staff-equipment-photo-grid.phone-photo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery, .isper-photo-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modal-backdrop { padding: 0; align-items: stretch; }
  .wizard, .detail-dialog, .vehicle-dialog, .license-dialog, .isper-dialog, .usage-dialog, .user-dialog {
    max-height: 100vh; width: 100%; border-radius: 0;
  }
  .wizard-body, .vehicle-form-body, .license-form-body, .isper-form-body, .usage-form-body, .user-form-body,
  .detail-content { padding: 18px 16px 24px; }
  .wizard-head, .stepper { padding-left: 16px; padding-right: 16px; }
  .wizard-footer, .vehicle-form-footer { padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  .record-row { grid-template-columns: 46px 1fr auto auto; gap: 11px; }
  .record-cell { display: none; }
  .record-status { display: none; }
  .page-heading { align-items: flex-start; }
  .page-heading h1 { font-size: 22px; }
  .heading-actions { width: 100%; }
  .heading-actions .primary-button, .heading-actions .secondary-button, .heading-actions .excel-button { flex: 1; }
}
@media (max-width: 470px) {
  .stat-grid, .vehicle-stat-grid, .license-stat-grid, .isper-stat-grid, .usage-stat-grid, .users-stat-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .stat-card { padding: 13px 15px; gap: 12px; }
  .stat-card strong { font-size: 22px; }
  .compare-grid, .detail-summary { grid-template-columns: minmax(0, 1fr); }
  .security-pin-actions { grid-template-columns: 1fr; }
  .vehicle-form-footer { flex-direction: column-reverse; }
  .vehicle-form-footer button { width: 100%; }
  .license-photo-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ===== Yazdırma ===== */
@media print {
  .sidebar, .topbar, .toast, .heading-actions { display: none !important; }
  .app-shell { margin-left: 0; }
  .panel { box-shadow: none; }
}

/* Aktif araç şeridi */
.usage-active-banner {
  display: flex; align-items: center; gap: 13px; padding: 14px 16px; margin-bottom: 16px;
  border-radius: var(--r); background: linear-gradient(120deg, var(--navy-800), var(--navy-700)); color: #fff;
  box-shadow: var(--shadow);
}
.usage-active-banner[hidden] { display: none; }
.usage-active-banner .ub-ico { width: 42px; height: 42px; border-radius: 12px; background: rgba(255,255,255,.13); display: grid; place-items: center; flex: 0 0 auto; }
.usage-active-banner .ub-main { min-width: 0; flex: 1; }
.usage-active-banner small { display: block; color: #a9b4ca; font-size: 10.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.usage-active-banner strong { display: block; font-size: 18px; font-weight: 800; margin-top: 2px; }
.usage-active-banner em { font-style: normal; display: block; color: #b9c3d6; font-size: 12px; margin-top: 2px; }
.usage-active-banner .primary-button { flex: 0 0 auto; }
.vehicle-status.success { background: var(--green-soft); color: #15803d; }
.vehicle-status.neutral { background: #f1f3f8; color: var(--ink-2); }
@media (max-width: 640px) {
  .usage-active-banner { flex-wrap: wrap; }
  .usage-active-banner .primary-button { width: 100%; }
}

/* Rötuşlar */
.search-wrap input[type=search] { padding: 0 14px 0 38px; height: 40px; min-height: 40px; }
.calendar-note[hidden] { display: none !important; }
.dash-side .empty-state { min-height: 120px; padding: 22px 16px; }
.dash-side .empty-state span { width: 40px; height: 40px; font-size: 17px; margin-bottom: 8px; }
.dash-side .empty-state strong { font-size: 13px; }
.dash-side .empty-state p { font-size: 11.5px; }
.activity-list .empty-state { min-height: 150px; }
#dashVehicleTable { min-width: 640px; }
#dashVehicleTable th, #dashVehicleTable td { padding: 10px 10px; }
#dashVehicleTable .actions { gap: 4px; }
@media (max-width: 1500px) {
  #dashVehicleTable th:nth-child(3), #dashVehicleTable td:nth-child(3) { display: none; }
}
table.data td .pill { white-space: nowrap; }
.usage-damage-flag svg, .approval-chip svg, .isper-signature-preview svg { flex: 0 0 auto; }
.approval-chip { display: inline-flex; align-items: center; gap: 4px; }
.isper-signature-preview.pending { display: flex; align-items: center; gap: 8px; }

@media (max-width: 860px) {
  .topbar-title { display: none; }
  .search-wrap { margin-left: 0; }
}
@media (max-width: 520px) {
  .topbar { gap: 8px; padding: 0 12px; }
  .search-wrap input[type=search] { padding-left: 34px; }
  .search-wrap svg { left: 10px; }
}

.brand-mini { width: 46px; }
body.sidebar-collapsed .brand { padding-bottom: 22px; }

body.sidebar-collapsed .brand { flex-direction: column; gap: 10px; padding: 2px 0 18px; }
body.sidebar-collapsed .brand-mini { width: 40px; }

/* ===== Logo = menü aç/kapa düğmesi ===== */
.brand {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 2px 4px 16px; border: 0; background: none; cursor: pointer;
  border-radius: var(--r); transition: opacity .15s ease;
}
.brand:hover { opacity: .82; }
.brand:active { transform: scale(.98); }
.brand-logo { width: 100%; max-width: 150px; height: auto; display: block; }
.sidebar { padding-left: 12px; padding-right: 12px; }
.nav-item { padding: 10px 12px; font-size: 13px; gap: 10px; }
.nav-item svg.ico { width: 18px; height: 18px; }
.support-card { padding: 12px; gap: 9px; }
.support-card strong { font-size: 12px; }
.support-card small { font-size: 10px; }
.user-chip { padding: 9px; gap: 9px; }
.user-avatar { width: 34px; height: 34px; font-size: 12px; }
body.sidebar-collapsed .brand { padding: 2px 0 16px; }
body.sidebar-collapsed .brand-mini { width: 38px; }

/* Modal içindeki formlar dikeyde sıkışsın ki gövde kaydırılabilsin */
.wizard > form, .vehicle-dialog > form, .license-dialog > form,
.isper-dialog > form, .usage-dialog > form, .user-dialog > form {
  display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; overflow: hidden;
}
.wizard-body, .vehicle-form-body, .license-form-body, .isper-form-body,
.usage-form-body, .user-form-body, .detail-content {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.wizard-footer, .vehicle-form-footer { flex: 0 0 auto; }
.wizard-head, .stepper { flex: 0 0 auto; }

/* ===== Boştaki araçlar paneli ===== */
.idle-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 12px; padding: 0 18px 18px;
}
.idle-card {
  border: 1px solid var(--line); border-radius: var(--r); padding: 14px;
  display: flex; flex-direction: column; gap: 11px; background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.idle-card:hover { border-color: var(--ink-3); box-shadow: var(--shadow); }
.idle-card.free { border-left: 3px solid var(--green); }
.idle-card.busy { border-left: 3px solid var(--blue); }
.idle-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.idle-card-head strong { display: block; font-size: 15px; letter-spacing: .2px; }
.idle-card-head small { display: block; color: var(--ink-3); font-size: 11.5px; margin-top: 2px; }
.idle-chip {
  flex: 0 0 auto; padding: 4px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .3px;
}
.idle-chip.free { color: var(--green); background: var(--green-soft); }
.idle-chip.busy { color: var(--blue); background: var(--blue-soft); }
.idle-info { display: grid; gap: 7px; margin: 0; }
.idle-info > div { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.idle-info dt { color: var(--ink-3); font-size: 11.5px; margin: 0; }
.idle-info dd { margin: 0; font-size: 12.5px; font-weight: 700; text-align: right; }
.return-chip {
  display: inline-block; margin-left: 5px; padding: 2px 7px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800;
}
.return-chip.danger { color: var(--brand); background: var(--brand-soft); }
.return-chip.warning { color: var(--amber); background: var(--amber-soft); }
.return-chip.success { color: var(--green); background: var(--green-soft); }
.return-chip.flat { color: var(--ink-3); background: var(--bg); }
.idle-card-actions { display: flex; gap: 7px; margin-top: auto; flex-wrap: wrap; }
.idle-card-actions button { flex: 1; min-width: 116px; }
.idle-card-actions .primary-button { min-height: 34px; padding: 0 11px; font-size: 12px; border-radius: 9px; }
.signature-missing {
  display: grid; place-items: center; min-height: 92px; border: 1px dashed var(--line);
  border-radius: var(--r); color: var(--ink-3); font-size: 12px; background: var(--bg);
}
.field-hint { display: block; margin-top: 4px; color: var(--ink-3); font-size: 11px; font-weight: 500; }
@media (max-width: 620px) {
  .idle-grid { grid-template-columns: minmax(0, 1fr); padding: 0 14px 14px; }
}
