:root { --green: #125d49; --green-dark: #0e4c3b; --green-soft: #e9f1e7; --ink: #263b2e; --muted: #7e8d73; --line: #e5eadf; --canvas: #f8f9f6; --gold: #c6a063; --white: #fff; }
* { box-sizing: border-box; }
body { margin: 0; height: 100vh; height: 100dvh; overflow: hidden; background: var(--canvas); color: var(--ink); font: 500 13px/1.8 Cairo, Tahoma, Arial, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button, a, label { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { outline: none; }
button, a { touch-action: manipulation; }
button:disabled { opacity: .45; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
button, a, label, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #b5a069; outline-offset: 3px; }
[hidden] { display: none !important; }
.svg-library { position: absolute; height: 0; width: 0; overflow: hidden; pointer-events: none; }
.icon { display: inline-block; flex: 0 0 auto; width: 19px; height: 19px; vertical-align: middle; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 37px; padding: 8px 14px; border: 1px solid transparent; border-radius: 7px; color: var(--ink); font-size: 11px; font-weight: 700; line-height: 1.6; white-space: nowrap; transition: background .15s, box-shadow .15s, border-color .15s; }
.button .icon { width: 16px; height: 16px; }
.button.primary { background: var(--green); border-color: var(--green); color: white; }
.button.primary:hover { background: var(--green-dark); box-shadow: 0 3px 10px #125d4920; }
.button.secondary { border-color: #dce4d5; background: #fff; color: #627854; }
.button.secondary:hover { border-color: #8ca47b; background: #f5f8ef; }
.button.ghost { border-color: transparent; background: #ffffffeb; color: #7b866e; }
.button.ghost:hover { background: #f1f4e9; }
.button.danger { color: #a35e4c; background: #fff7f2; border-color: #e8d5c9; }
.button.danger:hover { background: #f9ede4; border-color: #cfa18e; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; padding: 8px; height: 32px; width: 32px; border: 0; border-radius: 7px; background: #f1f4eb; color: #7b8d6e; }
.icon-button:hover { background: #e5ecdc; }
.icon-button .icon { height: 16px; width: 16px; }

/* The same home brand, in a focused workspace. */
.workspace-header { position: relative; z-index: 600; display: flex; align-items: center; gap: 23px; height: 81px; padding: 0 28px; border-bottom: 1px solid #e3e8dc; background: #fff; box-shadow: 0 1px 7px #23452904; }
.brand { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.brand-icon { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; background: var(--green); border-radius: 10px; color: white; }
.brand-icon .icon { width: 23px; height: 23px; }
.brand strong { display: block; font-size: 27px; font-weight: 800; letter-spacing: -.8px; line-height: 1.15; }
.brand strong > span { color: var(--gold); }
.brand small { display: block; font-size: 8px; color: #809173; line-height: 1.8; margin-top: 3px; }
.header-divider { height: 33px; width: 1px; background: var(--line); }
.workspace-title > span { font-size: 8px; color: #98a38b; }
.workspace-title h1 { font-size: 16px; font-weight: 800; margin: 0; line-height: 1.7; }
.header-status { display: flex; align-items: center; gap: 6px; margin-right: auto; padding-right: 16px; font-size: 9px; color: #829473; white-space: nowrap; }
.header-status i { height: 6px; width: 6px; background: #8da374; border-radius: 50%; box-shadow: 0 0 0 3px #eef3e8; }
.save-error { color: #ad7056; }
.workspace-header-actions { display: flex; align-items: center; gap: 8px; }
.import-button { position: relative; overflow: hidden; cursor: pointer; }
.import-button input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.import-button:focus-within { outline: 3px solid #b5a069; outline-offset: 3px; }
.back-link { display: flex; gap: 5px; align-items: center; font-size: 9px; color: #829372; margin-right: 13px; padding-right: 20px; border-right: 1px solid var(--line); white-space: nowrap; }
.back-link .icon { width: 14px; height: 14px; }
.back-link:hover { color: var(--green); }

/* A restrained, scrollable panel keeps the map in focus. */
.workspace-layout { display: grid; grid-template-columns: 322px minmax(0, 1fr); height: calc(100vh - 81px); height: calc(100dvh - 81px); }
.workspace-sidebar { display: flex; flex-direction: column; background: #fff; border-left: 1px solid #dde4d5; z-index: 500; min-width: 0; min-height: 0; box-shadow: -4px 0 17px #243c2405; }
.sidebar-heading { padding: 23px 23px 18px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.eyebrow { color: #95a27d; font-size: 9px; }
.sidebar-heading h2 { margin: 3px 0 0; font-weight: 800; font-size: 19px; line-height: 1.7; letter-spacing: -.4px; }
.workspace-tag { border: 1px solid #dfe7d2; border-radius: 4px; color: #8c9a76; background: #f8faef; font-size: 8px; padding: 3px 6px; }
.sidebar-tabs { display: flex; margin: 0 22px; gap: 10px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.sidebar-tab { display: flex; align-items: center; justify-content: center; flex: 1; gap: 6px; position: relative; padding: 10px 0 13px; border: 0; background: none; color: #99a48c; font-size: 10px; font-weight: 600; white-space: nowrap; }
.sidebar-tab .icon { height: 15px; width: 15px; }
.sidebar-tab.active { color: var(--green); font-weight: 800; }
.sidebar-tab.active:after { content: ''; position: absolute; bottom: -1px; right: 0; left: 0; height: 2px; background: var(--green); border-radius: 2px; }
.sidebar-tab:hover { color: var(--green); }
.sidebar-scroll { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #d4decb transparent; }
.sidebar-section { padding: 23px 22px; border-bottom: 1px solid #e9eee2; }
.section-topline { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.section-topline h3 { display: flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 800; margin: 0; color: #4e6942; line-height: 1.8; }
.section-topline > span:not(.selection-dot) { font-size: 8px; color: #a0aa91; }
.section-icon { height: 16px; width: 16px; color: #acb89a; }
.layer-toggle { position: relative; display: flex; align-items: center; gap: 10px; margin-top: 14px; cursor: pointer; }
.layer-icon { display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px; background: #eef4e7; color: #7d9769; }
.layer-icon .icon { width: 17px; height: 17px; }
.layer-icon.boundaries { background: #f7f2e4; color: #b29a67; }
.layer-toggle strong { display: block; color: #647b56; font-size: 10px; line-height: 1.7; font-weight: 700; }
.layer-toggle small { display: block; color: #a4af96; font-size: 8px; margin-top: 1px; }
.layer-toggle input { position: absolute; left: 0; top: 50%; width: 31px; height: 20px; margin: 0; transform: translateY(-50%); opacity: 0; }
.toggle-track { position: relative; margin-right: auto; width: 30px; height: 18px; background: #dce4d3; border-radius: 12px; transition: background .15s; }
.toggle-track:after { content: ''; position: absolute; top: 3px; right: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px #263b2e15; transition: transform .15s; }
.layer-toggle input:checked + .toggle-track { background: var(--green); }
.layer-toggle input:checked + .toggle-track:after { transform: translateX(-12px); }
.layer-toggle input:focus-visible + .toggle-track { outline: 3px solid #b5a069; outline-offset: 3px; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; height: 19px; min-width: 19px; padding: 0 4px; border-radius: 5px; background: #edf2e6; color: #82976d; font-size: 9px; font-weight: 600; }
.boundaries-list { display: flex; flex-direction: column; gap: 9px; }
.boundary-item { position: relative; display: flex; gap: 10px; align-items: center; padding: 12px; width: 100%; border: 1px solid #e1e8d8; background: #fcfdf9; border-radius: 9px; color: #617752; text-align: right; cursor: pointer; transition: border-color .15s, background .15s; }
.boundary-item:hover { border-color: #a3b792; background: #f6f9f1; }
.boundary-item.active { border-color: #80a16e; background: #f0f6e9; box-shadow: 0 0 0 1px #80a16e18; }
.boundary-item.active:before { content: ''; position: absolute; right: -1px; top: 15px; bottom: 15px; width: 3px; border-radius: 5px 0 0 5px; background: var(--green); }
.boundary-item .icon { width: 20px; height: 20px; color: #91a67e; }
.boundary-item strong { display: block; font-size: 10px; font-weight: 700; line-height: 1.8; }
.boundary-item small { display: block; font-size: 8px; color: #97a58a; margin-top: 3px; }
.boundary-item > span:first-child:empty, .boundary-color, .boundary-swatch { width: 10px; height: 10px; flex: 0 0 10px; border: 2px solid #fff; border-radius: 3px; box-shadow: 0 0 0 1px #6f875f28; }
.boundary-item > span:nth-child(2), .boundary-item > div { flex: 1; min-width: 0; }
.boundary-item > svg:last-child { width: 12px; height: 12px; margin-right: auto; }
.section-footnote { display: flex; gap: 6px; align-items: flex-start; font-size: 8px; line-height: 1.95; color: #a0ac90; margin: 13px 0 0; }
.section-footnote .icon { width: 12px; height: 12px; margin-top: 2px; }
.empty-boundaries { padding: 17px 7px 9px; text-align: center; color: #8a9a7c; }
.empty-outline { display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; background: #f4f7ed; color: #a2b68e; border: 1px dashed #d2dfc4; border-radius: 12px; margin: 0 auto 13px; }
.empty-outline .icon { width: 24px; height: 24px; }
.empty-boundaries strong { font-size: 11px; font-weight: 700; }
.empty-boundaries p { font-size: 9px; line-height: 1.95; max-width: 210px; margin: 5px auto 0; color: #a1ad92; }
.selection-dot { height: 7px; width: 7px; border-radius: 50%; background: #8aa571; box-shadow: 0 0 0 4px #edf4e4; }
.selected-feature-panel { background: #fdfefb; }
.boundary-form { display: flex; flex-direction: column; }
.boundary-form label { color: #6f845e; font-size: 9px; font-weight: 700; margin: 0 0 6px; }
.boundary-form label > span:not(.optional-label) { color: #a4b494; }
.boundary-form input:not([type=color]), .boundary-form select, .boundary-form textarea { width: 100%; max-width: 100%; background: #fff; border: 1px solid #dfe7d5; border-radius: 7px; color: #4a673d; padding: 9px 10px; font-size: 10px; min-height: 38px; margin-bottom: 13px; }
.boundary-form input::placeholder, .boundary-form textarea::placeholder { color: #a9b59a; font-size: 9px; }
.boundary-form input:focus, .boundary-form select:focus, .boundary-form textarea:focus { border-color: #8ba478; box-shadow: 0 0 0 3px #8ba47813; outline: none; }
.boundary-form textarea { min-height: 75px; resize: vertical; line-height: 1.95; }
.boundary-form select { cursor: pointer; }
.field-pair { display: grid; grid-template-columns: 1fr 59px; align-items: start; gap: 13px; }
.field-pair > div { min-width: 0; }
.field-pair label { display: block; }
.color-field input { height: 38px; width: 100%; padding: 5px; background: #fff; border: 1px solid #dfe7d5; border-radius: 7px; cursor: pointer; }
.color-field input::-webkit-color-swatch-wrapper { padding: 0; }
.color-field input::-webkit-color-swatch { border: 0; border-radius: 3px; }
.optional-label { font-size: 8px; color: #adb69e; font-weight: 500; margin-right: 3px; }
.save-feature { width: 100%; margin-top: 2px; }
.feature-actions { display: flex; gap: 7px; margin-top: 9px; }
.feature-actions .button { flex: 1; padding: 8px 9px; font-size: 9px; min-height: 34px; }
.feature-actions .button .icon { width: 14px; height: 14px; }
.sidebar-tip { display: flex; gap: 10px; margin: 21px 22px 24px; padding: 13px 11px; border-radius: 8px; background: #f3f6ed; color: #91a17f; }
.tip-icon { display: flex; align-items: center; justify-content: center; height: 26px; width: 26px; border-radius: 7px; background: #e7eedb; color: #94ac7d; flex: 0 0 auto; }
.tip-icon .icon { width: 15px; height: 15px; }
.sidebar-tip strong { font-size: 9px; color: #83996f; font-weight: 700; }
.sidebar-tip p { font-size: 8px; line-height: 1.95; margin: 2px 0 0; }
.sidebar-footer { display: flex; align-items: center; justify-content: center; gap: 6px; flex-shrink: 0; padding: 12px 15px; border-top: 1px solid #e7ecdf; background: #fafcf6; color: #9eac8c; font-size: 8px; }
.sidebar-footer .icon { width: 12px; height: 12px; }

/* Floating map controls are grouped by purpose. */
.workspace-map-shell { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #e8eedf; isolation: isolate; }
.workspace-map { position: absolute; inset: 0; z-index: 0; background: #e6ecdc; }
.google-map { z-index: 1; }
.map-location { position: absolute; top: 20px; right: 21px; z-index: 400; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid #dfe7d5; border-radius: 10px; background: #fffffffa; box-shadow: 0 3px 13px #2443290c; min-width: 218px; }
.map-location > .icon { width: 21px; height: 21px; color: #7d9867; }
.map-location label { font-size: 8px; display: block; color: #a2ad92; line-height: 1.8; }
.map-location select { border: 0; background: transparent; padding: 0 0 0 12px; color: #566e47; font-size: 11px; font-weight: 700; width: 100%; cursor: pointer; }
.sidebar-toggle { display: none; }
.map-toolbar { position: absolute; left: 19px; top: 20px; z-index: 410; display: flex; flex-direction: column; gap: 3px; padding: 9px 7px; background: #fffffff7; border: 1px solid #dfe7d5; border-radius: 11px; box-shadow: 0 3px 13px #2443290e; width: 83px; }
.toolbar-caption { font-size: 8px; color: #a2ae90; text-align: center; margin-bottom: 4px; }
.tool-button { display: flex; flex-direction: column; gap: 3px; align-items: center; justify-content: center; min-height: 53px; padding: 8px 3px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #8b9e79; transition: background .15s, border-color .15s; }
.tool-button .icon { width: 20px; height: 20px; }
.tool-button > span { font-size: 8px; line-height: 1.8; font-weight: 600; white-space: nowrap; }
.tool-button.active { background: var(--green); border-color: var(--green); color: #fff; box-shadow: 0 2px 6px #125d4917; }
.tool-button:not(.active):hover { border-color: #dfe8d3; background: #f1f6e9; color: #5f7f4b; }
.tool-divider { height: 1px; background: #edf1e5; margin: 4px 7px; }
.basemap-control { position: absolute; left: 19px; bottom: 60px; z-index: 400; width: 255px; padding: 11px; background: #fffffff5; border: 1px solid #dfe7d5; border-radius: 10px; box-shadow: 0 3px 13px #24432912; }
.basemap-label { font-size: 8px; display: block; color: #9aa98a; margin-bottom: 7px; padding-right: 2px; }
.basemap-options { display: flex; gap: 7px; }
.basemap-button { display: flex; align-items: center; justify-content: flex-start; gap: 7px; flex: 1; padding: 6px; min-width: 0; border: 1px solid #e4e9dc; border-radius: 6px; background: white; text-align: right; color: #839573; }
.basemap-button.active { border-color: #7d9e6c; color: #4c6d3e; background: #f6faf1; box-shadow: 0 0 0 1px #7d9e6c13; }
.basemap-button:hover { border-color: #9eb28d; }
.basemap-button > span:last-child { font-size: 8px; white-space: nowrap; line-height: 1.8; font-weight: 700; }
.basemap-button small { display: block; font-family: Arial, sans-serif; font-size: 6px; font-weight: 500; color: #a2af93; }
.basemap-preview { width: 31px; height: 33px; border: 1px solid #dbe5cf; border-radius: 4px; flex: 0 0 auto; overflow: hidden; }
.osm-preview { background: linear-gradient(35deg,transparent 39%,#fff 40%,#fff 49%,transparent 50%), linear-gradient(-63deg,transparent 42%,#f9f6e8 43%,#f9f6e8 53%,transparent 54%), linear-gradient(90deg,#dce9cc 35%,#eaf2dd 35%,#eaf2dd 70%,#d5e3c2 70%); }
.satellite-preview { display: flex; align-items: center; justify-content: center; background: linear-gradient(35deg,#38523b 39%,#687350 40%,#687350 49%,#394e32 50%); color: #dee9ce; border-color: #465c3d; }
.satellite-preview .icon { width: 19px; height: 19px; }
.google-settings { display: flex; align-items: center; gap: 4px; justify-content: center; padding: 0; width: 100%; border: 0; background: none; color: #95a683; font-size: 7px; margin-top: 9px; }
.google-settings .icon { width: 11px; height: 11px; }
.google-settings:hover { color: var(--green); }
.map-fit-button { position: absolute; top: 98px; right: 21px; z-index: 400; display: flex; align-items: center; gap: 7px; padding: 9px 12px; background: #fffffffa; border: 1px solid #dfe7d5; border-radius: 8px; color: #7f976d; font-size: 9px; box-shadow: 0 2px 8px #24432908; }
.map-fit-button .icon { height: 17px; width: 17px; }
.map-fit-button:hover { border-color: #a0b28c; background: #f7faef; }
.drawing-status { position: absolute; bottom: 62px; right: 22px; z-index: 420; display: flex; flex-direction: column; gap: 9px; max-width: calc(100% - 320px); align-items: flex-start; pointer-events: none; }
.drawing-actions { display: flex; flex-wrap: wrap; gap: 6px; pointer-events: auto; }
.drawing-actions:has(> [hidden]):not(:has(> :not([hidden]))) { display: none; }
.drawing-actions .button { font-size: 9px; min-height: 35px; padding: 8px 11px; box-shadow: 0 2px 8px #2747220b; }
.drawing-actions .icon { height: 14px; width: 14px; }
.drawing-hint { display: flex; align-items: center; gap: 7px; background: #ffffffed; border: 1px solid #e0e7d7; border-radius: 7px; padding: 9px 12px; color: #7b926b; font-size: 8px; line-height: 1.9; box-shadow: 0 3px 10px #24432905; }
.drawing-hint .icon { width: 14px; height: 14px; }
.map-bottom-strip { position: absolute; bottom: 0; right: 0; left: 0; height: 34px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 22px; background: #fffffff2; border-top: 1px solid #dfe7d5; color: #95a488; font-size: 8px; z-index: 420; }
.map-legend { display: flex; align-items: center; gap: 6px; }
.map-legend > i { width: 6px; height: 6px; display: inline-block; border-radius: 50%; margin-right: 7px; }
.map-legend > i:first-child { margin-right: 0; }
.legend-sale { background: var(--green); }
.legend-rent { background: #be975d; }
.legend-line { width: 15px; height: 0; border-top: 2px solid #638e4e; margin-right: 9px; }
.coord-readout { font: 9px/1.5 Arial, sans-serif; letter-spacing: .4px; }
.layer-warning { position: absolute; top: 155px; right: 21px; z-index: 430; border: 1px solid #e8d6ba; background: #fff9ed; color: #997d50; border-radius: 8px; padding: 11px 13px; width: min(310px,calc(100% - 150px)); font-size: 10px; box-shadow: 0 3px 10px #69513010; }

/* Native Leaflet shapes, handles and property pins. */
.leaflet-container { font-family: Cairo, Tahoma, Arial, sans-serif !important; }
.leaflet-container .leaflet-control-attribution { font-size: 7px; background: #ffffffce; color: #6d7b61; }
.leaflet-bottom { bottom: 36px; }
.leaflet-right { right: 11px; }
.leaflet-control-zoom { border: 1px solid #d9e2ce !important; border-radius: 7px !important; overflow: hidden; box-shadow: 0 2px 8px #2c452013 !important; }
.leaflet-control-zoom a { height: 30px !important; width: 30px !important; line-height: 29px !important; color: #627e50 !important; font-size: 20px !important; }
.leaflet-popup-content-wrapper { border: 1px solid #dfe8d6; border-radius: 10px; box-shadow: 0 6px 20px #23452116; }
.leaflet-popup-content { font-family: Cairo, Tahoma, sans-serif; font-size: 11px; line-height: 1.9; direction: rtl; text-align: right; min-width: 130px; margin: 14px 17px; }
.leaflet-popup-content strong { color: var(--green); font-size: 12px; }
.leaflet-popup-content a { display: inline-block; margin-top: 6px; font-size: 10px; font-weight: 700; color: var(--green); }
.leaflet-popup-content a:hover { text-decoration: underline; }
.workspace-popup p { font-size: 12px; color: #668356; margin: 6px 0 3px; font-weight: 700; }
.workspace-popup small { color: #8d9e7e; font-size: 9px; }
.workspace-property-pin { position: relative; display: block; width: max-content; min-width: 63px; padding: 5px 9px; border: 2px solid white; border-radius: 7px; background: var(--green); color: white; box-shadow: 0 3px 8px #1d372529; text-align: center; font-size: 10px; font-weight: 800; white-space: nowrap; line-height: 1.5; }
.workspace-property-pin:after { content: ''; position: absolute; height: 7px; width: 7px; left: 50%; bottom: -5px; border-right: 2px solid white; border-bottom: 2px solid white; transform: translateX(-50%) rotate(45deg); background: inherit; }
.workspace-property-pin.rent { background: #b08a4f; }
.workspace-property-pin.sale { background: var(--green); }
.workspace-property-pin:hover { background: var(--green-dark); }
.vertex-handle { width: 12px !important; height: 12px !important; border: 2px solid var(--green); border-radius: 50%; background: #fff; box-shadow: 0 1px 4px #1d3c2a30; cursor: grab; }
.vertex-handle:active { cursor: grabbing; }
.midpoint-handle { width: 9px !important; height: 9px !important; border: 2px solid #7f9c6d; border-radius: 50%; background: #e5eedb; box-shadow: 0 1px 3px #26472020; opacity: .9; cursor: copy; }
.sketch-point { width: 9px !important; height: 9px !important; border: 2px solid #fff; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 1px #125d4970; }
.draw-label { background: #fffef8f2; border: 1px solid #c6d8b5; border-radius: 5px; color: #4d6d3e; padding: 3px 8px; box-shadow: 0 2px 5px #1f381512; font-size: 9px; font-weight: 700; line-height: 1.8; white-space: nowrap; }
.draw-label.leaflet-tooltip:before { border-top-color: #c6d8b5; }
.workspace-map-shell.drawing .leaflet-container, .workspace-map-shell[data-mode=draw] .leaflet-container { cursor: crosshair; }

/* Every estimate includes its scope and the records behind it. */
.estimate-tag { padding: 2px 6px; border-radius: 4px; background: #f4f1e4; color: #ad986c !important; font-size: 8px !important; }
.analysis-intro { font-size: 10px; line-height: 2; color: #94a284; margin: 0 0 17px; }
.analysis-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.metric-card { position: relative; padding: 13px 11px 12px; border: 1px solid #e2e9d9; border-radius: 9px; background: #fbfcf8; overflow: hidden; min-width: 0; }
.metric-card > .icon { color: #a7b994; height: 19px; width: 19px; margin-bottom: 8px; }
.metric-card > span { display: block; font-size: 8px; color: #94a683; }
.metric-card > strong { display: block; font-size: 17px; font-weight: 800; color: var(--green); line-height: 1.8; letter-spacing: -.3px; margin: 2px 0; overflow-wrap: anywhere; }
.metric-card > small { display: block; font-size: 7px; color: #aab59c; }
.analysis-properties { display: flex; flex-direction: column; gap: 9px; }
.analysis-property { display: flex; gap: 9px; align-items: center; border: 1px solid #e4eadb; border-radius: 8px; padding: 10px; color: #718961; background: #fdfefb; font-size: 10px; transition: border-color .15s, background .15s; }
.analysis-property:hover { background: #f3f8ec; border-color: #9eb38c; }
.analysis-property strong { display: block; font-size: 10px; font-weight: 700; }
.analysis-property small { display: block; color: #9dad8e; font-size: 8px; margin-top: 2px; }
.analysis-property > span { flex: 1; min-width: 0; }
.analysis-property > b { font-size: 10px; font-weight: 800; color: var(--green); text-align: left; white-space: nowrap; }
.analysis-property img { height: 43px; width: 47px; object-fit: cover; border-radius: 5px; flex-shrink: 0; }
.analysis-property .icon { height: 15px; width: 15px; }
.analysis-empty { text-align: center; font-size: 10px; color: #a3af95; border: 1px dashed #e1e9d7; background: #fafcf5; padding: 20px 13px; border-radius: 8px; margin: 0; line-height: 2; }
.estimate-notice { display: flex; gap: 8px; align-items: flex-start; margin: 22px; padding: 12px; background: #f5f3e8; color: #ab9b75; border-radius: 8px; border: 1px solid #ede6d1; }
.estimate-notice .icon { height: 14px; width: 14px; margin-top: 3px; }
.estimate-notice p { margin: 0; font-size: 8px; line-height: 2; }

/* A session-only, official Google Maps connection. */
.google-dialog { position: fixed; inset: 0; margin: auto; width: min(480px,calc(100vw - 30px)); max-height: 91vh; max-height: 91dvh; padding: 27px; border: 1px solid #dce5d0; border-radius: 17px; background: #fff; color: var(--ink); overflow-y: auto; box-shadow: 0 24px 80px #142e2452; }
.google-dialog::backdrop { background: #132c225e; backdrop-filter: blur(4px); }
.dialog-topline { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.dialog-icon { width: 47px; height: 47px; display: flex; align-items: center; justify-content: center; background: #eaf2e2; color: #7e9f65; border-radius: 12px; }
.dialog-icon .icon { width: 26px; height: 26px; }
.google-dialog h2 { margin: 3px 0 10px; font-weight: 800; font-size: 25px; line-height: 1.7; letter-spacing: -.5px; }
.dialog-intro { color: #889a78; font-size: 11px; line-height: 2; margin: 0 0 23px; }
.google-dialog label { display: block; margin-bottom: 7px; color: #6c865b; font-weight: 700; font-size: 10px; }
#google-key { display: block; width: 100%; min-height: 43px; border: 1px solid #d8e2cc; border-radius: 8px; background: #fcfdf9; color: #3f6035; padding: 11px 12px; font-size: 12px; }
#google-key::placeholder { font: 10px Cairo, Tahoma, sans-serif; text-align: right; color: #a4b095; }
#google-key:focus { border-color: #81a16b; box-shadow: 0 0 0 3px #81a16b17; }
.key-hint { display: flex; gap: 5px; align-items: flex-start; color: #98a68a; font-size: 8px; line-height: 1.9; margin: 9px 0 18px; }
.key-hint .icon { height: 12px; width: 12px; margin-top: 2px; }
#google-connect { width: 100%; min-height: 42px; }
.google-error { color: #a16a50; background: #fff5ed; border: 1px solid #ecd6c4; border-radius: 7px; padding: 10px 12px; font-size: 10px; margin-bottom: 15px; }
.google-error:empty { display: none; }
.google-help { border: 1px solid #e3ead8; background: #fafcf5; border-radius: 9px; padding: 14px; margin: 20px 0 0; }
.google-help strong { display: block; color: #849b71; font-size: 10px; font-weight: 700; }
.google-help p { color: #9cab8d; font-size: 9px; line-height: 2; margin: 4px 0 9px; }
.google-help a { display: flex; align-items: center; gap: 5px; color: #718e5e; font-size: 9px; line-height: 1.9; padding: 3px 0; }
.google-help a .icon { height: 12px; width: 12px; }
.google-help a:hover { text-decoration: underline; text-underline-offset: 3px; }
.dialog-bottomline { display: flex; align-items: flex-start; gap: 6px; color: #a0ad90; font-size: 8px; line-height: 1.95; margin-top: 17px; }
.dialog-bottomline .icon { height: 13px; width: 13px; margin-top: 2px; }
.workspace-toast { position: fixed; bottom: 24px; left: 50%; z-index: 2000; max-width: calc(100vw - 30px); padding: 11px 21px; border-radius: 9px; background: #163d2f; border: 1px solid #ffffff30; color: #fff; font-size: 11px; box-shadow: 0 7px 25px #15382628; text-align: center; opacity: 0; transform: translate(-50%,20px); pointer-events: none; transition: opacity .2s, transform .2s; }
.workspace-toast.show, .workspace-toast.visible { opacity: 1; transform: translate(-50%,0); }

@media (min-width: 1700px) {
  .workspace-layout { grid-template-columns: 350px minmax(0,1fr); }
  .sidebar-heading, .sidebar-section { padding-right: 27px; padding-left: 27px; }
  .sidebar-tabs { margin-right: 27px; margin-left: 27px; }
  .sidebar-heading h2 { font-size: 21px; }
  .workspace-header { padding: 0 32px; }
}
@media (max-width: 1150px) {
  .workspace-header { padding: 0 21px; gap: 19px; }
  .workspace-layout { grid-template-columns: 300px minmax(0,1fr); }
  .header-status { font-size: 8px; padding-right: 0; }
  .workspace-header-actions { gap: 7px; }
  .back-link { padding-right: 12px; margin-right: 5px; font-size: 8px; }
  .workspace-title h1 { font-size: 15px; }
  .workspace-header .button { font-size: 10px; padding: 8px 11px; }
  .sidebar-heading, .sidebar-section { padding-right: 19px; padding-left: 19px; }
  .sidebar-tabs { margin-right: 19px; margin-left: 19px; }
  .sidebar-heading h2 { font-size: 18px; }
  .map-toolbar { left: 15px; top: 17px; width: 75px; }
  .tool-button { min-height: 50px; }
  .tool-button > span { font-size: 7px; }
  .basemap-control { left: 15px; width: 230px; bottom: 59px; padding: 9px; }
  .basemap-preview { width: 27px; height: 30px; }
  .basemap-button { gap: 5px; padding: 5px; }
  .basemap-button > span:last-child { font-size: 7px; }
  .drawing-status { right: 16px; max-width: calc(100% - 280px); }
  .drawing-hint { font-size: 7px; padding: 8px 10px; }
  .drawing-actions .button { font-size: 8px; padding: 7px 9px; min-height: 32px; }
  .map-location { right: 16px; top: 17px; }
  .map-fit-button { right: 16px; top: 96px; }
  .map-bottom-strip { padding: 0 16px; gap: 12px; }
  .coord-readout { font-size: 8px; letter-spacing: .2px; }
  .map-legend { font-size: 7px; }
}
@media (max-width: 950px) {
  .workspace-header { height: 73px; padding: 0 18px; gap: 15px; }
  .header-status { display: none; }
  .workspace-header-actions { margin-right: auto; }
  .workspace-layout { height: calc(100vh - 73px); height: calc(100dvh - 73px); grid-template-columns: 280px minmax(0,1fr); }
  .brand-icon { height: 34px; width: 34px; }
  .brand strong { font-size: 25px; }
  .brand small { font-size: 7px; }
  .back-link { font-size: 0; padding-right: 9px; margin-right: 0; }
  .back-link .icon { width: 17px; height: 17px; }
  .sidebar-heading { padding-top: 20px; }
  .sidebar-heading h2 { font-size: 17px; }
  .workspace-tag { font-size: 7px; }
  .sidebar-tabs { gap: 8px; }
  .sidebar-tab { font-size: 9px; gap: 4px; }
  .sidebar-tab .icon { height: 14px; width: 14px; }
  .sidebar-section { padding-top: 21px; padding-bottom: 21px; }
  .layer-toggle { gap: 8px; }
  .layer-toggle strong { font-size: 9px; }
  .layer-toggle small { font-size: 7px; }
  .layer-icon { width: 29px; height: 29px; }
  .map-toolbar { left: 12px; top: 14px; width: 65px; padding: 7px 5px; gap: 2px; }
  .toolbar-caption { font-size: 7px; }
  .tool-button { min-height: 46px; padding: 6px 2px; gap: 3px; }
  .tool-button .icon { height: 18px; width: 18px; }
  .tool-button > span { font-size: 6px; }
  .map-location { min-width: 195px; top: 14px; right: 13px; gap: 7px; padding: 9px 11px; }
  .map-location select { font-size: 10px; }
  .map-location label { font-size: 7px; }
  .map-location > .icon { height: 18px; width: 18px; }
  .map-fit-button { right: 13px; top: 86px; padding: 8px 10px; font-size: 8px; }
  .map-fit-button .icon { height: 15px; width: 15px; }
  .basemap-control { left: 12px; width: 211px; bottom: 54px; }
  .basemap-label { font-size: 7px; }
  .basemap-preview { width: 24px; height: 28px; }
  .basemap-button > span:last-child { font-size: 6px; }
  .basemap-button small { font-size: 6px; }
  .google-settings { font-size: 6px; }
  .drawing-status { right: 13px; left: 13px; max-width: none; bottom: 181px; align-items: flex-end; }
  .drawing-hint { max-width: 225px; font-size: 7px; }
  .drawing-actions { max-width: 240px; justify-content: flex-end; }
  .map-bottom-strip { padding: 0 12px; }
  .map-legend { gap: 4px; font-size: 6px; }
  .map-legend > i { height: 5px; width: 5px; margin-right: 4px; }
  .legend-line { width: 11px; margin-right: 5px; }
  .coord-readout { font-size: 7px; }
  .layer-warning { top: 138px; right: 13px; font-size: 9px; }
  .metric-card { padding: 11px 9px; }
  .metric-card > strong { font-size: 16px; }
  .metric-card > span { font-size: 7px; }
  .metric-card > small { font-size: 6px; }
}
@media (max-width: 760px) {
  body { height: auto; min-height: 100vh; min-height: 100dvh; overflow: auto; }
  .workspace-header { height: 72px; position: relative; padding: 0 15px; gap: 12px; }
  .brand { gap: 7px; }
  .brand small { display: none; }
  .brand strong { font-size: 25px; }
  .brand-icon { height: 32px; width: 32px; border-radius: 9px; }
  .brand-icon .icon { height: 21px; width: 21px; }
  .header-divider { height: 27px; }
  .workspace-title > span { display: none; }
  .workspace-title h1 { font-size: 13px; }
  .workspace-header .button { min-height: 33px; padding: 7px 9px; font-size: 9px; gap: 5px; }
  .workspace-header .button .icon { height: 14px; width: 14px; }
  .workspace-header-actions { gap: 6px; }
  .workspace-header-actions .back-link { padding-right: 8px; }
  .workspace-layout { display: flex; flex-direction: column; height: auto; min-height: calc(100dvh - 72px); }
  .workspace-map-shell { order: -1; min-height: 570px; height: 65vh; height: 65dvh; max-height: 750px; flex: 0 0 auto; }
  .workspace-sidebar { border-left: 0; border-top: 1px solid #dde5d3; min-height: 360px; box-shadow: none; }
  .sidebar-scroll { overflow: visible; flex: initial; }
  .sidebar-heading { padding: 24px 22px 17px; }
  .sidebar-heading h2 { font-size: 20px; }
  .eyebrow { font-size: 9px; }
  .workspace-tag { font-size: 8px; }
  .sidebar-tabs { margin: 0 22px; gap: 22px; max-width: 410px; }
  .sidebar-tab { font-size: 11px; gap: 7px; justify-content: flex-start; padding-top: 11px; padding-bottom: 14px; }
  .sidebar-tab .icon { width: 17px; height: 17px; }
  .sidebar-section { padding: 23px 22px; }
  .section-topline h3 { font-size: 12px; }
  .layer-toggle { max-width: 440px; gap: 10px; }
  .layer-toggle strong { font-size: 11px; }
  .layer-toggle small { font-size: 9px; }
  .layer-icon { width: 35px; height: 35px; }
  .layer-icon .icon { width: 18px; height: 18px; }
  .boundaries-list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .boundary-item strong { font-size: 11px; }
  .boundary-item small { font-size: 9px; }
  .section-footnote { font-size: 9px; max-width: 480px; }
  .empty-boundaries p { max-width: 310px; font-size: 10px; }
  .empty-boundaries strong { font-size: 12px; }
  .boundary-form { max-width: 500px; }
  .boundary-form label { font-size: 10px; }
  .boundary-form input:not([type=color]), .boundary-form select, .boundary-form textarea { min-height: 42px; font-size: 12px; padding: 10px 12px; }
  .boundary-form input::placeholder, .boundary-form textarea::placeholder { font-size: 10px; }
  .color-field input { height: 42px; }
  .boundary-form .button { font-size: 11px; min-height: 39px; }
  .feature-actions .button { font-size: 10px; }
  .sidebar-tip { max-width: 500px; margin: 22px; padding: 14px; }
  .sidebar-tip strong { font-size: 11px; }
  .sidebar-tip p { font-size: 9px; }
  .sidebar-footer { padding: 14px; font-size: 9px; }
  .sidebar-toggle { position: absolute; z-index: 420; display: flex; align-items: center; gap: 6px; background: #fffffff7; color: #778f64; border: 1px solid #dfe7d5; border-radius: 7px; padding: 7px 10px; font-size: 8px; right: 14px; top: 83px; box-shadow: 0 2px 8px #24432908; }
  .sidebar-toggle .icon { width: 14px; height: 14px; }
  .map-location { right: 14px; top: 14px; min-width: 204px; }
  .map-fit-button { top: 125px; right: 14px; }
  .map-toolbar { top: 14px; left: 13px; width: 70px; }
  .tool-button { min-height: 48px; }
  .tool-button > span { font-size: 7px; }
  .tool-button .icon { width: 20px; height: 20px; }
  .drawing-status { bottom: 54px; right: 14px; left: 250px; align-items: flex-start; }
  .drawing-hint { font-size: 8px; max-width: none; }
  .drawing-actions { justify-content: flex-start; }
  .basemap-control { width: 222px; bottom: 54px; left: 13px; }
  .basemap-button > span:last-child { font-size: 7px; }
  .basemap-preview { height: 30px; width: 26px; }
  .basemap-button small { font-size: 6px; }
  .google-settings { font-size: 7px; }
  .map-bottom-strip { padding: 0 14px; }
  .map-legend { font-size: 7px; gap: 5px; }
  .coord-readout { font-size: 8px; }
  .layer-warning { right: 14px; top: 169px; width: min(310px,calc(100% - 120px)); font-size: 9px; }
  .analysis-intro { font-size: 11px; }
  .analysis-metrics { max-width: 500px; gap: 13px; }
  .metric-card { padding: 17px 14px; }
  .metric-card > .icon { height: 21px; width: 21px; }
  .metric-card > span { font-size: 10px; }
  .metric-card > strong { font-size: 22px; }
  .metric-card > small { font-size: 8px; }
  .analysis-properties { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .analysis-property { font-size: 11px; }
  .analysis-property strong { font-size: 11px; }
  .analysis-property small { font-size: 9px; }
  .estimate-notice { font-size: 10px; max-width: 500px; padding: 15px; }
  .estimate-notice p { font-size: 9px; }
  .sidebar-collapsed .workspace-sidebar { display: none; }
  .sidebar-collapsed .workspace-map-shell { min-height: calc(100dvh - 72px); height: calc(100dvh - 72px); max-height: none; }
}
@media (max-width: 520px) {
  .workspace-header { gap: 9px; height: 69px; padding: 0 12px; }
  .brand-icon { height: 29px; width: 29px; border-radius: 8px; }
  .brand-icon .icon { height: 19px; width: 19px; }
  .brand { gap: 5px; }
  .brand strong { font-size: 23px; }
  .workspace-title h1 { font-size: 11px; }
  .header-divider { height: 22px; }
  .workspace-header .button { min-height: 31px; padding: 7px; font-size: 0; gap: 0; }
  .workspace-header .button span { display: none; }
  .workspace-header .button .icon { height: 16px; width: 16px; }
  .workspace-header-actions { gap: 5px; }
  .back-link { border-right: 0; padding-right: 3px !important; }
  .back-link .icon { height: 15px; width: 15px; }
  .workspace-map-shell { min-height: 570px; height: 70dvh; max-height: 670px; }
  .map-location { top: 13px; right: 12px; min-width: 184px; padding: 9px 10px; }
  .map-location label { font-size: 7px; }
  .map-location select { font-size: 9px; }
  .map-location > .icon { height: 17px; width: 17px; }
  .sidebar-toggle { right: 12px; top: 78px; font-size: 7px; padding: 7px 9px; }
  .map-fit-button { right: 12px; top: 119px; padding: 7px 9px; font-size: 7px; }
  .map-toolbar { left: 11px; top: 13px; width: 61px; padding: 6px 4px; }
  .toolbar-caption { font-size: 6px; margin-bottom: 2px; }
  .tool-button { min-height: 43px; padding: 6px 1px; gap: 2px; }
  .tool-button .icon { width: 18px; height: 18px; }
  .tool-button > span { font-size: 6px; }
  .tool-divider { margin: 3px 6px; }
  .basemap-control { left: 11px; bottom: 52px; width: 218px; padding: 8px; }
  .basemap-button > span:last-child { font-size: 6px; }
  .google-settings { font-size: 6px; }
  .basemap-preview { width: 25px; height: 29px; }
  .drawing-status { right: 12px; left: 12px; bottom: 181px; align-items: flex-end; }
  .drawing-hint { max-width: 222px; font-size: 7px; padding: 7px 9px; line-height: 1.95; }
  .drawing-actions { justify-content: flex-end; gap: 5px; }
  .drawing-actions .button { font-size: 7px; min-height: 30px; padding: 7px 8px; }
  .drawing-actions .button .icon { height: 12px; width: 12px; }
  .map-bottom-strip { padding: 0 11px; gap: 10px; height: 32px; }
  .map-legend { font-size: 6px; gap: 4px; }
  .map-legend > i { height: 5px; width: 5px; margin-right: 5px; }
  .coord-readout { font-size: 7px; letter-spacing: 0; }
  .layer-warning { top: 161px; right: 12px; font-size: 8px; padding: 9px 10px; width: calc(100% - 99px); }
  .sidebar-heading { padding: 23px 18px 16px; }
  .sidebar-heading h2 { font-size: 19px; }
  .sidebar-tabs { margin: 0 18px; gap: 18px; }
  .sidebar-tab { font-size: 10px; }
  .sidebar-section { padding: 22px 18px; }
  .section-topline h3 { font-size: 11px; }
  .layer-toggle strong { font-size: 10px; }
  .layer-toggle small { font-size: 8px; }
  .boundaries-list { grid-template-columns: 1fr; }
  .boundary-item { padding: 13px; }
  .boundary-item strong { font-size: 11px; }
  .boundary-item small { font-size: 9px; }
  .section-footnote { font-size: 8px; }
  .sidebar-tip { margin: 20px 18px; }
  .sidebar-tip strong { font-size: 10px; }
  .sidebar-tip p { font-size: 8px; }
  .analysis-intro { font-size: 10px; }
  .analysis-metrics { gap: 11px; }
  .metric-card { padding: 15px 12px; }
  .metric-card > span { font-size: 9px; }
  .metric-card > strong { font-size: 20px; }
  .metric-card > small { font-size: 7px; }
  .analysis-properties { grid-template-columns: 1fr; }
  .estimate-notice { margin: 20px 18px; }
  .estimate-notice p { font-size: 8px; }
  .google-dialog { padding: 23px 20px; border-radius: 14px; }
  .google-dialog h2 { font-size: 24px; }
  .dialog-intro { font-size: 10px; }
  .google-help p { font-size: 8px; }
  .google-help a { font-size: 8px; }
  .workspace-toast { bottom: 18px; font-size: 10px; padding: 10px 17px; }
  .sidebar-collapsed .workspace-map-shell { min-height: calc(100dvh - 69px); height: calc(100dvh - 69px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}

.basemap-source { display:block; max-width:230px; margin-top:6px; text-align:center; color:#6f7e73; font-size:9px; line-height:1.7; }
.basemap-source[data-state='loading'] { color:#a07832; }
.basemap-source[data-state='error'] { color:#a23735; }
