:root {
  --ink: #17201d;
  --muted: #67716d;
  --line: #dce3df;
  --panel: #f7f8f6;
  --white: #ffffff;
  --teal: #0d7468;
  --teal-dark: #07564f;
  --teal-soft: #dff0eb;
  --orange: #ee7948;
  --orange-dark: #cf5f31;
  --blue: #4289a1;
  --green: #2b9a75;
  --shadow: 0 14px 40px rgba(25, 43, 37, .13);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
html, body { height: 100%; margin: 0; overflow: hidden; color: var(--ink); background: #e8ece8; }
button, input { font: inherit; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.workspace { display: grid; grid-template-columns: minmax(340px, 30%) minmax(0, 70%); width: 100vw; height: 100vh; }
.workbench { position: relative; z-index: 700; display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 9fr); min-width: 0; min-height: 0; height: 100%; overflow: hidden; background: var(--panel); border-right: 1px solid rgba(30, 48, 42, .12); box-shadow: 8px 0 30px rgba(30, 48, 42, .08); }
.search-pane { display: grid; grid-template-columns: minmax(165px, .8fr) minmax(145px, 1.2fr); align-items: center; gap: 14px; min-height: 0; padding: 11px 16px; overflow: hidden; background: var(--white); border-bottom: 1px solid var(--line); }
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; flex: 0 0 auto; place-items: center; width: 34px; height: 34px; color: var(--teal); background: var(--teal-soft); border: 1px solid #c6e2da; border-radius: 10px; }
.brand-mark svg { width: 21px; height: 21px; stroke-width: 1.7; }
.eyebrow { margin-bottom: 3px; color: var(--teal); font-size: 9px; font-weight: 800; letter-spacing: .19em; }
h1 { margin: 0; font-size: 15px; line-height: 1.1; letter-spacing: -.02em; white-space: nowrap; }
.search-form { min-width: 0; }
.search-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.search-control { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.search-control > svg { position: absolute; z-index: 1; left: 12px; top: 50%; width: 17px; height: 17px; color: #7b8581; transform: translateY(-50%); }
.search-control input { min-width: 0; height: 40px; padding: 0 12px 0 39px; color: var(--ink); background: #f5f7f5; border: 1px solid #d8dedb; border-radius: 9px; outline: none; transition: .18s ease; }
.search-control input:focus { background: #fff; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13, 116, 104, .1); }
.search-control button { min-width: 66px; padding: 0 14px; color: #fff; font-size: 12px; font-weight: 700; background: var(--ink); border: 0; border-radius: 9px; cursor: pointer; }
.scope-row { display: flex; justify-content: flex-end; align-items: center; margin-top: 5px; min-height: 12px; }
.scope-pill { display: none; align-items: center; gap: 5px; color: #6b7571; font-size: 10px; }
.scope-pill i { width: 6px; height: 6px; background: var(--teal); border-radius: 50%; box-shadow: 0 0 0 3px var(--teal-soft); }
.source-status { max-width: 100%; overflow: hidden; color: #7b8581; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.source-status.live { color: var(--teal); }
.source-status.memory { color: var(--teal); }
.source-status.demo { color: #a46628; }

.postcode-pane { display: grid; grid-template-rows: auto 1fr; min-height: 0; padding: 20px 14px 14px; }
.list-heading { display: flex; justify-content: space-between; align-items: center; padding: 0 8px 13px; }
.list-heading p { margin: 0 0 3px; font-size: 13px; font-weight: 800; }
.list-heading span { color: var(--muted); font-size: 10px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; color: #6a7571; background: transparent; border: 1px solid transparent; border-radius: 9px; cursor: pointer; }
.icon-button:hover { color: var(--teal); background: #edf2ef; }
.icon-button svg { width: 17px; height: 17px; }
.icon-button.small { width: 30px; height: 30px; }
.postcode-list { min-height: 0; padding: 1px 5px 50px; overflow: auto; scrollbar-width: thin; scrollbar-color: #cad2ce transparent; }
.postcode-card { position: relative; margin-bottom: 9px; padding: 14px 14px 13px; background: #fff; border: 1px solid #e0e5e2; border-radius: 12px; box-shadow: 0 2px 5px rgba(28, 42, 37, .025); transition: border .18s, box-shadow .18s, transform .18s; }
.postcode-card:hover { border-color: #bbc9c3; box-shadow: 0 6px 18px rgba(32, 53, 45, .07); transform: translateY(-1px); }
.postcode-card.active { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(13, 116, 104, .11), 0 8px 20px rgba(25, 64, 52, .08); }
.postcode-card.active::before { position: absolute; top: 13px; bottom: 13px; left: -1px; width: 3px; background: var(--teal); border-radius: 0 3px 3px 0; content: ""; }
.postcode-group-card { background: linear-gradient(145deg, #f2faf7, #fff 68%); border-color: #b8d8cf; }
.postcode-group-card::after { position: absolute; top: 0; right: 0; width: 58px; height: 58px; pointer-events: none; background: linear-gradient(135deg, transparent 49%, rgba(13,116,104,.08) 50%); border-radius: 0 11px 0 0; content: ""; }
.group-badge { position: relative; z-index: 1; padding: 4px 7px; color: var(--teal); font-size: 8px; font-style: normal; font-weight: 800; background: var(--teal-soft); border-radius: 999px; }
.postcode-experience-card { background: linear-gradient(145deg, #fff8ee, #fff 68%); border-color: #edc891; }
.postcode-experience-card.active { border-color: #d58a24; box-shadow: 0 0 0 2px rgba(213,138,36,.13), 0 8px 20px rgba(112,72,19,.08); }
.postcode-experience-card.active::before { background: #d58a24; }
.experience-badge { position: relative; z-index: 1; padding: 4px 7px; color: #985d12; font-size: 8px; font-style: normal; font-weight: 800; background: #fff0d8; border-radius: 999px; }
.progress-track.experience-progress i { background: #d58a24; }
.postcode-card.postcode-experience-card.active .configure-button { background: #d58a24; border-color: #d58a24; }
.postcode-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.postcode-code { display: flex; align-items: baseline; gap: 8px; }
.postcode-code strong { font-size: 21px; letter-spacing: .02em; }
.postcode-code span { max-width: 130px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.postcode-stats { display: flex; gap: 18px; margin: 11px 0 13px; }
.postcode-stats div { display: grid; gap: 2px; }
.postcode-stats span { color: #88918d; font-size: 9px; font-weight: 650; letter-spacing: .04em; }
.postcode-stats b { font-size: 13px; }
.progress-track { height: 3px; margin: 1px 0 12px; overflow: hidden; background: #edf0ee; border-radius: 3px; }
.progress-track i { display: block; height: 100%; background: var(--teal); border-radius: inherit; }
.configure-button { width: 100%; height: 34px; color: var(--teal); font-size: 11px; font-weight: 750; background: #eef6f3; border: 1px solid #d5e9e3; border-radius: 8px; cursor: pointer; }
.postcode-card.active .configure-button { color: #fff; background: var(--teal); border-color: var(--teal); }
.empty-list { padding: 42px 18px; color: var(--muted); font-size: 12px; line-height: 1.7; text-align: center; }
.list-skeleton i { display: block; height: 122px; margin-bottom: 10px; background: linear-gradient(100deg, #ecefec 30%, #f7f8f7 50%, #ecefec 70%); background-size: 200% 100%; border-radius: 12px; animation: shimmer 1.4s infinite; }

.map-editor { position: relative; min-width: 0; overflow: hidden; background: #e5e9e5; }
.map { position: absolute; inset: 0; z-index: 0; background: #e8ebe7; }
.map::after { position: absolute; z-index: 500; inset: 0; pointer-events: none; background: rgba(15, 41, 32, .018); content: ""; }
.leaflet-control-zoom { margin-right: 18px !important; margin-bottom: 22px !important; border: 0 !important; box-shadow: 0 6px 20px rgba(24, 42, 36, .18) !important; }
.leaflet-control-zoom a { width: 36px !important; height: 36px !important; color: var(--ink) !important; line-height: 35px !important; border-color: #e5e8e6 !important; }
.leaflet-control-attribution { padding: 2px 7px !important; color: #78817e; font-size: 9px !important; background: rgba(255,255,255,.82) !important; }
.leaflet-container { font: inherit; }

.map-toolbar { position: absolute; z-index: 600; top: 18px; right: 18px; left: 18px; display: grid; grid-template-columns: minmax(210px, 1fr) auto minmax(220px, 1fr); align-items: center; min-height: 68px; padding: 10px 12px 10px 15px; background: rgba(255,255,255,.96); border: 1px solid rgba(28, 46, 39, .11); border-radius: 14px; box-shadow: var(--shadow); backdrop-filter: blur(16px); }
.active-context { display: flex; align-items: center; gap: 11px; min-width: 0; }
.toolbar-icon { display: grid; flex: 0 0 auto; place-items: center; width: 36px; height: 36px; color: var(--teal); background: var(--teal-soft); border-radius: 10px; }
.toolbar-icon svg { width: 20px; height: 20px; }
.active-context div:last-child { display: grid; min-width: 0; gap: 2px; }
.active-context span { color: #7c8682; font-size: 9px; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.active-context strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.map-stats { display: flex; height: 32px; align-items: center; background: #f2f5f3; border: 1px solid #e2e7e4; border-radius: 8px; }
.map-stats span { padding: 0 12px; color: #707b77; font-size: 10px; white-space: nowrap; }
.map-stats span + span { border-left: 1px solid #d9dfdc; }
.map-stats b { margin-right: 3px; color: var(--ink); font-size: 12px; }
.toolbar-actions { display: flex; justify-content: flex-end; gap: 8px; }
.guide-button { width: 40px; height: 40px; color: var(--teal); font-size: 17px; font-weight: 850; background: #eef6f3; border: 1px solid #cfe4dd; border-radius: 50%; cursor: pointer; transition: color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease; }
.guide-button:hover { color: #fff; background: var(--teal); border-color: var(--teal); box-shadow: 0 5px 14px rgba(13,116,104,.22); transform: translateY(-1px); }
.guide-button:focus-visible { outline: 3px solid rgba(13,116,104,.2); outline-offset: 2px; }
.primary-button, .secondary-button, .save-button, .text-button { border: 0; border-radius: 9px; cursor: pointer; }
.primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 15px; color: #fff; font-size: 11px; font-weight: 750; background: var(--orange); box-shadow: 0 5px 12px rgba(219, 99, 51, .22); }
.primary-button:hover { background: var(--orange-dark); }
.primary-button:disabled { color: #a7aeab; background: #e8ebe9; box-shadow: none; cursor: not-allowed; }
.primary-button svg { width: 16px; height: 16px; stroke-width: 2.3; }
.secondary-button { min-height: 40px; padding: 0 13px; color: #57635e; font-size: 11px; font-weight: 700; background: #f0f3f1; border: 1px solid #dde3df; }
.selection-mode-button { display: grid; place-items: center; color: #53605b; background: rgba(255,255,255,.97); border: 1px solid rgba(28,46,39,.16); cursor: pointer; }
.selection-mode-button svg { width: 22px; height: 22px; stroke-width: 2; }
.map-selection-button { position: absolute; z-index: 610; top: 104px; left: 50%; width: 50px; height: 50px; padding: 0; border-radius: 11px; box-shadow: 0 9px 22px rgba(24,42,36,.2), inset 0 -3px 0 rgba(31,54,46,.12); transform: translateX(-50%); transition: color .14s ease, background .14s ease, border-color .14s ease, box-shadow .14s ease, transform .14s ease; backdrop-filter: blur(12px); }
.map-selection-button:hover { color: var(--teal); background: #fff; border-color: rgba(13,116,104,.38); transform: translate(-50%, -1px); }
.map-selection-button:active { transform: translate(-50%, 2px); box-shadow: 0 3px 9px rgba(24,42,36,.18), inset 0 3px 5px rgba(18,48,40,.2); }
.map-selection-button.active { color: #fff; background: var(--teal); border-color: var(--teal-dark); box-shadow: 0 3px 9px rgba(17,54,45,.25), inset 0 3px 6px rgba(3,45,39,.35); transform: translate(-50%, 2px); }
.map-selection-button.active:hover { color: #fff; background: var(--teal); }
.map-selection-button:disabled { color: #a6aeaa; background: rgba(232,235,233,.94); border-color: rgba(150,160,155,.2); box-shadow: 0 5px 14px rgba(24,42,36,.1), inset 0 -2px 0 rgba(31,54,46,.06); cursor: not-allowed; transform: translateX(-50%); }

.legend-card { position: absolute; z-index: 550; right: 18px; bottom: 21px; display: flex; align-items: center; gap: 16px; padding: 9px 13px; background: rgba(255,255,255,.93); border: 1px solid rgba(35, 52, 46, .11); border-radius: 9px; box-shadow: 0 6px 20px rgba(26, 43, 37, .1); backdrop-filter: blur(10px); }
.legend-card span { display: flex; align-items: center; gap: 6px; color: #59645f; font-size: 9px; }
.legend-dot { width: 9px; height: 9px; border: 1.5px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px rgba(21,40,34,.22); }
.legend-dot.unlinked { background: #fff; }
.legend-dot.linked { background: conic-gradient(#e4572e, #3d6fb4, #8e5ba6, #d58a24, #2e7d6e, #e4572e); }
.legend-pin { position: relative; width: 10px; height: 10px; background: var(--orange); border: 2px solid #fff; border-radius: 50% 50% 50% 0; box-shadow: 0 0 0 1px rgba(156,69,34,.35); transform: rotate(-45deg); }

.empty-state { position: absolute; z-index: 520; top: 50%; left: 50%; width: 390px; padding: 35px 38px 33px; text-align: center; background: rgba(255,255,255,.94); border: 1px solid rgba(34, 52, 46, .12); border-radius: 18px; box-shadow: var(--shadow); transform: translate(-50%, -46%); backdrop-filter: blur(12px); }
.empty-illustration { position: relative; width: 170px; height: 90px; margin: 0 auto 20px; }
.building { position: absolute; bottom: 12px; background: #d9e2de; border: 1px solid #c5d1cc; border-radius: 4px 4px 1px 1px; }
.building::before { position: absolute; inset: 8px 6px; opacity: .7; background: repeating-linear-gradient(90deg, #fff 0 5px, transparent 5px 10px), repeating-linear-gradient(0deg, transparent 0 8px, rgba(255,255,255,.7) 8px 10px); content: ""; }
.building.b1 { left: 21px; width: 39px; height: 47px; }
.building.b2 { left: 65px; width: 48px; height: 69px; background: #cbdcd6; }
.building.b3 { left: 118px; width: 31px; height: 38px; }
.route { position: absolute; z-index: 2; width: 39px; height: 22px; border-bottom: 2px dashed var(--teal); border-radius: 50%; }
.route.r1 { bottom: 0; left: 27px; transform: rotate(8deg); }
.route.r2 { right: 27px; bottom: 1px; transform: rotate(-10deg); }
.mini-pin { position: absolute; z-index: 3; width: 13px; height: 13px; background: var(--orange); border: 3px solid #fff; border-radius: 50% 50% 50% 0; box-shadow: 0 2px 6px rgba(40,49,44,.22); transform: rotate(-45deg); }
.mini-pin.p1 { bottom: 2px; left: 20px; }
.mini-pin.p2 { right: 19px; bottom: 3px; }
.step-label { display: inline-block; margin-bottom: 7px; color: var(--teal); font-size: 9px; font-weight: 850; letter-spacing: .15em; }
.empty-state h2 { margin: 0 0 8px; font-size: 20px; letter-spacing: -.025em; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

.parking-panel { position: absolute; z-index: 610; top: 104px; left: 18px; width: 292px; overflow: hidden; padding: 20px; background: rgba(255,255,255,.97); border: 1px solid rgba(32, 49, 43, .12); border-radius: 13px; box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.panel-accent { position: absolute; top: 0; right: 0; left: 0; height: 3px; background: var(--orange); }
.parking-panel-header { display: flex; justify-content: space-between; align-items: flex-start; }
.parking-panel-header span { color: var(--orange-dark); font-size: 9px; font-weight: 800; letter-spacing: .09em; }
.parking-panel-header h2 { margin: 4px 0 0; font-size: 17px; }
.panel-tip { margin: 13px 0 14px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.palette-block { margin: 0 0 12px; padding: 9px 10px; background: #f6f8f6; border: 1px solid #e5e9e6; border-radius: 8px; }
.palette-block > span { display: block; margin-bottom: 7px; color: #7a8580; font-size: 8px; font-weight: 700; letter-spacing: .03em; }
.parking-palette { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; }
.palette-swatch { height: 13px; border: 1px solid rgba(255,255,255,.9); border-radius: 3px; box-shadow: 0 0 0 1px rgba(24,42,36,.1); opacity: .55; transition: transform .15s, opacity .15s; }
.palette-swatch.active { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 3px currentColor; transform: translateY(-1px) scale(1.08); }
.lasso-button { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; width: 100%; height: 38px; margin-bottom: 12px; padding: 0 10px; color: var(--teal); font-size: 10px; font-weight: 750; text-align: left; background: #eef6f3; border: 1px solid #cfe3dd; border-radius: 8px; cursor: pointer; }
.lasso-button:hover { background: #e4f1ed; }
.lasso-button.active { color: #fff; background: var(--teal); border-color: var(--teal); box-shadow: 0 0 0 3px rgba(13,116,104,.13); }
.lasso-button svg { width: 18px; height: 18px; }
.lasso-button kbd { min-width: 20px; padding: 2px 4px; color: inherit; font: 700 8px/1.2 inherit; text-align: center; background: rgba(255,255,255,.48); border: 1px solid currentColor; border-radius: 4px; opacity: .72; }
.assignment-summary { display: grid; grid-template-columns: repeat(3, 1fr); margin-bottom: 13px; padding: 11px 0; background: #f5f7f5; border-radius: 9px; }
.assignment-summary div { display: grid; gap: 3px; text-align: center; }
.assignment-summary div + div { border-left: 1px solid #dde3df; }
.assignment-summary span { color: #7a8580; font-size: 8px; }
.assignment-summary strong { font-size: 15px; }
.save-button { width: 100%; height: 38px; color: #fff; font-size: 11px; font-weight: 750; background: var(--teal); }
.save-button:hover { background: var(--teal-dark); }
.save-button:disabled { color: #a6aeaa; background: #e7ebe8; cursor: not-allowed; }

.assignment-popover { position: absolute; z-index: 640; width: 278px; overflow: hidden; padding: 13px; background: rgba(255,255,255,.98); border: 1px solid rgba(28,46,39,.14); border-radius: 12px; box-shadow: 0 16px 42px rgba(25,43,37,.2); backdrop-filter: blur(14px); }
.assignment-popover-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 8px; padding: 2px 2px 10px; border-bottom: 1px solid #e6ebe8; cursor: grab; touch-action: none; user-select: none; }
.assignment-popover.dragging { box-shadow: 0 20px 50px rgba(25,43,37,.28); }
.assignment-popover.dragging .assignment-popover-head { cursor: grabbing; }
.assignment-popover-head > div { display: grid; gap: 4px; }
.assignment-popover-head span { color: #747f7a; font-size: 9px; font-weight: 700; }
.assignment-popover-head strong { font-size: 13px; }
.assignment-popover-head strong b { color: var(--teal); font-size: 16px; }
.assignment-drag-handle { display: grid; place-items: center; width: 22px; height: 30px; color: #9aa39f !important; border-radius: 6px; }
.assignment-popover-head:hover .assignment-drag-handle { color: var(--teal) !important; background: #edf4f1; }
.assignment-drag-handle svg { width: 14px; height: 18px; }
.assignment-drag-handle circle { fill: currentColor; stroke: none; }
.assignment-popover-head .icon-button { cursor: pointer; }
.assignment-target-list { display: grid; gap: 5px; max-height: 245px; padding: 9px 1px 3px; overflow: auto; scrollbar-width: thin; }
.assignment-target { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; width: 100%; min-height: 39px; padding: 6px 9px; color: #35413d; text-align: left; background: #f6f8f6; border: 1px solid #e5e9e7; border-radius: 8px; cursor: pointer; }
.assignment-target:hover { background: #edf4f1; border-color: #c7dcd5; }
.assignment-target:disabled { opacity: .55; cursor: wait; }
.assignment-target-swatch { width: 13px; height: 13px; background: var(--target-color); border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 1px color-mix(in srgb, var(--target-color) 70%, #66736e); }
.assignment-target.unassign .assignment-target-swatch { position: relative; background: #fff; border-color: #fff; box-shadow: 0 0 0 1px #929b97; }
.assignment-target.unassign .assignment-target-swatch::after { position: absolute; top: 4px; left: -1px; width: 11px; height: 1px; background: #7e8984; content: ""; transform: rotate(-45deg); }
.assignment-target-name { display: grid; gap: 1px; min-width: 0; }
.assignment-target-name strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.assignment-target-name span { color: #87908c; font-size: 8px; }
.assignment-target > b { color: #69746f; font-size: 9px; }
.assignment-popover > p { margin: 8px 2px 0; color: #7b8581; font-size: 8px; line-height: 1.45; text-align: center; }

.parking-draft { position: absolute; z-index: 620; right: 50%; bottom: 31px; display: grid; grid-template-columns: auto minmax(185px, 1fr) auto auto; align-items: center; gap: 11px; min-width: 515px; padding: 12px; background: #fff; border: 1px solid rgba(34,50,44,.14); border-radius: 13px; box-shadow: var(--shadow); transform: translateX(50%); }
.draft-pin { display: grid; place-items: center; width: 38px; height: 38px; color: var(--orange); background: #fff0e9; border-radius: 10px; }
.draft-pin svg { width: 20px; height: 20px; }
.draft-content { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.draft-content label { color: #68736e; font-size: 9px; font-weight: 700; }
.draft-content input { grid-column: 1; width: 100%; padding: 1px 0 3px; font-size: 13px; font-weight: 700; background: transparent; border: 0; border-bottom: 1px solid #dbe1de; outline: 0; }
.draft-content span { grid-row: 1 / 3; grid-column: 2; align-self: center; color: #8a928f; font-size: 9px; }
.text-button { height: 38px; padding: 0 10px; color: #68736e; font-size: 10px; font-weight: 700; background: transparent; }

.loading-state { position: absolute; z-index: 650; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--ink); background: rgba(239,242,239,.72); backdrop-filter: blur(3px); }
.spinner { width: 32px; height: 32px; margin-bottom: 13px; border: 3px solid rgba(13,116,104,.15); border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
.loading-state strong { font-size: 13px; }
.loading-state span { margin-top: 5px; color: var(--muted); font-size: 10px; }

.guide-nudge { position: fixed; z-index: 950; top: 50%; right: 18px; display: grid; width: 268px; padding: 20px; background: rgba(255,255,255,.97); border: 1px solid rgba(25,48,40,.14); border-radius: 14px; box-shadow: 0 18px 52px rgba(20,42,34,.24); transform: translateY(-50%); backdrop-filter: blur(16px); animation: guide-nudge-in .28s ease both; }
.guide-nudge::before { position: absolute; top: 0; right: 0; left: 0; height: 4px; background: linear-gradient(90deg, var(--teal), #31a58f); border-radius: 14px 14px 0 0; content: ""; }
.guide-nudge-close { position: absolute; top: 9px; right: 9px; width: 27px; height: 27px; padding: 0; color: #77817d; font-size: 19px; line-height: 1; background: transparent; border: 0; border-radius: 7px; cursor: pointer; }
.guide-nudge-close:hover { color: var(--ink); background: #eef2ef; }
.guide-nudge-kicker { margin-bottom: 7px; color: var(--teal); font-size: 8px; font-weight: 850; letter-spacing: .14em; }
.guide-nudge > strong { padding-right: 18px; font-size: 16px; line-height: 1.35; }
.guide-nudge > p { margin: 8px 0 14px; color: #68736e; font-size: 10px; line-height: 1.65; }
.guide-nudge-start { height: 38px; color: #fff; font-size: 11px; font-weight: 800; background: var(--teal); border: 0; border-radius: 9px; cursor: pointer; }
.guide-nudge-start:hover { background: var(--teal-dark); }
.guide-nudge > label { display: flex; align-items: center; gap: 6px; margin-top: 11px; color: #79827e; font-size: 9px; cursor: pointer; }
.guide-nudge input { width: 13px; height: 13px; margin: 0; accent-color: var(--teal); }

.guide-layer { position: fixed; z-index: 1000; inset: 0; pointer-events: none; }
.guide-mask { position: fixed; z-index: 1000; background: rgba(15,23,42,.59); transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease; }
.guide-highlight { position: fixed; z-index: 1001; pointer-events: none; border: 3px solid #fff; border-radius: 11px; box-shadow: 0 0 0 4px rgba(13,116,104,.78), 0 10px 38px rgba(0,0,0,.28); transition: top .2s ease, left .2s ease, width .2s ease, height .2s ease; }
.guide-popover { position: fixed; z-index: 1002; width: min(320px, calc(100vw - 28px)); padding: 17px; pointer-events: auto; background: #fff; border: 1px solid rgba(25,48,40,.12); border-radius: 13px; box-shadow: 0 20px 52px rgba(0,0,0,.26); }
.guide-progress { color: var(--teal); font-size: 9px; font-weight: 850; letter-spacing: .08em; }
.guide-popover h2 { margin: 7px 0 7px; font-size: 17px; letter-spacing: -.02em; }
.guide-popover > p { min-height: 49px; margin: 0; color: #626d68; font-size: 11px; line-height: 1.6; }
.guide-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 15px; }
.guide-actions > div { display: flex; gap: 7px; }
.guide-actions button { height: 34px; padding: 0 12px; font-size: 10px; font-weight: 750; border: 0; border-radius: 8px; cursor: pointer; }
.guide-skip { color: #737d79; background: transparent; }
.guide-skip:hover { background: #f0f3f1; }
.guide-back { color: #54605b; background: #eef2ef; }
.guide-back:hover { background: #e3e9e5; }
.guide-next { min-width: 68px; color: #fff; background: var(--teal); }
.guide-next:hover { background: var(--teal-dark); }

.toast-region { position: absolute; z-index: 900; right: 18px; top: 101px; display: grid; gap: 8px; width: 300px; pointer-events: none; }
.toast { padding: 12px 14px; color: #fff; font-size: 11px; line-height: 1.45; background: rgba(24,35,31,.94); border-radius: 9px; box-shadow: 0 8px 24px rgba(25,37,32,.2); animation: toast-in .25s ease; }
.toast.error { background: rgba(143,57,41,.96); }

.address-icon, .parking-icon-wrap { background: transparent; border: 0; }
.address-dot-map { position: relative; display: block; width: 14px; height: 14px; background: #fff; border: 2px solid rgba(42,58,52,.34); border-radius: 50%; box-shadow: 0 2px 5px rgba(20,39,33,.42); transition: transform .12s, background .12s; }
.address-dot-map.linked { background: var(--point-color); border-color: #fff; }
.address-dot-map.pending-link { background: var(--point-color); border-color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--point-color) 28%, transparent), 0 2px 5px rgba(38,48,43,.42); transform: scale(1.12); }
.address-dot-map.pending-unlink { background: #fff; border-color: var(--point-color); border-style: dashed; box-shadow: 0 0 0 4px rgba(113,124,119,.16); }
.address-dot-map.awaiting-assignment { background: #fff; border-color: var(--ink); box-shadow: 0 0 0 4px rgba(23,32,29,.2), 0 2px 6px rgba(20,39,33,.52); transform: scale(1.18); }
.parking-pin-map { position: relative; display: grid; place-items: center; width: 30px; height: 30px; color: #fff; font-size: 10px; font-weight: 850; background: var(--parking-color, var(--orange)); border: 3px solid #fff; border-radius: 50% 50% 50% 0; box-shadow: 0 4px 11px rgba(55,58,43,.38); transform: rotate(-45deg); }
.parking-pin-map span { transform: rotate(45deg); }
.parking-icon-wrap.long-pressing .parking-pin-map { animation: parking-hold 5s linear both; }
.parking-icon-wrap.selected .parking-pin-map { box-shadow: 0 0 0 5px color-mix(in srgb, var(--parking-color, var(--teal)) 25%, transparent), 0 4px 11px rgba(30,61,51,.38); }
.parking-delete-popup .leaflet-popup-content-wrapper { border: 1px solid rgba(130,47,32,.16); border-radius: 12px; box-shadow: 0 14px 36px rgba(42,30,27,.24); }
.parking-delete-popup .leaflet-popup-content { margin: 14px; }
.parking-delete-popup .leaflet-popup-tip { box-shadow: none; }
.parking-delete-confirm { display: grid; gap: 5px; color: var(--ink); }
.parking-delete-confirm > span { color: #aa4937; font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.parking-delete-confirm > strong { font-size: 14px; }
.parking-delete-confirm > p { margin: 2px 0 7px; color: #707a76; font-size: 9px; line-height: 1.45; }
.parking-delete-confirm > div { display: grid; grid-template-columns: 1fr 1.25fr; gap: 7px; }
.parking-delete-confirm button { height: 34px; font-size: 10px; font-weight: 750; border: 0; border-radius: 8px; cursor: pointer; }
.parking-delete-cancel { color: #606b66; background: #eef1ef; }
.parking-delete-button { color: #fff; background: #c8513b; }
.parking-delete-button:hover { background: #aa3e2d; }
.parking-delete-button:disabled { opacity: .6; cursor: wait; }
.parking-tooltip { padding: 7px 9px !important; color: var(--ink) !important; font-size: 10px !important; font-weight: 700 !important; border: 0 !important; box-shadow: 0 5px 16px rgba(33,49,43,.16) !important; }
.address-tooltip { padding: 7px 9px !important; color: #36413d !important; font-size: 10px !important; border: 0 !important; box-shadow: 0 5px 15px rgba(33,49,43,.15) !important; }
.address-tooltip b { display: block; margin-bottom: 2px; color: var(--ink); }
.address-cluster { display: grid !important; place-items: center; color: var(--ink); font-size: 10px; font-weight: 850; background: rgba(255,255,255,.96); border: 4px solid rgba(13,116,104,.72); border-radius: 50%; box-shadow: 0 3px 13px rgba(27,63,52,.28); }
.address-cluster.medium { border-color: rgba(9,100,92,.83); }
.address-cluster.large { border-color: rgba(7,78,73,.92); }
.address-cluster span { line-height: 1; }
.leaflet-tooltip::before { display: none; }
.link-line { stroke-linecap: round; }
.map-editor.create-mode .map { cursor: crosshair; }
.map-editor.lasso-mode .map { cursor: crosshair; }
.map-editor.lasso-mode .leaflet-dragging .leaflet-grab,
.map-editor.lasso-mode .leaflet-grab { cursor: crosshair; }
.map-editor.parking-drag-mode .leaflet-container,
.map-editor.parking-drag-mode .leaflet-marker-draggable { cursor: grabbing; }

@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(-5px); } }
@keyframes guide-nudge-in { from { opacity: 0; transform: translate(12px, -50%); } }
@keyframes parking-hold {
  from { box-shadow: 0 4px 11px rgba(55,58,43,.38), 0 0 0 0 rgba(200,81,59,.42); }
  to { box-shadow: 0 4px 11px rgba(55,58,43,.38), 0 0 0 10px rgba(200,81,59,.08); }
}

@media (max-width: 1120px) {
  .workspace { grid-template-columns: 330px minmax(0, 1fr); }
  .map-toolbar { grid-template-columns: minmax(180px, 1fr) auto; }
  .map-stats { display: none; }
}

@media (max-width: 760px) {
  html, body { overflow: auto; }
  .workspace { display: block; min-height: 100vh; }
  .workbench { position: relative; display: block; height: 43vh; min-height: 330px; border-right: 0; }
  .search-pane { display: grid; height: 100px; }
  .postcode-pane { height: calc(43vh - 100px); min-height: 230px; }
  .map-editor { height: 57vh; min-height: 430px; }
  .map-toolbar { grid-template-columns: 1fr auto; right: 10px; left: 10px; top: 10px; min-height: 61px; }
  .map-selection-button { top: 83px; }
  .primary-button { padding: 0 10px; }
  .parking-panel { top: 83px; left: 10px; width: 270px; }
  .parking-draft { right: 10px; left: 10px; min-width: 0; transform: none; }
  .draft-content span { display: none; }
  .legend-card { display: none; }
  .empty-state { width: calc(100% - 36px); }
  .guide-nudge { display: none; }
  .guide-popover { right: 14px; bottom: 14px; left: 14px !important; top: auto !important; width: auto; }
}
