/* ==========================================================================
   TAMGORA Tasarım Sistemi — premium, sade, kurumsal.
   Harici kaynak yok (CSP 'self'). Açık/koyu tema: [data-theme] ya da sistem tercihi.
   Renk tokenları: antrasit #17212B · bakır #C58A4A (vurgu/seçili) · petrol #176B68 (birincil eylem) · kırık beyaz #F6F3EC
   ========================================================================== */

:root {
  --c-antrasit: #17212B;
  --c-bakir: #C58A4A;
  --c-bakir-strong: #9C6A32;   /* metin için AA kontrastlı bakır */
  --c-petrol: #176B68;
  --c-kirik-beyaz: #F6F3EC;

  --bg: #F6F3EC;
  --surface: #FFFFFF;
  --surface-2: #FBFAF6;
  --surface-sunken: #EFEBE2;
  --text: #17212B;
  --text-muted: #56616B;
  --border: #E4DFD4;
  --border-strong: #CFC8BA;
  --focus: #176B68;

  --primary: #176B68;
  --primary-hover: #11524F;
  --primary-text: #FFFFFF;
  --accent-soft: #F5E9DA;

  --ok: #1D6B45;     --ok-bg: #E2F1E8;
  --warn: #8A5A12;   --warn-bg: #F8EBD5;
  --danger: #A23A2E; --danger-bg: #F8E3DF;
  --info: #1F5E86;   --info-bg: #E1EEF6;
  --neutral: #56616B; --neutral-bg: #ECE8DF;

  --sidebar-bg: #17212B;
  --sidebar-text: #C9CFD5;
  --sidebar-active: #FFFFFF;
  --sidebar-hover: #222E3A;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(23, 33, 43, .06), 0 4px 16px rgba(23, 33, 43, .05);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: Consolas, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #10171E; --surface: #17212B; --surface-2: #1C2733; --surface-sunken: #0D1318;
  --text: #ECE8DF; --text-muted: #A3ACB5; --border: #2A3644; --border-strong: #3A4757; --focus: #5FC2BC;
  --primary: #2A8C87; --primary-hover: #34A39D; --accent-soft: #3A2C1C; --c-bakir-strong: #E0A866;
  --ok: #7FD1A2; --ok-bg: #173327; --warn: #E8B76B; --warn-bg: #3A2C14; --danger: #F0948A; --danger-bg: #3D1E1A;
  --info: #8CC4E8; --info-bg: #15293A; --neutral: #A3ACB5; --neutral-bg: #232E3A;
  --sidebar-bg: #0D1318; --sidebar-hover: #17212B; --shadow: 0 1px 2px rgba(0, 0, 0, .3);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #10171E; --surface: #17212B; --surface-2: #1C2733; --surface-sunken: #0D1318;
    --text: #ECE8DF; --text-muted: #A3ACB5; --border: #2A3644; --border-strong: #3A4757; --focus: #5FC2BC;
    --primary: #2A8C87; --primary-hover: #34A39D; --accent-soft: #3A2C1C; --c-bakir-strong: #E0A866;
    --ok: #7FD1A2; --ok-bg: #173327; --warn: #E8B76B; --warn-bg: #3A2C14; --danger: #F0948A; --danger-bg: #3D1E1A;
    --info: #8CC4E8; --info-bg: #15293A; --neutral: #A3ACB5; --neutral-bg: #232E3A;
    --sidebar-bg: #0D1318; --sidebar-hover: #17212B; --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}

/* Super Admin (platform) alanı: petrol koyu kabuk + bakır şerit — müşteri panelinden belirgin şekilde ayrı. */
.area-platform { --sidebar-bg: #0E3B39; --sidebar-hover: #14514E; --sidebar-text: #CFE4E2; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
h1 { font-size: 24px; font-weight: 700; letter-spacing: -.3px; }
h2 { font-size: 17px; font-weight: 650; margin: 24px 0 12px; }
h3 { font-size: 15px; font-weight: 650; }
.muted { color: var(--text-muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }

/* ---------- Uygulama kabuğu: sol navigasyon ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar-bg); color: var(--sidebar-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 20px 18px 16px; color: #fff; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--c-bakir); color: var(--c-antrasit); display: grid; place-items: center; font-weight: 900; font-size: 17px; }
.brand-name { font-weight: 800; letter-spacing: 2.5px; font-size: 15px; }
.brand-sub { display: block; font-size: 11px; letter-spacing: .4px; color: var(--sidebar-text); font-weight: 400; }
.nav-section { padding: 6px 10px 4px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: #8C97A3; padding: 10px 10px 4px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--sidebar-text); text-decoration: none; font-size: 14px; border-left: 3px solid transparent; }
.nav-item:hover { background: var(--sidebar-hover); color: var(--sidebar-active); }
.nav-item.active { background: var(--sidebar-hover); color: var(--sidebar-active); border-left-color: var(--c-bakir); font-weight: 600; }
.nav-item.active .icon { color: var(--c-bakir); }
.sidebar-foot { margin-top: auto; padding: 14px 18px; font-size: 12px; color: #8C97A3; border-top: 1px solid rgba(255, 255, 255, .06); }
.platform-stripe { height: 4px; background: var(--c-bakir); flex: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 10px 28px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13px; color: var(--text-muted); text-align: right; line-height: 1.3; }
.topbar .who strong { color: var(--text); font-weight: 600; display: block; }
.topbar form { margin: 0; display: flex; gap: 6px; align-items: center; }
.topbar select { min-height: 36px; padding: 6px 10px; width: auto; }
.icon-btn { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; padding: 0; }
.icon-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.nav-toggle-btn { display: none; }
.content { padding: 24px 28px 48px; max-width: 1280px; width: 100%; }
.badge-admin { background: var(--c-bakir); color: var(--c-antrasit); font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 99px; letter-spacing: .6px; }

/* Mobil: CSS-only menü (checkbox), JS gerektirmez */
#nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; transform: translateX(-100%); z-index: 40; transition: transform .2s ease; }
  #nav-toggle:checked ~ .shell .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(0, 0, 0, .35); }
  .nav-toggle-btn { display: inline-grid; }
  .topbar { padding: 10px 16px; }
  .topbar .who { display: none; }
  .content { padding: 18px 16px 40px; }
}
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none; } }

/* ---------- Sayfa başlığı ---------- */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-header p { margin: 6px 0 0; color: var(--text-muted); font-size: 14px; max-width: 72ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.eyebrow { font-size: 12px; letter-spacing: .6px; color: var(--c-bakir-strong); font-weight: 700; margin-bottom: 4px; }

/* ---------- Kartlar ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .grid-2 > .card + .card { margin-top: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-header h2, .card-header h3 { margin: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 20px; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); margin-bottom: 20px; }

.stat { position: relative; display: block; text-decoration: none; color: inherit; }
.stat .label { color: var(--text-muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.stat .label .icon { color: var(--c-petrol); }
.stat .value { font-size: 30px; font-weight: 700; letter-spacing: -.5px; margin-top: 6px; color: var(--text); font-variant-numeric: tabular-nums; }
.stat .value.small { font-size: 16px; font-weight: 600; letter-spacing: 0; }
.stat .hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
a.stat:hover { border-color: var(--border-strong); }
.stat-accent { border-top: 3px solid var(--c-bakir); }

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; }
.card.table-wrap { padding: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); background: var(--surface-2); font-weight: 600; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tfoot td { font-weight: 700; background: var(--surface-2); }

/* ---------- Filtre / arama ---------- */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; }
.filter-bar .field { margin: 0; min-width: 160px; }
.filter-bar .grow { flex: 1; min-width: 220px; }
.search { position: relative; }
.search .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.search input[type=search], .search input { padding-left: 36px; }

/* ---------- Formlar ---------- */
label, .label { display: block; font-weight: 600; font-size: 13px; margin: 0 0 6px; }
.field { margin-bottom: 14px; }
.field .help { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.field .error { font-size: 12px; color: var(--danger); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: inherit; font-size: 14px; background: var(--surface); color: var(--text); min-height: 40px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--danger); }
.row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.actions { display: flex; gap: 8px; align-items: center; margin-top: 18px; flex-wrap: wrap; }
.actions input, .actions select { width: auto; min-width: 110px; }
.inline { display: inline; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 6px 0; font-size: 14px; }
.check input { width: auto; min-height: 0; accent-color: var(--c-petrol); }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 16px; }
.choice-row { display: flex; gap: 6px; flex-wrap: wrap; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-block; padding: 7px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; background: var(--surface); }
.choice input:checked + span { border-color: var(--c-bakir); background: var(--accent-soft); color: var(--c-bakir-strong); font-weight: 700; }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px; margin: 0 0 14px; }
legend { font-weight: 650; font-size: 13px; padding: 0 6px; }

/* ---------- Butonlar ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: var(--radius-sm); padding: 9px 16px; min-height: 40px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--primary); color: var(--primary-text); }
.btn:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface-2); }
.btn-copper, .btn-accent { background: var(--c-bakir); color: var(--c-antrasit); }
.btn-copper:hover, .btn-accent:hover { background: #B57B3D; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: var(--danger); filter: brightness(.95); }
.btn-ghost { background: transparent; color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-link { background: none; border: 0; color: inherit; padding: 4px 6px; min-height: 0; font-weight: 500; }
.btn-link:hover { background: none; text-decoration: underline; }
.btn-sm { padding: 5px 10px; min-height: 32px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---------- Durum rozetleri (renk + ikon + metin) ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 3px 9px 3px 7px; border-radius: 99px; background: var(--neutral-bg); color: var(--neutral); white-space: nowrap; }
.badge .icon { width: 14px; height: 14px; vertical-align: 0; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-accent { background: var(--accent-soft); color: var(--c-bakir-strong); }
.pill { display: inline-block; font-size: 12px; padding: 2px 9px; border-radius: 99px; background: var(--neutral-bg); color: var(--neutral); font-weight: 600; }
.pill-ok { background: var(--ok-bg); color: var(--ok); }
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.pill-danger { background: var(--danger-bg); color: var(--danger); }

/* ---------- Bildirim kutuları ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; font-size: 14px; }
.alert .icon { margin-top: 1px; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-info { background: var(--info-bg); color: var(--info); }
.alert ul { margin: 0; padding-left: 18px; }
.alert p { margin: 0; }

/* ---------- Boş durum ---------- */
.empty { text-align: center; padding: 36px 20px; color: var(--text-muted); }
.empty .icon { width: 34px; height: 34px; color: var(--c-bakir); margin-bottom: 8px; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty p { margin: 0 auto; max-width: 52ch; }

/* ---------- Listeler / zaman çizelgesi ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.list .icon { margin-top: 2px; }
.list .grow { flex: 1; }
.tone-ok { color: var(--ok); } .tone-warn { color: var(--warn); } .tone-danger { color: var(--danger); } .tone-info { color: var(--info); } .tone-accent { color: var(--c-bakir-strong); }
.timeline { display: flex; flex-direction: column; gap: 6px; }
.slot { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--surface-2); border-left: 4px solid var(--c-petrol); font-size: 14px; }
.slot.temporary { border-left-color: var(--c-bakir); background: var(--accent-soft); }
.slot .time { font-family: var(--mono); font-size: 13px; color: var(--text-muted); min-width: 110px; }
.staff-plan { display: grid; grid-template-columns: 220px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.staff-plan:last-child { border-bottom: 0; }
@media (max-width: 700px) { .staff-plan { grid-template-columns: 1fr; } }

/* ---------- Harita ---------- */
.map { height: 460px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface-sunken); position: relative; z-index: 0; }
.map-toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 10px; align-items: center; }
.map-note { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.leaflet-container { font-family: var(--font); }

/* ---------- Giriş ekranı ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; background: var(--c-antrasit); padding: 20px; }
.auth-card { width: 100%; max-width: 410px; background: var(--surface); color: var(--text); border-radius: 16px; padding: 30px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.auth-brand .brand-mark { width: 46px; height: 46px; font-size: 21px; border-radius: 11px; }
.auth-brand .name { font-weight: 800; letter-spacing: 3px; font-size: 20px; }
.auth-brand .tagline { color: var(--text-muted); font-size: 12px; }
.auth-card label { margin-top: 12px; }
.auth-admin .auth-page { background: #0E3B39; }
.auth-admin .auth-card { border-top: 4px solid var(--c-bakir); }

.qr { background: #fff; padding: 12px; border-radius: 8px; display: inline-block; border: 1px solid var(--border); }
.code { font-family: var(--mono); background: var(--surface-2); border: 1px dashed var(--border-strong); padding: 8px 10px; border-radius: 6px; word-break: break-all; }
.codes { columns: 2; font-family: var(--mono); }
.pagination { padding: 12px 14px; }
.pagination nav { font-size: 13px; }
.container { max-width: 1120px; margin: 0 auto; padding: 24px 20px 48px; }
.narrow { max-width: 460px; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 20px 0; }

/* Aşama 3B: bildirim zili, bildirim merkezi, bölge olayları */
.bell { position: relative; text-decoration: none; }
.bell[aria-current=page] { border-color: var(--c-bakir); }
.bell-count { position: absolute; top: -7px; right: -7px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 99px; background: var(--c-bakir); color: var(--c-antrasit); font-size: 11px; font-weight: 800; display: grid; place-items: center; line-height: 1; border: 2px solid var(--surface); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-size: 13px; text-decoration: none; min-height: 34px; }
.chip:hover { background: var(--surface-2); }
.chip[aria-current=true] { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip .count { font-weight: 700; }
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; }
.notice:last-child { border-bottom: 0; }
.notice.is-unread { background: var(--surface-2); border-left-color: var(--c-bakir); }
.notice .grow { flex: 1; min-width: 0; }
.notice-title { font-weight: 600; color: var(--text); text-decoration: none; }
.notice-title:hover { text-decoration: underline; }
.notice-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.notice-actions { display: flex; gap: 6px; flex: none; }
.kv { display: grid; grid-template-columns: minmax(140px, max-content) 1fr; gap: 9px 18px; margin: 0; }
.kv dt { color: var(--text-muted); font-size: 13px; }
.kv dd { margin: 0; }
.map-sm { height: 360px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.swatch-zone { background: var(--c-petrol); }
.swatch-point { background: var(--c-bakir); }
@media (max-width: 600px) {
  /* Özet kartları telefonda iki sütun: önemli sayılar kaydırmadan görünür */
  .grid:has(> .stat) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .grid > .stat { padding: 14px; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .notice { flex-wrap: wrap; }
  .notice-actions { width: 100%; }
}
.card-flush { padding: 0; overflow: hidden; }
.pagination.pad { padding: 12px 16px; }

/* Aşama 3C: canlı saha haritası */
.field-map { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 16px; }
.fm-panel { display: flex; flex-direction: column; max-height: calc(100vh - 220px); min-height: 520px; }
.fm-filters { padding: 14px 14px 4px; border-bottom: 1px solid var(--border); }
.fm-filters .chips { margin: 10px 0; }
.fm-filters .chip { font: inherit; font-size: 12px; min-height: 30px; padding: 4px 10px; cursor: pointer; }
.fm-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.fm-item { border-bottom: 1px solid var(--border); }
.fm-item-btn { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; padding: 11px 14px; background: none; border: 0; border-left: 3px solid transparent; color: var(--text); font: inherit; cursor: pointer; }
.fm-item-btn:hover { background: var(--surface-2); }
.fm-item.is-selected .fm-item-btn { background: var(--surface-2); border-left-color: var(--c-bakir); }
.fm-item-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fm-item-meta { display: flex; flex-wrap: wrap; gap: 4px; }
.fm-item-meta .badge { font-size: 11px; }
.fm-dot { flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; border: 2px solid transparent; }
.fm-dot-live { background: var(--c-petrol); }
.fm-dot-outside { background: var(--danger); }
.fm-dot-stale { background: transparent; border: 2px dashed var(--text-muted); }
.fm-dot-no_fix { background: transparent; border-color: var(--info); }
.fm-dot-off_shift { background: var(--border-strong); }
.fm-empty { padding: 14px; margin: 0; }
.fm-mapwrap { position: relative; min-width: 0; }
.fm-map { height: calc(100vh - 260px); min-height: 480px; }
.fm-detail { position: absolute; top: 12px; right: 12px; width: min(340px, calc(100% - 24px)); z-index: 500; padding: 16px; box-shadow: var(--shadow-lg, 0 10px 30px rgba(0,0,0,.18)); }
.fm-detail .card-header { margin-bottom: 8px; }
.fm-detail h2 { font-size: 16px; margin: 0; }
.fm-detail .kv { grid-template-columns: max-content 1fr; font-size: 13px; }
.fm-sw-live { background: var(--c-petrol); }
.fm-sw-outside { background: var(--danger); }
.fm-sw-stale { background: transparent; border: 2px dashed var(--text-muted); width: 8px; height: 8px; }
.fm-error { color: var(--danger); font-weight: 600; }
.fm-privacy { margin-top: 0; }
@media (max-width: 900px) {
  .field-map { grid-template-columns: 1fr; }
  .fm-mapwrap { order: -1; }
  .fm-map { height: 52vh; min-height: 300px; }
  .fm-panel { max-height: none; min-height: 0; }
  .fm-list { max-height: 60vh; }
  .fm-detail { position: static; width: auto; margin-top: 12px; }
}
