/* Sevkiyat360 — ortak tasarım sistemi
   Kimlik: derin lacivert zemin, petrol yeşili ana renk, elektrik mavisi ikincil renk.
   Yazı: Plus Jakarta Sans (başlık ve metin), JetBrains Mono (plaka, kod, rakam). */
:root {
  --navy-950: #070E1C; --navy-900: #0A1426; --navy-800: #0F1D36; --navy-700: #172A4B; --navy-600: #22406E;
  /* Ana renk (eski adlarıyla korunur): petrol yeşili */
  --amber: #0B8F86; --amber-600: #097A72; --amber-ink: #FFFFFF; --amber-soft: #E2F5F3;
  --brand-bright: #2DD4BF; --brand-grad: linear-gradient(135deg, #0B8F86 0%, #0E9FB5 100%);
  /* İkincil: elektrik mavisi */
  --sea: #3B6EF5; --sea-soft: #E9EFFE;
  --sun: #FF8A3D;

  --bg: #F3F6FA; --surface: #FFFFFF; --surface-2: #F8FAFD; --sunken: #EDF1F7;
  --line: #E1E7EF; --line-strong: #C9D3E0;
  --text: #0B1529; --text-2: #3B4A60; --muted: #6B7A90;
  --primary: #0F1D36; --primary-ink: #FFFFFF;
  --accent: var(--amber); --accent-ink: var(--amber-ink);
  --ok: #12A066; --ok-soft: #E3F6EC; --warn: #B7791F; --warn-soft: #FDF3DC; --crit: #D9473A; --crit-soft: #FCE8E6; --info: #2F6FD0; --info-soft: #E6EEFB;
  --shadow-1: 0 1px 2px rgba(10,20,38,.05), 0 2px 6px rgba(10,20,38,.04);
  --shadow-2: 0 18px 40px -16px rgba(10,20,38,.28);
  --ring: 0 0 0 3px color-mix(in srgb, var(--amber) 26%, transparent);
  --f-display: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --f-body: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --r-sm: 8px; --r: 12px; --r-lg: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #070E1C; --surface: #0E1A30; --surface-2: #112039; --sunken: #0B1629;
    --line: #1E2F4D; --line-strong: #2A4066;
    --text: #E7EEF8; --text-2: #B6C4D8; --muted: #8496B0;
    --primary: #E7EEF8; --primary-ink: #0A1426;
    --amber: #14A89D; --amber-600: #0F948A; --amber-soft: #0D2E33; --sea-soft: #13224A;
    --ok-soft: #0E2A1F; --warn-soft: #2B2410; --crit-soft: #2E1514; --info-soft: #102340;
    --shadow-1: 0 1px 2px rgba(0,0,0,.35); --shadow-2: 0 18px 44px -14px rgba(0,0,0,.65);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #070E1C; --surface: #0E1A30; --surface-2: #112039; --sunken: #0B1629;
  --line: #1E2F4D; --line-strong: #2A4066;
  --text: #E7EEF8; --text-2: #B6C4D8; --muted: #8496B0;
  --primary: #E7EEF8; --primary-ink: #0A1426;
  --amber: #14A89D; --amber-600: #0F948A; --amber-soft: #0D2E33; --sea-soft: #13224A;
  --ok-soft: #0E2A1F; --warn-soft: #2B2410; --crit-soft: #2E1514; --info-soft: #102340;
  --shadow-1: 0 1px 2px rgba(0,0,0,.35); --shadow-2: 0 18px 44px -14px rgba(0,0,0,.65);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; letter-spacing: -.02em; text-wrap: balance; line-height: 1.18; font-weight: 750; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
.mono, .num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.xs { font-size: 12.5px; }
.eyebrow { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.ico.sm { width: 15px; height: 15px; }
.ico.lg { width: 22px; height: 22px; }

/* Düğmeler */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--text); font-weight: 650; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s; }
.btn:hover { border-color: var(--muted); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary { background: var(--brand-grad); border-color: transparent; color: #fff; box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--amber) 70%, transparent); }
.btn.primary:hover { filter: brightness(1.06); box-shadow: 0 8px 22px -8px color-mix(in srgb, var(--amber) 80%, transparent); }
.btn.dark { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.btn.dark:hover { background: var(--navy-700); }
.btn.sun { background: var(--sun); border-color: var(--sun); color: #2A1404; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--sunken); }
.btn.danger { color: var(--crit); }
.btn.danger:hover { border-color: var(--crit); background: var(--crit-soft); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 13px 22px; font-size: 15.5px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Formlar */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 650; color: var(--text-2); }
.field .hint { font-size: 12.5px; color: var(--muted); }
.field.err .input { border-color: var(--crit); }
.field .errmsg { font-size: 12.5px; color: var(--crit); }
.input { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.input:focus { border-color: var(--amber); box-shadow: var(--ring); }
textarea.input { resize: vertical; min-height: 80px; }
select.input { appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 52%, calc(100% - 11px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.input-group { display: flex; }
.input-group .input { border-radius: 10px 0 0 10px; }
.input-group > :last-child { border-radius: 0 10px 10px 0; border-left: 0; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; background: var(--sunken); border: 1px solid var(--line-strong); color: var(--muted); font-size: 13px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--amber); flex: none; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 14px; }

/* Seçim kartları (radyo/checkbox görünümlü) */
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--line-strong); }
.choice:has(input:checked) { border-color: var(--amber); background: var(--amber-soft); }
.choice input { accent-color: var(--amber); margin-top: 3px; }
.choice b { display: block; font-size: 14px; }
.choice small { color: var(--muted); font-size: 12.5px; }

/* Rozet ve hap */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; padding: 3px 10px; border-radius: 999px; background: var(--sunken); color: var(--text-2); white-space: nowrap; }
.pill.dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.crit { background: var(--crit-soft); color: var(--crit); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.amber { background: var(--amber-soft); color: var(--amber-600); }
.pill.sea { background: var(--sea-soft); color: var(--sea); }
.badge-verified { display: inline-flex; align-items: center; gap: 4px; color: var(--amber-600); font-size: 12px; font-weight: 650; }

/* Kart ve tablo */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-h h3 { font-size: 15.5px; }
.card-b { padding: 18px; }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--surface-2); }
.tbl td.r, .tbl th.r { text-align: right; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ico { width: 34px; height: 34px; color: var(--line-strong); }

/* Bildirim, modal */
.toast-host { position: fixed; z-index: 1000; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(520px, calc(100% - 32px)); }
.toast { pointer-events: auto; background: var(--navy-900); color: #fff; border-radius: 12px; padding: 12px 16px; font-size: 14px; box-shadow: var(--shadow-2); border-left: 4px solid var(--brand-bright); animation: tin .2s ease-out; }
.toast.err { border-left-color: var(--crit); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }
.modal-bg { position: fixed; inset: 0; z-index: 900; background: rgba(7,14,28,.55); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(3px); }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-2); border: 1px solid var(--line); }
.modal.wide { max-width: 860px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-h h3 { font-size: 17px; }
.modal-b { padding: 20px; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }

.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; font-size: 14px; align-items: flex-start; }
.alert.info { background: var(--info-soft); color: var(--text); }
.alert.warn { background: var(--warn-soft); }
.alert.crit { background: var(--crit-soft); }
.alert.ok { background: var(--ok-soft); }
.alert.brand { background: var(--amber-soft); }

/* Logo */
.logo { display: inline-flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 800; font-size: 19px; letter-spacing: -.03em; text-decoration: none; }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: url(/img/logo-mark.svg) center / contain no-repeat; flex: none; box-shadow: 0 6px 16px -6px rgba(11,143,134,.65); }
.logo-mark > svg { display: none; }
.logo b { color: var(--brand-bright); font-weight: 800; margin-left: -9px; }

/* Para gösterimi */
.money-big { font: 750 30px/1.1 var(--f-display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kv-line { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; }
.kv-line + .kv-line { border-top: 1px dashed var(--line); }
.kv-line.total { font-weight: 750; font-size: 15.5px; border-top: 1px solid var(--line-strong) !important; padding-top: 10px; }

/* Harita işaretleri (Leaflet) */
.leaflet-container { font-family: var(--f-body); background: var(--sunken); }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); display: grid; place-items: center; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); }
.pin span { transform: rotate(45deg); color: #fff; font: 700 12px var(--f-display); }
.pin.a { background: var(--navy-700); } .pin.b { background: var(--amber); } .pin.c { background: var(--sea); }
.truck-pin { width: 32px; height: 32px; border-radius: 50%; background: var(--sea); border: 2px solid #fff; display: grid; place-items: center; color: #fff; box-shadow: 0 0 0 6px color-mix(in srgb, var(--sea) 28%, transparent), 0 2px 6px rgba(0,0,0,.35); }
.truck-pin svg { width: 17px; height: 17px; stroke: #fff; }
.leaflet-popup-content { font-size: 13.5px; }

@media (max-width: 760px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- v3 ortak bileşenler ---------- */
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.seg button { border: 0; background: none; padding: 7px 11px; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(10,20,38,.12); }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; vertical-align: middle; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 22px; background: var(--line-strong); transition: background .15s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + span { background: var(--amber); }
.switch input:checked + span::after { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 2px; }
.steps-v { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.steps-v li { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.steps-v li .dot { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.steps-v li.done .dot { background: rgba(11,143,134,.12); color: var(--amber); border-color: transparent; }
.steps-v li.bad { border-color: rgba(210,72,59,.45); }
.steps-v li.bad .dot { background: rgba(210,72,59,.1); color: var(--crit); }
.steps-v li b { display: block; }
.live-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #22C55E; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: livePulse 1.6s infinite; vertical-align: middle; }
.live-dot.off { background: var(--muted); animation: none; box-shadow: none; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.55); } 70% { box-shadow: 0 0 0 9px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@media (prefers-reduced-motion: reduce) { .live-dot { animation: none; } }
.doc-tile { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.doc-tile .ico { flex: none; }
.doc-tile .meta { flex: 1; min-width: 0; }
.doc-tile .meta b, .doc-tile .meta small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop { border: 1.5px dashed var(--line-strong); border-radius: 14px; padding: 18px; text-align: center; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--amber); background: rgba(11,143,134,.05); color: var(--text); }
.keybox { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; padding: 12px; border-radius: 10px; background: var(--navy-900, #0A1426); color: #CFFAF2; word-break: break-all; user-select: all; }
.code-block { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; line-height: 1.6; padding: 14px 16px; border-radius: 12px; background: #0A1426; color: #D6E2F5; overflow-x: auto; white-space: pre; }
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check-list li .ico { flex: none; margin-top: 2px; }
.check-list li.ok .ico { color: var(--ok, #16A34A); }
.check-list li.no .ico { color: var(--warn, #D97706); }
.fuel-big { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.fuel-big div { padding: 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.fuel-big span { display: block; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fuel-big b { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 22px; letter-spacing: -.02em; }
.share-bar { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 900; display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 999px; background: #0A1426; color: #E6FFFA; box-shadow: 0 10px 30px rgba(10,20,38,.35); font-size: 13.5px; max-width: calc(100vw - 32px); }
.share-bar button { border: 0; background: rgba(255,255,255,.12); color: #fff; border-radius: 999px; padding: 5px 11px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; }
.timeline li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding-bottom: 16px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .tdot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); display: grid; place-items: center; z-index: 1; }
.timeline .tdot .ico { width: 12px; height: 12px; }
.timeline li.done .tdot { border-color: var(--ok); background: var(--ok); color: #fff; }
.timeline li.now .tdot { border-color: var(--amber-600); background: var(--amber); color: var(--amber-ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--amber) 25%, transparent); }
.timeline b { font-size: 14px; }
.timeline small { display: block; color: var(--muted); font-size: 12.5px; }

/* Koyu temada açık harita karolarını koyulaştır */
.leaflet-tile-pane .tiles-dark, .tiles-dark { filter: invert(1) hue-rotate(180deg) brightness(.92) contrast(.88) saturate(.7); }
.leaflet-control-attribution { font-size: 10.5px; }
.prose-prev h2 { font-size: 17px; margin: 14px 0 6px; } .prose-prev h3 { font-size: 15px; margin: 10px 0 4px; }
.prose-prev p, .prose-prev li { color: var(--text-2); margin: 6px 0; line-height: 1.6; } .prose-prev ul, .prose-prev ol { padding-left: 20px; }
.road-it { display: grid; gap: 3px; padding-bottom: 10px; border-bottom: 1px solid var(--line); } .road-it:last-of-type { border-bottom: 0; }

.pay-band { display: inline-flex; align-items: center; background: #fff; border-radius: 10px; padding: 8px 14px; box-shadow: 0 1px 0 rgba(0,0,0,.04); max-width: 100%; }
.pay-band img { display: block; height: 26px; width: auto; max-width: 100%; object-fit: contain; }
.pay-band.checkout { justify-content: center; width: 100%; border: 1px solid var(--line); } .pay-band.checkout img { height: 30px; }
