:root {
  --bg: #070b11; --panel: #0f1620; --panel2: #172131; --panel3: #1e2a3d; --line: rgba(255,255,255,.08); --line2: rgba(255,255,255,.14);
  --text: #eef3f9; --muted: #93a3b6; --accent: #3ddc97; --accent2: #5ab4ff; --warn: #ffb547; --bad: #ff6b6b; --fs: 15px;
  --glass: rgba(14,20,29,.84); --grad: linear-gradient(135deg, #3ddc97 0%, #1fc3a6 100%); --glow: 0 8px 24px rgba(61,220,151,.28);
  --shadow: 0 14px 40px rgba(0,0,0,.45); --r: 16px; --panel-w: 430px; --gap: 12px;
}
body.drive { --fs: 19px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); color: var(--text); font: var(--fs)/1.45 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
h2 { font-size: 1.25em; margin: .6em 0 .5em; letter-spacing: -.01em; } h3 { font-size: 1.02em; margin: 1.2em 0 .5em; letter-spacing: -.005em; }
button { font: inherit; cursor: pointer; color: inherit; transition: background .15s, transform .08s, border-color .15s, box-shadow .15s; }
button:active { transform: scale(.98); }
button:focus-visible, input:focus-visible, select:focus-visible, summary:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 8px; } ::-webkit-scrollbar-track { background: transparent; }

/* ---------- Harita */
#map { position: fixed; inset: 0; }
.maplibregl-ctrl-attrib { background: rgba(255,255,255,.75) !important; color: #556; font-size: 10px; border-radius: 8px 0 0 0; }
.maplibregl-ctrl-attrib a { color: #445; }
.maplibregl-popup-content { background: var(--panel); color: var(--text); border-radius: 12px; }

/* ---------- Yüzen düğmeler */
.fab-row, .fab-col { position: fixed; z-index: 20; display: flex; gap: 10px; align-items: center; }
.top-right { top: calc(env(safe-area-inset-top) + 12px); right: 12px; }
.fab-col { flex-direction: column; }
.bottom-right { right: 12px; bottom: 24px; }
.fab { width: 48px; height: 48px; border-radius: 15px; border: 1px solid var(--line2); background: var(--glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); font-size: 20px; display: grid; place-items: center; box-shadow: var(--shadow); }
.fab:hover { border-color: rgba(61,220,151,.5); }
.fab.on { color: var(--accent); border-color: rgba(61,220,151,.55); box-shadow: var(--shadow), 0 0 0 3px rgba(61,220,151,.12); }
.fab-pill { height: 48px; padding: 0 22px; border-radius: 15px; border: 0; background: #fff; color: #0b0f14; font-weight: 600; box-shadow: var(--shadow); }
.chip-status { height: 36px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .9em; box-shadow: var(--shadow); }
.chip-status.bad { background: #ff4d5e; color: #fff; }
.chip-status.ok { background: var(--glass); color: var(--accent2); border: 1px solid var(--line2); backdrop-filter: blur(14px); }
.menu { position: fixed; z-index: 30; top: calc(env(safe-area-inset-top) + 68px); right: 12px; background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--line2); border-radius: 16px; padding: 6px; min-width: 240px; box-shadow: var(--shadow); }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 12px 14px; border-radius: 11px; }
.menu button:hover { background: rgba(255,255,255,.07); }
.map-hint { position: fixed; z-index: 15; left: 50%; transform: translateX(-50%); top: calc(env(safe-area-inset-top) + 16px); background: var(--glass); backdrop-filter: blur(14px); border: 1px solid var(--line2); padding: 9px 16px; border-radius: 999px; font-size: .85em; color: var(--text); box-shadow: var(--shadow); }

/* ---------- İstasyon kartı */
.station-card { position: fixed; z-index: 25; right: 76px; bottom: 24px; width: min(380px, calc(100vw - 100px)); background: var(--glass); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border: 1px solid var(--line2); border-radius: 20px; padding: 16px; box-shadow: var(--shadow); max-height: 70vh; overflow: auto; }
.station-card .close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.08); }
.station-card .close:hover { background: rgba(255,255,255,.16); }
.station-card h4 { margin: 0 42px 6px 0; font-size: 1.08em; letter-spacing: -.01em; }
.station-card .actions { margin-bottom: 4px; }

/* ---------- Panel: masaüstü sol, mobil alt sayfa */
.panel { position: fixed; z-index: 10; background: var(--glass); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); border: 1px solid var(--line2); display: flex; flex-direction: column; box-shadow: var(--shadow); }
@media (min-width: 900px) {
  .panel { top: 12px; left: 12px; bottom: 12px; width: var(--panel-w); border-radius: 24px; transition: transform .2s; }
  .panel.peek { transform: translateX(calc(-1 * var(--panel-w) + 56px)); }
  .handle { position: absolute; right: -20px; top: 50%; width: 28px; height: 60px; border-radius: 12px; border: 1px solid var(--line2); background: var(--glass); backdrop-filter: blur(14px); }
  .handle span { display: block; width: 4px; height: 24px; margin: auto; border-radius: 2px; background: var(--muted); }
  .station-card { left: calc(var(--panel-w) + 28px); right: auto; }
}
@media (max-width: 899px) {
  .panel { left: 0; right: 0; bottom: 0; border-radius: 24px 24px 0 0; height: 92vh; transition: transform .22s; padding-bottom: env(safe-area-inset-bottom); }
  .panel.peek { transform: translateY(calc(92vh - 128px)); }
  .panel.half { transform: translateY(44vh); }
  .panel.full { transform: none; }
  .handle { width: 100%; height: 22px; border: 0; background: none; display: grid; place-items: center; flex: none; }
  .handle span { display: block; width: 44px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.22); }
  .bottom-right { bottom: calc(128px + 16px); }
  body.sheet-half .bottom-right, body.sheet-full .bottom-right { opacity: 0; pointer-events: none; }
  .station-card { left: 12px; right: 12px; width: auto; bottom: calc(128px + 12px); }
}
.brand { display: flex; align-items: center; gap: 10px; padding: 14px 18px 6px; flex: none; }
.brand .logo { width: 30px; height: 30px; border-radius: 10px; background: var(--grad); display: grid; place-items: center; color: #04140c; box-shadow: var(--glow); }
.brand b { font-size: 1.08em; letter-spacing: -.02em; } .brand span { color: var(--muted); font-size: .8em; margin-left: auto; }
@media (max-width: 899px) { .brand { display: none; } }
.tabs { display: flex; gap: 4px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); overflow-x: auto; flex: none; scrollbar-width: none; }
.tabs button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; white-space: nowrap; background: none; border: 0; padding: 8px 4px; border-radius: 13px; color: var(--muted); font-size: .74em; font-weight: 500; min-height: 52px; }
.tabs button svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabs button:hover { background: rgba(255,255,255,.05); color: var(--text); }
.tabs button.on { background: rgba(61,220,151,.13); color: var(--accent); font-weight: 600; box-shadow: inset 0 0 0 1px rgba(61,220,151,.28); }
.panel-body { overflow: auto; padding: 14px 18px 28px; flex: 1; overscroll-behavior: contain; }
.view { display: none; } .view.active { display: block; animation: rise .22s ease; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.empty { color: var(--muted); padding: 40px 0; text-align: center; }
.sec-title { display: flex; align-items: center; gap: 8px; font-size: .74em; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.sec-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Form */
label { display: flex; flex-direction: column; gap: 5px; color: var(--muted); font-size: .8em; font-weight: 500; margin-bottom: 11px; flex: 1; min-width: 0; }
label.check { flex-direction: row; align-items: center; gap: 9px; color: var(--text); font-size: .95em; font-weight: 400; }
select, input[type=number], input[type=datetime-local], input[type=email], input[type=password], input.place, input:not([type]) {
  font: inherit; font-size: 1rem; color: var(--text); background: rgba(255,255,255,.05); border: 1px solid var(--line2); border-radius: 13px; padding: 11px 13px; min-height: 48px; width: 100%; transition: border-color .15s, background .15s;
}
select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2393a3b6' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
select option { background: var(--panel2); color: var(--text); }
input:hover, select:hover { border-color: rgba(255,255,255,.24); }
input:focus, select:focus { border-color: var(--accent2); background: rgba(90,180,255,.07); outline: none; }
input.place.ok { border-color: rgba(61,220,151,.65); background: rgba(61,220,151,.06); }
input::placeholder { color: #66778a; }
input[type=range] { width: 100%; accent-color: var(--accent); height: 30px; }
input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
output { color: var(--text); font-weight: 700; font-size: 1.35em; letter-spacing: -.02em; }
.row { display: flex; gap: 8px; align-items: flex-end; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.primary { display: block; width: 100%; text-align: center; background: var(--grad); color: #04140c; border: 0; border-radius: 15px; padding: 14px; font-size: 1.05em; font-weight: 700; min-height: 54px; box-shadow: var(--glow); letter-spacing: -.01em; }
.primary:hover { filter: brightness(1.06); box-shadow: 0 10px 28px rgba(61,220,151,.38); }
.primary:disabled { opacity: .6; box-shadow: none; }
.secondary { background: rgba(255,255,255,.06); border: 1px solid var(--line2); border-radius: 13px; padding: 11px 14px; min-height: 46px; flex: 1; }
.secondary:hover { background: rgba(255,255,255,.11); }
.chip { background: rgba(255,255,255,.06); border: 1px solid var(--line2); border-radius: 999px; padding: 6px 12px; }
.icon { background: rgba(255,255,255,.06); border: 1px solid var(--line2); border-radius: 13px; width: 48px; height: 48px; margin-bottom: 11px; flex: none; }
.icon:hover { background: rgba(255,255,255,.12); }
.link { background: none; border: 0; color: var(--accent2); padding: 4px 0 12px; text-align: left; }
.link:hover { text-decoration: underline; }
.seg { display: flex; background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 14px; padding: 4px; margin: 6px 0 14px; gap: 2px; }
.seg button { flex: 1; background: none; border: 0; color: var(--muted); padding: 10px 6px; border-radius: 11px; min-height: 44px; font-weight: 500; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--grad); color: #04140c; font-weight: 700; box-shadow: var(--glow); }
.seg.small button { min-height: 36px; padding: 6px; font-size: .9em; }
.seg.wide button small { display: block; font-size: .75em; opacity: .85; }
details summary { cursor: pointer; color: var(--accent2); padding: 6px 0 12px; font-weight: 500; }
.actions { display: flex; gap: 8px; margin: 12px 0; align-items: stretch; }
.actions .primary { width: auto; flex: 1; }
.err { color: var(--bad); font-size: .9em; min-height: 1em; margin: 4px 0; }
.src { color: var(--muted); font-size: .8em; }
.src a, a.src { color: var(--accent2); }
.tag { display: inline-block; font-size: .73em; padding: 2px 9px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid var(--line2); color: var(--muted); font-weight: 500; }
.tag.ok { color: var(--accent); } .tag.busy { color: var(--warn); } .tag.est { color: var(--warn); border-color: rgba(255,181,71,.45); background: rgba(255,181,71,.08); }
.tag.dc { color: var(--accent); border-color: rgba(61,220,151,.5); background: rgba(61,220,151,.1); } .tag.ac { color: var(--accent2); border-color: rgba(90,180,255,.5); background: rgba(90,180,255,.1); }
.warn { background: rgba(255,181,71,.1); border: 1px solid rgba(255,181,71,.5); color: var(--warn); padding: 11px 13px; border-radius: 14px; margin-bottom: 12px; }
.warn.bad { background: rgba(255,107,107,.1); border-color: rgba(255,107,107,.5); color: #ffb3b8; }
.card { background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 12px; }
.saved-item { display: flex; gap: 8px; align-items: center; padding: 11px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.035); }
.saved-item:hover { background: rgba(255,255,255,.07); }
.saved-item .grow { flex: 1; min-width: 0; }
.saved-item b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent { display: flex; flex-wrap: wrap; gap: 6px; margin: -4px 0 10px; }
.recent button { font-size: .8em; padding: 4px 10px; }

/* Plan formu: rota kartı (Nereden / Nereye bir arada) ve ayar kartları */
.route-card { position: relative; background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 18px; padding: 12px 12px 2px 36px; margin-bottom: 12px; }
.route-card::before { content: ""; position: absolute; left: 17px; top: 38px; bottom: 44px; border-left: 2px dotted rgba(255,255,255,.25); }
.route-card .row:first-child::before, .route-card .row:nth-child(2)::before { content: ""; position: absolute; left: 11px; width: 13px; height: 13px; border-radius: 50%; }
.route-card .row:first-child::before { top: 31px; background: var(--accent); box-shadow: 0 0 0 4px rgba(61,220,151,.18); }
.route-card .row:nth-child(2)::before { bottom: 31px; background: var(--accent2); box-shadow: 0 0 0 4px rgba(90,180,255,.18); }
.route-card .row { position: static; }
.soc-card { background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 18px; padding: 12px 14px 2px; margin-bottom: 12px; }
.soc-card label { margin-bottom: 8px; }

/* ---------- Sonuç */
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.compare > div { background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 15px; padding: 12px; }
.compare b { display: block; font-size: 1.25em; letter-spacing: -.02em; } .compare span { color: var(--muted); font-size: .8em; }
.compare .arrive { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; border-color: rgba(61,220,151,.45); background: linear-gradient(135deg, rgba(61,220,151,.16), rgba(31,195,166,.05)); }
.compare .arrive.fail { border-color: var(--bad); background: rgba(255,107,107,.1); }
.compare .arrive b { font-size: 2.3em; line-height: 1; }
.day h3 { margin: 18px 0 10px; font-size: .98em; color: var(--accent2); }
.tl { position: relative; padding-left: 24px; border-left: 3px solid rgba(255,255,255,.1); margin-left: 8px; }
.tl .ev { position: relative; margin-bottom: 14px; }
.tl .ev::before { content: ""; position: absolute; left: -33px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--accent2); border: 3px solid var(--panel); box-shadow: 0 0 0 2px rgba(90,180,255,.35); }
.tl .ev.stop::before { background: var(--accent); box-shadow: 0 0 0 2px rgba(61,220,151,.4); } .tl .ev.place::before { background: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.3); }
.tl .ev.drive-leg::before { display: none; }
.drive-leg { color: var(--muted); font-size: .88em; padding: 2px 0; }
.stop .card { margin: 0; cursor: pointer; background: rgba(61,220,151,.06); border-color: rgba(61,220,151,.28); }
.stop .card:hover { background: rgba(61,220,151,.11); }
.stop h4 { margin: 0 0 8px; font-size: 1.02em; }
.stop .num { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--grad); color: #04140c; font-size: .8em; font-weight: 700; margin-right: 8px; }
.kv { display: flex; flex-wrap: wrap; gap: 5px 12px; font-size: .92em; align-items: center; }
.soc { font-weight: 700; color: var(--accent); }
.price { margin-top: 10px; border-top: 1px dashed var(--line2); padding-top: 9px; font-size: .88em; }
.price .opt { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; }
.price .opt.best { color: var(--accent); font-weight: 600; }
.price .opt span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Tablolar, istasyon listesi */
.tablewrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .88em; }
table.data th, table.data td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.data th:first-child, table.data td:first-child { text-align: left; }
table.data th { color: var(--muted); font-weight: 500; font-size: .92em; }
table.data tr:hover td { background: rgba(255,255,255,.03); }
.filters { display: grid; grid-template-columns: 1fr 1fr 1.4fr; gap: 0 8px; position: sticky; top: -14px; z-index: 2; background: linear-gradient(var(--panel) 75%, transparent); padding-top: 14px; margin-top: -14px; }
.st-item { display: flex; gap: 12px; align-items: center; padding: 11px 12px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.035); cursor: pointer; }
.st-item:hover { background: rgba(255,255,255,.08); border-color: var(--line2); transform: translateY(-1px); }
.st-item .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; font-size: 16px; }
.st-item .ico.dc { background: var(--grad); color: #04140c; box-shadow: var(--glow); } .st-item .ico.ac { background: rgba(90,180,255,.14); border: 1px solid rgba(90,180,255,.5); }
.st-item .grow { flex: 1; min-width: 0; } .st-item b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Diyalog, bildirim */
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line2); border-radius: 22px; padding: 22px; width: min(480px, calc(100vw - 24px)); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(3,6,10,.65); backdrop-filter: blur(4px); }
dialog h2 { margin-top: 0; }
.toast { position: fixed; z-index: 60; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 24px); background: var(--glass); backdrop-filter: blur(16px); border: 1px solid var(--line2); border-radius: 14px; padding: 11px 18px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); }
.toast.bad { border-color: var(--bad); color: #ffb3b8; }

/* ---------- Geçmiş: özet kutucukları ve grafikler */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.tile { position: relative; overflow: hidden; background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--grad); }
.tile:nth-child(3n+2)::before { background: linear-gradient(var(--accent2), #7b8cff); } .tile:nth-child(3n)::before { background: linear-gradient(var(--warn), #ff8a4c); }
.tile .t-l { color: var(--muted); font-size: .78em; }
.tile .t-v { font-size: 1.45em; font-weight: 700; letter-spacing: -.02em; }
.tile .t-s { color: var(--muted); font-size: .75em; }
.card.chart h3 { margin: 0; font-size: 1em; }
.card.chart .src { margin: 2px 0 8px; }
svg.viz { display: block; overflow: visible; touch-action: pan-y; }
.viz-grid { stroke: rgba(255,255,255,.08); stroke-width: 1; }
.viz-base { stroke: rgba(255,255,255,.2); stroke-width: 1; }
.viz-tick { fill: #8c9bab; font-size: 11px; font-variant-numeric: tabular-nums; }
.viz-val { fill: var(--text); font-size: 12px; font-weight: 600; }
.viz-dot { stroke: var(--panel2); stroke-width: 2; }
.viz-cross { stroke: #5a6878; stroke-width: 1; }
.viz-hit { fill: transparent; cursor: crosshair; }
.viz-hit.on { fill: rgba(255,255,255,.05); }
.viz-ref { stroke-width: 1; stroke-dasharray: none; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .85em; color: var(--muted); margin-top: 6px; }
.viz-legend i, .viz-tip i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.viz-tip { position: fixed; z-index: 70; pointer-events: none; background: #0b1119; border: 1px solid var(--line2); border-radius: 12px; padding: 8px 11px; font-size: .85em; color: var(--text); box-shadow: 0 6px 20px rgba(0,0,0,.4); max-width: 240px; }
.viz-tip div { margin-top: 2px; }

/* Konum işareti */
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: #4aa8ff; border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(74,168,255,.25); }
.flag { font-size: 22px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.6)); }
@media (max-width: 899px) { .map-hint { left: 12px; transform: none; max-width: calc(100vw - 160px); top: calc(env(safe-area-inset-top) + 18px); border-radius: 14px; } }
.check-set { border: 1px solid var(--line2); border-radius: 14px; margin: 8px 0; padding: 6px 12px 8px; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.check-set legend { color: var(--muted); font-size: .85em; padding: 0 6px; }
/* Bölüm başlıkları (Araç / Geçmiş) */
#view-vehicle > h3, #view-history > h3 { display: flex; align-items: center; gap: 8px; font-size: .74em; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 20px 0 8px; font-weight: 600; }
#view-vehicle > h3::after, #view-history > h3::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#vehicleCard h2 { font-size: 1.3em; letter-spacing: -.02em; }

.fab-pill.sm { padding: 0 14px; font-size: .9em; background: var(--glass); color: var(--text); border: 1px solid var(--line2); backdrop-filter: blur(14px); }

/* Bağlantılar: koyu zeminde okunur renk (tarayıcı varsayılan koyu mavisi okunmuyordu) */
a { color: #8fd0ff; }
a:hover { color: #b9e1ff; }
.map-hint a { color: #8fd0ff; font-weight: 600; text-decoration: underline; white-space: nowrap; }
/* Yönetim: toplu ekleme */
textarea { font: inherit; font-size: .95rem; color: var(--text); background: rgba(255,255,255,.05); border: 1px solid var(--line2); border-radius: 13px; padding: 11px 13px; width: 100%; resize: vertical; margin-bottom: 10px; }
textarea:focus { border-color: var(--accent2); outline: none; }
dialog.wide { width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow: auto; }
.bk-rows { display: grid; gap: 8px; margin: 8px 0; }
.bk-row { display: grid; grid-template-columns: 24px 1.6fr 1fr 74px; gap: 8px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.035); }
.bk-row.dup { border-color: rgba(255,181,71,.5); } .bk-row.bad { border-color: rgba(255,107,107,.5); }
.bk-row input[type=text], .bk-row input:not([type]), .bk-row input[type=number] { min-height: 40px; padding: 8px 10px; font-size: .92rem; }
.bk-row .meta { grid-column: 2 / -1; font-size: .78em; color: var(--muted); }
@media (max-width: 600px) { .bk-row { grid-template-columns: 24px 1fr 74px; } .bk-row .op { grid-column: 2 / -1; } }

/* =====================================================================
   Tema: "Yol Defteri" — bakır + petrol, kağıt/bilet hissi (ABRP'den ayrışma)
   Koyu zemin, cam yok; rakamlar serif; sonuç özeti bilet gibi.
   ===================================================================== */
:root {
  --bg: #0d1214; --panel: #151c1f; --panel2: #1d2629; --panel3: #243034; --line: rgba(255,236,210,.10); --line2: rgba(255,236,210,.18);
  --text: #f3ece1; --muted: #a9b0ab; --accent: #ff9d4d; --accent2: #4fc3c8; --warn: #ffd166; --bad: #ff6f61;
  --glass: #151c1f; --grad: var(--accent); --glow: none; --shadow: 0 10px 30px rgba(0,0,0,.45);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}
.panel, .fab, .menu, .station-card, .map-hint, .toast, .handle, .chip-status.ok, .fab-pill.sm { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--panel); }
.fab { border-color: var(--line2); }
.fab:hover { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.fab.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 70%, transparent); box-shadow: var(--shadow), 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.fab-pill { background: var(--text); color: #1a0f05; }
.primary, .seg button.on { color: #1a0f05; }
.primary:hover { filter: brightness(1.05); box-shadow: none; }
@media (min-width: 900px) { .panel { top: 0; left: 0; bottom: 0; border-radius: 0 16px 16px 0; border-left: 0; } .handle { right: -22px; } }
@media (max-width: 899px) { .panel { border-radius: 16px 16px 0 0; } }
.brand .logo { background: var(--accent); color: #1a0f05; box-shadow: none; border-radius: 9px; }
.brand b { font-family: var(--serif); font-style: italic; font-weight: 700; font-size: 1.25em; letter-spacing: -.01em; }
/* sekmeler: dolgu yerine bakır alt çizgi */
.tabs button { border-bottom: 3px solid transparent; border-radius: 6px 6px 0 0; }
.tabs button.on { background: none; box-shadow: none; color: var(--accent); border-bottom-color: var(--accent); }
/* serif rakamlar ve başlıklar */
h2, h3, .soc, .tile .t-v, .compare b, .station-card h4, .stop h4, output, .tk-cost, .tk-bottom b { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; }
.soc { font-weight: 700; }
input.place.ok { border-color: color-mix(in srgb, var(--accent) 70%, transparent); background: color-mix(in srgb, var(--accent) 7%, transparent); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.tag.dc { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.tag.ac { color: var(--accent2); border-color: color-mix(in srgb, var(--accent2) 55%, transparent); background: color-mix(in srgb, var(--accent2) 10%, transparent); }
.st-item .ico.ac { background: color-mix(in srgb, var(--accent2) 14%, transparent); border-color: color-mix(in srgb, var(--accent2) 55%, transparent); }
.st-item, .saved-item, .card, .tile { border-radius: 12px; }
.st-item { border-left: 5px dotted color-mix(in srgb, var(--accent) 55%, transparent); } /* kuponun sapı */
.st-item:hover { border-color: var(--line2); border-left-color: var(--accent); transform: none; }
.tile::before { width: 0; }
.tile { border-top: 3px solid var(--accent); } .tile:nth-child(3n+2) { border-top-color: var(--accent2); } .tile:nth-child(3n) { border-top-color: var(--warn); }
.stop .card { background: color-mix(in srgb, var(--accent) 7%, transparent); border-color: color-mix(in srgb, var(--accent) 32%, transparent); }
.stop .card:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.stop .num { background: var(--accent); color: #1a0f05; }
.tl .ev::before { box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent2) 40%, transparent); background: var(--accent2); }
.tl .ev.stop::before { background: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 45%, transparent); }
.compare .arrive { background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
/* Bilet: rota özeti */
.ticket { position: relative; grid-column: 1 / -1; background: var(--panel2); border: 1px solid var(--line2); border-radius: 14px; padding: 16px 18px 14px; margin-bottom: 2px;
  background-image: radial-gradient(circle at 0 62%, var(--panel) 9px, transparent 10px), radial-gradient(circle at 100% 62%, var(--panel) 9px, transparent 10px); }
.tk-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: .78em; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.tk-route { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-main { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 4px 0 14px; }
.tk-cost { font-size: clamp(2rem, 9vw, 3rem); line-height: 1.05; color: var(--accent); font-weight: 700; }
.tk-sub { color: var(--muted); font-size: .82em; }
.tk-perf { border-top: 2px dashed var(--line2); margin: 0 -18px 12px; }
.tk-bottom { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tk-bottom span { display: block; color: var(--muted); font-size: .72em; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.tk-bottom b { font-size: 1.2em; }
/* zaman şeridi: sürüş = petrol, şarj = bakır, sınır = amber */
.strip { display: flex; gap: 2px; height: 14px; margin-top: 14px; border-radius: 7px; overflow: hidden; background: rgba(255,255,255,.05); }
.strip span { display: block; min-width: 3px; transform-origin: left; animation: fillx .5s ease-out both; }
.strip .drive { background: var(--accent2); } .strip .charge { background: var(--accent); } .strip .border { background: var(--warn); }
.strip span:nth-child(2) { animation-delay: .04s; } .strip span:nth-child(3) { animation-delay: .08s; } .strip span:nth-child(4) { animation-delay: .12s; } .strip span:nth-child(5) { animation-delay: .16s; } .strip span:nth-child(n+6) { animation-delay: .2s; }
@keyframes fillx { from { transform: scaleX(0); opacity: .3; } to { transform: none; opacity: 1; } }
.strip-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: .75em; color: var(--muted); }
.strip-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
/* Sınır damgası */
.stamp { display: inline-block; margin-left: 6px; padding: 2px 9px; border: 2px solid var(--warn); border-radius: 999px; color: var(--warn); font-size: .8em; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; transform: rotate(-4deg); animation: stamp .3s ease-out both; }
@keyframes stamp { 0% { transform: scale(1.7) rotate(-14deg); opacity: 0; } 60% { transform: scale(.96) rotate(-5deg); opacity: 1; } 100% { transform: scale(1) rotate(-4deg); } }
.ticket, .stop .card { transition: border-color .12s, transform .12s; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Ara duraklar: numara, ▲▼ taşıma ve "nereye eklensin" penceresi */
.row.via { align-items: flex-end; }
.via .mv { display: flex; flex-direction: column; gap: 3px; margin-bottom: 11px; flex: none; }
.mv button { width: 30px; height: 22px; padding: 0; border: 1px solid var(--line2); border-radius: 7px; background: rgba(255,255,255,.06); font-size: .62rem; line-height: 1; }
.mv button:hover:not(:disabled) { background: rgba(255,255,255,.14); border-color: var(--accent); }
.mv button:disabled { opacity: .3; cursor: default; }
.vn { color: var(--accent); font-weight: 600; }
.vp-list { margin: 6px 0 4px; }
.vp-stop { padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.04); font-weight: 500; }
.vp-stop.start { border-left: 4px solid var(--accent); } .vp-stop.end { border-left: 4px solid var(--accent2); }
.vp-slot { display: flex; justify-content: center; margin: 5px 0; }
.vp-slot button { background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px dashed color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent); border-radius: 999px; padding: 6px 14px; font-weight: 600; }
.vp-slot button:hover { background: color-mix(in srgb, var(--accent) 22%, transparent); }

/* Yolculuk gereklilikleri (vinyet / belge / sigorta kontrol listesi) */
.req { padding: 12px 14px 6px; }
.req summary { cursor: pointer; padding: 0 0 8px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.req-country { display: flex; align-items: center; gap: 8px; margin: 14px 0 6px; font-size: .78em; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.req-country span:first-child { display: inline-block; padding: 1px 7px; border: 1.5px solid var(--accent); border-radius: 6px; color: var(--accent); letter-spacing: .04em; }
.req-item { align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.req-item:first-of-type { border-top: 0; }
.req-item input { margin-top: 3px; flex: none; }
.req-item small { display: block; color: var(--muted); font-size: .82em; line-height: 1.4; margin-top: 2px; }
.req-item .req-price { color: var(--text); }
.req-item input:checked + span b { text-decoration: line-through; opacity: .6; }
.tk-req { display: inline-block; margin-top: 12px; padding: 4px 12px; border-radius: 999px; font-size: .82em; font-weight: 600; text-decoration: none; }
.tk-req.todo { color: var(--warn); border: 1.5px solid var(--warn); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.tk-req.ok { color: var(--accent2); border: 1.5px solid var(--accent2); background: color-mix(in srgb, var(--accent2) 8%, transparent); }
.btn-buy { display: inline-block; margin-top: 8px; padding: 9px 16px; border-radius: 12px; background: var(--accent); color: #1a0f05; font-weight: 700; text-decoration: none; }
.btn-buy:hover { filter: brightness(1.07); color: #1a0f05; }
.nav-link { font-size: .86em; font-weight: 600; text-decoration: none; padding: 1px 9px; border: 1px solid var(--line2); border-radius: 999px; }
.nav-link:hover { border-color: var(--accent2); }
/* Mobil: harita ipucu satırı sağ üstteki düğmelerin altında, tam genişlikte */
@media (max-width: 899px) { .map-hint { left: 12px; right: 12px; max-width: none; transform: none; top: calc(env(safe-area-inset-top) + 72px); border-radius: 12px; text-align: center; } }

/* ===== Tema paletleri (kullanıcı seçer; varsayılan: deniz) ===== */
:root { --pin: #e8761f; --pin-dark: #6b3208; --route: #0e8a93; }
:root[data-theme="deniz"] { --bg: #08131a; --panel: #0f1d26; --panel2: #162734; --panel3: #1d3242; --glass: #0f1d26; --line: rgba(190,230,240,.10); --line2: rgba(190,230,240,.18);
  --text: #eaf4f7; --muted: #9ab0ba; --accent: #2dd4bf; --accent2: #fb7185; --warn: #fbbf24; --bad: #ff6b6b; --pin: #14b8a6; --pin-dark: #0b5c53; --route: #0b7285; }
:root[data-theme="gece"] { --bg: #0d0e1a; --panel: #151729; --panel2: #1e2038; --panel3: #282b49; --glass: #151729; --line: rgba(200,205,255,.10); --line2: rgba(200,205,255,.18);
  --text: #eeeefb; --muted: #a2a5c4; --accent: #a78bfa; --accent2: #5eead4; --warn: #fcd34d; --bad: #ff7b8a; --pin: #8b5cf6; --pin-dark: #3b1f8c; --route: #5b3fd0; }
:root[data-theme="gul"] { --bg: #170d13; --panel: #21131b; --panel2: #2c1a25; --panel3: #3a2230; --glass: #21131b; --line: rgba(255,210,230,.10); --line2: rgba(255,210,230,.18);
  --text: #fbeef3; --muted: #c4a3b2; --accent: #f472b6; --accent2: #7dd3fc; --warn: #fcd34d; --bad: #ff8a80; --pin: #ec4899; --pin-dark: #7a1d4a; --route: #c026a3; }
/* Tema seçici */
.theme-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 4px; }
.theme-card { display: grid; gap: 8px; padding: 12px; border: 2px solid var(--line2); border-radius: 14px; background: var(--panel2); text-align: left; }
.theme-card.on, .theme-card:hover { border-color: var(--accent); }
.theme-card .sw { display: flex; height: 26px; border-radius: 8px; overflow: hidden; }
.theme-card .sw i { flex: 1; }
:root[data-theme="okyanus"] { --bg: #07111f; --panel: #0e1b2e; --panel2: #152640; --panel3: #1c3254; --glass: #0e1b2e; --line: rgba(180,210,255,.10); --line2: rgba(180,210,255,.18);
  --text: #e8f0fb; --muted: #94a8c4; --accent: #60a5fa; --accent2: #fbbf24; --warn: #fcd34d; --bad: #ff7b7b; --pin: #3b82f6; --pin-dark: #1e3a8a; --route: #1d4ed8; }
:root[data-theme="orman"] { --bg: #0a120c; --panel: #111c14; --panel2: #192a1d; --panel3: #213826; --glass: #111c14; --line: rgba(200,235,200,.10); --line2: rgba(200,235,200,.18);
  --text: #eaf5ea; --muted: #9db5a0; --accent: #a3e635; --accent2: #fbbf24; --warn: #fde047; --bad: #ff7b6b; --pin: #65a30d; --pin-dark: #2f4a07; --route: #3f6212; }
