*, *::before, *::after { box-sizing: border-box; }
:root {
  color-scheme: light;
  --text: #172d32; --muted: #526a6c; --faint: #678083; --line: #e2ebea; --paper: #fff;
  --surface: #f5f9f8; --primary: #08786a; --strong: #056356; --accent: #dff3ed;
  --shadow: 0 4px 18px #1f47401b; --radius: 13px;
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
}
html, body, #root { height: 100%; margin: 0; }
body { color: var(--text); background: var(--surface); }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { opacity: .58; cursor: progress; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #29a89a; outline-offset: 2px;
}
[hidden] { display: none !important; }
h1, h2, p { margin: 0; }
.icon { display: inline-block; height: 18px; width: 18px; vertical-align: middle; flex: none; opacity: .8; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 770; font-size: 25px; letter-spacing: -.065em; line-height: 1; }
.brand-mark { width: 39px; height: 39px; display: grid; place-items: center; background: var(--primary); border-radius: 13px; box-shadow: 0 3px 8px #08786a29; }
.brand-mark .icon { opacity: 1; width: 21px; height: 21px; filter: invert(1); }
.button, .icon-button, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: none; border-radius: 10px; font-weight: 650; }
.button { min-height: 43px; padding: 0 14px; font-size: .91rem; white-space: nowrap; }
.primary { color: white; background: var(--primary); }
.primary .icon { filter: invert(1); opacity: 1; }
.primary:hover { background: var(--strong); }
.secondary { color: #24504b; background: #f3f8f6; box-shadow: inset 0 0 0 1px #dfeae6; }
.secondary:hover { background: #e8f2ee; }
.danger { color: #9c2c36; background: #fff1f1; }
.danger:hover { background: #ffe6e6; }
.icon-button { width: 39px; height: 39px; flex: none; }
.icon-button:hover { background: #eaf3ef; }
.text-button { color: var(--strong); padding: 7px; }
.text-button:hover { text-decoration: underline; }
.boot { display: grid; min-height: 100%; place-items: center; padding: 20px; }
.feedback { padding: 12px 14px; border-radius: 10px; font-size: .9rem; background: #fff0ef; color: #8b2b36; }
.feedback.success { background: #e4f4ed; color: #246345; }
.toast { position: fixed; z-index: 80; bottom: 27px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px);
  box-shadow: var(--shadow); background: #1b3a3c; color: white; border-radius: 12px; padding: 13px 17px; font-size: .94rem; }

.app-shell { display: grid; grid-template-rows: 69px minmax(0,1fr); height: 100%; height: 100dvh; overflow: hidden; }
.topbar { position: relative; z-index: 4; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 29px;
  gap: 15px; background: #fff; border-bottom: 1px solid var(--line); }
.desktop-nav { display: flex; gap: 4px; align-items: center; background: #f4f8f7; border: 1px solid #edf2f1; padding: 4px; border-radius: 13px; }
.nav-button { display: flex; align-items: center; gap: 8px; border: 0; border-radius: 9px; background: transparent; padding: 0 14px; min-height: 36px;
  font-size: .88rem; font-weight: 660; color: var(--muted); }
.nav-button .icon { width: 17px; height: 17px; }
.nav-button:hover, .nav-button.active { color: var(--strong); }
.nav-button.active { background: #fff; box-shadow: 0 1px 5px #192f2c14; }
#request-count { background: var(--primary); color: #fff; border-radius: 99px; min-width: 18px; padding: 1px 4px; font: 700 .72rem/1.3 system-ui; }
.account { justify-self: end; min-width: 0; display: flex; align-items: center; gap: 9px; }
.avatar { display: grid; place-items: center; flex: none; width: 37px; height: 37px; border-radius: 12px; background: #dff0ea; color: var(--strong); font-size: .88rem; font-weight: 750; }
.account-name { max-width: 155px; display: grid; gap: 2px; white-space: nowrap; overflow: hidden; }
.account-name strong { overflow: hidden; text-overflow: ellipsis; font-size: .88rem; }
.account-name span { color: var(--muted); font-size: .76rem; }
.logout { margin-left: 6px; }
.phone-nav { display: none; }
.workspace { position: relative; min-height: 0; display: grid; grid-template-columns: 393px 1fr; background: #edf0ec; overflow: hidden; }
.catalog { position: relative; z-index: 2; grid-area: 1/1; align-self: stretch; min-height: 0; display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto; border-right: 1px solid var(--line); background: var(--paper); }
.catalog-head { padding: 27px 23px 16px; }
.catalog-head h1 { font-size: clamp(1.56rem,2.3vw,1.92rem); line-height: 1.14; font-weight: 760; letter-spacing: -.055em; }
.search { min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 47px; border: 1px solid #dce9e6;
  background: #f5f9f8; padding: 0 11px 0 13px; border-radius: 11px; }
.search:focus-within { border-color: #33a895; box-shadow: 0 0 0 3px #168b751a; background: white; }
.search input { min-width: 0; width: 100%; border: 0; background: transparent; color: var(--text); padding: 7px 0; outline: none; }
.search input:focus-visible { outline: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: #647a7b; opacity: 1; }
.search .mini { width: 29px; height: 29px; }
.search .mini .icon { width: 15px; height: 15px; }
.filters { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.filter { min-height: 35px; border: 1px solid #e2ebe9; border-radius: 8px; padding: 0 11px; font-size: .86rem; font-weight: 650; color: #476366; background: #fff; }
.filter:hover { background: #f3f9f7; }
.filter[aria-pressed="true"] { color: var(--strong); background: var(--accent); border-color: #c4e7dd; }
.list-toolbar { display: flex; align-items: center; justify-content: space-between; min-height: 41px; padding: 0 23px;
  border-top: 1px solid var(--line); background: #fbfdfc; color: #4d6566; font-size: .83rem; font-weight: 650; }
.sort { display: flex; align-items: center; gap: 6px; }
.sort .icon { width: 13px; height: 13px; }
.sort select { appearance: none; border: 0; padding: 4px 0; background: transparent; color: var(--muted); cursor: pointer; font-size: .83rem; font-weight: 650; }
.object-list { list-style: none; min-height: 0; padding: 0 12px 10px; margin: 0; overflow: auto; scrollbar-width: thin; scrollbar-color: #cbded8 transparent; }
.object-row { min-width: 0; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #edf1f0; padding: 2px 4px 2px 0; }
.object-row:nth-child(1) { margin-top: 3px; }
.object-row:hover, .object-current { background: #f1f8f5; border-radius: 10px; }
.object-current { box-shadow: inset 3px 0 var(--primary); }
.object-open { display: flex; flex: 1; min-width: 0; align-items: center; gap: 11px; text-align: left; padding: 10px;
  min-height: 67px; border: 0; border-radius: inherit; background: transparent; }
.object-icon { display: grid; place-items: center; width: 39px; height: 39px; flex: none; border-radius: 11px; background: #e0f1ed; }
.object-icon .icon { width: 19px; height: 19px; filter: invert(31%) sepia(64%) saturate(773%) hue-rotate(121deg); opacity: 1; }
.object-icon.district { background: #fbefd9; }
.object-icon.district .icon { filter: invert(41%) sepia(89%) saturate(663%) hue-rotate(4deg); }
.object-icon.other { background: #eee9f8; }
.object-icon.other .icon { filter: invert(35%) sepia(50%) saturate(1043%) hue-rotate(225deg); }
.object-row-body { display: grid; gap: 4px; min-width: 0; }
.object-name, .object-address { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.object-name { font-size: .92rem; font-weight: 730; letter-spacing: -.014em; }
.object-address { font-size: .83rem; color: var(--muted); }
.voltage { margin-left: 3px; color: #456661; font-size: .73rem; background: #eaf3ef; padding: 2px 5px; border-radius: 4px; vertical-align: 1px; font-weight: 680; }
.favorite .icon { opacity: .54; width: 18px; height: 18px; }
.favorite.saved .icon { opacity: 1; filter: invert(28%) sepia(82%) saturate(801%) hue-rotate(125deg); }
.favorite.saved { background: #dff1e9; }
.catalog-foot { min-height: 63px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 19px 9px 23px;
  border-top: 1px solid var(--line); background: #fff; }
.catalog-foot-label { display: flex; align-items: center; gap: 7px; color: var(--muted); font-weight: 620; font-size: .86rem; }
.catalog-foot-label .icon { width: 17px; height: 17px; }
.empty-state { min-height: 145px; padding: 27px 20px; display: grid; justify-items: center; align-content: center; gap: 8px; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--text); }
.empty-state > span:last-child { font-size: .93rem; }
.empty-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; background: var(--accent); color: var(--strong); }
.empty-icon .icon { opacity: 1; filter: invert(27%) sepia(97%) saturate(728%) hue-rotate(128deg); }

.map-stage { position: relative; min-width: 0; min-height: 0; grid-area: 1/2; overflow: hidden; background: #e8eeeb; }
.map-canvas { position: absolute; inset: 0; }
.map-status { position: absolute; inset: 42% auto auto 50%; transform: translateX(-50%); z-index: 1; min-width: 180px;
  width: max-content; max-width: calc(100% - 32px); text-align: center; padding: 10px 15px; border-radius: 12px; background: #fff; box-shadow: var(--shadow); font-size: .92rem; }
.map-top { position: absolute; inset: 19px 20px auto; z-index: 2; pointer-events: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.map-top > * { pointer-events: auto; }
.map-search { display: none; }
.map-region, .map-pill, .map-control-group { display: flex; align-items: center; background: #fff; border: 1px solid #e0eae6; border-radius: 12px; box-shadow: var(--shadow); }
.map-region { padding: 3px; }
.region-button { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; padding: 0 9px;
  background: #e6f3ee; border: 0; border-radius: 8px; color: var(--strong); font-size: .82rem; font-weight: 700; }
.region-button .icon { width: 15px; height: 15px; }
.region-button[aria-pressed="false"] { background: #fff; color: var(--muted); }
.region-button:hover { background: #d6ede4; color: var(--strong); }
.map-pill { gap: 7px; padding: 9px 12px; color: #334b4a; font-size: .82rem; font-weight: 700; }
.map-pill i { width: 7px; height: 7px; border-radius: 50%; background: #148773; }
.map-controls { position: absolute; right: 20px; top: 43%; z-index: 2; display: flex; flex-direction: column; gap: 9px; }
.map-control-group { flex-direction: column; }
.map-control-group .icon-button { width: 43px; height: 43px; border-radius: 10px; }
.map-control-group .icon-button + .icon-button { border-top: 1px solid #edf2ef; }
.user-position { width: 17px; height: 17px; border: 3px solid white; border-radius: 50%; background: #1178ba; box-shadow: 0 0 0 6px #2b8bd040; }
.maplibregl-ctrl-attrib { font-size: .72rem; line-height: 1.4; border-radius: 7px 0 0 0; }
.maplibregl-ctrl-scale { background: #ffffffd6; color: #344b4b; }


.detail { position: absolute; z-index: 3; left: 412px; bottom: 34px; width: min(410px, calc(100% - 477px)); max-height: calc(100% - 76px);
  border: 1px solid #e1ece7; border-radius: 16px; background: #fff; box-shadow: 0 10px 32px #24494331; outline: none; display: flex; flex-direction: column; }
.sheet-grip { display: none; }
.detail-heading { display: flex; align-items: flex-start; gap: 12px; padding: 16px 15px 12px; }
.detail-heading > div { min-width: 0; flex: 1; }
.detail-type { color: var(--muted); font-size: .79rem; }
.detail-heading h2 { font-size: 1.17rem; line-height: 1.27; letter-spacing: -.026em; overflow-wrap: anywhere; margin-top: 2px; }
.detail-heading .icon-button { width: 33px; height: 33px; }
.detail-body { min-height: 0; overflow: auto; padding: 1px 16px 12px; }
.detail-location { display: grid; gap: 2px; background: #f3f8f6; padding: 7px 8px 7px 11px; border-radius: 11px; }
.location-row { display: grid; grid-template-columns: 16px minmax(0,1fr) auto; align-items: center; gap: 9px; }
.location-row > .icon { width: 16px; height: 16px; }
.location-address { min-width: 0; overflow-wrap: anywhere; }
.location-address strong, .location-address span { display: block; }
.location-address strong { font-size: .93rem; }
.location-address span { color: var(--muted); margin-top: 3px; font-size: .81rem; }
.location-coordinates { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; }
.location-copy { width: 34px; height: 34px; color: var(--strong); }
.location-copy .icon { width: 16px; height: 16px; }
summary { cursor: pointer; font-weight: 690; color: #285a53; }
.detail-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 10px 14px 13px; border-top: 1px solid var(--line); }
.detail-actions .button { padding: 0 9px; min-height: 38px; font-size: .83rem; }
.detail-actions .icon { width: 16px; height: 16px; }
.detail-bookmark { margin-left: auto; background: #f3f8f6; width: 38px; height: 38px; }
.picking .maplibregl-canvas-container { cursor: crosshair; }
.pick-banner { position: absolute; z-index: 4; left: calc(50% + 196px); bottom: 35px; transform: translateX(-50%); width: max-content; max-width: calc(100% - 445px);
  display: flex; gap: 12px; align-items: center; justify-content: center; padding: 10px 11px 10px 13px; border: 1px solid var(--line);
  border-radius: 12px; background: white; box-shadow: var(--shadow); font-size: .91rem; }
.pick-banner strong { display: flex; align-items: center; gap: 8px; }
.workspace:is([data-view="users"], [data-view="history"], [data-view="proposals"], [data-view="archived"], [data-view="import"]) > :is(.catalog,.map-stage) { display: none; }
.admin-stage { grid-area: 1/1/2/3; min-height: 0; overflow: auto; background: #f5f9f8; }
.admin-inner { max-width: 930px; margin: 0 auto; padding: 47px 28px; }
.admin-heading { margin-bottom: 24px; }
.admin-heading h1 { font-size: 2rem; letter-spacing: -.045em; margin: 8px 0; }
.admin-heading p { color: var(--muted); }
.admin-list { background: white; border: 1px solid var(--line); border-radius: 15px; padding: 8px 15px; }
.user-row { display: grid; align-items: center; grid-template-columns: auto minmax(80px,1fr) auto auto; gap: 13px; padding: 14px 2px; }
.user-row + .user-row { border-top: 1px solid var(--line); }
.user-text { display: grid; gap: 3px; min-width: 0; }
.user-text span { color: var(--muted); font-size: .85rem; overflow-wrap: anywhere; }
.user-text strong { overflow-wrap: anywhere; }
.user-state { color: #3b5a5a; font-size: .8rem; font-weight: 660; border-radius: 7px; padding: 6px 8px; white-space: nowrap; background: #edf2f1; }
.user-state.pending { color: #885917; background: #fdf1da; }
.user-state.active { color: #176651; background: #e0f1eb; }
.user-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.editor { max-width: min(580px, calc(100% - 36px)); width: 100%; max-height: min(780px, calc(100dvh - 48px)); padding: 0;
  margin: auto; border: 1px solid #d9e8e2; color: var(--text); background: white; border-radius: 16px; box-shadow: 0 18px 65px #112d2c4d; }
.editor::backdrop { background: #122e33a0; }
.editor form { display: grid; max-height: inherit; grid-template-rows: auto minmax(0,1fr) auto; }
.editor-head, .editor-foot { display: flex; align-items: center; gap: 10px; justify-content: space-between; padding: 13px 19px; background: white; }
.editor-head { border-bottom: 1px solid var(--line); }
.editor-head h2 { font-size: 1.23rem; letter-spacing: -.03em; }
.editor-foot { border-top: 1px solid var(--line); }
.editor-foot .primary { margin-left: auto; }
.editor-body { padding: 15px 19px; overflow: auto; min-height: 0; }
.editor-body form { display: block; }
.editor-body label, .auth-card label { display: grid; gap: 6px; font-size: .89rem; font-weight: 660; margin: 0 0 13px; min-width: 0; }
.editor-body input:not([type="checkbox"]), .editor-body select, .editor-body textarea, .auth-card input { width: 100%; min-width: 0; color: var(--text);
  border: 1px solid #dbe8e4; border-radius: 9px; padding: 8px 11px; min-height: 43px; background: #f8fbfa; font-weight: 450; font-size: 1rem; }
.editor-body select { appearance: none; background: #f8fbfa url('/icons/chevron-down.svg') no-repeat right 9px center / 16px; padding-right: 31px; }
.editor-body textarea { resize: vertical; }
.form-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.point-fields { margin: 0 0 10px; border: 1px solid #dceae4; border-radius: 11px; padding: 10px 11px; }
.point-fields legend { color: #2e5c55; font-weight: 730; font-size: .9rem; padding: 0 5px; }
.point-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.point-actions .button { font-size: .86rem; }

.auth-page { min-height: 100dvh; display: grid; place-items: center; background: #f5f9f7; padding: 24px 16px; }
.auth-brand { margin-bottom: 21px; }
.auth-card { max-width: 450px; width: 100%; border: 1px solid #e0ebe8; border-radius: 20px; background: white; padding: 29px;
  box-shadow: 0 18px 65px #234f4310, 0 3px 9px #234f4306; }
.auth-card h1 { font-size: 1.65rem; font-weight: 740; letter-spacing: -.045em; margin-bottom: 14px; }
.auth-intro { font-size: .95rem; color: var(--muted); margin: 4px 0 22px; }
.auth-card .feedback { margin: 0 0 12px; }
.auth-card label { margin-bottom: 13px; }
.auth-card input { min-height: 47px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 47px; }
.password-button { position: absolute; right: 4px; top: 4px; }
.auth-submit { margin-top: 2px; width: 100%; min-height: 46px; }
.auth-switch { text-align: center; color: var(--muted); margin-top: 13px; font-size: .91rem; }


@media (max-width: 1000px) {
  .workspace { grid-template-columns: 338px 1fr; }
  .detail { left: 353px; width: min(390px, calc(100% - 410px)); }
  .pick-banner { left: calc(50% + 169px); max-width: calc(100% - 370px); }
  .topbar { padding-inline: 20px; }
  .catalog-head { padding-inline: 18px; }
  .list-toolbar { padding-inline: 18px; }
}

@media (max-width: 760px) {
  .app-shell { grid-template-rows: 57px minmax(0,1fr) auto; }
  .topbar { grid-template-columns: 1fr auto; padding-inline: 15px; gap: 8px; }
  .topbar .brand { font-size: 23px; }
  .topbar .brand-mark { width: 34px; height: 34px; border-radius: 11px; }
  .topbar .brand-mark .icon { width: 19px; height: 19px; }
  .desktop-nav { display: none; }
  .account { gap: 6px; }
  .account .avatar { width: 31px; height: 31px; border-radius: 10px; font-size: .77rem; }
  .account-name { display: none; }
  .logout { margin-left: 0; width: 38px; }
  .phone-nav { z-index: 5; display: flex; justify-content: space-around; gap: 3px; min-width: 0; padding: 3px 5px max(3px, env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid var(--line); }
  .phone-button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; min-width: 0; padding: 2px;
    border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: .73rem; font-weight: 650; }
  .phone-button .icon { width: 20px; height: 20px; }
  .phone-button.active { background: #eaf5f0; color: var(--strong); }
  .phone-button.active .icon { filter: invert(28%) sepia(82%) saturate(801%) hue-rotate(125deg); opacity: 1; }
  .workspace { display: grid; grid-template-columns: minmax(0,1fr); }
  .workspace > .map-stage, .workspace > .catalog, .workspace > .admin-stage { grid-area: 1/1; }
  .workspace[data-view="map"] > .catalog, .workspace[data-view="catalog"] > .map-stage { display: none; }
  .catalog { border: none; }
  .catalog-head { padding: 17px 14px 12px; }
  .catalog-head h1 { font-size: 1.55rem; }
  .filters { gap: 6px; margin-top: 9px; }
  .filter { min-height: 39px; padding: 0 10px; }
  .list-toolbar { min-height: 37px; padding: 0 14px; }
  .object-list { padding-inline: 8px; }
  .object-open { min-height: 69px; }
  .object-row .favorite { width: 43px; height: 43px; }
  .catalog-foot { min-height: 56px; padding: 6px 13px; }
  .map-top { display: grid; grid-template-columns: 1fr auto; inset: 11px 11px auto; }
  .map-search { width: 100%; grid-column: 1 / -1; display: flex; align-items: center; gap: 9px; text-align: left;
    padding: 0 14px; min-height: 46px; border: 1px solid #dae5e1; border-radius: 12px; background: white; box-shadow: var(--shadow);
    font-size: .95rem; color: #425e60; font-weight: 650; }
  .map-region { justify-self: start; }
  .region-button { min-height: 37px; }
  .map-controls { right: 11px; top: min(44%, 255px); gap: 7px; }
  .map-control-group .icon-button { width: 44px; height: 42px; }
  .map-pill { padding-inline: 8px; font-size: .78rem; }
  .detail { left: 0; bottom: 0; width: 100%; max-height: min(66%, 400px); border-radius: 18px 18px 0 0; border-bottom: 0; }
  .sheet-grip { display: block; width: 32px; height: 4px; background: #d1e2df; margin: 6px auto 0; border-radius: 9px; flex: none; }
  .detail-heading { padding: 10px 11px 9px; gap: 9px; }
  .detail-heading h2 { font-size: 1.13rem; }
  .detail-heading .icon-button { width: 41px; height: 41px; }
  .detail-body { padding: 0 12px 8px; }
  .location-copy { width: 44px; height: 44px; }
  .detail-actions { padding: 7px 9px; gap: 5px; }
  .detail-actions .button { min-height: 42px; font-size: .79rem; }
  .detail-bookmark { width: 43px; height: 43px; }
  .pick-banner { left: 50%; bottom: 15px; max-width: calc(100% - 23px); width: calc(100% - 23px); font-size: .86rem; }
  .pick-banner strong { flex: 1; }
  .pick-banner .button { min-height: 38px; }
  .toast { bottom: calc(67px + env(safe-area-inset-bottom)); }
  .admin-inner { padding: 23px 13px; }
  .admin-heading h1 { font-size: 1.65rem; }
  .user-row { grid-template-columns: auto minmax(0,1fr) auto; gap: 7px; }
  .admin-list { padding: 5px 9px; }
  .user-state { font-size: .73rem; padding: 5px; }
  .user-actions { grid-column: 2 / 4; }
  .admin-heading p { font-size: .95rem; }
  .editor { max-width: calc(100% - 16px); max-height: calc(100dvh - 22px); }
  .editor-head, .editor-foot, .editor-body { padding-inline: 12px; }
  .editor-foot .button { font-size: .82rem; padding-inline: 8px; }
  .auth-card { padding: 19px; border-radius: 16px; }
  .auth-card h1 { font-size: 1.65rem; }
  .auth-intro { margin-bottom: 15px; }
}
@media (max-width: 365px) {
  .filter { padding-inline: 7px; font-size: .8rem; }
  .detail-actions .button { padding-inline: 5px; gap: 4px; }
  .detail-actions .icon { width: 15px; height: 15px; }
  .detail-bookmark { width: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

@media (max-width: 760px) {
  .workspace:has(.detail:not([hidden])) .maplibregl-ctrl-bottom-right { top: 109px; bottom: auto; }
}

.list-more { display: grid; justify-content: center; padding: 11px 8px; }
.map-route-control .icon-button { color: #fff; background: #2263d3; }
.map-route-control .icon-button:hover { background: #124fae; }
.map-route-control .icon { filter: invert(1); opacity: 1; }
.workspace:has(.route-pick:not([hidden])) .maplibregl-canvas-container { cursor: crosshair; }
.route-panel {
  position: absolute; z-index: 4; left: 412px; bottom: 34px; width: min(418px, calc(100% - 477px));
  max-height: calc(100% - 73px); display: flex; flex-direction: column; border: 1px solid #dce8ea; border-radius: 16px;
  background: white; box-shadow: 0 10px 35px #24494330;
}
.nav-head { display: flex; align-items: center; gap: 10px; padding: 13px 13px 10px; }
.nav-head > div { flex: 1; min-width: 0; }
.nav-head h2 { font-size: 1.11rem; line-height: 1.22; letter-spacing: -.025em; }
.nav-head p { color: var(--muted); font-size: .83rem; margin-top: 3px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.nav-car { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; background: #eaf0ff; flex: none; }
.nav-car .icon { filter: invert(35%) sepia(90%) saturate(2368%) hue-rotate(205deg); opacity: 1; }
.nav-head .icon-button { width: 37px; height: 37px; }
.nav-body { min-height: 0; overflow: auto; padding: 0 13px 10px; }
.nav-endpoint { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid #e4ebf0; border-radius: 10px; background: #f7f9fc; }
.nav-endpoint + .nav-endpoint { margin-top: 5px; }
.nav-endpoint > div { min-width: 0; flex: 1; display: grid; gap: 2px; }
.nav-endpoint > div span { color: var(--muted); font-size: .77rem; }
.nav-endpoint strong { font-size: .88rem; overflow-wrap: anywhere; }
.nav-letter { color: #205bc2; background: #e8effd; min-width: 30px; height: 30px; display: grid; place-items: center;
  border-radius: 8px; font-size: .83rem; font-weight: 760; }
.nav-letter-end { color: #176552; background: #e4f2ed; }
.nav-hint, .nav-feedback { margin-top: 8px; font-size: .82rem; color: var(--muted); }
.nav-feedback { background: #f4f7fd; color: #254d81; padding: 7px 9px; border-radius: 8px; }
.nav-actions { display: flex; justify-content: space-between; align-items: center; gap: 7px; padding: 8px 13px;
  border-top: 1px solid #e4eced; }
.nav-actions .primary { flex: 1; background: #2263d3; }
.nav-actions .primary:hover { background: #124fae; }
.nav-actions .icon-button { background: #f2f6f8; }
.nav-estimate { display: flex; align-items: center; gap: 10px; color: #3e5c68; font-size: .87rem; padding: 8px 9px;
  border-radius: 9px; background: #f0f5fd; }
.nav-estimate strong { color: #2150a5; font-size: 1.15rem; line-height: 1.1; white-space: nowrap; }
.nav-estimate span + span { margin-left: auto; }
.nav-turns { margin-top: 10px; font-size: .88rem; }
.nav-turns ol { max-height: 145px; overflow: auto; margin: 5px 0 0; padding: 0; list-style: none; }
.nav-turns li { display: flex; align-items: center; gap: 9px; padding: 6px 2px; border-bottom: 1px solid var(--line); }
.nav-turns li > span { color: #2150a5; font-size: 1.14rem; font-weight: 750; width: 21px; flex: none; text-align: center; }
.nav-turns li small { display: block; color: var(--muted); margin-top: 2px; }
.nav-next { display: flex; align-items: center; gap: 12px; padding: 9px 10px; color: white; border-radius: 11px; background: #184fa9; }
.nav-symbol { min-width: 35px; text-align: center; font-size: 1.95rem; font-weight: 700; }
.nav-next > div { min-width: 0; display: grid; gap: 2px; }
.nav-next strong { font-size: 1.32rem; }
.nav-next span:last-child { font-size: .91rem; overflow-wrap: anywhere; }
.nav-remain { margin-top: 7px; }
@media (max-width: 1000px) {
  .route-panel { left: 353px; width: min(390px, calc(100% - 410px)); }
}
@media (max-width: 760px) {
  .map-controls { top: min(36%, 205px); }
  .route-panel { left: 0; bottom: 0; width: 100%; max-height: min(70%, 415px); border-radius: 17px 17px 0 0; border-bottom: 0; }
  .route-panel .icon-button, .route-panel .button { min-height: 44px; }
  .route-panel .icon-button { min-width: 44px; }
  .nav-head { padding: 9px 11px 7px; }
  .nav-body { padding: 0 11px 7px; }
  .nav-actions { padding: 6px 11px; }
  .nav-endpoint { padding: 2px 5px; }
  .workspace:has(.route-panel:not([hidden])) .maplibregl-ctrl-bottom-right { top: 109px; bottom: auto; }
  .workspace:has(.route-panel[data-phase="drive"]:not([hidden])) .map-top { display: none; }
  .workspace:has(.route-panel[data-phase="drive"]:not([hidden])) .maplibregl-ctrl-bottom-right { top: 9px; }
}


.search-row { display: flex; align-items: stretch; gap: 7px; margin-top: 14px; }
.search-row .search { flex: 1; }
.filter-toggle { width: 46px; height: 46px; border: 1px solid var(--line); background: #f5f9f8; }
.filter-toggle.active, .filter-toggle[aria-expanded="true"] { color: var(--strong); background: var(--accent); border-color: #c5e7db; }
.extra-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 7px; align-items: end;
  padding: 9px; margin-top: 7px; border-radius: 9px; border: 1px solid var(--line); background: #f7faf9; }
.extra-filters label, .history-head label { display: grid; min-width: 0; gap: 4px; color: var(--muted); font-size: .79rem; font-weight: 650; }
.extra-filters select, .history-head select { appearance: none; min-width: 0; min-height: 37px; padding: 5px 26px 5px 8px;
  border: 1px solid #dce9e5; border-radius: 7px; background: #fff url('/icons/chevron-down.svg') no-repeat right 7px center / 15px;
  color: var(--text); font-size: .88rem; }
.extra-filters .text-button { min-height: 37px; font-size: .8rem; padding: 4px; }
.history-inner { max-width: 1070px; }
.history-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.history-head h1 { font-size: 1.8rem; letter-spacing: -.045em; }
.history-list { border: 1px solid var(--line); border-radius: 12px; background: white; }
.history-row { display: grid; grid-template-columns: 104px minmax(120px, 1fr) minmax(130px,.55fr) auto; align-items: start;
  gap: 11px 18px; padding: 13px 14px; }
.history-row + .history-row { border-top: 1px solid var(--line); }
.history-tag { justify-self: start; font-size: .84rem; font-weight: 690; padding: 5px 7px; border-radius: 6px; background: #e9f2fb; color: #244c73; }
.history-tag.create { background: #e4f2eb; color: #195c45; }
.history-tag.delete { background: #f9ecec; color: #883943; }
.history-object, .history-user { display: grid; gap: 3px; align-content: start; overflow-wrap: anywhere; }
.history-object strong, .history-user strong { font-size: .94rem; }
.history-object span, .history-user span, .history-row time { font-size: .84rem; color: var(--muted); }
.history-row time { white-space: nowrap; }
.history-empty { padding: 24px 14px; color: var(--muted); }
.history-more { margin-top: 13px; }
@media (max-width: 760px) {
  .search-row { margin-top: 11px; }
  .history-head h1 { font-size: 1.3rem; }
  .history-head select { min-height: 40px; }
  .history-row { grid-template-columns: minmax(0,1fr) minmax(0,.8fr); padding: 12px 10px; gap: 7px 10px; }
  .history-tag { grid-area: 1/1; }
  .history-row time { grid-area: 1/2; justify-self: end; padding-top: 4px; }
  .history-object { grid-area: 2/1; }
  .history-user { grid-area: 2/2; text-align: right; }
}


.object-icon.distribution { background: #e8effa; }
.object-icon.distribution .icon { filter: invert(40%) sepia(57%) saturate(930%) hue-rotate(181deg); }
.object-icon.charging { background: #eaf4e5; }
.object-icon.charging .icon { filter: invert(36%) sepia(29%) saturate(1222%) hue-rotate(63deg); }
.detail-distance { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: .84rem; color: var(--muted); }
.detail-distance .icon { width: 15px; height: 15px; }

.detail-status { margin-top: 7px; color: var(--muted); font-size: .84rem; }
.change-details { margin-top: 8px; color: var(--text); font-size: .85rem; }
.editor-points { margin-bottom: 13px; }
.editor-points > summary { margin-bottom: 8px; }
.editor-body label.check-row { display: flex; align-items: center; gap: 7px; margin-block: 8px; }
.check-row input { width: 17px; height: 17px; accent-color: var(--primary); }
.suggest-title { margin-bottom: 10px; color: var(--muted); }
.review-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding: 14px 4px; }
.review-row + .review-row { border-top: 1px solid var(--line); }
.review-row > div:first-child { flex: 1; min-width: 0; }
.review-row p { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0; }
.review-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.change-details dl, .review-row dl { display: grid; grid-template-columns: minmax(80px,auto) minmax(0,1fr); gap: 4px 8px; }
.change-details dd, .review-row dd { margin: 0; overflow-wrap: anywhere; }
.history-head { flex-wrap: wrap; }
.connection { position: fixed; z-index: 7; bottom: 12px; left: 50%; transform: translateX(-50%);
  color: #674418; background: #fff3da; border: 1px solid #f1d8a4; border-radius: 9px; padding: 7px 12px; font-size: .85rem; pointer-events: none; }
.offline-card h2 { font-size: 1.1rem; }
.offline-card > * + * { margin-top: 9px; }
@media (max-width: 760px) {
  .phone-button { font-size: .69rem; }
  .review-row { flex-wrap: wrap; gap: 8px; }
  .review-actions { flex-basis: 100%; justify-content: end; }
  .connection { bottom: calc(63px + env(safe-area-inset-bottom)); }
}

.catalog-tools { display: flex; gap: 6px; margin-left: auto; }
.catalog-tools .button { padding-inline: 8px; }
.report-link { margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.stage-tabs { display: flex; gap: 8px; margin: 5px 0 14px; }
.registry-form, .import-report { display: grid; gap: 12px; padding: 16px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.registry-form > .button, .import-report > .button { justify-self: start; }
.registry-form label:not(.check-row), .issue-resolution { display: grid; gap: 5px; color: var(--muted); font-size: .85rem; }
.registry-form input:not([type=checkbox]), .registry-form select, .issue-resolution input {
  min-width: 0; width: 100%; min-height: 40px; padding: 7px 9px; color: var(--text);
  background: #f8fbfa; border: 1px solid #dbe8e4; border-radius: 7px; font: inherit;
}
.registry-form .form-columns { margin-top: 9px; row-gap: 9px; }
.registry-form details p { margin-top: 8px; color: var(--muted); }
.import-report { margin-top: 14px; }
.import-report h2 { font-size: 1.15rem; }
.import-report dl { display: flex; flex-wrap: wrap; gap: 10px 20px; margin: 0; }
.import-report dd { margin: 3px 0 0; color: var(--strong); font-weight: 750; }
.import-changes { max-height: 260px; overflow: auto; margin: 8px 0; padding-left: 24px; }
.import-changes li { margin: 6px 0; }
.issue-kind { display: block; margin: 3px 0; }
.issue-resolution { margin-top: 8px; }

@media (max-width: 365px) {
  .catalog-foot-label { display: none; }
}
