/* Merkez paneli: koyu üst çubuk, açık çalışma alanı. Masaüstü/tablet yan yana, telefonda sekmeli. */
:root {
  --bar: #121820; --bar-2: #1f2933; --bg: #f3f5f8; --card: #ffffff; --line: #e1e6ec; --line-2: #eef1f4;
  --fg: #1d2733; --muted: #5b6775; --faint: #8a95a3;
  --yellow: #f7c600; --on-yellow: #121820; --acc-hi: #f7c600; --acc-tint: #fff8d6; --green: #1d9e4f; --green-l: #2ecc71; --red: #e53935; --red-d: #c62828; --amber: #e8a20c; --grey: #8a95a3; --purple: #6b4fd8; --talk: #2563eb;
  color-scheme: light;
}
/* Dolmuş: mavi tema (taksi sarı). Mavi düğmede yazı beyaz; koyu zeminde açık mavi.
   Anlam taşıyan sarılar (bekleyen çağrı, uyarı kartı, onay bekleyen kayıt) değişmez. */
:root[data-tur="dolmus"] { --yellow: #2563eb; --on-yellow: #fff; --acc-hi: #fff; --acc-tint: #e6efff; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--fg); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 15px; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; color: inherit; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; }
.mono { font-family: "DejaVu Sans Mono", Menlo, Consolas, monospace; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.btn { border: 0; border-radius: 12px; min-height: 44px; padding: 0 16px; font-weight: 700; background: var(--line-2); }
.btn.primary { background: var(--yellow); color: var(--on-yellow); }
.btn.green { background: var(--green); color: #fff; }
.btn.red { background: var(--red); color: #fff; }
.btn.ghost { background: transparent; border: 1px solid currentColor; }
.btn.link { background: none; text-decoration: underline; color: var(--faint); min-height: 36px; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.big { min-height: 58px; font-size: 18px; }
.btn.white { background: #fff; color: var(--red-d); }
.btn.ghost-w { background: transparent; border: 2px solid rgba(255,255,255,.7); color: #fff; }
.btn:disabled { opacity: .55; cursor: default; }

/* ============ Giriş ekranları ============ */
.auth { min-height: 100%; display: flex; align-items: center; justify-content: center; padding: calc(env(safe-area-inset-top,0px) + 24px) max(16px, env(safe-area-inset-right,0px)) calc(env(safe-area-inset-bottom,0px) + 24px) max(16px, env(safe-area-inset-left,0px)); background: var(--bar); }
.auth-card { width: 100%; max-width: 440px; background: var(--card); border-radius: 22px; padding: 26px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.auth-card.dark { background: #161d26; color: #fff; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { border-radius: 12px; }
.brand b { display: block; font-size: 20px; }
.brand span { display: block; font-size: 13px; color: var(--faint); margin-top: 2px; }
.tabs2 { display: flex; background: var(--line-2); border-radius: 12px; padding: 4px; }
.tabs2 button { flex: 1; border: 0; background: transparent; min-height: 40px; border-radius: 9px; font-weight: 700; color: var(--muted); }
.tabs2 button.on { background: #fff; color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.form { display: flex; flex-direction: column; gap: 8px; }
.form label, .form .lbl { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 6px; }
.auth-card.dark .form label { color: #9aa6b4; }
.form input, .form select, .form textarea { min-height: 46px; border: 1px solid var(--line); border-radius: 11px; padding: 0 12px; background: #fff; }
.form textarea { padding: 10px 12px; min-height: 70px; resize: vertical; }
.auth-card.dark .form input { background: #1f2933; border-color: #2c3846; color: #fff; }
.form .btn { margin-top: 10px; }
.pw { position: relative; display: flex; }
.pw input { flex: 1; min-width: 0; padding-right: 78px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 700; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.pw-eye:hover { background: rgba(0,0,0,.05); }
.auth-card.dark .pw-eye { color: #9aa6b4; }
.radio2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.radio2 label { margin: 0; }
.radio2 input { position: absolute; opacity: 0; }
.radio2 span { display: flex; align-items: center; justify-content: center; min-height: 52px; border: 2px solid var(--line); border-radius: 12px; font-weight: 700; color: var(--fg); font-size: 15px; }
.radio2 input:checked + span { border-color: var(--yellow); background: var(--acc-tint); }
.radio2 input:focus-visible + span { outline: 3px solid var(--yellow); }
.err { color: var(--red); font-weight: 600; font-size: 14px; min-height: 18px; margin: 0; }
.err.center { text-align: center; }
.hint { font-size: 13px; color: var(--faint); margin: 0; line-height: 1.45; }
.hint.light { color: #9aa6b4; }

.ops { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.ops button { display: flex; flex-direction: column; align-items: center; gap: 6px; background: none; border: 0; color: #9aa6b4; font-size: 14px; width: 76px; }
.ops .a { width: 60px; height: 60px; border-radius: 50%; background: #2a3440; color: #fff; font-size: 22px; font-weight: 800; display: grid; place-items: center; }
.ops button.on { color: #fff; font-weight: 800; }
.ops button.on .a { background: #3b82f6; box-shadow: 0 0 0 3px #161d26, 0 0 0 6px #3b82f6; }
.pins { display: flex; gap: 16px; justify-content: center; margin: 4px 0 2px; }
.pins i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #5b6775; }
.pins i.f { background: var(--yellow); border-color: var(--yellow); }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 280px; margin: 14px auto 0; }
.pad button { min-height: 58px; border-radius: 16px; background: #1f2933; border: 0; color: #fff; font-size: 24px; font-weight: 600; }
.pad button.e { background: transparent; }
.ops-foot { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.ops-foot .btn.ghost { color: #c9d1db; width: 100%; }

/* ============ Panel ============ */
.panel { height: 100%; display: flex; flex-direction: column; }
.bar { flex: none; background: var(--bar); color: #fff; display: flex; align-items: center; gap: 14px; padding: calc(env(safe-area-inset-top,0px) + 10px) max(18px, env(safe-area-inset-right,0px)) 10px max(18px, env(safe-area-inset-left,0px)); }
.bar-logo { border-radius: 10px; }
/* Uzun durak adı kısalır (…), sağdaki görevli düğmesini ekran dışına itmez */
.bar-t { min-width: 0; flex: 0 1 auto; }
.bar-t b { display: block; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-t span { display: block; font-size: 12px; color: #8e9aa8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .chip, .bar .who, .bar-logo { flex: none; }
.nav { display: flex; gap: 4px; margin-left: 10px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav button { background: transparent; border: 0; color: #9aa6b4; font-weight: 700; padding: 8px 12px; border-radius: 10px; position: relative; white-space: nowrap; }
.nav button.on { background: var(--bar-2); color: #fff; }
.nav em, .tabbar em { font-style: normal; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; border-radius: 10px; padding: 1px 6px; margin-left: 4px; }
.sp { flex: 1; }
.chip { background: var(--bar-2); border-radius: 20px; padding: 7px 12px; font-size: 13px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.chip.y { background: #3a2b0a; color: var(--yellow); cursor: pointer; }
.chip.off { background: #4a1414; color: #ffb3b3; }
.d { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; background: var(--grey); }
.d.m { background: var(--red); } .d.t { background: var(--talk); }
.d.g { background: var(--green-l); } .d.y { background: var(--yellow); } .d.r { background: var(--red); } .d.a { background: var(--amber); } .d.x { background: #b8c0ca; } .d.p { background: var(--purple); }
.who { position: relative; }
.who-btn { display: flex; align-items: center; gap: 8px; background: var(--bar-2); border: 0; border-radius: 20px; padding: 5px 12px 5px 5px; color: #fff; font-size: 13px; font-weight: 600; }
.av { width: 26px; height: 26px; border-radius: 50%; background: #3b82f6; color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; color: var(--fg); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.2); min-width: 200px; padding: 6px; z-index: 1200; }
.menu button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 11px 12px; border-radius: 8px; font-weight: 600; }
.menu button:hover { background: var(--line-2); }

.body { flex: 1; min-height: 0; display: flex; }
.side { width: 360px; flex: none; background: var(--card); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.sec { padding: 14px 16px 6px; }
.sec.grow { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sec h3 { font-size: 12px; font-weight: 800; color: var(--faint); letter-spacing: .8px; margin-bottom: 8px; }
.search { border: 1px solid var(--line); border-radius: 10px; min-height: 38px; padding: 0 12px; margin-bottom: 8px; background: var(--bg); }
.vlist { overflow-y: auto; flex: 1; margin: 0 -16px; padding-bottom: 120px; }
.pend { background: #fff8e1; border: 1px solid #f5d76e; border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.pend .when { font-size: 12px; color: #8a7a3a; margin-top: 4px; }
.pend .pn { font-size: 14px; }
.v .st .drv { color: var(--fg); font-weight: 700; }
.phs { margin-top: 10px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.phs-h { font-size: 11px; font-weight: 800; letter-spacing: .5px; color: var(--muted); padding: 7px 10px; background: var(--line-2); }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); }
.ph.on { background: #effaf3; }
.ph b { display: block; font-size: 14px; }
.ph small { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.ph-a { display: flex; align-items: center; gap: 6px; flex: none; }
.ph-a a { text-decoration: none; font-size: 16px; }
.ph-a button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 8px; font-size: 12px; font-weight: 700; color: var(--red-d, #c62828); cursor: pointer; }
.pend .acts { display: flex; gap: 6px; flex: none; }
/* Türk plakası: beyaz zemin, siyah çerçeve, solda mavi TR bandı (her plaka gösterimi) */
.plate { display: inline-flex; align-items: stretch; vertical-align: middle; background: #fff; color: #111; border: 1.5px solid #1a1a1a; border-radius: 4px; overflow: hidden; white-space: nowrap; font-family: "DIN Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif; font-weight: 800; font-size: 13.5px; letter-spacing: .03em; line-height: 1.15; padding: 2px 6px 1px 0; }
.plate::before { content: "TR"; flex: none; display: flex; align-items: flex-end; justify-content: center; width: 12px; margin: -2px 5px -1px 0; padding-bottom: 2px; background: #0a3d9e; color: #fff; font: 700 6px/1 Arial, sans-serif; letter-spacing: 0; }
.v { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.v:hover { background: #fafbfc; }
.v.sel { background: #fff7d1; }
.v.talk { background: #eef4ff; }
.v.off { opacity: .55; }
.v .st { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.v .st b { color: var(--fg); font-weight: 600; }
.v .st { display: flex; flex-direction: column; line-height: 1.25; }
.v .st .st1 { font-weight: 700; color: var(--fg); overflow: hidden; text-overflow: ellipsis; }
.v .st .st1 b { font-weight: 800; }
.v .st .st1.g { color: #15803d; } .v .st .st1.a, .v .st .st1.a b { color: #b45309; } .v .st .st1.m, .v .st .st1.m b { color: var(--red-d); } .v .st .st1.t, .v .st .st1.t b { color: var(--talk); } .v .st .st1.x { color: var(--muted); font-weight: 600; } .v .st .st1.p { color: var(--purple); }
.v .st .st2 { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.v .acts { display: flex; gap: 6px; flex: none; }
.ibtn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 15px; touch-action: none; -webkit-user-select: none; user-select: none; }
.ibtn.on { background: var(--red); color: #fff; border-color: var(--red); }
.tag { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 10px; background: #fdecea; color: var(--red-d); }

.main { flex: 1; min-width: 0; position: relative; }
.view { position: absolute; inset: 0; }
.view.scroll { overflow-y: auto; padding: 22px max(22px, env(safe-area-inset-right,0px)) 40px max(22px, env(safe-area-inset-left,0px)); }
#map { position: absolute; inset: 0; background: #e8ecef; }
.legend { position: absolute; left: 16px; bottom: 18px; z-index: 500; background: #fff; border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.15); padding: 9px 14px; font-size: 12px; display: flex; gap: 12px; flex-wrap: wrap; }
.legend span { display: flex; align-items: center; gap: 6px; }
.map-hint { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); z-index: 600; background: var(--bar); color: #fff; padding: 10px 16px; border-radius: 12px; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.25); }

/* Harita işaretleri */
.mk { display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -100%); position: absolute; left: 0; top: 0; }
.mk .lab { display: flex; align-items: center; background: #fff; color: #111; border: 1.5px solid #1a1a1a; border-radius: 4px; overflow: hidden; padding: 2px 6px 1px 0; font-size: 12.5px; font-weight: 800; letter-spacing: .03em; font-family: "DIN Condensed", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Arial, sans-serif; box-shadow: 0 2px 6px rgba(0,0,0,.25); white-space: nowrap; }
.mk .lab::before { content: "TR"; flex: none; align-self: stretch; display: flex; align-items: flex-end; justify-content: center; width: 11px; margin: -2px 5px -1px 0; padding-bottom: 2px; background: #0a3d9e; color: #fff; font: 700 5.5px/1 Arial, sans-serif; letter-spacing: 0; }
.mk .pin { width: 18px; height: 18px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35); margin-top: 3px; background: var(--green); }
.mk.a .pin { background: var(--amber); } .mk.x .pin { background: #9aa4b0; } .mk.x .lab { opacity: .7; } .mk.p .pin { background: var(--purple); }
.mk.m .pin { background: var(--red); }
.mk.t .lab { background: var(--talk); color: #fff; }
.mk.t .pin { background: var(--talk); box-shadow: 0 0 0 7px rgba(37,99,235,.25), 0 0 0 14px rgba(37,99,235,.1); }
.stc.g { color: #15803d; font-weight: 700; } .stc.m, .stc.m b { color: var(--red-d); font-weight: 800; } .stc.a, .stc.a b { color: #b45309; } .stc.t, .stc.t b { color: var(--talk); } .stc.p { color: var(--purple); }
.mk.sel .lab { outline: 3px solid var(--yellow); }
.mk.panic .pin { background: var(--red); animation: pz 1s infinite; }
@keyframes pz { 0% { box-shadow: 0 0 0 0 rgba(229,57,53,.7); } 100% { box-shadow: 0 0 0 26px rgba(229,57,53,0); } }
.dk-mk { background: var(--bar); color: var(--acc-hi); font-weight: 800; font-size: 12px; padding: 6px 10px; border-radius: 9px; white-space: nowrap; transform: translate(-50%, -50%); position: absolute; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.req-mk { transform: translate(-50%, -100%); position: absolute; background: #3b82f6; color: #fff; font-weight: 800; font-size: 12px; padding: 5px 9px; border-radius: 10px 10px 10px 2px; white-space: nowrap; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
.leaflet-div-icon { background: transparent; border: 0; }

/* Telsiz kutusu */
.dock { position: fixed; right: max(24px, env(safe-area-inset-right,0px)); bottom: calc(env(safe-area-inset-bottom,0px) + 24px); width: 320px; background: #fff; border-radius: 20px; box-shadow: 0 12px 34px rgba(20,30,45,.25); padding: 14px; display: flex; flex-direction: column; gap: 10px; z-index: 900; }
.side .dock { position: static; width: auto; flex: none; border-radius: 0; box-shadow: none; border-top: 1px solid var(--line); padding: 12px 14px calc(env(safe-area-inset-bottom,0px) + 12px); z-index: auto; }
.dock-live { background: var(--line-2); color: var(--muted); font-weight: 700; font-size: 14px; padding: 10px 12px; border-radius: 10px; display: flex; align-items: center; gap: 8px; min-height: 40px; }
.dock-live.listen { background: #e8f4fd; color: #0c6aa8; }
.dock-live.talk { background: #fdecea; color: var(--red-d); }
.dock-live.private { background: #efeaff; color: var(--purple); }
.dock-ptt { border: 0; border-radius: 16px; min-height: 78px; background: linear-gradient(#34d673, #1d9e4f); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.dock-ptt .dl { font-size: 20px; font-weight: 900; }
.dock-ptt .ds { font-size: 12px; opacity: .85; }
.dock-ptt.talk { background: linear-gradient(#ff5a5a, #c62828); }
.dock-ptt.wait { background: linear-gradient(#f7b733, #c98a10); }
.dock-ptt.busy { background: #c9d1db; color: #5b6775; }
.wave { display: inline-flex; gap: 3px; align-items: center; height: 16px; }
.wave i { width: 3px; border-radius: 2px; background: currentColor; animation: wv .6s ease-in-out infinite alternate; }
.wave i:nth-child(2) { animation-delay: .15s; } .wave i:nth-child(3) { animation-delay: .3s; }
@keyframes wv { from { height: 4px; } to { height: 16px; } }

.tabbar { display: none; }
.mobile-only { display: none; }

/* İçerik görünümleri */
.page-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-h h2 { font-size: 22px; }
.seg { display: inline-flex; background: #e6eaef; border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-weight: 700; color: var(--muted); }
.seg button.on { background: #fff; color: var(--fg); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; align-items: start; }
.card { background: var(--card); border-radius: 16px; padding: 16px; box-shadow: 0 2px 8px rgba(20,30,45,.06); min-width: 0; }
.card h3 { font-size: 16px; margin-bottom: 10px; }
.card .h { display: flex; align-items: center; gap: 10px; }
.card .nm { font-weight: 800; font-size: 16px; }
.card .tm { font-size: 12.5px; color: var(--muted); }
.badge { margin-left: auto; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 10px; background: var(--line-2); color: var(--muted); white-space: nowrap; }
.badge.g { background: #e6f7ee; color: var(--green); }
.badge.r { background: #fdecea; color: var(--red-d); }
.badge.b { background: #e8f1fd; color: #1d63c9; }
.badge.y { background: #fff3c4; color: #7a5a00; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.stats div { background: var(--bg); border-radius: 10px; padding: 8px 4px; text-align: center; }
.stats b { display: block; font-size: 19px; font-variant-numeric: tabular-nums; }
.stats span { font-size: 11px; color: var(--muted); }
.ev { display: flex; gap: 10px; font-size: 13px; padding: 7px 0; border-top: 1px solid var(--line-2); align-items: baseline; }
.ev .ti { font-family: "DejaVu Sans Mono", Menlo, monospace; color: var(--muted); width: 44px; flex: none; font-size: 12px; }
.empty { color: var(--faint); text-align: center; padding: 40px 10px; line-height: 1.5; }
.set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; align-items: start; }
.qr { width: 160px; height: 160px; background: #fff; border-radius: 10px; padding: 6px; border: 1px solid var(--line); flex: none; }
.qr svg { width: 100%; height: 100%; display: block; }
.linkbox { display: flex; gap: 8px; align-items: center; margin: 8px 0; }
.linkbox input, .linkbox textarea { flex: 1; min-width: 0; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: var(--bg); font-family: "DejaVu Sans Mono", Menlo, monospace; font-size: 12.5px; }
/* Uzun bağlantı kesilmesin: iki satıra kırılarak tamamı görünür */
.linkbox textarea { resize: none; line-height: 1.35; word-break: break-all; overflow: hidden; }
.op-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line-2); }
.op-row .nm { flex: 1; font-weight: 600; }
.op-row.off .nm { color: var(--faint); text-decoration: line-through; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.inline-form input { min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; flex: 1; min-width: 110px; }
.job { border-left: 4px solid #3b82f6; }
.job.open { border-left-color: var(--yellow); }
.job.accepted { border-left-color: var(--green); }
.job .meta { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.job .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.job select { min-height: 34px; border: 1px solid var(--line); border-radius: 9px; padding: 0 8px; }
.qlist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.qlist span { font-size: 13px; background: var(--bg); border-radius: 8px; padding: 5px 8px; }

/* Katmanlar */
.overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(10,14,19,.9); display: flex; align-items: center; justify-content: center; padding: 24px; color: #fff; }
.overlay.red { background: rgba(160, 20, 20, .96); }
.ov-card { max-width: 460px; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; }
.ov-card img { border-radius: 18px; }
.ov-card p { margin: 0; line-height: 1.5; opacity: .9; }
.ov-card .row { display: flex; flex-direction: column; gap: 10px; width: 100%; }
.big-ico { font-size: 70px; }
.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom,0px) + 120px); transform: translateX(-50%); background: var(--bar); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 2100; box-shadow: 0 8px 24px rgba(0,0,0,.3); max-width: calc(100vw - 32px); }

/* ============ Tablet ============ */
@media (max-width: 1280px) {
  .who-btn #who-name { display: none; }
  .who-btn { padding: 5px; }
  #p-online .off-n { display: none; }
  .bar-t { max-width: 240px; }
}
@media (max-width: 1100px) {
  .side { width: 300px; }
  .nav button { padding: 8px 9px; }
  #p-pending span, #p-online span { font-size: 12px; }
  .bar { gap: 10px; }
  .bar-t { max-width: 190px; }
}

/* ============ Telefon ============ */
@media (max-width: 820px) {
  .nav, #p-online, .bar-logo { display: none; }
  .bar { gap: 10px; }
  .bar-t { flex: 1; max-width: none; }
  .who-btn #who-name { display: none; }
  .who-btn { padding: 5px; }
  .side { display: none; }
  .mobile-only { display: block; }
  .tabbar { display: flex; flex: none; background: #fff; border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-right,0px)) calc(env(safe-area-inset-bottom,0px) + 6px) max(6px, env(safe-area-inset-left,0px)); }
  .tabbar button { flex: 1; background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--faint); padding: 4px 0; position: relative; }
  .tabbar button b { font-size: 19px; }
  .tabbar button.on { color: var(--fg); }
  .tabbar em { position: absolute; top: 0; right: 18%; }
  .dock { position: static; width: auto; border-radius: 0; box-shadow: 0 -4px 14px rgba(20,30,45,.08); padding: 10px max(12px, env(safe-area-inset-left,0px)); flex-direction: row; align-items: stretch; flex: none; }
  .dock-live { flex: 1; min-width: 0; font-size: 13px; }
  .dock-ptt { flex: 1.3; min-height: 60px; }
  .dock-ptt .dl { font-size: 16px; }
  .dock-ptt .ds { display: none; }
  .view.scroll { padding: 16px max(14px, env(safe-area-inset-left,0px)) 24px; }
  .legend { display: none; }
  .cards, .set-grid { grid-template-columns: 1fr; }
  .vlist-m .v { padding: 12px 4px; }
  .chip.y { padding: 6px 10px; }
}

/* ---------- Özel gruplar ---------- */
.h3row { display: flex; align-items: center; gap: 6px; }
.linkbtn { margin-left: auto; background: none; border: 0; color: #11866f; font-weight: 800; font-size: 12px; cursor: pointer; padding: 4px 0; letter-spacing: 0; }
.grp-select { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: #e8faf5; border: 1px solid #9fe3d3; border-radius: 10px; padding: 8px 10px; margin-bottom: 8px; font-size: 13px; color: #0b5e4e; font-weight: 600; }
.grp-select span { flex: 1; min-width: 120px; }
.v input[type=checkbox] { width: 18px; height: 18px; accent-color: #11866f; flex: none; }
.gcard { border: 1px solid #9fe3d3; background: #f1fcf8; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.gcard.out { border-color: var(--line); background: #f7f8fa; }
.gcard .gt { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; color: #0b5e4e; }
.gcard.out .gt { color: var(--muted); }
.gcard .gt .live { margin-left: auto; color: var(--red-d); }
.gcard .mem { display: flex; flex-wrap: wrap; gap: 5px; margin: 8px 0; }
.gcard .mem span { font-family: "DejaVu Sans Mono", Menlo, monospace; font-size: 12px; font-weight: 800; border: 2px solid var(--fg); border-radius: 6px; padding: 1px 6px; background: #fff; }
.gcard .mem span.off { opacity: .5; }
.gcard .mem span.talk { background: var(--red-d); color: #fff; border-color: var(--red-d); }
.gcard .mem span.mk { background: var(--yellow); border-color: #c9a200; }
.gcard .note { font-size: 12px; color: var(--muted); }
.gcard .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.dock-ch { display: flex; gap: 6px; flex-wrap: wrap; }
.dock-ch button { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 10px; font-weight: 800; font-size: 12.5px; color: var(--muted); position: relative; }
.dock-ch button.on { background: var(--bar); color: #fff; border-color: var(--bar); }
.dock-ch button.on.g { background: #11866f; border-color: #11866f; }
.dock-ch button i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-left: 5px; }
.dock-live.group { background: #e8faf5; color: #0b5e4e; }
.dock-ptt.grp { background: linear-gradient(#2fd3b0, #11866f); }
@media (max-width: 820px) { .dock { flex-wrap: wrap; } .dock-ch { width: 100%; } }

.tgl { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-weight: 700; cursor: pointer; }
.tgl input { width: 20px; height: 20px; accent-color: var(--green); }

/* Kapı numarası, susturma, durak levhası */
.door { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 6px; background: var(--bar); color: var(--acc-hi); font-weight: 900; font-size: 12.5px; margin-right: 6px; flex: none; }
.mk .lab .dn { background: var(--yellow); color: var(--on-yellow); border-radius: 4px; padding: 0 4px; margin-right: 5px; font-weight: 900; }
.mute-btn { margin-left: auto; border: 1px solid currentColor; background: #fff; color: var(--red-d); border-radius: 8px; font-weight: 800; font-size: 12px; padding: 4px 8px; cursor: pointer; flex: none; }
.door-row { display: flex; align-items: center; gap: 6px; margin-top: 10px; }
.door-row label { font-size: 12px; font-weight: 800; color: var(--muted); }
.door-row input { width: 70px; min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; font-weight: 800; }
.board { position: absolute; top: 12px; right: 12px; z-index: 500; background: rgba(18,24,32,.92); color: #fff; border-radius: 12px; padding: 10px 12px; min-width: 170px; box-shadow: 0 6px 18px rgba(0,0,0,.25); font-size: 13px; }
.board b { display: block; font-size: 11.5px; letter-spacing: .5px; color: var(--acc-hi); margin-bottom: 6px; }
.board > div { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.board .qn { width: 18px; color: #9aa6b4; font-weight: 800; }
.board .door { height: 18px; min-width: 22px; font-size: 11px; background: var(--yellow); color: var(--on-yellow); margin-right: 0; }
.board .mono { font-weight: 800; letter-spacing: .5px; }

/* Kayıp eşya */
.card.lost .asks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.card.lost .ask { font-size: 12.5px; font-weight: 700; border-radius: 8px; padding: 4px 8px; background: var(--line-2); color: var(--muted); }
.card.lost .ask.ok { background: #e6f7ee; color: #15803d; } .card.lost .ask.no { background: #fdecea; color: var(--red-d); }
.card.lost .cand { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.card.lost .cand label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.card.lost .cand label small { color: var(--muted); }
.card.lost .cand .btn { align-self: flex-start; margin-top: 4px; }

/* Müşteri rehberi ve randevu */
.cust-line { font-size: 13.5px; padding: 8px 10px; border-radius: 10px; background: var(--line-2); color: var(--muted); }
.cust-line.known { background: #e6f7ee; color: #15803d; } .cust-line.blocked { background: #fdecea; color: var(--red-d); }
.addr-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.addr-chips button { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 10px; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
.addr-chips button:hover { border-color: var(--yellow); }
.sched { display: flex; flex-direction: column; gap: 8px; }
.sched .srow { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 8px; font-size: 14px; }
.card.cust .h { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.card.cust.blocked { border-color: #f5b5ae; background: #fff8f7; }
.card.cust .addr-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.card.cust .addr-list span { font-size: 12.5px; background: var(--line-2); border-radius: 8px; padding: 4px 4px 4px 8px; display: inline-flex; align-items: center; gap: 4px; }
.card.cust .addr-list button { border: 0; background: none; color: var(--muted); font-size: 15px; cursor: pointer; padding: 0 4px; }
.card.cust .acts input { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; flex: 1; min-width: 120px; }

/* Arayan numara kartı ve geçmişi */
.callpop { position: fixed; top: 70px; right: 16px; z-index: 1200; display: flex; flex-direction: column; gap: 10px; width: min(340px, calc(100vw - 32px)); pointer-events: none; }
.callpop .cp { pointer-events: auto; background: #fff; border-radius: 16px; box-shadow: 0 14px 34px rgba(20,30,45,.28); padding: 12px 14px; border-left: 6px solid var(--green); display: flex; flex-direction: column; gap: 6px; animation: cpin .25s ease-out; }
.callpop .cp.ringing { border-left-color: var(--yellow); }
.callpop .cp.missed { border-left-color: var(--red); }
.callpop .cp.blocked { border-left-color: var(--red); background: #fff5f4; }
@keyframes cpin { from { transform: translateX(30px); opacity: 0; } }
.cp-h { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.cp-h button { border: 0; background: none; font-size: 16px; color: var(--muted); cursor: pointer; }
.cp-n a { font-size: 22px; font-weight: 900; color: var(--fg); text-decoration: none; letter-spacing: .5px; }
.cp-c { font-size: 14px; } .cp-c.ok { color: #15803d; font-weight: 700; }
.cp .btn { align-self: flex-start; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 800; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.cid-dev { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.cid-dev small { display: block; color: var(--muted); font-size: 12px; }
.steps-m { margin: 0; padding-left: 20px; line-height: 1.6; font-size: 14px; flex: 1; min-width: 220px; }

/* Durak sırası kartı */
.qcard .qrow { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px solid var(--line-2); }
.qcard .qrow.req { background: #fff8e1; margin: 0 -10px; padding: 7px 10px; border-radius: 8px; border-top: 0; }
.qcard .qn { width: 22px; font-weight: 900; color: var(--muted); text-align: center; }
.qcard .qrow small { color: var(--muted); }
.qcard .qrow .ibtn:disabled { opacity: .3; }
.qcard .qadd { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.qcard .qadd select { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; }
.qcard .sp, .qrow .sp { flex: 1; }

.heat-btn { position: absolute; top: 12px; left: 56px; z-index: 500; border: 0; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.2); font-weight: 800; font-size: 13px; padding: 8px 12px; cursor: pointer; }
.heat-btn.on { background: var(--bar); color: var(--acc-hi); }
.rep-tabs { margin-bottom: 12px; max-width: 560px; }
.stats { flex-wrap: wrap; }

/* Araç yönetimi */
.card.wide { grid-column: 1 / -1; }
.veh-add { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.veh-add input { min-height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; }
#va-list input { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; width: 100%; max-width: 160px; }
#va-list .va-door { min-width: 70px; max-width: 90px; font-weight: 800; }
#va-list .va-acts { text-align: right; white-space: nowrap; }
/* Telefon ve tablette (yan menü açıkken tablo sığmaz) araç tablosu kart olur: kapı no ve plaka rahat genişlikte, durum ve düğmeler altta */
@media (max-width: 1100px) {
  #va-list .tbl, #va-list .tbl tbody { display: block; }
  #va-list .tbl thead { display: none; }
  #va-list .tbl tr { display: grid; grid-template-columns: minmax(76px, min(30%, 140px)) minmax(0, 1fr); gap: 10px 12px; align-items: end; padding: 14px 0; border-bottom: 1px solid var(--line); }
  #va-list .tbl td { display: block; padding: 0; border: 0; min-width: 0; background: none !important; }
  #va-list .tbl td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 4px; }
  #va-list input, #va-list .va-door { max-width: 420px; min-width: 0; min-height: 44px; }
  #va-list .tbl td.va-acts { grid-column: 1 / -1; display: flex; gap: 8px; text-align: left; white-space: normal; }
  #va-list .va-acts .btn { flex: 1; min-height: 44px; }
  #va-list tr.blocked { background: #fff8f7; margin: 0 -10px; padding-left: 10px; padding-right: 10px; border-radius: 10px; }
}
#va-list tr.blocked td { background: #fff8f7; }

.pool-btn { left: 170px; }
.mk.guest .pin { background: var(--purple); }
.mk.guest .lab { border-color: var(--purple); }

.heat-btns { display: none; }
#view-map .heat-btn { position: absolute; top: 12px; }
#heat-btn { left: 56px; } #traffic-btn { left: 170px; } #pool-btn { left: 262px; } #yer-btn { left: 410px; }
@media (max-width: 820px) { #heat-btn { left: 52px; top: 12px; } #traffic-btn { left: 52px; top: 52px; } #pool-btn { left: 52px; top: 92px; } #yer-btn { left: 52px; top: 132px; } }

.cp-tag { background: var(--line-2); border-radius: 6px; padding: 1px 6px; color: var(--muted); font-weight: 700; }

/* Tekrar dinle */
.dock-row { display: flex; gap: 8px; align-items: stretch; }
.dock-row .dock-live { flex: 1; min-width: 0; }
.dock-rp { flex: none; width: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--bar); font-size: 20px; font-weight: 900; cursor: pointer; }
.dock-live.replay { background: #fff4d6; color: #8a6200; }
.dock-clips { background: var(--line-2); border-radius: 12px; padding: 8px; max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.dock-clips .dc-h { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); padding: 0 4px 4px; }
.dock-clips .dc-h button { border: 0; background: none; cursor: pointer; color: var(--muted); }
.dock-clips .dc { border: 0; background: #fff; border-radius: 8px; padding: 7px 9px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 1px; }
.dock-clips .dc span { font-weight: 700; font-size: 13px; } .dock-clips .dc small { color: var(--muted); font-size: 11.5px; }
.dock-clips .dc.mine { opacity: .65; }
.dock-clips .dc-t { font-style: normal; font-size: 13px; color: var(--fg); line-height: 1.35; margin-top: 3px; overflow-wrap: anywhere; }
.dock-clips .dc-t.wait { color: var(--faint); font-size: 12px; }
.dock-clips .dc.old { background: #fafbfc; cursor: default; }
.dock-clips .dc-list { display: flex; flex-direction: column; gap: 4px; }
.dock-clips .dc-q { border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font: inherit; font-size: 16px; background: #fff; margin-bottom: 4px; }
.dock-clips { max-height: 320px; }
@media (max-width: 820px) { .dock-row { flex: 1; min-width: 0; } .dock-clips { width: 100%; order: -1; } }
.dk-mk { cursor: move; }

/* Dolmuş seferleri */
.dk-mk.end { background: #0b5e4e; color: #fff; }
.sf-vehs { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 140px; overflow-y: auto; }
.sf-vehs label { font-size: 13px; display: flex; gap: 6px; align-items: center; }
#sf-plan select { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; width: 100%; min-width: 170px; max-width: 260px; }
.tbl .st-acts { text-align: right; white-space: nowrap; }
#sf-stats { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 820px) { #sf-stats { grid-template-columns: repeat(2, 1fr); } }
#sf-veh-tbl, #sf-plan, #sf-trips { overflow-x: auto; }

/* Dolmuş hat şeridi */
#strip-btn { left: auto; right: 12px; }
.strip-ov { position: absolute; left: 16px; right: 16px; bottom: 62px; z-index: 600; background: #fff; border-radius: 14px; box-shadow: 0 6px 22px rgba(0,0,0,.18); padding: 10px 12px; max-height: 46%; overflow: auto; }
.strip { display: grid; grid-template-columns: 112px 1fr 112px; gap: 10px; align-items: stretch; min-width: 560px; }
.st-end { background: var(--bg); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.st-eh { font-weight: 900; font-size: 13px; }
.st-en { font-size: 11px; color: var(--muted); }
.st-q { display: flex; align-items: center; gap: 5px; border: 0; background: #fff; border-radius: 7px; padding: 3px 6px; font-size: 12px; cursor: pointer; text-align: left; }
.st-q span { color: var(--muted); font-size: 11px; } .st-q b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .st-q small { color: var(--muted); }
.st-lanes { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.st-lbl { font-size: 12px; font-weight: 800; } .st-lbl em { font-style: normal; color: var(--muted); font-weight: 600; }
.st-track { position: relative; height: 84px; margin: 0 22px; }
.st-line { position: absolute; left: -22px; right: -22px; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; background: #cfd8e3; }
.st-lane.a .st-line { background: linear-gradient(90deg, #cfe9dd, #2ecc71); }
.st-lane.b .st-line { background: linear-gradient(270deg, #d6e4f7, #3b82f6); }
.st-v { position: absolute; transform: translateX(-50%); min-width: 40px; border: 2px solid #1d9e4f; background: #fff; border-radius: 9px; padding: 2px 5px; line-height: 1.05; cursor: pointer; display: flex; flex-direction: column; align-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.st-lane.b .st-v { border-color: #2563eb; }
.st-v.full { background: #fff4d6; }
.st-v.r0 { top: 0; } .st-v.r1 { bottom: 0; }
.st-v b { font-size: 12.5px; white-space: nowrap; } .st-v small { font-size: 10.5px; color: var(--muted); }
.st-gap { position: absolute; top: 50%; transform: translate(-50%, -50%); background: #fff; border: 1px solid var(--line); border-radius: 6px; font-size: 10.5px; font-weight: 800; padding: 0 4px; color: var(--muted); white-space: nowrap; }
.st-gap.tight { border-color: var(--red); color: var(--red); background: #fdecea; }
#sf-strip { overflow-x: auto; }
@media (max-width: 820px) { .strip-ov { left: 8px; right: 8px; bottom: 8px; } #strip-btn { top: 12px; } }
@media (max-width: 640px) {
  .strip { grid-template-columns: 1fr; min-width: 0; }
  .st-end { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .st-eh { margin-right: 4px; }
  .st-track { margin: 0 18px; }
}
.st-track.one { height: 60px; }
.st-track.one .st-line { top: auto; bottom: 8px; margin-top: 0; }
.st-track.one .st-gap { top: auto; bottom: 10px; transform: translate(-50%, 50%); }

/* Mesai: elle ekleme, rapor, düzenleme */
.sh-add { margin-bottom: 12px; max-width: 640px; }
.sh-times { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sh-times input { width: 100%; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 0 10px; font: inherit; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.sh-note { margin-top: 10px; background: #fff8e1; border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.sh-note p { margin: 4px 0 0; white-space: pre-wrap; }
.sh-edit { margin-top: 10px; } .sh-edit textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; }
.sh-empty { text-align: left; } .sh-empty p { margin: 8px 0 0; font-size: 14px; line-height: 1.5; }
.tblwrap { overflow-x: auto; }
/* Tablolarda plaka ve saatler bölünmez (telefonda tablo kendi içinde kayar) */
.tbl .mono, .tbl .door { white-space: nowrap; }
#qh-list { overflow-x: auto; }
#qh-list td { white-space: nowrap; }
#qh-list td:last-child { white-space: normal; min-width: 96px; }
#rep-csv:disabled { opacity: .5; cursor: default; }
@media (max-width: 640px) { .sh-times { grid-template-columns: 1fr; } }

/* Tarama düzeltmeleri */
.radio2 span { flex-direction: column; text-align: center; padding: 6px 10px; line-height: 1.25; }
.radio2 span small { font-weight: 500; color: var(--muted); font-size: 12px; margin-top: 2px; }
.radio2 span br { display: none; }
.qcard .qrow .mono, .qcard .qrow .door { white-space: nowrap; }
.qcard .qrow small.hint { white-space: nowrap; }
.job select { max-width: 100%; min-width: 0; }
@media (min-width: 641px) { .strip { grid-template-columns: 132px 1fr 132px; } }
.st-q b { font-size: 12px; }
#view-reports > .card > .stats { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

/* Uyarı kartları: sağ üstte, sayfayı kapatmaz */
.notes { position: fixed; top: 64px; right: 16px; z-index: 1500; width: min(380px, calc(100vw - 32px)); display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.note { pointer-events: auto; display: flex; gap: 10px; align-items: flex-start; background: #fff; border-radius: 14px; padding: 12px 12px 12px 14px; box-shadow: 0 10px 30px rgba(18,24,32,.22), 0 1px 3px rgba(18,24,32,.12); border-left: 5px solid #1d63c9; animation: notein .22s ease-out; }
.note.warn { border-left-color: var(--yellow); } .note.ok { border-left-color: var(--green); } .note.bad { border-left-color: var(--red); }
.note-ic { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #e8f1fd; color: #1d63c9; }
.note.warn .note-ic { background: #fff3c4; color: #7a5a00; } .note.ok .note-ic { background: #e6f7ee; color: var(--green); }
.note-ic .ico { width: 20px; height: 20px; }
.note-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.note-b b { font-size: 14.5px; } .note-b span { font-size: 13.5px; color: #3a4552; overflow-wrap: anywhere; } .note-b small { font-size: 11.5px; color: var(--muted); }
.note-a { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.note-x { border: 0; background: transparent; color: var(--muted); width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; cursor: pointer; }
.note-x:hover { background: #eef1f5; } .note-x .ico { width: 16px; height: 16px; }
.ico { width: 24px; height: 24px; display: block; }
@keyframes notein { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .note { animation: none; } }
@media (max-width: 820px) { .notes { top: 60px; right: 8px; left: 8px; width: auto; } }

/* Uyarı kartı içi düğmeler (dolmuş sıra) */
.note-x2 { margin-top: 8px; }
.mv-plans, .mv-join { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.mv-plans select, .mv-join select { min-height: 34px; border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; font: inherit; font-size: 13px; max-width: 100%; }
.mv-pick { display: inline-flex; gap: 4px; }

/* Seferler › Sıra */
.sira-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sira-col > b, .sira-out > b { display: block; margin-bottom: 4px; }
.sira-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-top: 1px solid var(--line-2); }
.sira-row .qn { width: 22px; font-weight: 900; color: var(--muted); text-align: center; }
.sira-row .sp { flex: 1; }
.sira-row .ibtn { width: 30px; height: 30px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; }
.sira-row .ibtn:disabled { opacity: .3; cursor: default; }
.sira-row select { min-height: 30px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 13px; max-width: 160px; }
.sira-out { margin-top: 12px; }
@media (max-width: 720px) { .sira-grid { grid-template-columns: 1fr; } }
/* Uyarı kartları sağ altta: sayfanın başlığını ve düğmelerini kapatmaz */
.notes { top: auto; bottom: 18px; flex-direction: column-reverse; }
@keyframes notein { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 820px) { .notes { top: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 168px); } }

/* Kullanıcının açtığı menü her zaman en üstte (arayan numara kartı ve uyarıların üstünde) */
.menu { z-index: 2000; }
.callpop { top: 64px; }

.notes > .callpop { position: static; width: 100%; top: auto; right: auto; pointer-events: none; }

/* Plaka kutuları: harfler yazarken büyük görünür (değer de büyütülür) */
[data-plaka] { text-transform: uppercase; }
[data-plaka]::placeholder { text-transform: none; }

/* iPhone: yazısı 16 px'ten küçük kutuya dokununca Safari sayfayı yakınlaştırıp yana kaydırıyor.
   Dokunmatik ve dar ekranlarda bütün yazı kutuları 16 px (yakınlaştırma ve kayma olmaz). */
@media (max-width: 900px), (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), select, textarea { font-size: 16px !important; }
}

/* Girişte bağlantıdan gelen durak: kod yerine adı */
.slug-known { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); margin-bottom: 4px; }
.slug-known b { min-width: 0; overflow-wrap: anywhere; }
.slug-known .btn-link { flex: none; background: none; border: 0; color: var(--blue, #2563eb); font-weight: 700; padding: 4px; cursor: pointer; }

/* Form ızgaraları: sütunlar kutunun kendi genişliğiyle büyümez (Android saat kutusu taşmasın); telefonda daha az sütun */
.g3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.g21 { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; }
.g3 > *, .g21 > *, .form > * { min-width: 0; }
.g3 input, .g3 select, .g21 input, .g21 select { width: 100%; min-width: 0; max-width: 100%; }
@media (max-width: 560px) {
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .g21 { grid-template-columns: 1fr; }
}
input, select, textarea { max-width: 100%; }

/* Telefonda çok sütunlu tablo: her satır alt alta okunan bir kart (yana kaydırma yok) */
@media (max-width: 640px) {
  .tbl.stack, .tbl.stack tbody { display: block; width: 100%; }
  .tbl.stack thead { display: none; }
  .tbl.stack tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .tbl.stack td { display: inline-flex; align-items: center; gap: 6px; padding: 0; border: 0; min-width: 0; max-width: 100%; }
  .tbl.stack td[data-l]::before { content: attr(data-l); font-size: 12px; font-weight: 800; color: var(--muted); }
  .tbl.stack td[data-l]:empty { display: none; }
  .tbl.stack td.st-first { font-size: 15px; }
  .tbl.stack td.st-full { flex: 1 1 100%; }
  .tbl.stack td.st-full select { max-width: none; min-width: 0; min-height: 44px; }
  .tbl.stack td.st-acts { margin-left: auto; gap: 8px; }
  .tbl.stack td.st-acts .btn { min-height: 40px; }
}
/* Masaüstü araç tablosunda plaka kutusu plakanın tamamını gösterir */
@media (min-width: 1101px) { #va-list .va-plate { min-width: 128px; } }

/* Kalkış ekle: iki sütun, yön (uzun yön adı) her zaman tam satır */
.g3.g3w { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3.g3w > :last-child { grid-column: 1 / -1; }
/* Uzun durak kodu etiketi bölünebilir (dar ekranda taşmaz) */
.page-h .badge.mono { white-space: normal; overflow-wrap: anywhere; max-width: 100%; }
/* Telefonda hat şeridi tek sütun: çizgi kutunun dışına uzamaz */
@media (max-width: 640px) { .st-line { left: 0; right: 0; } }

/* Araç tablosu: şoför telefonu kutusu */
#va-list .va-phone { min-width: 140px; max-width: 180px; }
#va-list .va-own { display: block; font-size: 12px; margin-top: 3px; }
@media (max-width: 1100px) {
  #va-list .tbl td.va-ph-td { grid-column: 1 / -1; }
  #va-list .va-phone { max-width: 420px; min-width: 0; }
}

/* Panik ortam sesi */
.pn-audio { display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; width: 100%; background: rgba(0,0,0,.2); border-radius: 12px; padding: 10px 12px; }
.pn-audio span { font-weight: 700; }

/* Konum geçmişi: güzergah ve "kim geçti?" panelleri */
.mpanel { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 650; max-width: 560px; margin: 0 auto; max-height: 52%; overflow-y: auto; background: var(--card); color: var(--fg); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.28); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; }
.mp-h { display: flex; align-items: center; gap: 10px; }
.mp-h b { flex: 1; min-width: 0; font-size: 15px; }
.mp-x { border: 0; background: var(--line-2); width: 36px; height: 36px; border-radius: 10px; font-size: 16px; cursor: pointer; flex: none; }
.mp-q { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.mp-q input, .mp-q select { border: 1px solid var(--line); border-radius: 10px; padding: 7px 8px; font: inherit; font-size: 16px; background: var(--bg); color: var(--fg); min-width: 0; }
.mp-q input[type=date] { flex: 1 1 150px; } .mp-q input[type=time] { flex: 0 0 auto; min-width: 128px; } /* 12 saat biçimli tarayıcıda ÖÖ/ÖS kesilmesin */
.mp-quick { display: flex; gap: 6px; flex-wrap: wrap; }
.mp-quick button { border: 1px solid var(--line); background: var(--bg); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; color: var(--fg); }
.mp-sum { font-size: 14px; color: var(--muted); line-height: 1.45; }
.mp-sum b { color: var(--fg); }
.mp-play { display: flex; align-items: center; gap: 8px; }
.mp-play input[type=range] { flex: 1; min-width: 0; }
.mp-now { font-weight: 800; font-size: 15px; min-height: 18px; }
.mp-stops { display: flex; flex-wrap: wrap; gap: 6px; }
.mp-stops button { border: 1px solid var(--line); background: var(--acc-tint); color: var(--fg); border-radius: 999px; padding: 6px 10px; font-size: 13px; cursor: pointer; }
.mp-list { display: flex; flex-direction: column; gap: 6px; }
.yer-row { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; }
.yer-row .yr-c { flex: 1; min-width: 0; }
.yer-row .yr-c small { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; }
.stop-mk { transform: translate(-50%, -130%); background: #1d2733; color: #fff; font-weight: 800; font-size: 12px; padding: 3px 7px; border-radius: 8px; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.3); }

/* Panik ortam sesinin yazısı */
.pn-yazi { width: 100%; background: rgba(0,0,0,.2); border-radius: 12px; padding: 10px 12px; text-align: left; display: flex; flex-direction: column; gap: 4px; font-size: 15px; line-height: 1.4; }
.pn-yazi small { opacity: .75; margin-right: 6px; }
