/* =============================================================================
   Santral Bilgi ve Yönetim Sistemi — arayüz stilleri
   Palet: koyu lacivert, açık gri, beyaz; vurgu: turkuaz.  Açık / koyu tema.
   ============================================================================= */

:root {
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;

  --navy-950: #07111f;
  --navy-900: #0b1d33;
  --navy-800: #112a47;
  --navy-700: #1a3a5f;
  --accent: #0e8fa3;
  --accent-strong: #0b7486;
  --accent-soft: #e0f4f6;
  --accent-contrast: #ffffff;

  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-2: #f6f8fb;
  --surface-3: #e9eef4;
  --border: #d8e0e9;
  --border-strong: #b9c6d4;
  --text: #0f1f33;
  --text-2: #43546a;
  --text-3: #6b7b8f;
  --focus: #1a8fff;

  --ok: #15803d;      --ok-bg: #e3f5e9;
  --info: #1d6fb8;    --info-bg: #e3eefa;
  --warn: #a16207;    --warn-bg: #fdf3d8;
  --danger: #b42318;  --danger-bg: #fde8e6;
  --muted: #5b6878;   --muted-bg: #edf0f3;
  --demo: #7c3aed;    --demo-bg: #efe7fd;

  --sidebar-bg: var(--navy-900);
  --sidebar-text: #c9d6e6;
  --sidebar-active: rgba(14, 143, 163, .22);

  --shadow-sm: 0 1px 2px rgba(15, 31, 51, .06), 0 1px 3px rgba(15, 31, 51, .08);
  --shadow: 0 4px 16px rgba(15, 31, 51, .10);
  --shadow-lg: 0 12px 40px rgba(15, 31, 51, .20);
  --radius: 10px;
  --radius-sm: 6px;
  --sidebar-w: 248px;
  --topbar-h: 58px;
  --panel-w: 440px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08111e; --surface: #0f1b2c; --surface-2: #132238; --surface-3: #1a2c45;
    --border: #22364f; --border-strong: #2f4866; --text: #e6edf6; --text-2: #aebcd0; --text-3: #8497b0;
    --accent: #22b8cc; --accent-strong: #4fd0e0; --accent-soft: #0f3340; --accent-contrast: #04131b;
    --ok: #4ade80; --ok-bg: #0f2e1d; --info: #6cb4ff; --info-bg: #10263f; --warn: #f5c451; --warn-bg: #33270b;
    --danger: #ff8a7a; --danger-bg: #3a1512; --muted: #a0adbd; --muted-bg: #1b2a3d; --demo: #c4a5ff; --demo-bg: #2a1d48;
    --sidebar-bg: #060e19; --sidebar-active: rgba(34, 184, 204, .18);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 4px 16px rgba(0,0,0,.45); --shadow-lg: 0 12px 40px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #08111e; --surface: #0f1b2c; --surface-2: #132238; --surface-3: #1a2c45;
  --border: #22364f; --border-strong: #2f4866; --text: #e6edf6; --text-2: #aebcd0; --text-3: #8497b0;
  --accent: #22b8cc; --accent-strong: #4fd0e0; --accent-soft: #0f3340; --accent-contrast: #04131b;
  --ok: #4ade80; --ok-bg: #0f2e1d; --info: #6cb4ff; --info-bg: #10263f; --warn: #f5c451; --warn-bg: #33270b;
  --danger: #ff8a7a; --danger-bg: #3a1512; --muted: #a0adbd; --muted-bg: #1b2a3d; --demo: #c4a5ff; --demo-bg: #2a1d48;
  --sidebar-bg: #060e19; --sidebar-active: rgba(34, 184, 204, .18);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4); --shadow: 0 4px 16px rgba(0,0,0,.45); --shadow-lg: 0 12px 40px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ----------------------------------------------------------------- temel */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14.5px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.2rem; } h3 { font-size: 1.02rem; } h4 { font-size: .93rem; }
p { margin: 0 0 .75em; }
a { color: var(--accent-strong); }
:root[data-theme="dark"] a { color: var(--accent); }
small, .small { font-size: .85em; }
.muted { color: var(--text-3); }
.mono { font-family: var(--mono); font-size: .92em; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pre { white-space: pre-line; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
img { max-width: 100%; }
.noscript { padding: 2rem; text-align: center; }

/* ----------------------------------------------------------------- düğmeler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45em; min-height: 36px; padding: .4rem .9rem;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  font-weight: 560; cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn--primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.btn--primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn--danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 45%, transparent); }
.btn--danger:hover { background: var(--danger-bg); }
.btn--ghost { background: transparent; border-color: transparent; }
.btn--ghost:hover { background: var(--surface-3); }
.btn--sm { min-height: 30px; padding: .2rem .6rem; font-size: .88em; }
.btn--icon { width: 36px; padding: 0; }
.btn--sm.btn--icon { width: 30px; }
.btn--block { width: 100%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--sm svg { width: 16px; height: 16px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-strong); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.btn-row--end { justify-content: flex-end; }

/* ----------------------------------------------------------------- form */
.field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: .9rem; min-width: 0; }
.field > label, .field__label { font-weight: 600; font-size: .9em; color: var(--text-2); }
.field__req { color: var(--danger); margin-left: 2px; }
.field__help { font-size: .82em; color: var(--text-3); margin: 0; }
.field__error { font-size: .84em; color: var(--danger); margin: 0; font-weight: 550; }
.field--invalid input, .field--invalid select, .field--invalid textarea, .field--invalid .picker, .field--invalid .choice-list { border-color: var(--danger) !important; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=datetime-local],
input[type=time], input[type=url], input[type=search], input[type=tel], select, textarea {
  width: 100%; min-height: 38px; padding: .45rem .65rem; border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
input[type=color] { width: 48px; height: 36px; padding: 2px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.input-group { display: flex; gap: .4rem; align-items: stretch; }
.input-group > input { flex: 1; }
.input-unit { display: flex; align-items: stretch; }
.input-unit input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-unit span { display: flex; align-items: center; padding: 0 .6rem; border: 1px solid var(--border-strong); border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; background: var(--surface-2); color: var(--text-2); font-size: .9em; white-space: nowrap; }
.check { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; font-weight: 500; color: var(--text); }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.choice-list { display: flex; flex-wrap: wrap; gap: .35rem .9rem; padding: .45rem .6rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 1rem; }
.form-grid .field--wide { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: .9rem 1rem .2rem; margin: 0 0 1rem; min-width: 0; }
legend { padding: 0 .4rem; font-weight: 650; color: var(--text-2); }
.form-actions { display: flex; gap: .5rem; justify-content: flex-end; padding-top: .5rem; border-top: 1px solid var(--border); margin-top: .5rem; flex-wrap: wrap; }

/* ----------------------------------------------------------------- rozetler */
.badge {
  display: inline-flex; align-items: center; gap: .3em; padding: .1em .55em; border-radius: 999px; font-size: .78rem; font-weight: 600;
  background: var(--muted-bg); color: var(--muted); white-space: nowrap; line-height: 1.6; border: 1px solid transparent;
}
.badge svg { width: 13px; height: 13px; }
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--demo { background: var(--demo-bg); color: var(--demo); border-color: color-mix(in srgb, var(--demo) 30%, transparent); }
.badge--accent { background: var(--accent-soft); color: var(--accent-strong); }
.badge--outline { background: transparent; border-color: var(--border-strong); color: var(--text-2); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.type-chip { display: inline-flex; align-items: center; gap: .35rem; font-weight: 550; }
.type-chip__icon { width: 26px; height: 26px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; color: #fff; flex: none; }
.type-chip__icon svg { width: 16px; height: 16px; }

/* ----------------------------------------------------------------- kartlar, tablolar */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .85rem 1rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.card__head h2, .card__head h3 { margin: 0; }
.card__body { padding: 1rem; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: .6rem .75rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-3); background: var(--surface-2); font-weight: 650; position: sticky; top: 0; z-index: 1; }
.table th button { all: unset; cursor: pointer; display: inline-flex; gap: .25rem; align-items: center; }
.table th button:focus-visible { outline: 2px solid var(--focus); }
.table tbody tr:hover { background: var(--surface-2); }
.table tr.is-clickable { cursor: pointer; }
.table tr.is-archived td { color: var(--text-3); }
.table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: minmax(120px, 38%) 1fr; gap: .45rem 1rem; margin: 0; }
.kv dt { color: var(--text-3); font-size: .88em; font-weight: 550; }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.list-plain { list-style: none; margin: 0; padding: 0; }

/* ----------------------------------------------------------------- durum ekranları */
.state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .5rem; padding: 2.5rem 1.25rem; color: var(--text-2); }
.state svg { width: 40px; height: 40px; color: var(--text-3); }
.state h3 { margin: .25rem 0 0; color: var(--text); }
.state p { max-width: 44ch; margin: 0; }
.state--error svg { color: var(--danger); }
.state--forbidden svg { color: var(--warn); }
.spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.skeleton { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; border-radius: 6px; height: 14px; margin: .5rem 0; }
@keyframes sk { to { background-position: -200% 0; } }
.notice { display: flex; gap: .6rem; align-items: flex-start; padding: .65rem .8rem; border-radius: var(--radius-sm); background: var(--info-bg); color: var(--text); border: 1px solid color-mix(in srgb, var(--info) 25%, transparent); font-size: .9rem; }
.notice svg { width: 18px; height: 18px; flex: none; color: var(--info); margin-top: 2px; }
.notice--warn { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.notice--warn svg { color: var(--warn); }
.notice--danger { background: var(--danger-bg); border-color: color-mix(in srgb, var(--danger) 30%, transparent); }
.notice--danger svg { color: var(--danger); }
.notice--demo { background: var(--demo-bg); border-color: color-mix(in srgb, var(--demo) 30%, transparent); }
.notice--demo svg { color: var(--demo); }
.alert { padding: .6rem .8rem; border-radius: var(--radius-sm); margin-bottom: .9rem; font-size: .92rem; }
.alert--error { background: var(--danger-bg); color: var(--danger); font-weight: 550; }
.boot { height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .75rem; color: var(--text-3); }

/* ----------------------------------------------------------------- uygulama iskeleti */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); grid-template-rows: var(--topbar-h) minmax(0, 1fr); height: 100dvh; }
.app.is-collapsed { --sidebar-w: 68px; }
.sidebar { grid-row: 1 / -1; background: var(--sidebar-bg); color: var(--sidebar-text); display: flex; flex-direction: column; min-height: 0; z-index: 30; }
.sidebar__brand { display: flex; align-items: center; gap: .65rem; height: var(--topbar-h); padding: 0 1rem; color: #fff; font-weight: 700; letter-spacing: .01em; border-bottom: 1px solid rgba(255,255,255,.06); white-space: nowrap; overflow: hidden; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #0e8fa3, #20c5d6); color: #04131b; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.brand-mark svg { width: 20px; height: 20px; }
.sidebar nav { flex: 1; overflow-y: auto; padding: .6rem .5rem; }
.nav-group { margin-bottom: .6rem; }
.nav-group__title { font-size: .7rem; text-transform: uppercase; letter-spacing: .09em; color: #7f93ad; padding: .6rem .7rem .3rem; white-space: nowrap; overflow: hidden; }
.nav-link { display: flex; align-items: center; gap: .75rem; padding: .55rem .7rem; border-radius: 8px; color: var(--sidebar-text); text-decoration: none; white-space: nowrap; overflow: hidden; font-weight: 520; }
.nav-link svg { width: 20px; height: 20px; flex: none; opacity: .9; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link[aria-current="page"] { background: var(--sidebar-active); color: #fff; box-shadow: inset 3px 0 0 #20c5d6; }
.nav-link:focus-visible { outline-color: #20c5d6; }
.sidebar__foot { padding: .5rem; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar__foot .nav-link { width: 100%; background: none; border: 0; cursor: pointer; font: inherit; }
.app.is-collapsed .nav-group__title, .app.is-collapsed .nav-link span, .app.is-collapsed .sidebar__brand span:not(.brand-mark) { display: none; }
.app.is-collapsed .nav-link { justify-content: center; padding: .6rem 0; }

.topbar { grid-column: 2; display: flex; align-items: center; gap: .75rem; padding: 0 1rem; background: var(--surface); border-bottom: 1px solid var(--border); min-width: 0; z-index: 25; }
.topbar__menu { display: none; }
.topbar__facility { max-width: 240px; }
.topbar__facility select { min-height: 36px; font-weight: 550; }
.topbar__spacer { flex: 1; }
.search { position: relative; flex: 1; max-width: 520px; min-width: 0; }
.search input { padding-left: 2.3rem; background: var(--surface-2); }
.search > svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-3); pointer-events: none; }
.search__results { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: min(70vh, 560px); overflow-y: auto; z-index: 60; padding: .35rem 0; }
.search__group { padding: .4rem .9rem .2rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 650; }
.search__item { display: flex; gap: .65rem; align-items: center; width: 100%; padding: .5rem .9rem; border: 0; background: none; text-align: left; cursor: pointer; }
.search__item:hover, .search__item[aria-selected="true"] { background: var(--surface-2); }
.search__item .t { font-weight: 600; }
.search__item .s { font-size: .82rem; color: var(--text-3); }
.search__item .grow { flex: 1; min-width: 0; }
.search__item .grow > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search__sub { padding-left: 2.7rem; }
.user-menu { position: relative; }
.user-btn { display: flex; align-items: center; gap: .5rem; padding: .25rem .5rem .25rem .25rem; border: 1px solid transparent; border-radius: 999px; background: none; cursor: pointer; }
.user-btn:hover { background: var(--surface-2); border-color: var(--border); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--navy-700); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 650; font-size: .85rem; flex: none; }
.user-btn .who { display: flex; flex-direction: column; text-align: left; line-height: 1.2; }
.user-btn .who small { color: var(--text-3); }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .35rem; z-index: 70; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: .55rem; padding: .5rem .65rem; border: 0; background: none; border-radius: 6px; cursor: pointer; text-align: left; color: var(--text); text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
.menu svg { width: 18px; height: 18px; color: var(--text-3); }
.menu hr { margin: .3rem 0; }

.main { grid-column: 2; min-height: 0; min-width: 0; overflow: auto; position: relative; }
.page { padding: 1.25rem; max-width: 1400px; margin: 0 auto; }
.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.page__head h1 { margin: 0; }
.page__head p { margin: .2rem 0 0; color: var(--text-3); }
.toolbar { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .9rem; }
.toolbar > input[type=search], .toolbar > .search-inline { flex: 1 1 220px; max-width: 360px; }
.toolbar select { width: auto; min-width: 150px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .75rem 1rem; flex-wrap: wrap; color: var(--text-3); font-size: .9rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.stack > * + * { margin-top: 1rem; }
.scrim { position: fixed; inset: 0; background: rgba(4, 12, 24, .5); z-index: 25; }

/* ----------------------------------------------------------------- harita ekranı */
.mapscreen { position: absolute; inset: 0; display: flex; overflow: hidden; }
.mapscreen__body { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.map-viewport { position: relative; flex: 1; overflow: hidden; background: #dfe5ea; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; outline: none; }
:root[data-theme="dark"] .map-viewport { background: #0a1422; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .map-viewport { background: #0a1422; } }
.map-viewport.is-dragging { cursor: grabbing; }
.map-viewport:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.map-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; will-change: transform; }
.map-stage > img { display: block; position: absolute; left: 0; top: 0; pointer-events: none; -webkit-user-drag: none; }
.map-stage > svg { position: absolute; left: 0; top: 0; overflow: visible; }
.map-stage.is-animating { transition: transform .45s cubic-bezier(.2, .7, .2, 1); }
.map-loader { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: center; gap: .6rem; padding: .6rem .9rem; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); color: var(--text-2); font-size: .9rem; z-index: 5; pointer-events: none; }
.map-loader .spinner { width: 20px; height: 20px; border-width: 2.5px; }
.map-img-pending { opacity: .55; }

.feat-poly { fill: var(--c); fill-opacity: .10; stroke: var(--c); stroke-width: 2; stroke-opacity: .85; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill-opacity .12s; }
.feat-poly:hover, .feat-poly.is-hover { fill-opacity: .26; stroke-width: 2.5; }
.feat-poly.is-selected { fill-opacity: .30; stroke-width: 3.5; stroke: #fff; filter: drop-shadow(0 0 5px var(--c)) drop-shadow(0 0 2px rgba(0,0,0,.6)); }
.feat-poly.is-dim { fill-opacity: .04; stroke-opacity: .35; }
.feat-poly:focus { outline: none; }
.feat-poly:focus-visible { stroke: var(--focus); stroke-width: 4; }
.map-hide-areas .feat-poly:not(.is-selected):not(.is-hover) { fill-opacity: 0; stroke-opacity: .0; }
.feat-marker { cursor: pointer; }
/* SVG filtre (drop-shadow) kullanılmaz: çok sayıda işarette yakınlaştırma sırasında boyamayı yavaşlatır. */
.feat-marker .m-bg { fill: var(--c); stroke: #fff; stroke-width: 2.25; paint-order: stroke; }
.feat-marker .m-shadow { fill: rgba(0, 0, 0, .28); }
.feat-marker .m-ring { fill: none; stroke: var(--c); stroke-width: 3; opacity: 0; }
.feat-marker .m-icon { color: #fff; pointer-events: none; }
.feat-marker:hover .m-bg, .feat-marker.is-hover .m-bg { stroke-width: 3; }
.feat-marker.is-selected .m-ring { opacity: 1; }
.feat-marker.is-selected .m-bg { stroke: #fff; stroke-width: 3; }
.feat-marker.is-highlight .m-ring { opacity: 1; animation: pulse 1.4s ease-out infinite; }
.feat-poly.is-highlight { fill-opacity: .32; stroke-width: 3; animation: pulsepoly 1.4s ease-in-out infinite; }
.feat-marker.is-dim { opacity: .35; }
.feat-marker:focus { outline: none; }
.feat-marker:focus-visible .m-bg { stroke: var(--focus); stroke-width: 4; }
.feat-marker .m-status { stroke: #fff; stroke-width: 1.5; }
@keyframes pulse { 0% { transform: scale(1); opacity: .95; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes pulsepoly { 50% { fill-opacity: .12; } }
.feat-label { font: 600 12px var(--font); fill: #0f1f33; paint-order: stroke; stroke: rgba(255,255,255,.9); stroke-width: 3px; pointer-events: none; }

.map-tooltip { position: absolute; z-index: 20; pointer-events: none; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); padding: .5rem .65rem; max-width: 280px; font-size: .86rem; transform: translate(12px, 12px); }
.map-tooltip strong { display: block; }
.map-tooltip .s { color: var(--text-3); font-size: .8rem; }
.map-tooltip .i { margin-top: .25rem; color: var(--text-2); }

.map-ctrl { position: absolute; right: .9rem; bottom: .9rem; display: flex; flex-direction: column; gap: .35rem; z-index: 10; }
.map-ctrl .btn { background: var(--surface); box-shadow: var(--shadow-sm); }
.map-float { position: absolute; left: .9rem; top: .9rem; right: .9rem; display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-start; pointer-events: none; z-index: 12; }
.map-float > * { pointer-events: auto; }
.map-float .btn { background: var(--surface); box-shadow: var(--shadow-sm); }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); overflow: hidden; }
.seg button { border: 0; background: none; padding: .4rem .75rem; min-height: 34px; cursor: pointer; display: inline-flex; gap: .35rem; align-items: center; font-weight: 550; color: var(--text-2); }
.seg button svg { width: 17px; height: 17px; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-contrast); }
.popover { position: absolute; top: calc(100% + 6px); left: 0; width: 300px; max-width: calc(100vw - 2rem); max-height: 65vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: .75rem; z-index: 40; }
.popover h4 { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin: .5rem 0 .4rem; }
.popover h4:first-child { margin-top: 0; }
.popover .check { display: flex; padding: .25rem 0; }
.popover .check .cnt { margin-left: auto; color: var(--text-3); font-size: .82rem; }
.rel { position: relative; }
.map-info { position: absolute; left: .9rem; bottom: .9rem; z-index: 10; display: flex; gap: .4rem; flex-wrap: wrap; max-width: calc(100% - 5rem); }
.map-info .badge { box-shadow: var(--shadow-sm); background: var(--surface); color: var(--text-2); }
.feat-marker .m-detail circle { fill: var(--brand-navy, #0b1d33); stroke: #fff; stroke-width: 1.5; }
.feat-poly.has-detail { stroke-dasharray: 9 5; }
/* Ayrıntı haritası: üst harita izi ve geçiş perdesi */
.map-crumbs { display: inline-flex; align-items: center; gap: .15rem; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: .15rem .3rem .15rem .15rem; max-width: 100%; }
.map-crumbs button { border: 0; background: none; cursor: pointer; padding: .25rem .5rem; min-height: 32px; border-radius: 6px; color: var(--text-2); font-weight: 550; display: inline-flex; align-items: center; gap: .3rem; }
.map-crumbs button:hover { background: var(--surface-2, rgba(127,127,127,.12)); color: var(--text); }
.map-crumbs button[aria-current="page"] { color: var(--text); font-weight: 700; cursor: default; }
.map-crumbs button svg { width: 16px; height: 16px; }
.map-crumbs .sep { color: var(--text-3); display: inline-flex; }
.map-crumbs .sep svg { width: 14px; height: 14px; }
.map-crumbs .back { color: var(--accent); }
.map-fade { position: absolute; inset: 0; z-index: 11; background: var(--bg); opacity: 0; pointer-events: none; transition: opacity .24s ease; }
.map-fade.is-on { opacity: 1; pointer-events: auto; }
.panel__detail { margin-top: .6rem; }
.panel__detail .btn { width: 100%; justify-content: center; }
.panel__detail .hint { margin: .3rem 0 0; font-size: .8rem; color: var(--text-3); }
@media (prefers-reduced-motion: reduce) { .map-fade { transition: none; } }
.map-list { flex: 1; overflow: auto; padding: 4.3rem .9rem .9rem; background: var(--bg); }
.map-list .table td:first-child { width: 42px; }

/* ----------------------------------------------------------------- detay paneli */
.panel { width: var(--panel-w); max-width: 100%; flex: none; background: var(--surface); border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; box-shadow: var(--shadow); z-index: 15; }
.panel__head { padding: .9rem 1rem .6rem; border-bottom: 1px solid var(--border); }
.panel__top { display: flex; align-items: flex-start; gap: .6rem; }
.panel__title { flex: 1; min-width: 0; }
.panel__title h2 { margin: .15rem 0 .1rem; font-size: 1.15rem; overflow-wrap: anywhere; }
.panel__meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.panel__crumbs { font-size: .8rem; color: var(--text-3); }
.panel__crumbs button { all: unset; cursor: pointer; color: var(--accent-strong); }
.panel__crumbs button:focus-visible { outline: 2px solid var(--focus); }
.panel__actions { display: flex; gap: .3rem; }
.panel__body { flex: 1; overflow-y: auto; padding: 1rem; overscroll-behavior: contain; }
.panel__handle { display: none; }
.tabs { display: flex; gap: .15rem; overflow-x: auto; padding: 0 .6rem; border-bottom: 1px solid var(--border); scrollbar-width: thin; }
.tabs button { border: 0; background: none; padding: .6rem .6rem; font-weight: 580; color: var(--text-3); border-bottom: 2.5px solid transparent; cursor: pointer; white-space: nowrap; font-size: .88rem; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--accent-strong); border-bottom-color: var(--accent); }
:root[data-theme="dark"] .tabs button[aria-selected="true"] { color: var(--accent); }
.section-title { font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin: 1.1rem 0 .5rem; font-weight: 650; display: flex; align-items: center; gap: .5rem; }
.section-title:first-child { margin-top: 0; }
.section-title .grow { flex: 1; }
.count-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .5rem; }
.count-tile { display: flex; align-items: center; gap: .55rem; padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); text-align: left; cursor: pointer; }
.count-tile:hover { border-color: var(--accent); }
.count-tile b { font-size: 1.1rem; display: block; line-height: 1.1; }
.count-tile small { color: var(--text-3); font-size: .78rem; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .5rem; }
.photos button { padding: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; aspect-ratio: 4 / 3; }
.photos img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.item { display: flex; gap: .65rem; align-items: flex-start; padding: .65rem .7rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.item--click { cursor: pointer; }
.item--click:hover { border-color: var(--accent); background: var(--surface-2); }
.item__main { flex: 1; min-width: 0; }
.item__title { font-weight: 620; overflow-wrap: anywhere; }
.item__sub { font-size: .84rem; color: var(--text-3); }
.item__side { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.steps { counter-reset: s; list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; padding: 0 0 .9rem 2.4rem; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .85rem; }
.steps li::after { content: ""; position: absolute; left: .83rem; top: 1.9rem; bottom: .2rem; width: 2px; background: var(--border); }
.steps li:last-child::after { display: none; }
.steps b { display: block; }
.flow { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; font-size: .86rem; }
.flow .arrow { color: var(--text-3); }
.status-line { font-size: .8rem; color: var(--text-3); }
.value-empty { color: var(--text-3); font-style: italic; }
.group-table { font-size: .86rem; }
.file-link { display: inline-flex; align-items: center; gap: .4rem; }
.file-link svg { width: 16px; height: 16px; }

/* ----------------------------------------------------------------- modal, toast */
.modal-backdrop { position: fixed; inset: 0; background: rgba(4, 12, 24, .55); z-index: 90; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 1rem; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg); width: 100%; max-width: 640px; display: flex; flex-direction: column; max-height: 92vh; }
.modal--lg { max-width: 920px; }
.modal--xl { max-width: 1180px; }
.modal__head { display: flex; align-items: center; gap: .75rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--border); }
.modal__head h2 { margin: 0; flex: 1; font-size: 1.12rem; }
.modal__body { padding: 1.1rem; overflow-y: auto; }
.modal__foot { padding: .8rem 1.1rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }
.lightbox { background: rgba(0,0,0,.88); align-items: center; }
.lightbox img { max-height: 86vh; border-radius: 8px; }
.lightbox figcaption { color: #dde5ee; text-align: center; margin-top: .5rem; }
.toasts { position: fixed; right: 1rem; bottom: 1rem; display: flex; flex-direction: column; gap: .5rem; z-index: 120; max-width: min(420px, calc(100vw - 2rem)); }
.toast { display: flex; gap: .6rem; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--ok); padding: .7rem .8rem; border-radius: 8px; box-shadow: var(--shadow-lg); animation: toastin .2s ease-out; }
.toast--error { border-left-color: var(--danger); }
.toast--info { border-left-color: var(--info); }
.toast svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
@keyframes toastin { from { transform: translateY(8px); opacity: 0; } }

/* ----------------------------------------------------------------- seçici (picker) */
.picker { position: relative; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); padding: .25rem; display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; min-height: 38px; }
.picker input { border: 0 !important; box-shadow: none !important; min-height: 30px; flex: 1; min-width: 120px; padding: .2rem .4rem; background: transparent; }
.picker .chip { display: inline-flex; align-items: center; gap: .3rem; background: var(--accent-soft); color: var(--text); padding: .15rem .25rem .15rem .55rem; border-radius: 999px; font-size: .86rem; max-width: 100%; }
.picker .chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picker .chip button { border: 0; background: none; cursor: pointer; display: inline-flex; padding: 2px; border-radius: 50%; color: var(--text-2); }
.picker .chip button:hover { background: rgba(0,0,0,.08); }
.picker .chip svg { width: 14px; height: 14px; }
.picker__list { position: absolute; left: -1px; right: -1px; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 260px; overflow-y: auto; z-index: 100; }
.picker__list button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .45rem .65rem; cursor: pointer; }
.picker__list button:hover, .picker__list button[aria-selected="true"] { background: var(--surface-2); }
.picker__list small { display: block; color: var(--text-3); }
.picker__empty { padding: .6rem .7rem; color: var(--text-3); font-size: .88rem; }

/* ----------------------------------------------------------------- dosya alanı, tekrarlı grup */
.uploads { display: flex; flex-direction: column; gap: .4rem; }
.upload-row { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); font-size: .9rem; }
.upload-row img { width: 40px; height: 32px; object-fit: cover; border-radius: 4px; }
.upload-row .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repeater { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow-x: auto; }
.repeater table { width: 100%; border-collapse: collapse; }
.repeater th, .repeater td { padding: .35rem .4rem; border-bottom: 1px solid var(--border); vertical-align: top; min-width: 110px; }
.repeater th { font-size: .78rem; color: var(--text-3); text-align: left; background: var(--surface-2); }
.repeater td:last-child, .repeater th:last-child { min-width: 40px; width: 40px; }
.repeater input, .repeater select { min-height: 32px; padding: .25rem .45rem; }
.repeater .field__error { font-size: .78rem; }
.steps-editor .step-row { display: grid; grid-template-columns: 28px 1fr auto; gap: .5rem; align-items: start; margin-bottom: .5rem; }
.steps-editor .num { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .85rem; margin-top: 4px; }
.steps-editor textarea { min-height: 54px; margin-top: .3rem; }

/* ----------------------------------------------------------------- özet */
.stat { padding: 1rem; display: flex; gap: .85rem; align-items: center; }
.stat__icon { width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent-strong); flex: none; }
.stat__icon svg { width: 22px; height: 22px; }
.stat b { font-size: 1.5rem; display: block; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat small { color: var(--text-3); }
.bar-list { display: flex; flex-direction: column; gap: .55rem; }
.bar-row { display: grid; grid-template-columns: minmax(110px, 180px) 1fr 44px; gap: .6rem; align-items: center; font-size: .9rem; }
.bar-row .bar { height: 10px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.bar-row .bar i { display: block; height: 100%; border-radius: 999px; }
.bar-row .n { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ----------------------------------------------------------------- harita editörü */
.editor { position: absolute; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto minmax(0, 1fr); }
.editor__bar { grid-column: 1 / -1; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .6rem .9rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.editor__bar h1 { font-size: 1.05rem; margin: 0 .5rem 0 0; }
.editor__map { position: relative; display: flex; min-height: 0; }
.editor__side { border-left: 1px solid var(--border); background: var(--surface); overflow-y: auto; padding: 1rem; min-height: 0; }
.editor .map-viewport { cursor: default; }
.editor.tool-marker .map-viewport, .editor.tool-polygon .map-viewport { cursor: crosshair; }
.handle { fill: #fff; stroke: var(--accent); stroke-width: 2; cursor: move; vector-effect: non-scaling-stroke; }
.handle.is-mid { fill: var(--accent); stroke: #fff; opacity: .75; cursor: copy; }
.handle.is-active { fill: var(--accent); }
.draft-line { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.draft-poly { fill: var(--accent); fill-opacity: .15; stroke: var(--accent); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.feat-list button { display: flex; width: 100%; gap: .5rem; align-items: center; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); padding: .4rem .5rem; margin-bottom: .3rem; cursor: pointer; text-align: left; }
.feat-list button[aria-current="true"] { border-color: var(--accent); background: var(--accent-soft); }
.feat-list .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbd { font-family: var(--mono); font-size: .78rem; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 .3rem; background: var(--surface-2); }

/* ----------------------------------------------------------------- alan oluşturucu */
.builder { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1rem; align-items: start; }
.cond-row > select, .cond-row > input { width: auto; flex: 1 1 150px; }
.cond-row > .choice-list { flex: 1 1 100%; }
.builder__tabs { position: sticky; top: 0; }
.dnd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; min-height: 44px; border-radius: 8px; }
.dnd-list.is-over { outline: 2px dashed var(--accent); outline-offset: 4px; }
.dnd-item { display: flex; align-items: center; gap: .55rem; padding: .55rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); }
.dnd-item.is-dragging { opacity: .45; }
.dnd-item.is-archived { opacity: .6; background: var(--surface-2); }
.dnd-item .grip { cursor: grab; color: var(--text-3); display: flex; padding: 2px; border: 0; background: none; }
.dnd-item .grip svg { width: 18px; height: 18px; }
.dnd-item .grow { flex: 1; min-width: 0; }
.dnd-item .t { font-weight: 600; }
.dnd-item .s { font-size: .82rem; color: var(--text-3); }
.dnd-children { margin: .3rem 0 0 1.8rem; }
.tab-card { margin-bottom: 1rem; }
.tab-card .card__head { background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; }
.impact { border-radius: 8px; padding: .75rem; background: var(--surface-2); border: 1px solid var(--border); }
.impact ul { margin: .3rem 0 0; padding-left: 1.2rem; }

/* ----------------------------------------------------------------- giriş ekranı */
.login-body { background: var(--bg); }
.login-shell { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 480px); }
.login-hero { background: radial-gradient(1200px 600px at 10% 10%, #13426a 0%, transparent 60%), linear-gradient(160deg, #0b1d33, #07111f); color: #dbe7f5; padding: 3rem clamp(1.5rem, 5vw, 4rem); display: flex; flex-direction: column; justify-content: center; gap: 1rem; }
.login-hero__brand { display: flex; align-items: center; gap: .7rem; font-weight: 700; color: #fff; font-size: 1.05rem; margin-bottom: 1.5rem; }
.login-hero h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); color: #fff; max-width: 18ch; }
.login-hero p { max-width: 50ch; color: #b8c9dd; font-size: 1.02rem; }
.login-hero ul { margin: .5rem 0 0; padding-left: 1.1rem; color: #b8c9dd; }
.login-hero li { margin: .3rem 0; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: 2.5rem clamp(1.25rem, 4vw, 3rem); background: var(--surface); }
.login-card h1 { font-size: 1.6rem; }
.login-foot { margin-top: 1.5rem; text-align: center; }

/* ----------------------------------------------------------------- duyarlı düzen */
@media (max-width: 1100px) {
  :root { --panel-w: 400px; }
  .editor { grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 900px) {
  .app, .app.is-collapsed { grid-template-columns: minmax(0, 1fr); --sidebar-w: 270px; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; }
  .app.is-nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .app.is-collapsed .nav-group__title, .app.is-collapsed .nav-link span, .app.is-collapsed .sidebar__brand span:not(.brand-mark) { display: revert; }
  .app.is-collapsed .nav-link { justify-content: flex-start; padding: .55rem .7rem; }
  .topbar, .main { grid-column: 1; }
  .topbar { padding: 0 .6rem; gap: .5rem; }
  .topbar__menu { display: inline-flex; }
  .topbar__facility { display: none; }
  .user-btn .who { display: none; }
  .collapse-btn { display: none !important; }
  .panel { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: min(58dvh, 100%); border-left: 0; border-top: 1px solid var(--border); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.25); z-index: 30; transition: height .2s; }
  .panel.is-expanded { height: 100%; border-radius: 0; }
  .panel__handle { display: block; width: 44px; height: 5px; border-radius: 99px; background: var(--border-strong); margin: .45rem auto 0; border: 0; padding: 0; cursor: pointer; }
  .panel__head { padding-top: .4rem; }
  .map-ctrl { bottom: .9rem; }
  .mapscreen.has-panel .map-ctrl, .mapscreen.has-panel .map-info { display: none; }
  .editor { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) minmax(0, 42%); }
  .editor__side { border-left: 0; border-top: 1px solid var(--border); }
  .builder { grid-template-columns: minmax(0, 1fr); }
  .builder__tabs { position: static; }
  .login-shell { grid-template-columns: minmax(0, 1fr); }
  .login-hero { display: none; }
  .page { padding: 1rem; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .kv dd { margin-bottom: .45rem; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  .search { max-width: none; }
  .map-float .seg button span { display: none; }
  .modal-backdrop { padding: 0; }
  .modal { max-height: 100dvh; min-height: 100dvh; border-radius: 0; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .bar-row { grid-template-columns: minmax(90px, 120px) 1fr 36px; }
  .table th, .table td { padding: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
@media print {
  .sidebar, .topbar, .map-ctrl, .map-float { display: none !important; }
}
