/* Gamboa Fleet — tek stil dosyası. Renkler token olarak tanımlı; durum renkleri bütün sitede aynı anlama gelir. */
:root {
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e3e8ef;
  --text: #0f172a;
  --muted: #64748b;
  --brand: #1d4ed8;
  --brand-ink: #ffffff;
  --side: #0b1324;
  --side-text: #c7d2e3;
  --side-active: #1e293b;
  --danger: #dc2626;
  --ok: #16a34a;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 1px 3px rgba(15, 23, 42, .05);

  /* Durum renkleri (harita, sayaçlar, case listesi) */
  --st-green: #16a34a;
  --st-blue: #2563eb;
  --st-gray: #64748b;
  --st-orange: #ea580c;
  --st-red: #dc2626;
  --st-purple: #7c3aed;
  --st-yellow: #ca8a04;
  --st-neutral: #0f172a;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

/* ---------- yerleşim */
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--side) 240px, transparent 240px); }
.side {
  background: var(--side); color: var(--side-text); padding: 20px 14px;
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 17px; padding: 4px 8px 18px; }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--side-text); letter-spacing: .06em; text-transform: uppercase; }
.side .sect { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 14px 10px 6px; }
.side a.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  color: var(--side-text); padding: 9px 10px; border-radius: 8px; font-weight: 500;
}
.side a.nav:hover { background: var(--side-active); text-decoration: none; color: #fff; }
.side a.nav.on { background: var(--brand); color: #fff; }
.side .soon { font-size: 10px; background: #1e293b; color: #94a3b8; padding: 1px 6px; border-radius: 99px; }
.side a.nav.on .soon { background: rgba(255,255,255,.2); color: #fff; }
.side .me { margin-top: auto; border-top: 1px solid #1e293b; padding: 14px 8px 0; font-size: 13px; }
.side .me b { color: #fff; display: block; }
.side .me a { color: var(--side-text); }
.side .me form { display: inline; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--side-text); font: inherit; cursor: pointer; }
.linkbtn:hover { color: #fff; text-decoration: underline; }

.main { padding: 28px 32px 48px; min-width: 0; }
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.head p { margin: 4px 0 0; }

.topbar { display: none; }
.menu-toggle { display: none; }

/* ---------- kartlar ve kutular */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.tile {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; position: relative; overflow: hidden;
}
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c, var(--st-neutral)); }
.tile .lbl { font-size: 13px; color: var(--muted); font-weight: 500; }
.tile .num { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0; color: var(--c, var(--text)); }
.tile .hint { font-size: 12px; color: var(--muted); }
.c-green { --c: var(--st-green); } .c-blue { --c: var(--st-blue); } .c-gray { --c: var(--st-gray); }
.c-orange { --c: var(--st-orange); } .c-red { --c: var(--st-red); } .c-purple { --c: var(--st-purple); }
.c-yellow { --c: var(--st-yellow); } .c-neutral { --c: var(--st-neutral); }

.placeholder {
  margin-top: 16px; border: 2px dashed var(--border); border-radius: var(--radius); background: var(--surface-2);
  min-height: 320px; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 24px;
}
.placeholder b { color: var(--text); display: block; font-size: 16px; margin-bottom: 4px; }

.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: 13px; color: var(--muted); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: 6px; vertical-align: -1px; }

/* ---------- tablolar */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tr.off td { color: var(--muted); }

.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 99px; background: #eef2ff; color: #3730a3; white-space: nowrap; }
.b-admin { background: #fee2e2; color: #991b1b; }
.b-fleet { background: #dbeafe; color: #1e40af; }
.b-management { background: #ede9fe; color: #5b21b6; }
.b-viewer { background: #f1f5f9; color: #334155; }
.b-active { background: #dcfce7; color: #166534; }
.b-invited { background: #fef9c3; color: #854d0e; }
.b-disabled { background: #f1f5f9; color: #64748b; }

/* ---------- formlar */
label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
input[type=text], input[type=email], input[type=password], select {
  width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text);
}
input:focus, select:focus { outline: 2px solid #bfdbfe; border-color: var(--brand); }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.row > .field { flex: 1 1 180px; margin-bottom: 0; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600;
  padding: 10px 16px; border-radius: 8px; border: 1px solid transparent; cursor: pointer;
  background: var(--brand); color: var(--brand-ink); white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.secondary { background: #fff; color: var(--text); border-color: var(--border); }
.btn.danger { background: #fff; color: var(--danger); border-color: #fecaca; }
.btn.block { width: 100%; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.actions form { margin: 0; }

.alert { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.alert.ok { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert.err { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.copy { display: flex; gap: 8px; margin-top: 8px; }
.copy input { font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 12px; font-size: 13px; }

/* ---------- giriş ekranları */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-art {
  background: radial-gradient(1200px 600px at 10% 10%, #1e3a8a 0%, #0b1324 60%);
  color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-art .brand { padding: 0; font-size: 20px; }
.auth-art h2 { font-size: 30px; line-height: 1.2; max-width: 420px; margin: 0 0 12px; letter-spacing: -.02em; }
.auth-art p { color: #c7d2e3; max-width: 420px; margin: 0; }
.auth-art ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; color: #dbe4f3; font-size: 14px; }
.auth-art li .dot { margin-right: 10px; }
.auth-form { display: grid; place-items: center; padding: 32px 20px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h1 { margin-bottom: 6px; }
.auth-box > p { margin: 0 0 22px; color: var(--muted); }
.auth-foot { margin-top: 18px; font-size: 13px; text-align: center; color: var(--muted); }

/* ---------- telefon */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; background: none; }
  .side { position: fixed; inset: 0 30% 0 0; z-index: 20; transform: translateX(-100%); transition: transform .2s; height: 100%; }
  .menu-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(2,6,23,.45); }
  .topbar {
    display: flex; align-items: center; gap: 12px; background: var(--side); color: #fff; padding: 12px 16px;
    position: sticky; top: 0; z-index: 10; font-weight: 700;
  }
  .topbar svg { width: 24px; height: 24px; }
  .menu-toggle { display: inline-flex; background: none; border: 0; color: #fff; padding: 4px; cursor: pointer; }
  .main { padding: 20px 16px 40px; }
  .grid2 { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile .num { font-size: 24px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { padding: 28px 20px; }
  .auth-art h2 { font-size: 22px; }
  .auth-art ul { display: none; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .hide-sm { display: none; }
}
.mt { margin-top: 16px; }

/* ---------- F2: canlı harita, sayaç süzgeçleri */
:root { --st-slate: #334155; --st-nosig: #a8a29e; --st-teal: #0d9488; }
.c-slate { --c: var(--st-slate); } .c-nosig { --c: var(--st-nosig); } .c-teal { --c: var(--st-teal); }
button.tile { font: inherit; text-align: left; cursor: pointer; color: inherit; width: 100%; }
button.tile:hover { border-color: var(--c); }
.tile.on { outline: 2px solid var(--c); outline-offset: -1px; background: var(--surface-2); }
.tile.later { opacity: .55; }
.tile.later .num { color: var(--muted); }

.live { margin-top: 16px; }
.live-grid { display: grid; gap: 16px; }
.on-map .live-grid { grid-template-columns: minmax(0, 1fr) 420px; align-items: start; }
.map-card { min-width: 0; }
#map { height: 520px; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); background: #e5e7eb; z-index: 0; }
.on-map #map { height: calc(100vh - 190px); min-height: 480px; }
.on-map .list-card { max-height: calc(100vh - 150px); overflow: auto; }
.list-card { padding: 14px; }
.list-head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.list-head input { max-width: 320px; }
table.trucks td { padding: 8px 10px; }
table.trucks .dot { margin-right: 8px; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: var(--surface-2); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font: inherit; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border); background: #fff; cursor: pointer; color: var(--text); }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }

/* harita iğneleri: araç numarası durum renginde */
.pin-wrap { background: none; border: 0; }
.pin {
  display: inline-block; transform: translate(0, 0); white-space: nowrap; font: 700 11px/1 -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: #fff; background: var(--c); padding: 4px 6px; border-radius: 6px; border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(2, 6, 23, .35);
}
.pin.moving::after { content: "›"; margin-left: 3px; }
.pin.c-nosig { color: #1c1917; }
.pill { display: inline-block; font-size: 11px; font-weight: 700; color: #fff; background: var(--c); padding: 2px 8px; border-radius: 99px; }
.pop-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 15px; }
.pop-driver { color: var(--muted); margin: 2px 0 6px; }
.pop-kv { display: grid; grid-template-columns: 78px 1fr; gap: 3px 8px; margin: 0; font-size: 13px; }
.pop-kv dt { color: var(--muted); }
.pop-kv dd { margin: 0; }
.leaflet-container { font: inherit; }

@media (max-width: 1100px) { .on-map .live-grid { grid-template-columns: 1fr; } .on-map #map { height: 60vh; } .on-map .list-card { max-height: none; } }
@media (max-width: 900px) { #map { height: 420px; } }
table.trucks td:first-child { white-space: nowrap; }
@media (max-width: 900px) { .tile.later { display: none; } }
:root { --st-maroon: #9f1239; --st-nogroup: #cbd5e1; }
.c-maroon { --c: var(--st-maroon); } .c-nogroup { --c: var(--st-nogroup); }
.pin.c-nogroup { color: #334155; }
.sect-title { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 10px; }
.sect-title:first-of-type { margin-top: 0; }

/* ---------- F3: case panosu, case sayfası */
textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; resize: vertical; }
textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--brand); }
input[type=datetime-local] { width: 100%; font: inherit; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; }
.mt-s { margin-top: 8px; }
.nowrap { white-space: nowrap; }
.check { display: flex; align-items: center; gap: 6px; font-weight: 500; margin: 0 0 10px; }
.filters { padding: 14px 16px; }
.form-narrow { max-width: 860px; }
.b-repeat { background: #ffedd5; color: #9a3412; }

.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 14px; margin-top: 16px; align-items: start; }
.board .col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; border-top: 4px solid var(--c); }
.board .col header { margin-bottom: 10px; }
.board .count { background: #fff; border: 1px solid var(--border); border-radius: 99px; padding: 0 8px; font-size: 12px; font-weight: 700; margin-left: 4px; }
.board .empty { margin: 4px 2px; }
.case-card { display: block; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; color: var(--text); box-shadow: var(--shadow); border-left: 4px solid transparent; }
.case-card:hover { text-decoration: none; border-color: #cbd5e1; }
.case-card.late-warn { border-left-color: var(--st-yellow); background: #fefce8; }
.case-card.late-late { border-left-color: var(--st-red); background: #fef2f2; }
.cc-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cc-unit { font-size: 16px; }
.cc-title { font-weight: 600; margin: 2px 0; }
.cc-foot { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; margin-top: 6px; }
.upd { font-weight: 600; }
.upd-warn { color: #a16207; }
.upd-late { color: var(--danger); }

.stage-pill { display: inline-block; color: #fff; background: var(--c); font-weight: 700; font-size: 13px; padding: 6px 12px; border-radius: 99px; }
.case-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.case-layout aside .card + .card, .case-layout > div .card + .card { margin-top: 16px; }
.update-card.late-warn { border-color: #fde047; box-shadow: 0 0 0 3px #fef9c3; }
.update-card.late-late { border-color: #fca5a5; box-shadow: 0 0 0 3px #fee2e2; }
.upd-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.stage-buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.stage-buttons form { margin: 0; }
.stage-buttons .dot { margin-right: 4px; }
.desc { white-space: pre-wrap; margin: 12px 0 0; padding: 10px 12px; background: var(--surface-2); border-radius: 8px; font-size: 14px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline .ev { position: relative; padding: 0 0 14px 20px; border-left: 2px solid var(--border); margin-left: 6px; }
.timeline .ev::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid #94a3b8; }
.timeline .ev-stage::before, .timeline .ev-opened::before { border-color: var(--brand); background: #dbeafe; }
.timeline .ev-closed::before { border-color: var(--ok); background: #dcfce7; }
.timeline .ev-reminder::before, .timeline .ev-escalation::before { border-color: var(--st-yellow); background: #fef9c3; }
.timeline .ev-escalation::before { border-color: var(--danger); background: #fee2e2; }
.timeline .ev-repeat::before { border-color: #ea580c; background: #ffedd5; }
.timeline .ev-button::before { border-color: #0ea5e9; background: #e0f2fe; }
.ev-meta { font-size: 13px; }
.ev-body { margin-top: 2px; white-space: pre-wrap; }
.pop-link { display: inline-block; margin-top: 8px; font-weight: 600; }
.pop-case { margin: 6px 0; padding: 6px 8px; background: var(--surface-2); border-radius: 6px; font-size: 13px; }
.pop-case.late-warn { background: #fefce8; } .pop-case.late-late { background: #fef2f2; }
a.tile { color: inherit; display: block; } a.tile:hover { text-decoration: none; border-color: var(--c); }

@media (max-width: 1200px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) { .board, .case-layout { grid-template-columns: 1fr; } }
.on-map table.trucks th:nth-child(3), .on-map table.trucks td:nth-child(3) { display: none; }

/* ---------- F4: faturalar */
.mb { margin-bottom: 14px; }
.num-col { text-align: right; white-space: nowrap; }
.ai-spend { margin-left: auto; align-self: center; }
.pay { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.pay-yellow { background: #fef9c3; color: #854d0e; } .pay-green { background: #dcfce7; color: #166534; }
.pay-red { background: #fee2e2; color: #991b1b; } .pay-blue { background: #dbeafe; color: #1e40af; }
.pay-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pay-buttons form { margin: 0; }
.pay-btn { width: 100%; font: inherit; font-weight: 700; padding: 12px 6px; border-radius: 10px; border: 2px solid transparent; cursor: pointer; opacity: .55; }
.pay-btn:hover { opacity: .85; } .pay-btn.on { opacity: 1; border-color: currentColor; }
.pay-sum { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 12px; font-size: 14px; }
.b-st-review { background: #fef9c3; color: #854d0e; } .b-st-approved { background: #dcfce7; color: #166534; } .b-st-rejected { background: #f1f5f9; color: #64748b; }
.chk { font-size: 12px; font-weight: 700; } .chk-ok { color: var(--ok); } .chk-warn { color: #a16207; } .chk-fail { color: var(--danger); } .chk-info { color: var(--muted); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chk-row { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; font-size: 14px; background: var(--surface-2); }
.chk-row.chk-fail { background: #fef2f2; color: #7f1d1d; } .chk-row.chk-warn { background: #fefce8; color: #713f12; } .chk-row.chk-ok { color: #14532d; }
.chk-ico { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 12px; background: #fff; border: 1px solid currentColor; }
.inv-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.inv-layout > div > .card + .card { margin-top: 16px; }
.file-card .pdf { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: 8px; }
.inv-img { max-width: 100%; border-radius: 8px; border: 1px solid var(--border); }
.grid2.tight { gap: 0 12px; }
.decision input[type=text] { margin-top: 6px; }
form.inline { display: inline; }
.linkbtn-dark { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: inherit; text-decoration: underline; cursor: pointer; }
input[type=file] { font: inherit; padding: 10px; border: 1px dashed var(--border); border-radius: 8px; width: 100%; background: var(--surface-2); }
@media (max-width: 1000px) { .inv-layout { grid-template-columns: 1fr; } .file-card .pdf { height: 420px; } .pay-buttons { grid-template-columns: repeat(2, 1fr); } }

/* ---------- F5: bakım */
.pm { font-size: 13px; font-weight: 700; white-space: nowrap; }
.pm-ok { color: var(--ok); } .pm-soon { color: #c2410c; } .pm-overdue { color: var(--danger); } .pm-unknown { color: var(--muted); font-weight: 500; }
.pm-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pm-box { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; border-left: 4px solid #cbd5e1; }
.pm-b-ok { border-left-color: var(--ok); } .pm-b-soon { border-left-color: #ea580c; background: #fff7ed; }
.pm-b-overdue { border-left-color: var(--danger); background: #fef2f2; }
.pm-big { font-size: 18px; font-weight: 700; margin: 2px 0; }
.pm-close { margin-top: 10px; padding: 10px; background: var(--surface-2); border-radius: 8px; display: grid; gap: 4px; }
.pm-close .check { margin: 0; }
details > summary { list-style: none; display: inline-flex; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
input[type=date] { width: 100%; font: inherit; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; }
@media (max-width: 900px) { .pm-grid { grid-template-columns: 1fr; } }

/* ---------- F6: kılavuz + Ask */
.ask-card { border-top: 4px solid var(--brand); }
.ask-row { display: flex; gap: 8px; }
.ask-row input { flex: 1; font-size: 16px; }
.ask-answer { margin-top: 12px; padding: 14px 16px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; white-space: pre-wrap; line-height: 1.55; }
.ask-answer.wait { color: var(--muted); background: var(--surface-2); border-color: var(--border); }
.ask-answer.warn { background: #fefce8; border-color: #fde68a; }
.guide-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.guide-toc { position: sticky; top: 16px; display: grid; gap: 4px; padding: 14px; }
.guide-toc input { margin-bottom: 8px; }
.toc-sec { padding: 6px 8px; border-radius: 6px; color: var(--text); font-weight: 600; font-size: 14px; }
.toc-sec:hover { background: var(--surface-2); text-decoration: none; }
.guide-sec + .guide-sec { margin-top: 16px; }
.guide-h { font-size: 20px; }
.md h2 { font-size: 15px; margin: 20px 0 6px; color: var(--brand); }
.md p, .md li { line-height: 1.6; }
.md ul, .md ol { padding-left: 22px; }
.md img { max-width: 100%; border: 1px solid var(--border); border-radius: 10px; margin: 8px 0; box-shadow: var(--shadow); }
.md code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
@media (max-width: 900px) { .guide-layout { grid-template-columns: 1fr; } .guide-toc { position: static; } }

/* ---------- 11.11: sorun odaklı harita durumları (Şafak: hazır = yeşil, bakım = turuncu, şoför bekliyor = koyu yeşil) */
:root { --st-dgreen: #14532d; --st-mint: #6ee7b7; --st-sky: #38bdf8; }
.c-dgreen { --c: var(--st-dgreen); } .c-mint { --c: var(--st-mint); } .c-sky { --c: var(--st-sky); }
.pin.c-mint, .pin.c-sky { color: #0f172a; }
.pin-ico { font-style: normal; margin-right: 3px; }
.pin.blink { animation: pinblink 1.2s ease-in-out infinite; }
@keyframes pinblink { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .7); } 50% { box-shadow: 0 0 0 7px rgba(220, 38, 38, 0); } }
.pin.ring { outline: 2px dashed #f59e0b; outline-offset: 2px; }
.pin.c-dgreen { border-color: #bbf7d0; }
.map-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .pin.blink { animation: none; } }
.cc-flag { font-size: 12px; font-weight: 700; color: #065f46; background: #d1fae5; border-radius: 6px; padding: 3px 8px; margin: 4px 0; }

/* ---------- 11.11: case kapanışı + fotoğraflar */
.close-card { border-top: 3px solid var(--st-red); }
.close-card .alert ul { margin: 6px 0 0 18px; padding: 0; }
.close-card .field { margin-bottom: 10px; }
.b-missing { background: #fef3c7; color: #92400e; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo { display: block; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); color: var(--text); }
.photo:hover { text-decoration: none; border-color: var(--brand); }
.photo img { display: block; width: 100%; height: 120px; object-fit: cover; }
.photo span { display: block; padding: 6px 8px; line-height: 1.3; }

/* ---------- 11.11: Fleet Insights + küçük sayaçlar (ana ekranda harita ilk ekranda görünsün) */
.tiles.compact { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tiles.compact .tile { padding: 8px 12px 9px; }
.tiles.compact .tile .lbl { font-size: 11.5px; line-height: 1.25; }
.tiles.compact .tile .num { font-size: 22px; margin: 0; line-height: 1.15; }
.tiles.compact .tile .hint { display: none; }
.dash-tiles { display: grid; gap: 6px; margin-bottom: 4px; }
.dash-tiles .sect-title { margin: 6px 0 2px; font-size: 11.5px; }
.on-dash.live { margin-top: 10px; }
.ins-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.ins-row:first-of-type { border-top: 0; }
.ins-row > .small:not(.muted) { grid-column: 1; }
.ins-unit { font-size: 16px; }
.decide { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; grid-column: 2; grid-row: 1 / span 3; }
.decide form { display: inline; }
.decide .btn { padding: 6px 10px; font-size: 13px; }
.dc-needs_driver { border-color: #14532d !important; color: #14532d !important; }
.dc-on_hold { border-color: #7c3aed !important; color: #6d28d9 !important; }
.dc-left { border-color: #64748b !important; color: #334155 !important; }
.decide .linkbtn { color: var(--muted); }
svg.trend { width: 100%; height: auto; display: block; }
.tr-line { stroke: var(--st-blue); stroke-width: 2.5; stroke-linejoin: round; }
.tr-bar { fill: var(--st-dgreen); opacity: .8; }
details.card summary { cursor: pointer; }
@media (max-width: 700px) { .ins-row { grid-template-columns: 1fr; } .decide { grid-column: 1; grid-row: auto; justify-content: flex-start; } }
/* haritada grubu kapalı araçlar okunur olsun (Şafak 11.11: 'silik beyaz') */
.pin.c-nogroup { background: #fff; color: #1f2937; border-color: #475569; }
.pin.c-dgreen { background: #14532d; color: #fff; border-color: #fff; box-shadow: 0 0 0 2px #14532d, 0 1px 4px rgba(2, 6, 23, .35); }
.pin.c-purple { color: #fff; }
.head-tight { margin-bottom: 8px; }
.head-tight h1::after { margin-top: 4px; }
.photo-need { background: var(--surface-2); border: 1px dashed var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 10px; }
.photo-need .check { margin: 6px 0 0; }
/* tek satırlık sayaçlar: sayı solda, etiket sağda (ilk ekranda harita görünsün) */
.tiles.compact { grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); gap: 6px; }
.tiles.compact .tile { display: flex; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 8px; padding: 6px 10px; min-height: 44px; }
.tiles.compact .tile .lbl { font-size: 11px; line-height: 1.2; }
.tiles.compact .tile .num { font-size: 20px; min-width: 1.4em; }
.dash-tiles .sect-title { margin: 4px 0 0; }
.dot.c-nogroup { box-shadow: inset 0 0 0 1.5px #475569; }

/* ---------- 11.11 (2): case sayfası sadeleşti — aşama çizelgesi, tek güncelleme formu, ayrı kapatma sayfası */
.stepper { list-style: none; display: flex; gap: 0; padding: 0; margin: 0 0 16px; counter-reset: s; overflow-x: auto; }
.step { flex: 1; min-width: 110px; position: relative; padding: 10px 6px 0; text-align: center; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.step::before { content: ""; position: absolute; top: 17px; left: 0; right: 0; height: 3px; background: var(--border); }
.step:first-child::before { left: 50%; } .step:last-child::before { right: 50%; }
.step-dot { position: relative; display: block; width: 16px; height: 16px; margin: 0 auto 6px; border-radius: 50%; background: #fff; border: 3px solid var(--border); }
.step.now { color: var(--text); }
.step.now .step-dot { background: var(--c); border-color: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent); }
.step-lbl small { display: block; font-weight: 500; color: var(--muted); }
.upd-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.upd-row .field { margin: 0; min-width: 180px; flex: 1; }
.upd-row .btn { white-space: nowrap; }
.btn.close-btn, .theme-ops .btn.close-btn { background: #15803d; border-color: #15803d; color: #fff; box-shadow: 0 3px 10px rgba(21, 128, 61, .3); }
.close-form .cstep { margin-bottom: 14px; }
.cstep h2 { display: flex; align-items: center; gap: 10px; }
.cnum { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--side, #0b1324); color: #fff; font-size: 13px; }
.close-bar { position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px; padding: 12px 0; background: linear-gradient(to top, var(--bg) 70%, transparent); }
.close-bar .btn { padding: 12px 20px; font-size: 15px; }
#close-errors ul { margin: 6px 0 0 18px; padding: 0; }
.pre { white-space: pre-line; }
/* tema: bağlantı rengi düğme yazısını ezmesin (Şafak 11.11: "+ New case" okunmuyordu) */
.theme-ops a.btn { color: #fff; }
.theme-ops a.btn.secondary { color: var(--text); }
.theme-ops a.btn.danger { color: var(--danger); }
.back-case { margin-bottom: 8px; padding: 5px 12px; font-size: 13px; }
.h1-pill { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.h1-pill .stage-pill { font-size: 12px; padding: 4px 11px; letter-spacing: 0; }
.head-actions { align-items: center; }
.head-actions .btn { white-space: nowrap; }
.stage-pill.c-mint, .stage-pill.c-sky, .stage-pill.c-nogroup { color: #0f172a; }
/* 11.11: kim ödüyor / neyin tamiri */
.pay-purple { background: #ede9fe; color: #5b21b6; } .pay-teal { background: #ccfbf1; color: #115e59; }
.pay-orange { background: #ffedd5; color: #9a3412; } .pay-neutral { background: #f1f5f9; color: #334155; }
.pay-buttons { grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); }
.mini-h { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 16px 0 8px; }
/* hazır + şoför yok: yeşil iğnenin sağında koyu yeşil "D" rozeti */
.pin.also-driver { box-shadow: 0 0 0 2px #14532d, 0 1px 4px rgba(2, 6, 23, .35); }
.pin.also-driver::after { content: "D"; display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 4px; background: #14532d; color: #fff; font-size: 10px; }
