:root {
    --bg: #0f1713;
    --sidebar: #131f19;
    --panel: #19271f;
    --panel-2: #1f3026;
    --border: rgba(255,255,255,.10);
    --text: #f1f7f3;
    --muted: #9fb1a6;
    --accent: #79c267;
    --accent-strong: #57a94b;
    --danger: #ff6b6b;
    --shadow: 0 18px 45px rgba(0,0,0,.25);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
html { color-scheme: dark; }
input, textarea, select {
    color-scheme: dark;
    appearance: none;
    -webkit-appearance: none;
    -webkit-text-fill-color: var(--text);
    caret-color: var(--accent);
    -webkit-tap-highlight-color: transparent;
}
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
select:-webkit-autofill {
    background-color: #08130d !important;
    background-image: none !important;
    -webkit-text-fill-color: var(--text) !important;
    color: var(--text) !important;
    caret-color: var(--accent) !important;
    -webkit-box-shadow: 0 0 0 1000px #08130d inset !important;
    box-shadow: 0 0 0 1000px #08130d inset !important;
    transition: background-color 9999s ease-out 0s;
}
input::selection { background:#3d7447; color:#fff; -webkit-text-fill-color:#fff; }
button { cursor: pointer; }

.app-shell { display: grid; grid-template-columns: 390px minmax(0, 1fr); height: 100vh; overflow: hidden; }
.sidebar { background:linear-gradient(180deg,rgba(8,24,15,.92) 0%,rgba(8,18,12,.98) 240px),url('/images/misko-gis-activation-forest-v2.jpg') center top/100% auto no-repeat,#0f1713; padding:22px; overflow-y:auto; border-right:1px solid var(--border); z-index:500; }
.brand { display: flex; gap: 13px; align-items: center; margin-bottom: 20px; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--panel-2); font-size: 25px; box-shadow: var(--shadow); }
.brand h1 { font-size: 22px; margin: 0; letter-spacing: -.02em; }
.brand p { color: var(--muted); margin: 3px 0 0; font-size: 13px; }
.app-title-line { display:flex; align-items:center; gap:7px; min-width:0; }

.search-card, .panel { background: rgba(25,39,31,.92); border: 1px solid var(--border); border-radius: 17px; padding: 16px; box-shadow: var(--shadow); }
.search-card label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.search-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
.search-row input,
.search-row input:hover,
.search-row input:active,
.search-row input:focus {
    min-width:0;
    border:1px solid rgba(255,255,255,.14);
    background:#0e1712 !important;
    background-color:#0e1712 !important;
    background-image:none !important;
    color:var(--text) !important;
    -webkit-text-fill-color:var(--text) !important;
    -webkit-box-shadow:0 0 0 1000px #0e1712 inset !important;
    box-shadow:0 0 0 1000px #0e1712 inset !important;
    border-radius:11px;
    padding:12px 13px;
    outline:none;
    transition:border-color .16s ease, box-shadow .16s ease;
}
.search-row input:focus { border-color:var(--accent); box-shadow:0 0 0 3px rgba(121,194,103,.12),0 0 0 1000px #0e1712 inset !important; }
.search-row button, .map-toolbar button { border: 0; border-radius: 11px; padding: 0 16px; background: var(--accent); color: #0c160f; font-weight: 800; transition: .16s ease; }
.search-row button:hover, .map-toolbar button:hover { background: #8bd079; transform: translateY(-1px); }
.search-row button:disabled { opacity: .55; cursor: wait; transform: none; }
.hint { color: var(--muted); font-size: 12px; margin-top: 8px; }

.status { margin: 12px 0 0; border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; font-size: 13px; background: rgba(255,255,255,.05); }
.status.error { border-color: rgba(255,107,107,.35); color: #ffd0d0; background: rgba(255,107,107,.08); }
.status.success { border-color: rgba(121,194,103,.35); color: #d9ffd1; background: rgba(121,194,103,.08); }
.hidden { display: none !important; }

.panel { margin-top: 12px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .08em; font-weight: 800; font-size: 10px; }
.panel h2 { margin: 3px 0 0; font-size: 17px; }
.badge { background: #0d1711; border: 1px solid var(--border); border-radius: 999px; padding: 6px 9px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.details { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; margin: 14px 0 0; font-size: 13px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; font-weight: 700; text-align: right; }
.parcel-navigation-button { width:100%; margin-top:14px; min-height:43px; border:1px solid rgba(121,194,103,.54); border-radius:12px; background:linear-gradient(135deg,#1f7042,#176039); color:#f4fff5; font:inherit; font-weight:850; cursor:pointer; box-shadow:0 7px 18px rgba(8,35,19,.22); }
.parcel-navigation-button:hover { background:linear-gradient(135deg,#27814d,#1d7042); transform:translateY(-1px); }
.parcel-navigation-button:focus-visible { outline:3px solid rgba(121,194,103,.35); outline-offset:2px; }
.parcel-navigation-button:disabled { opacity:.55; cursor:not-allowed; transform:none; }

.legend { display: flex; flex-wrap: wrap; gap: 7px 11px; margin: 14px 0 10px; color: var(--muted); font-size: 11px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.species { width:11px; height:11px; border-radius:3px; display:inline-block; border:1px solid rgba(255,255,255,.30); }
.species-pine { background:#c75000; }.species-spruce { background:#772850; }.species-birch { background:#289f9f; }
.species-black-alder { background:#772800; }.species-aspen { background:#006400; }.species-grey-alder { background:#c7c777; }
.species-oak { background:#757575; }.species-ash { background:#779f00; }.species-other { background:#c700c7; }
.species-legend { grid-template-columns:repeat(3,minmax(0,1fr)); }

.forest-list { display: grid; gap: 8px; max-height: 330px; overflow: auto; padding-right: 2px; }
.forest-item { width: 100%; text-align: left; border: 1px solid var(--border); border-radius: 12px; background: #111c16; color: var(--text); padding: 11px 12px; transition: .15s ease; }
.forest-item:hover { border-color: rgba(121,194,103,.55); background: #17251d; }
.forest-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.forest-title { font-weight: 800; font-size: 13px; }
.forest-age { color: var(--accent); font-weight: 800; font-size: 12px; }
.forest-meta { color: var(--muted); font-size: 11px; line-height: 1.45; }

.source-note { color: #76887d; font-size: 10px; line-height: 1.5; margin-top: 14px; padding: 0 3px; }
.feedback-link { display:block; margin-top:10px; padding:10px 11px; border:1px solid rgba(121,194,103,.30); border-radius:10px; background:rgba(35,75,48,.28); color:#b7eea8; font-size:11px; font-weight:800; line-height:1.25; text-align:center; text-decoration:none; }
.feedback-link:hover { border-color:rgba(121,194,103,.7); background:rgba(46,94,60,.42); color:#e4ffd9; }
.parcel-map-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:12px; }
.parcel-map-actions button { min-height:38px; border:1px solid rgba(255,255,255,.14); border-radius:10px; padding:8px 9px; font-size:11px; font-weight:850; }
.parcel-ortho-button { background:rgba(34,73,91,.94); color:#e4f7ff; border-color:rgba(95,176,211,.62) !important; }
.parcel-ortho-button.active { background:#245e79; border-color:#82d8ff !important; box-shadow:0 0 0 2px rgba(95,176,211,.14); }
.parcel-access-roads-button { background:rgba(38,84,63,.94); color:#e6f9eb; border-color:rgba(121,194,103,.55) !important; }
.parcel-access-roads-button.active { background:#26705a; border-color:#8de9c6 !important; box-shadow:0 0 0 2px rgba(69,206,160,.14); }
.parcel-navigation-button { background:#285f39; color:#f0faf2; }
.parcel-navigation-button { grid-column:1/-1; }
.parcel-ortho-note { margin:8px 1px 0; color:#93a89a; font-size:10px; line-height:1.4; }
.map-wrap { position: relative; min-width: 0; }
#map { width: 100%; height: 100%; background: #dce4db; }
.map-scale-picker {
    position:absolute;
    z-index:440;
    top:84px;
    left:auto;
    right:14px;
    width:138px;
    padding:7px;
    border:1px solid rgba(255,255,255,.15);
    border-radius:11px;
    background:rgba(13,27,19,.94);
    color:#eef7f0;
    box-shadow:var(--shadow);
    backdrop-filter:blur(10px);
}
.map-scale-picker label { display:block; margin:0 3px 4px; color:#a9c7ae; font-size:9px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.map-scale-picker select {
    width:100%;
    min-height:32px;
    padding:4px 25px 4px 8px;
    border:1px solid rgba(121,194,103,.34);
    border-radius:8px;
    background:#0c1811;
    color:#f2faf3;
    font:inherit;
    font-size:11px;
    font-weight:800;
}
.map-scale-picker output { display:block; margin:5px 3px 0; color:#c8e8cb; font-size:10px; font-weight:850; white-space:nowrap; }
.map-scale-picker output::before { content:'Dabar '; color:#829c88; font-weight:700; }
.maplibregl-ctrl-bottom-left.ag-map-scale-corner { bottom:var(--map-scale-bar-bottom, 64px); }
.ag-map-scale-corner .maplibregl-ctrl-scale {
    height:26px;
    margin:0 0 0 14px;
    padding:0 5px 5px;
    border:0;
    border-bottom:3px solid #17231c;
    border-left:3px solid #17231c;
    border-right:3px solid #17231c;
    border-radius:0;
    background:rgba(255,255,255,.88);
    color:#17231c;
    font:800 12px/18px Inter,ui-sans-serif,system-ui,sans-serif;
    text-align:center;
    box-shadow:0 1px 3px rgba(0,0,0,.18);
    pointer-events:none;
}
.map-toolbar { position: absolute; z-index: 450; top: 14px; right: 14px; max-width: min(700px, calc(100% - 28px)); }
.map-toolbar-primary { display:flex; justify-content:flex-end; gap:8px; }
.map-toolbar-panel {
    position:absolute;
    top:48px;
    right:0;
    width:min(680px, calc(100vw - 440px));
    min-width:460px;
    max-height:calc(100vh - 82px);
    overflow:auto;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:8px;
    padding:10px;
    border:1px solid rgba(255,255,255,.15);
    border-radius:15px;
    background:rgba(13,27,19,.97);
    box-shadow:0 18px 44px rgba(0,0,0,.34);
    backdrop-filter:blur(14px);
}
.map-toolbar-panel button { width:100%; min-width:0; height:auto; min-height:42px; padding:7px 10px; white-space:normal; line-height:1.18; overflow-wrap:anywhere; box-shadow:none; }
.layer-section { display:grid; grid-template-columns:repeat(auto-fit,minmax(138px,1fr)); align-content:start; gap:7px; min-width:0; padding:9px; border:1px solid rgba(255,255,255,.09); border-radius:11px; background:rgba(255,255,255,.025); }
.layer-section-title { grid-column:1/-1; color:#a9c7ae; font-size:10px; font-weight:850; letter-spacing:.10em; text-transform:uppercase; }
.layer-section-actions { border-color:rgba(121,194,103,.15); }
.cutting-zones-note { grid-column:1/-1; display:grid; gap:6px; padding:10px 12px; border:1px solid rgba(245,158,11,.42); border-radius:11px; background:rgba(77,48,7,.42); color:#e7eadf; font-size:11px; line-height:1.35; }
.cutting-zones-note.hidden { display:none; }
.cutting-zones-note > b { color:#facc15; font-size:11px; letter-spacing:.04em; text-transform:uppercase; }
.cutting-zones-note div { display:flex; flex-wrap:wrap; gap:6px 12px; }
.cutting-zones-note a { color:#baf7c5; text-decoration:underline; text-underline-offset:2px; }
.map-toolbar button { height: 40px; padding: 0 13px; background: rgba(16,28,21,.92); color: var(--text); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(10px); box-shadow: var(--shadow); }
.map-toolbar button:hover { background: #1a2b21; }

.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: #142119; color: var(--text); }
.leaflet-popup-content { margin: 13px 15px; line-height: 1.5; }
.popup-title { font-weight: 850; margin-bottom: 5px; }
.popup-row { color: #c3d1c7; font-size: 12px; }

@media (max-width: 850px) {
    .app-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .sidebar { max-height: 48vh; border-right: 0; border-bottom: 1px solid var(--border); padding: 14px; }
    .brand { margin-bottom: 12px; }
    .brand-mark { width: 42px; height: 42px; }
    .map-wrap { min-height: 52vh; }
}


.offline-db { margin-top: 14px; display:flex; align-items:center; gap:9px; border:1px solid var(--border); background:rgba(255,255,255,.035); border-radius:12px; padding:10px 11px; font-size:11px; color:var(--muted); }
.offline-db b { display:block; color:var(--text); font-size:12px; margin-bottom:2px; }
.offline-db span { display:block; }
.offline-dot { width:10px; height:10px; border-radius:50%; background:#6b7280; box-shadow:0 0 0 4px rgba(107,114,128,.12); flex:0 0 auto; }
.offline-db.ready .offline-dot { background:var(--accent); box-shadow:0 0 0 4px rgba(121,194,103,.12); }

.forest-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin:10px 0; }
.summary-item { border:1px solid var(--border); background:#101a14; border-radius:10px; padding:8px 9px; min-width:0; }
.summary-item span { display:block; color:var(--muted); font-size:10px; margin-bottom:2px; }
.summary-item b { display:block; font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.forest-data-note { color:#8fa197; font-size:10px; line-height:1.45; border-left:2px solid rgba(121,194,103,.45); padding-left:8px; margin:8px 0 10px; }
.forest-primary { font-size:12px; font-weight:800; color:#dff7d8; margin-bottom:7px; }
.forest-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px 10px; color:var(--muted); font-size:10px; }
.forest-grid span { min-width:0; }
.forest-grid b { color:var(--text); font-size:11px; }
.popup-row { display:flex; justify-content:space-between; gap:16px; border-top:1px solid rgba(255,255,255,.06); padding:3px 0; }
.popup-row:first-of-type { border-top:0; }
.popup-row span { color:#9fb1a6; }
.popup-row b { color:#f1f7f3; text-align:right; }

/* v0.7 – gyvos kadastrinių sklypų ribos */
.map-toolbar button.active { border-color: rgba(121,194,103,.75); background: rgba(42,78,52,.95); box-shadow: 0 0 0 2px rgba(121,194,103,.10), var(--shadow); }
.map-toolbar button.loading { opacity: .72; cursor: progress; }
.leaflet-tooltip.cadastre-tooltip { background: rgba(15,23,19,.94); color: #f1f7f3; border: 1px solid rgba(255,255,255,.14); box-shadow: 0 8px 24px rgba(0,0,0,.18); font-weight: 750; font-size: 11px; }
.leaflet-tooltip.cadastre-tooltip:before { display:none; }

/* v0.9 – gyvi taksaciniai sklypai + GPS */
.map-toolbar button { white-space: normal; line-height:1.18; overflow-wrap:anywhere; }

.leaflet-tooltip.forest-hover-tooltip {
    background: rgba(11, 24, 16, .95);
    color: #eef8f0;
    border: 1px solid rgba(121,194,103,.42);
    box-shadow: 0 8px 24px rgba(0,0,0,.22);
    font-size: 11px;
    font-weight: 800;
}
.leaflet-tooltip.forest-hover-tooltip:before { display: none; }

.leaflet-tooltip.forest-map-label {
    background: rgba(9, 18, 13, .82);
    color: #f0f7f2;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 7px;
    box-shadow: 0 3px 12px rgba(0,0,0,.18);
    padding: 3px 6px;
    font-size: 10px;
    line-height: 1;
    font-weight: 850;
    white-space: nowrap;
    pointer-events: none;
}
.leaflet-tooltip.forest-map-label:before { display: none; }

.gps-status {
    position: absolute;
    z-index: 660;
    left: 14px;
    bottom: 18px;
    max-width: min(620px, calc(100% - 28px));
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(12, 25, 17, .92);
    color: #edf8f0;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    font-size: 12px;
    font-weight: 750;
}
.gps-status.error { border-color: rgba(255,107,107,.45); color: #ffd4d4; }

.gps-div-icon { background: transparent; border: 0; }
.gps-marker { position: relative; width: 36px; height: 36px; }
.gps-core {
    position: absolute;
    left: 9px;
    top: 9px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    border: 4px solid #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.42), 0 0 0 3px rgba(37,99,235,.25);
}
.gps-heading {
    position: absolute;
    left: 13px;
    top: -6px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 15px solid #2563eb;
    transform-origin: 5px 24px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.3));
}
.gps-heading.hidden { display: none; }

#selected-forest-card .details { max-height: 330px; overflow: auto; padding-right: 2px; }

@media (max-width: 1100px) {
    .map-toolbar { max-width: calc(100% - 28px); }
    .map-toolbar-panel { width:min(580px, calc(100vw - 420px)); min-width:460px; }
    .map-toolbar button { font-size: 12px; }
}



/* v1.1 – CarryMap principas: nuolatinės kadastrų ribos + GIS labeliai */
.leaflet-tooltip.cadastre-map-label {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    color: rgba(65, 58, 40, .66);
    font-size: 10px;
    line-height: 1;
    font-weight: 750;
    white-space: nowrap;
    pointer-events: none;
    text-shadow:
        -1px -1px 0 rgba(255,255,255,.88),
         1px -1px 0 rgba(255,255,255,.88),
        -1px  1px 0 rgba(255,255,255,.88),
         1px  1px 0 rgba(255,255,255,.88),
         0 1px 2px rgba(255,255,255,.75);
}
.leaflet-tooltip.cadastre-map-label:before { display: none; }

/* Kadastrų numeriai turi būti informacinis sluoksnis, ne tamsūs mygtukai ant žemėlapio. */
.leaflet-pane.leaflet-cadastreLabel-pane { pointer-events: none; }
.leaflet-pane.leaflet-forestLabel-pane { pointer-events: none; }

@media (min-width: 1200px) {
    .leaflet-tooltip.cadastre-map-label { font-size: 10.5px; }
}

/* v1.2 – CarryMap tipo kartografija + pilna taksacinio sklypo atributų kortelė */
.leaflet-tooltip.cadastre-map-label {
    color: rgba(220, 30, 38, .78);
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: -.02em;
    text-shadow:
        -1px -1px 0 rgba(255,255,255,.92),
         1px -1px 0 rgba(255,255,255,.92),
        -1px  1px 0 rgba(255,255,255,.92),
         1px  1px 0 rgba(255,255,255,.92);
}

.leaflet-tooltip.forest-map-label.carrymap-forest-label {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    color: #1d261d;
    font-family: Arial, sans-serif;
    font-weight: 500;
    text-align: center;
    text-shadow:
        -1px -1px 0 rgba(255,255,255,.86),
         1px -1px 0 rgba(255,255,255,.86),
        -1px  1px 0 rgba(255,255,255,.86),
         1px  1px 0 rgba(255,255,255,.86);
}
.leaflet-tooltip.forest-map-label.carrymap-forest-label:before { display: none; }
.forest-plot-number { display:block; font-size:11px; line-height:1; font-weight:500; color:#172017; }
.forest-plot-meta { display:block; margin-top:2px; font-size:8.5px; line-height:1; color:rgba(24,58,31,.78); white-space:nowrap; }

.quarter-div-icon { background: transparent; border: 0; overflow: visible !important; }
.quarter-map-label {
    display:block;
    transform: translate(-50%, -50%);
    color:#111;
    font: 700 13px/1 Arial, sans-serif;
    white-space:nowrap;
    text-shadow:
        -1px -1px 0 rgba(255,255,255,.92),
         1px -1px 0 rgba(255,255,255,.92),
        -1px  1px 0 rgba(255,255,255,.92),
         1px  1px 0 rgba(255,255,255,.92);
}

.forest-identify-quick {
    display:grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap:6px;
    margin-top:11px;
}
.forest-identify-quick > div {
    min-width:0;
    border:1px solid var(--border);
    background:#101a14;
    border-radius:9px;
    padding:7px 8px;
}
.forest-identify-quick span { display:block; color:var(--muted); font-size:9px; margin-bottom:2px; }
.forest-identify-quick b { display:block; color:var(--text); font-size:11px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

.raw-attributes {
    margin-top:12px;
    border-top:1px solid var(--border);
    padding-top:9px;
}
.raw-attributes summary {
    cursor:pointer;
    color:#dfe9e2;
    font-size:11px;
    font-weight:800;
    user-select:none;
}
.raw-attributes summary span { color:var(--accent); }
.raw-details {
    display:grid;
    grid-template-columns:minmax(90px, .8fr) minmax(0, 1.2fr);
    gap:0;
    margin:9px 0 0;
    max-height:420px;
    overflow:auto;
    border:1px solid var(--border);
    border-radius:9px;
    background:#0e1712;
}
.raw-details dt,
.raw-details dd {
    margin:0;
    padding:6px 8px;
    border-bottom:1px solid rgba(255,255,255,.055);
    min-width:0;
    font-size:10px;
    line-height:1.25;
}
.raw-details dt { color:#8fa197; font-family:Consolas, monospace; }
.raw-details dd { color:#f1f7f3; overflow-wrap:anywhere; }
.raw-details dt:nth-last-of-type(1),
.raw-details dd:nth-last-of-type(1) { border-bottom:0; }
.popup-more { margin-top:7px; color:#9fb1a6; font-size:10px; }

@media (max-width: 1100px) {
    .forest-identify-quick { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

/* v1.3 – CarryMap stiliaus viso vaizdo žymėjimas */
.cadastre-div-icon,
.forest-div-icon,
.quarter-div-icon {
    background: transparent !important;
    border: 0 !important;
    overflow: visible !important;
    width: 1px !important;
    height: 1px !important;
}

.cadastre-map-text {
    display: block;
    transform: translate(-50%, -50%);
    color: rgba(229, 32, 39, .78);
    font: 500 10px/1 Arial, sans-serif;
    letter-spacing: -.03em;
    white-space: nowrap;
    text-shadow:
        -1px -1px 0 rgba(255,255,255,.92),
         1px -1px 0 rgba(255,255,255,.92),
        -1px  1px 0 rgba(255,255,255,.92),
         1px  1px 0 rgba(255,255,255,.92);
}

.forest-plot-text {
    display: block;
    transform: translate(-50%, -50%);
    color: rgba(20, 20, 20, .88);
    font: 500 11px/1 Arial, sans-serif;
    text-align: center;
    white-space: nowrap;
    text-shadow:
        -1px -1px 0 rgba(255,255,255,.82),
         1px -1px 0 rgba(255,255,255,.82),
        -1px  1px 0 rgba(255,255,255,.82),
         1px  1px 0 rgba(255,255,255,.82);
}

.forest-meta-text {
    display: block;
    transform: translate(-50%, -35%);
    margin-top: 3px;
    color: rgba(38, 66, 39, .82);
    font: 500 8.5px/1 Arial, sans-serif;
    text-align: center;
    white-space: nowrap;
    text-shadow:
        -1px -1px 0 rgba(255,255,255,.82),
         1px -1px 0 rgba(255,255,255,.82),
        -1px  1px 0 rgba(255,255,255,.82),
         1px  1px 0 rgba(255,255,255,.82);
}

.quarter-map-label {
    font-size: 14px;
    font-weight: 700;
    color: rgba(15,15,15,.9);
}

.offline-db.spatial-warning {
    border-color: rgba(245, 158, 11, .55);
}
.offline-db.spatial-warning .offline-dot {
    background: #f59e0b;
}

/* v1.5 – ne miško žemė + GRPK keliai */
.nonforest-div-icon {
    background: transparent !important;
    border: 0 !important;
    overflow: visible !important;
    width: 1px !important;
    height: 1px !important;
}
.nonforest-map-text {
    display: block;
    transform: translate(-50%, -50%);
    color: rgba(72, 72, 72, .72);
    font: 600 9px/1 Arial, sans-serif;
    white-space: nowrap;
    letter-spacing: .01em;
    text-shadow:
        -1px -1px 0 rgba(255,255,255,.98),
         1px -1px 0 rgba(255,255,255,.98),
        -1px  1px 0 rgba(255,255,255,.98),
         1px  1px 0 rgba(255,255,255,.98);
}
.leaflet-roadPane-pane path {
    filter: drop-shadow(0 0 1px rgba(105, 76, 0, .55));
}

.map-legend-mini {
    position: absolute;
    z-index: 445;
    right: 14px;
    bottom: 18px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    padding: 7px 9px;
    border-radius: 10px;
    background: rgba(255,255,255,.90);
    border: 1px solid rgba(0,0,0,.14);
    color: #30352f;
    font: 600 10px/1 Arial, sans-serif;
    box-shadow: 0 5px 18px rgba(0,0,0,.12);
}
.map-legend-mini span { display:flex; align-items:center; gap:5px; white-space:nowrap; }
.legend-swatch { display:inline-block; width:15px; height:10px; border:1px solid rgba(60,60,60,.45); }
.legend-swatch.nonforest { background: rgba(255,255,255,.95); }
.legend-swatch.forest { background: #b7ee91; border-style:dashed; }
.legend-species-group { display:inline-block; width:25px; height:10px; border:1px dashed #536052; background:linear-gradient(90deg,#c75000 0 11.1%,#772850 11.1% 22.2%,#289f9f 22.2% 33.3%,#772800 33.3% 44.4%,#006400 44.4% 55.5%,#c7c777 55.5% 66.6%,#757575 66.6% 77.7%,#779f00 77.7% 88.8%,#c700c7 88.8%); }
.legend-swatch.water { background: rgba(69, 170, 235, .65); border-color: #1778b7; }
.legend-swatch.state-forest { background: rgba(22, 118, 229, .52); border: 2px solid #003f9e; }
.legend-swatch.permit-clearcut { background: rgba(239,68,68,.30); border: 2px solid #dc2626; }
.legend-swatch.permit-thinning { background: rgba(250,204,21,.32); border: 2px solid #ca8a04; }
.legend-road { display:inline-block; width:18px; height:0; border-top:3px solid #ffd21f; box-shadow:0 1px 0 rgba(105,76,0,.5); }
.gps-status:not(.hidden) + .map-legend-mini { bottom: 62px; }

/* v1.6 – vidinės miškotvarkos projektai */
.management-project-state {
    display: grid;
    gap: 3px;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 12px;
    background: rgba(255,255,255,.035);
}
.management-project-state b { color: #eaf6e7; font-size: 13px; }
.management-project-state span { color: #91a297; font-size: 11px; line-height: 1.45; }
.permit-risk-note { margin-top:9px; padding:8px 9px; border-radius:9px; font-size:11px; line-height:1.42; font-weight:700; }
.permit-risk-note.clearcut { color:#ffd9d9; background:rgba(185,28,28,.20); border:1px solid rgba(248,113,113,.46); }
.permit-risk-note.thinning { color:#fff3bb; background:rgba(161,98,7,.19); border:1px solid rgba(250,204,21,.42); }
.management-project-state code { color: #bde8ad; font-size: 10px; }
.management-project-list { display: grid; gap: 9px; }
.management-project-item {
    border: 1px solid rgba(255,255,255,.09);
    border-left: 3px solid #839188;
    border-radius: 12px;
    padding: 11px;
    background: rgba(7,22,15,.55);
}
.management-project-item.approved { border-left-color: #75d56b; }
.management-project-item.processing { border-left-color: #e6c85e; }
.management-project-item.expired { border-left-color: #a87b76; opacity: .82; }
.management-project-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.management-project-label { display: block; color: #82948a; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 2px; }
.management-project-top strong { color: #fff; font-size: 14px; }
.management-project-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 999px;
    background: rgba(255,255,255,.07);
    color: #d7e2da;
    font-size: 10px;
    text-align: center;
}
.management-project-status.approved { background: rgba(117,213,107,.14); color: #a7ee9f; }
.management-project-status.processing { background: rgba(230,200,94,.14); color: #ead98f; }
.management-project-status.expired { background: rgba(168,123,118,.14); color: #d5aaa5; }
.management-project-details { display: grid; grid-template-columns: minmax(90px, .8fr) minmax(0, 1.2fr); gap: 5px 9px; margin: 0; }
.management-project-details dt { color: #85978d; font-size: 11px; }
.management-project-details dd { margin: 0; color: #dce8df; font-size: 11px; text-align: right; overflow-wrap: anywhere; }
.management-project-notes { margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.07); color: #aebcb3; font-size: 11px; line-height: 1.45; }
.management-project-notes b { display: block; color: #dce8df; margin-bottom: 2px; }
.management-project-detail-button { width:100%; min-height:38px; margin-top:10px; border:1px solid rgba(117,213,107,.34); border-radius:9px; background:rgba(117,213,107,.09); color:#bceeb5; font-weight:800; font-size:12px; }
.management-project-detail-button:hover { background:rgba(117,213,107,.15); border-color:rgba(117,213,107,.52); }
.management-project-extra { margin-top:10px; padding-top:10px; border-top:1px solid rgba(255,255,255,.08); color:#c7d5cc; }
.management-project-extra pre { margin:6px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; color:#c7d5cc; font:11px/1.5 inherit; }
.management-project-cuttings { padding:9px; border-radius:9px; background:rgba(230,200,94,.07); border:1px solid rgba(230,200,94,.18); }
.management-project-cuttings b { color:#ead98f; font-size:12px; }
.management-project-extra details { margin-top:9px; }
.management-project-extra summary { cursor:pointer; color:#9fbaaa; font-size:11px; font-weight:700; }

/* v1.7 – gyva miškotvarkos projektų patikra */
.management-project-actions { display:flex; align-items:center; gap:6px; }
#management-project-refresh {
    width:30px; height:30px; border-radius:9px; border:1px solid var(--border);
    background:#0d1711; color:#b9c9bf; font-weight:900; font-size:16px; line-height:1;
}
#management-project-refresh:hover { color:#fff; border-color:rgba(121,194,103,.55); background:#17251d; }
.management-project-source {
    margin-top:9px; padding:6px 8px; border-radius:8px; border:1px solid rgba(255,255,255,.07);
    background:#101a14; color:#92a399; font-size:10px; line-height:1.3;
}
.management-project-source.live { color:#a8efa0; border-color:rgba(117,213,107,.22); background:rgba(117,213,107,.06); }
.management-project-source.offline { color:#d6c58a; border-color:rgba(230,200,94,.18); }

/* v1.8 Natura 2000 + EB svarbos buveinės */
.legend-swatch.natura { background: rgba(111, 91, 180, .24); border: 2px dashed #6552a8; }
.legend-swatch.protected-area { background:rgba(154,123,63,.10); border:1.5px dashed #756031; }
.legend-swatch.cutting-zone { background:rgba(245,158,11,.20); border:2px dashed #dc6b16; }
.legend-swatch.habitat { background-color:rgba(107,114,128,.08); background-image:repeating-linear-gradient(135deg,rgba(92,101,108,.65) 0 1.5px,transparent 1.5px 6px); border:1.5px solid #6b7280; }
.legend-swatch.habitat-pending { background:rgba(245,158,11,.12); border:1.5px dashed #d97706; }
.legend-swatch.protected-nest { background:rgba(220,38,38,.18); border:2px solid #dc2626; border-radius:50%; }
#nature-info-card .details dd { white-space: normal; word-break: break-word; }

/* Papildomi oficialūs sluoksniai: jie yra tik online patikrai ir nekeičia
   žemėlapyje jau rodomos vietinės GIS bazės. */
.online-check-intro {
    margin: 0 0 9px;
    color: #9aaca0;
    font-size: 11px;
    line-height: 1.45;
}
.online-check-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}
.online-check-actions button {
    min-height: 36px;
    padding: 7px 8px;
    border: 1px solid rgba(147, 184, 142, .22);
    border-radius: 10px;
    background: #101d15;
    color: #cbd9cf;
    font: 700 10px/1.2 inherit;
    text-align: left;
    cursor: pointer;
}
.online-check-actions button:hover,
.online-check-actions button.active {
    border-color: rgba(118, 219, 126, .64);
    background: #1c3422;
    color: #efffed;
}
.online-check-state {
    margin: 9px 0 0;
    color: #90a495;
    font-size: 10px;
    line-height: 1.4;
}
.online-check-results {
    margin-top: 9px;
    padding: 9px;
    border: 1px solid rgba(203, 171, 77, .25);
    border-radius: 10px;
    background: rgba(154, 117, 22, .07);
    color: #dce9df;
    font-size: 10px;
    line-height: 1.42;
}
.online-check-results p { margin: 0 0 7px; }
.online-check-results p:last-child { margin-bottom: 0; }
.online-check-results ul { display:grid; gap:6px; margin:0; padding:0; list-style:none; }
.online-check-results li { display:grid; gap:2px; padding-top:6px; border-top:1px solid rgba(255,255,255,.08); }
.online-check-results li:first-child { padding-top:0; border-top:0; }
.online-check-results li b { color:#f2df9f; font-size:9px; text-transform:uppercase; letter-spacing:.035em; }
.online-check-results li span { color:#dce9df; }
.online-check-results li small { color:#91a796; font-family:ui-monospace, SFMono-Regular, Consolas, monospace; }
.online-check-results a { color:#b9e98d; font-weight:800; text-decoration:none; }
.online-check-disclaimer { color:#a5b3a8; font-size:9px; }
@media (max-width: 420px) {
    .online-check-actions { grid-template-columns: 1fr; }
}

/* AG Miško GIS v2.0 RC1 */
.brand-mark-gis {
    width:46px; height:46px; border-radius:14px; display:grid; place-items:center; overflow:hidden;
    background:#092418; border:1px solid rgba(201,224,169,.32); color:#fff;
    box-shadow:0 10px 24px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.12);
}
.brand-mark-gis img { width:100%; height:100%; display:block; object-fit:cover; }
.brand-mark-gis small { margin-top:3px; color:#a9e69f; font-size:8px; font-weight:800; letter-spacing:.16em; }

#license-gate-help a { color:#bcebb3; font-weight:800; }
.search-actions-row { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.search-mini-button {
    border:1px solid rgba(255,255,255,.09); background:#101a14; color:#aabbb0; border-radius:9px;
    padding:6px 8px; font-size:10px; cursor:pointer;
}
.search-mini-button:hover:not(:disabled), .search-mini-button.active { color:#fff; border-color:rgba(121,194,103,.45); background:#18271e; }
.search-mini-button:disabled { opacity:.45; cursor:not-allowed; }
.search-memory {
    margin-top:8px; padding:7px; border-radius:11px; background:#0c1510; border:1px solid rgba(255,255,255,.08);
    display:grid; gap:5px; max-height:210px; overflow:auto;
}
.search-memory.hidden { display:none; }
.search-memory-empty { color:#7f9186; font-size:11px; padding:7px; }
.search-memory-row { display:flex; align-items:center; gap:6px; }
.search-memory-open {
    flex:1; text-align:left; border:0; background:transparent; color:#dce9df; padding:7px 8px; border-radius:8px;
    font:600 11px/1.2 ui-monospace,SFMono-Regular,Consolas,monospace; cursor:pointer;
}
.search-memory-open:hover { background:rgba(255,255,255,.055); }
.search-memory-delete { width:28px; height:28px; border:0; border-radius:8px; background:transparent; color:#75887c; cursor:pointer; }
.search-memory-delete:hover { color:#efb1a9; background:rgba(190,70,55,.08); }
.search-memory-head { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:3px 5px 6px; color:#819388; font-size:10px; }
.search-memory-clear { border:0; background:transparent; color:#92a69a; font-size:10px; cursor:pointer; }
.analysis-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; }
.analysis-metric { padding:9px 10px; border-radius:11px; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.035); }
.analysis-metric span { display:block; color:#82958a; font-size:9px; text-transform:uppercase; letter-spacing:.045em; margin-bottom:3px; }
.analysis-metric b { color:#f1f8f3; font-size:14px; font-weight:800; }
.analysis-metric small { display:block; color:#819287; font-size:9px; margin-top:2px; }
/* CarryMap tipo GPS rodyklė laikoma virš visų MapLibre sluoksnių. */
.gps-position-marker { --gps-heading:0deg; position:relative; width:30px; height:30px; pointer-events:none; }
.gps-position-marker::before,
.gps-position-marker::after { content:''; position:absolute; inset:5px; border-radius:50%; background:rgba(14,165,233,.20); animation:gps-pulse 1.8s ease-out infinite; }
.gps-position-marker::after { inset:9px; background:rgba(14,165,233,.32); animation-delay:.55s; }
.gps-position-marker-bearing { position:absolute; z-index:3; inset:0; display:block; transform:rotate(var(--gps-heading)); transform-origin:50% 50%; transition:transform 90ms linear,opacity .2s ease; filter:drop-shadow(0 3px 4px rgba(0,0,0,.55)); }
.gps-position-marker-bearing svg { display:block; width:100%; height:100%; overflow:visible; }
.gps-arrow-halo { fill:#fff; stroke:#073b5b; stroke-width:1.8; stroke-linejoin:round; }
.gps-arrow-fill { fill:#0ea5e9; stroke:#0369a1; stroke-width:1.2; stroke-linejoin:round; }
.gps-position-marker.heading-unavailable .gps-position-marker-bearing { opacity:0; }
.gps-position-marker-core {
    position:absolute; z-index:4; left:50%; top:50%; width:7px; height:7px; transform:translate(-50%,-50%);
    border:2px solid #fff; border-radius:50%; background:#075985;
    box-shadow:0 0 0 1px #064a70,0 2px 8px rgba(0,0,0,.55);
}
@keyframes gps-pulse { 0%{transform:scale(.45);opacity:.95} 78%,100%{transform:scale(1.25);opacity:0} }
@media (prefers-reduced-motion:reduce) { .gps-position-marker::before,.gps-position-marker::after { animation:none; } }
.compact-panel { padding-bottom:12px; }
.data-update-summary { display:grid; gap:5px; font-size:11px; color:#bdcbbf; }
.data-update-row { display:flex; justify-content:space-between; gap:8px; border-bottom:1px solid rgba(255,255,255,.055); padding-bottom:5px; }
.data-update-row:last-child { border-bottom:0; }
.data-update-row b { color:#eaf4ed; font-weight:700; text-align:right; }
.panel-link-row { display:flex; flex-wrap:wrap; gap:7px; margin-top:8px; }
.panel-link-row a { color:#a9df9d; font-size:10px; text-decoration:none; border-bottom:1px dotted rgba(169,223,157,.4); }
.panel-link-row a:hover { color:#fff; }
.legend-cadastre { display:inline-block; width:15px; height:10px; border:1.4px solid #e84040; background:rgba(255,255,255,.75); }
.legend-registry { display:inline-block; width:10px; height:10px; border-radius:50%; border:1.5px solid rgba(20,35,20,.72); }
.legend-registry.project { background:#22c55e; }
.legend-registry.permit { background:#facc15; }
.legend-forest-road { display:inline-block; width:18px; height:0; border-top:2px dashed #e8b91a; }
.legend-servitude { display:inline-block; width:18px; height:0; border-top:2px dashed #8755d6; }
#servitudes-button:not(.active) { opacity:.65; }
.forest-item .parcel-share { margin-top:7px; padding-top:7px; border-top:1px solid rgba(255,255,255,.07); display:flex; justify-content:space-between; gap:8px; color:#9db0a4; font-size:10px; }
.forest-item .parcel-share b { color:#e7f2ea; }
.forest-species-volumes { margin-top:7px; padding-top:7px; border-top:1px solid rgba(121,194,103,.18); display:grid; gap:3px; }
.forest-species-volumes span { color:#9db0a4; font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.04em; }
.forest-species-volumes b { color:#ccefc2; font-size:10px; line-height:1.45; }
.cadastre-map-text { opacity:.64; }
@media (max-width: 760px) {
    .analysis-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .search-actions-row { gap:5px; }
    .search-mini-button { padding:6px 7px; }
}

/* v2.0 RC1.2 – stabilus CarryMap tipo bazinis vaizdas */
.cadastre-map-text {
    opacity: .86;
    color: rgba(220, 28, 35, .92);
    font-weight: 600;
}
.forest-plot-text { font-weight: 650; color: rgba(18,18,18,.94); }
.quarter-map-label { opacity: .92; }
.leaflet-cadastrePane-pane path,
.leaflet-forestViewportPane-pane path,
.leaflet-roadPane-pane path { vector-effect: non-scaling-stroke; }

/* Papildomi sluoksniai išjungti pagal nutylėjimą – jie neturi užgožti CarryMap bazės. */
#natura-button:not(.active), #habitats-button:not(.active), #context-layers-button:not(.active) { opacity: .72; }
.legend-swatch.official-context { background:repeating-linear-gradient(135deg,rgba(180,83,9,.82) 0 2px,rgba(250,204,21,.38) 2px 4px); border-color:#b45309; }
.legend-survey { width:15px; height:0; display:inline-block; border-top:3px solid; }
.legend-survey.geodetic { border-color:#009999; }
.legend-survey.preliminary { border-color:#ff9900; }

/* === RC2: MapLibre GPU renderer === */
.gpu-renderer-badge {
    display: inline-flex;
    align-items: center;
    height: 40px;
    padding: 0 11px;
    border-radius: 11px;
    background: rgba(21, 64, 38, .94);
    border: 1px solid rgba(121,194,103,.55);
    color: #dff7dc;
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .02em;
    box-shadow: var(--shadow);
}
.maplibregl-map { font: inherit; }
.maplibregl-canvas { outline: none; }
.maplibregl-ctrl-top-left { top: 12px; left: 12px; }
.maplibregl-ctrl-group {
    background: rgba(16,28,21,.92);
    border: 1px solid rgba(255,255,255,.14);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.maplibregl-ctrl-group button { filter: invert(1) brightness(1.6); }
.maplibregl-popup-content {
    background: #142119;
    color: var(--text);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0,0,0,.28);
    padding: 13px 15px;
    min-width: 230px;
}
.maplibregl-popup-tip { border-top-color: #142119 !important; border-bottom-color: #142119 !important; }
.maplibregl-popup-close-button { color: #fff; font-size: 20px; padding: 2px 7px; }
.maplibregl-popup-content .popup-title { font-weight: 900; margin-bottom: 8px; }
.maplibregl-popup-content .popup-grid { display:grid; grid-template-columns:auto 1fr; gap:5px 12px; font-size:12px; }
.maplibregl-popup-content .popup-grid span:nth-child(odd) { color:var(--muted); }
.maplibregl-popup-content .popup-more { margin-top:8px; color:var(--muted); font-size:11px; }
.coordinate-popup { display:grid; gap:7px; min-width:250px; }
.coordinate-popup b { padding-right:18px; font-size:12px; }
.coordinate-popup code { padding:8px 9px; border:1px solid rgba(134,213,255,.3); border-radius:8px; background:#09140f; color:#bceeff; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:13px; font-weight:800; letter-spacing:.02em; }
.coordinate-popup span { color:var(--muted); font-size:10px; }
.coordinate-popup button { min-height:38px; border:1px solid rgba(121,194,103,.55); border-radius:9px; background:#2b6a3b; color:#effbeb; font-size:11px; font-weight:900; }
.coordinate-popup button:active { transform:scale(.98); }
.map-perf-badge {
    position:absolute;
    z-index:451;
    left:14px;
    bottom:14px;
    display:none;
    padding:6px 9px;
    border-radius:9px;
    background:rgba(10,18,13,.78);
    color:#cfe5d3;
    border:1px solid rgba(255,255,255,.1);
    font-size:10px;
    pointer-events:none;
}
.map-perf-badge.visible { display:block; }
@media (max-width: 900px) {
    .gpu-renderer-badge { height:36px; font-size:10px; }
}

/* === Mobilioji programa: pilno ekrano žemėlapis + valdomi skydeliai === */
.mobile-app-bar,
.mobile-sheet-handle,
.mobile-backdrop,
.mobile-toolbar-heading { display:none; }
.map-location-fab { display:none !important; }
.mobile-layers-fab { display:none !important; }
.mobile-layers-close { display:none !important; }
.native-only { display:none !important; }
.capacitor-native .native-only { display:grid !important; }
.native-offline-import { gap:8px; margin:12px 0; }
.native-offline-import button {
    min-height:44px;
    border:1px solid rgba(121,194,103,.48);
    border-radius:12px;
    background:#244f31;
    color:var(--text);
    font-weight:850;
}
.native-offline-import button:disabled { opacity:.62; }
.native-offline-import span { color:var(--muted); font-size:10px; line-height:1.45; overflow-wrap:anywhere; }
.update-manifest-state { display:grid; gap:6px; color:var(--muted); font-size:10px; line-height:1.45; }
.update-manifest-row { padding:8px 9px; border:1px solid rgba(255,255,255,.09); border-radius:10px; background:rgba(4,15,9,.32); }
.update-manifest-row b { display:block; margin-bottom:2px; color:var(--text); font-size:11px; }
.update-manifest-row a { display:inline-block; margin-top:5px; color:#b7eea8; font-weight:800; }

@media (max-width: 850px) {
    html, body { height:100%; overflow:hidden; overscroll-behavior:none; }
    body { min-height:100dvh; }
    .app-shell { display:block; height:100dvh; overflow:hidden; }
    .map-wrap { position:fixed; inset:0; min-height:0; z-index:1; }
    #map { height:100dvh; }

    .mobile-app-bar {
        position:fixed;
        z-index:720;
        top:0;
        left:0;
        right:0;
        min-height:calc(58px + env(safe-area-inset-top));
        padding:calc(8px + env(safe-area-inset-top)) 10px 8px;
        display:flex;
        align-items:center;
        justify-content:space-between;
        gap:8px;
        background:linear-gradient(180deg,rgba(6,22,13,.88),rgba(5,20,12,.94)),url('/images/misko-gis-activation-forest-v2.jpg') center 23%/cover no-repeat;
        border-bottom:1px solid rgba(255,255,255,.12);
        box-shadow:0 8px 24px rgba(0,0,0,.20);
        backdrop-filter:blur(14px);
    }
    .mobile-brand { display:flex; align-items:center; gap:8px; min-width:0; }
    .mobile-brand .brand-mark { width:38px; height:38px; min-width:38px; border-radius:11px; font-size:16px; box-shadow:none; }
    .mobile-brand .brand-mark small { font-size:6px; }
    .mobile-brand b, .mobile-brand span { display:block; white-space:nowrap; }
    .mobile-brand b { font-size:14px; line-height:1.1; }
    .mobile-brand span { margin-top:2px; color:var(--muted); font-size:9px; }
    .mobile-location-toggle { line-height:1; }
    .mobile-location-arrow { width:23px; height:23px; fill:#dce9df; stroke:#183e57; stroke-width:1.2; transform-origin:50% 50%; }
    .mobile-location-toggle.locating { color:#8fdfff; }
    .mobile-location-toggle.locating .mobile-location-arrow { fill:#8fdfff; animation:gps-button-spin 1.4s linear infinite; }
    .mobile-location-toggle.active { color:#9be7ff; box-shadow:0 0 0 2px rgba(80,196,255,.28) inset; }
    .mobile-location-toggle.active .mobile-location-arrow { fill:#53c9ff; filter:drop-shadow(0 0 4px rgba(83,201,255,.7)); }
    .map-location-fab {
        position:absolute;
        z-index:620;
        top:calc(154px + env(safe-area-inset-top));
        left:8px;
        width:40px;
        height:40px;
        display:grid !important;
        place-items:center;
        padding:0;
        border:1px solid rgba(255,255,255,.2);
        border-radius:8px;
        background:rgba(17,37,25,.96);
        color:var(--text);
        box-shadow:0 2px 8px rgba(0,0,0,.34);
    }
    .map-location-fab:active { transform:translateY(1px); }
    .mobile-gps-source-fab {
        position:absolute; z-index:620; top:calc(202px + env(safe-area-inset-top)); left:8px;
        width:40px; height:40px; place-items:center; padding:0; border:1px solid rgba(102,220,226,.48);
        border-radius:8px; background:rgba(10,45,48,.96); color:#bff8fb; box-shadow:0 2px 8px rgba(0,0,0,.34);
        font-size:8px; font-weight:950; letter-spacing:.03em;
    }
    .mobile-layers-fab {
        position:absolute;
        z-index:620;
        top:calc(250px + env(safe-area-inset-top));
        left:8px;
        width:40px;
        height:40px;
        display:grid !important;
        place-items:center;
        padding:0;
        border:1px solid rgba(255,255,255,.2);
        border-radius:8px;
        background:rgba(17,37,25,.96);
        color:var(--text);
        box-shadow:0 2px 8px rgba(0,0,0,.34);
        font-size:20px;
        font-weight:850;
    }
    .mobile-layers-fab[aria-expanded="true"] { border-color:var(--accent); background:#294d34; }
    .mobile-app-actions { display:flex; gap:6px; }
    .mobile-app-actions button {
        min-width:42px;
        height:40px;
        border:1px solid rgba(255,255,255,.14);
        border-radius:11px;
        padding:0 10px;
        background:rgba(32,55,41,.95);
        color:var(--text);
        font-size:17px;
        font-weight:800;
    }
    .mobile-app-actions button span { font-size:11px; }
    .mobile-app-actions button[aria-expanded="true"] { border-color:var(--accent); background:#294d34; }
    .mobile-app-actions .mobile-protected-nests-toggle { border-color:rgba(239,68,68,.58); color:#ffd8d8; background:rgba(127,29,29,.38); }
    .mobile-app-actions .mobile-protected-nests-toggle.active { border-color:#ff6b6b; color:#fff; background:#a92525; box-shadow:0 0 0 2px rgba(255,107,107,.18) inset; }

    .sidebar {
        position:fixed;
        z-index:700;
        left:0;
        right:0;
        top:auto;
        bottom:0;
        width:100%;
        height:min(82dvh, 720px);
        max-height:none;
        padding:0 12px calc(16px + env(safe-area-inset-bottom));
        overflow-y:auto;
        overscroll-behavior:contain;
        border:1px solid rgba(255,255,255,.14);
        border-bottom:0;
        border-radius:22px 22px 0 0;
        background:linear-gradient(180deg, rgba(16,31,23,.985), rgba(10,20,15,.99));
        box-shadow:0 -16px 44px rgba(0,0,0,.32);
        transform:translateY(calc(100% - 198px - env(safe-area-inset-bottom)));
        transition:transform .24s cubic-bezier(.2,.8,.2,1);
        will-change:transform;
    }
    body.mobile-sheet-open .sidebar { transform:translateY(0); }
    .sidebar > .brand { display:none; }
    .mobile-sheet-handle {
        position:sticky;
        z-index:2;
        top:0;
        width:100%;
        height:42px;
        display:grid;
        place-items:center;
        gap:3px;
        border:0;
        padding:5px 0 4px;
        background:linear-gradient(180deg, #102017 70%, rgba(16,32,23,.82));
        color:var(--muted);
        font-size:10px;
    }
    .mobile-sheet-handle span { width:42px; height:4px; border-radius:999px; background:rgba(255,255,255,.34); }
    .mobile-sheet-handle b { font-weight:750; }
    .sidebar .search-card { margin:0; padding:12px; border-radius:15px; box-shadow:0 10px 30px rgba(0,0,0,.18); }
    .search-card label { margin-bottom:6px; font-size:11px; }
    .search-row input { min-height:44px; padding:10px 12px; font-size:16px; }
    .search-row button { min-height:44px; padding:0 15px; }
    .search-actions-row { margin-top:7px; }
    .search-mini-button { min-height:30px; font-size:9px; }
    .hint { display:none; }
    .sidebar .panel { border-radius:15px; padding:13px; }
    .sidebar .status { position:sticky; top:42px; z-index:3; box-shadow:0 8px 22px rgba(0,0,0,.24); }
    .source-note { padding-bottom:12px; }

    .mobile-backdrop {
        position:fixed;
        z-index:650;
        inset:0;
        width:100%;
        height:100%;
        border:0;
        background:rgba(2,10,6,.44);
        opacity:0;
        visibility:hidden;
        transition:opacity .2s ease, visibility .2s ease;
    }
    body.mobile-sheet-open .mobile-backdrop,
    body.mobile-layers-open .mobile-backdrop { display:block; opacity:1; visibility:visible; }
    /* Sluoksnių langas gyvena žemėlapio konteineryje, o uždengimo fonas –
       šalia jo. Fonas neturi perimti pačių sluoksnių mygtukų paspaudimų. */
    body.mobile-layers-open .mobile-backdrop { pointer-events:none; }

    .map-toolbar {
        position:fixed;
        z-index:710;
        top:calc(66px + env(safe-area-inset-top));
        left:10px;
        right:10px;
        width:auto;
        max-width:none;
        max-height:calc(100dvh - 88px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
        padding:10px;
        display:grid;
        grid-template-columns:repeat(2, minmax(0,1fr));
        gap:7px;
        overflow-y:auto;
        border:1px solid rgba(255,255,255,.14);
        border-radius:18px;
        background:rgba(13,27,19,.98);
        box-shadow:0 20px 50px rgba(0,0,0,.38);
        opacity:0;
        visibility:hidden;
        pointer-events:none;
        transform:translateY(-10px) scale(.98);
        transition:opacity .18s ease, transform .18s ease, visibility .18s ease;
    }
    body.mobile-layers-open .map-toolbar { display:block !important; opacity:1; visibility:visible; pointer-events:auto; transform:none; }
    /* Kol sluoksnių langas neužsakytas, jis neuždengia telefono žemėlapio. */
    .map-toolbar { display:none; }
    .map-toolbar-primary { display:none; }
    .map-toolbar-panel {
        position:static;
        width:100%;
        min-width:0;
        grid-template-columns:1fr;
        padding:0;
        border:0;
        border-radius:0;
        background:transparent;
        box-shadow:none;
        backdrop-filter:none;
    }
    .map-toolbar-panel.hidden { display:grid; }
    .mobile-layers-close {
        display:block !important;
        width:100%;
        min-height:42px;
        margin:0 0 8px;
        border-color:rgba(121,194,103,.5) !important;
        background:#244f31 !important;
        color:#effbeb !important;
        font-weight:850;
    }
    .layer-section { gap:7px; padding:8px; }
    .mobile-toolbar-heading {
        grid-column:1/-1;
        display:flex;
        align-items:center;
        justify-content:space-between;
        min-height:38px;
        padding:0 2px 4px 5px;
        font-size:14px;
    }
    .mobile-toolbar-heading button {
        width:34px;
        height:34px;
        padding:0;
        border-radius:10px;
        font-size:23px;
        line-height:1;
    }
    .map-toolbar .gpu-renderer-badge { grid-column:1/-1; justify-content:center; height:32px; }
    .map-toolbar > button { width:100%; height:43px; padding:0 8px; font-size:11px; box-shadow:none; }

    .maplibregl-ctrl-top-left { top:calc(68px + env(safe-area-inset-top)); left:8px; }
    .map-scale-picker {
        top:calc(142px + env(safe-area-inset-top));
        left:auto;
        right:8px;
        width:124px;
        padding:6px;
        border-radius:10px;
    }
    .map-scale-picker label { font-size:8px; }
    .map-scale-picker select { min-height:30px; font-size:10px; }
    .map-scale-picker output { font-size:9px; }
    .maplibregl-ctrl-bottom-left.ag-map-scale-corner { bottom:var(--map-scale-bar-bottom, calc(240px + env(safe-area-inset-bottom))); }
    .ag-map-scale-corner .maplibregl-ctrl-scale { margin-left:10px; }
    .map-legend-mini {
        left:8px;
        right:8px;
        bottom:calc(204px + env(safe-area-inset-bottom));
        max-width:none;
        flex-wrap:nowrap;
        overflow-x:auto;
        justify-content:flex-start;
        padding:7px 9px;
        border-radius:11px;
        scrollbar-width:none;
    }
    .map-legend-mini::-webkit-scrollbar { display:none; }
    .map-legend-mini span { flex:0 0 auto; font-size:8px; }
    .gps-status { top:calc(66px + env(safe-area-inset-top)); bottom:auto; left:58px; right:8px; max-width:none; }
    .gps-status:not(.hidden) + .map-legend-mini { bottom:calc(204px + env(safe-area-inset-bottom)); }
    .maplibregl-popup-content { min-width:210px; max-width:calc(100vw - 46px); }
}

@media (max-width: 390px) {
    .mobile-app-actions button span { display:none; }
    .mobile-app-actions button { padding:0 9px; }
    .mobile-brand > div:not(.brand-mark) > span { display:none; }
    .sidebar { transform:translateY(calc(100% - 192px - env(safe-area-inset-bottom))); }
    .map-legend-mini { bottom:calc(198px + env(safe-area-inset-bottom)); }
}

@media (max-width: 350px) {
    .mobile-app-bar { gap:5px; padding-left:6px; padding-right:6px; }
    .mobile-app-actions { gap:4px; }
    .mobile-app-actions button { min-width:38px; width:38px; height:38px; padding:0 5px; }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar, .map-toolbar, .mobile-backdrop { transition:none !important; }
}

.license-gate {
    position:fixed; z-index:5000; inset:0; display:grid; place-items:center; overflow:auto;
    min-height:100%; padding:max(28px,env(safe-area-inset-top)) 20px max(24px,env(safe-area-inset-bottom));
    background:
        linear-gradient(180deg,rgba(1,13,8,.12) 0%,rgba(1,15,9,.46) 42%,rgba(1,11,7,.82) 100%),
        url('/images/misko-gis-activation-forest-v2.jpg') center 43%/cover no-repeat,
        #03110a;
    transition:opacity .24s ease;
}
.license-gate::before {
    content:""; position:absolute; inset:0; pointer-events:none;
    background:radial-gradient(circle at 67% 18%,rgba(160,255,153,.14),transparent 31%),linear-gradient(90deg,rgba(0,16,9,.16),transparent 48%,rgba(0,10,6,.12));
}
.license-gate.unlocked{opacity:0;pointer-events:none}
.license-gate-shell{position:relative;z-index:1;width:min(430px,100%);display:grid;gap:16px}
.license-gate-brand{display:flex;align-items:center;gap:13px;padding:0 8px;color:#fff;text-shadow:0 2px 13px rgba(0,0,0,.62)}
.license-gate-brand img{width:58px;height:58px;display:block;border-radius:18px;box-shadow:0 13px 28px rgba(0,0,0,.38),0 0 0 1px rgba(210,235,184,.2)}
.license-gate-brand strong,.license-gate-brand small{display:block}
.license-gate-brand strong{font-size:22px;line-height:1.06;letter-spacing:-.025em}
.license-gate-brand small{margin-top:5px;color:#c0cfc4;font-size:11px;font-weight:700;letter-spacing:.015em}
.license-gate-card{width:100%;padding:26px;border:1px solid rgba(201,230,185,.22);border-radius:24px;background:linear-gradient(145deg,rgba(8,39,24,.91),rgba(3,24,14,.87));box-shadow:0 28px 72px rgba(0,0,0,.46),inset 0 1px 0 rgba(255,255,255,.08);backdrop-filter:blur(22px) saturate(118%);-webkit-backdrop-filter:blur(22px) saturate(118%)}
.license-gate-card-heading{display:grid;grid-template-columns:34px minmax(0,1fr);align-items:center;gap:11px;margin-bottom:20px}
.license-gate-card-heading>img{width:34px;height:34px;border-radius:10px;box-shadow:0 7px 18px rgba(0,0,0,.3)}
.license-gate-status{position:relative;margin:0;padding-bottom:11px;font-size:22px;font-weight:900;line-height:1.18;letter-spacing:-.025em;color:#fff}
.license-gate-status::after{content:"";position:absolute;left:0;bottom:0;width:34px;height:3px;border-radius:99px;background:linear-gradient(90deg,#6eff79,#9bf1a2);box-shadow:0 0 12px rgba(96,255,121,.58)}
.license-gate form{display:grid;gap:13px}
.license-gate label{display:grid;gap:7px;color:#c2d2c6;font-size:11px;font-weight:800}
.license-gate input,.license-gate textarea{width:100%;border:1px solid rgba(205,233,193,.2);border-radius:13px;padding:14px 15px;background:rgba(3,18,11,.82);color:var(--text);font-size:13px;outline:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.025)}
.license-gate textarea{min-height:92px;resize:vertical;line-height:1.35}
.license-gate input:focus,.license-gate textarea:focus{border-color:#72e783;box-shadow:0 0 0 3px rgba(92,236,113,.12)}
.license-gate button{min-height:49px;border:0;border-radius:13px;background:linear-gradient(180deg,#70f07c,#2fc653);color:#05210d;font-weight:950;box-shadow:0 9px 24px rgba(35,210,80,.24),inset 0 1px 0 rgba(255,255,255,.38)}
.license-gate button[type="submit"]::before{content:"✓";display:inline-block;margin-right:8px;font-weight:950}
.license-gate button:disabled{opacity:.6}
.license-gate p{margin:16px 0 0;color:#afc2b4;font-size:11px;line-height:1.5}
.license-gate-signature{margin:0!important;text-align:center!important;color:rgba(224,238,226,.72)!important;text-shadow:0 2px 10px rgba(0,0,0,.55)}
@media (max-width:520px){.license-gate{place-items:start center;padding-left:15px;padding-right:15px;background-position:center top}.license-gate-shell{margin:auto 0}.license-gate-card{padding:22px}.license-gate-brand{padding:0 5px}.license-gate-brand img{width:54px;height:54px}.license-gate-brand strong{font-size:20px}}

.license-gate-purchase{display:flex;align-items:center;justify-content:center;min-height:46px;margin-top:11px;border:1px solid rgba(231,181,48,.7);border-radius:12px;background:#dcae32;color:#14200d!important;font-size:14px;font-weight:900;text-decoration:none;box-shadow:0 8px 22px rgba(0,0,0,.2)}
.license-gate-purchase:active{transform:translateY(1px)}
.license-gate-trial{width:100%;margin-top:12px;border:1px solid rgba(121,194,103,.7)!important;background:#79c267!important;color:#09200d!important;font-size:14px}
.license-expiry-overlay{position:fixed;z-index:5400;inset:0;display:grid;place-items:center;padding:22px;background:rgba(3,12,7,.82);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px)}
.license-expiry-card{width:min(420px,100%);padding:25px;border:1px solid rgba(246,196,83,.5);border-radius:22px;background:linear-gradient(145deg,#253018,#0c1b10);color:#f4fbf1;box-shadow:0 30px 90px rgba(0,0,0,.58)}
.license-expiry-card>span{color:#f2ce70;font-size:10px;font-weight:950;letter-spacing:.12em}.license-expiry-card h2{margin:10px 0 12px;font-size:24px}.license-expiry-card p{margin:7px 0;color:#cfdbd0;font-size:13px;line-height:1.5}.license-expiry-card p strong{color:#fff1b5}.license-expiry-card .license-expiry-remaining{color:#f2ce70;font-size:18px;font-weight:900}.license-expiry-card>div{display:grid;gap:9px;margin-top:19px}.license-expiry-card a,.license-expiry-card button{display:flex;align-items:center;justify-content:center;min-height:48px;border-radius:12px;font-size:13px;font-weight:900;text-decoration:none}.license-expiry-card a{border:1px solid #e6bd4d;background:#dcae32;color:#17200d}.license-expiry-card button{border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.07);color:#e6eee7}

.license-gate input,
.license-gate input:hover,
.license-gate input:active,
.license-gate input:focus {
    background:#08130d !important;
    background-color:#08130d !important;
    background-image:none !important;
    color:var(--text) !important;
    -webkit-text-fill-color:var(--text) !important;
    -webkit-box-shadow:0 0 0 1000px #08130d inset !important;
    box-shadow:0 0 0 1000px #08130d inset !important;
}

.mobile-app-actions .sale-action{border-color:rgba(246,190,77,.5);color:#f6cf78;background:rgba(246,190,77,.09)}
.mobile-app-actions .sale-action.active{border-color:rgba(246,190,77,.95);color:#fff1bd;background:rgba(210,151,31,.35);box-shadow:0 0 0 2px rgba(246,190,77,.16) inset}
.mobile-app-actions .mobile-wood-toggle{border-color:rgba(121,194,103,.55);color:#c9f4be;background:rgba(121,194,103,.09)}
.sale-lead-card{border-color:rgba(246,190,77,.28);box-shadow:0 16px 42px rgba(0,0,0,.3)}
.sale-privacy-note{margin:10px 0;color:var(--muted);font-size:10px;line-height:1.45}
.sale-lead-form{display:grid;gap:9px}.sale-lead-form label{display:grid;gap:5px;color:var(--muted);font-size:10px;font-weight:750}.sale-form-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.sale-lead-form input,.sale-lead-form textarea,.sale-lead-form input:focus,.sale-lead-form textarea:focus{width:100%;min-width:0;border:1px solid rgba(255,255,255,.14);border-radius:10px;padding:10px 11px;background:#08130d!important;background-color:#08130d!important;color:var(--text)!important;-webkit-text-fill-color:var(--text)!important;caret-color:var(--accent);outline:none;-webkit-box-shadow:0 0 0 1000px #08130d inset!important;box-shadow:0 0 0 1000px #08130d inset!important}
.sale-lead-form input:focus,.sale-lead-form textarea:focus{border-color:var(--accent)!important}.sale-lead-form textarea{resize:vertical}.sale-lead-form>button{min-height:44px;border:0;border-radius:11px;background:#d5a93d;color:#1d1708;font-weight:900}.sale-lead-form>button:disabled{opacity:.6}.sale-form-status{border:1px solid var(--border);border-radius:10px;padding:9px;color:var(--muted);font-size:10px}.sale-form-status.success{border-color:rgba(121,194,103,.4);color:#d9ffd1;background:rgba(121,194,103,.08)}.sale-form-status.error{border-color:rgba(255,107,107,.4);color:#ffd0d0;background:rgba(255,107,107,.08)}
@media(max-width:390px){.sale-form-row{grid-template-columns:1fr}}
.license-gate input:focus { box-shadow:0 0 0 3px rgba(121,194,103,.12),0 0 0 1000px #08130d inset !important; }
.license-gate textarea,.license-gate textarea:hover,.license-gate textarea:active,.license-gate textarea:focus { background:#08130d !important;background-color:#08130d !important;color:var(--text)!important;-webkit-text-fill-color:var(--text)!important;caret-color:var(--accent);-webkit-box-shadow:0 0 0 1000px #08130d inset!important;box-shadow:0 0 0 1000px #08130d inset!important; }

.ios-install-banner{position:fixed;z-index:4800;left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:calc(12px + env(safe-area-inset-bottom));display:grid;grid-template-columns:52px minmax(0,1fr) 34px;align-items:center;gap:11px;padding:12px;border:1px solid rgba(185,235,170,.28);border-radius:18px;background:rgba(7,21,14,.96);box-shadow:0 18px 55px rgba(0,0,0,.48);color:#f2fff0;-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}
.ios-install-banner img{width:52px;height:52px;border-radius:13px}.ios-install-banner b,.ios-install-banner span{display:block}.ios-install-banner b{font-size:13px}.ios-install-banner span{margin-top:4px;color:#c2d8c6;font-size:10px;line-height:1.4}.ios-install-banner strong{color:#efffe9}.ios-install-banner button{align-self:start;width:32px;height:32px;border:1px solid rgba(255,255,255,.12);border-radius:50%;background:rgba(255,255,255,.06);color:#fff;font-size:21px;line-height:1}

.update-manifest-row button { width:100%; min-height:42px; margin-top:8px; border:1px solid rgba(121,194,103,.48); border-radius:10px; background:#2e6b3e; color:#f2fff0; font-weight:850; }
.update-manifest-row button:disabled { opacity:.58; }

.map-addon-intro { margin:9px 0; color:#8fa197; font-size:10px; line-height:1.45; }
.map-addon-list { display:grid; gap:7px; }
.map-addon-row {
    display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px 9px;
    padding:9px; border:1px solid rgba(255,255,255,.09); border-radius:11px; background:rgba(4,15,9,.32);
}
.map-addon-row b, .map-addon-row span { display:block; }
.map-addon-row b { color:#eef8f0; font-size:11px; }
.map-addon-row div > span { margin-top:2px; color:#86998d; font-size:9px; line-height:1.35; }
.map-addon-state { padding:4px 6px; border-radius:999px; background:rgba(73,118,151,.15); color:#9fc9e7; font-size:8px; font-weight:900; }
.map-addon-state.ready { background:rgba(121,194,103,.14); color:#a7e99e; }
.map-addon-row > button {
    grid-column:1/-1; min-height:36px; border:1px solid rgba(121,194,103,.42); border-radius:9px;
    background:#285f39; color:#f0faf2; font-size:10px; font-weight:850;
}
.map-toolbar .map-background-button { border-bottom-color:rgba(95,176,211,.55); }
.map-toolbar .map-background-button.active { border-color:rgba(95,176,211,.85); background:rgba(34,73,91,.95); }
.location-action { display:inline-flex; align-items:center; justify-content:center; gap:7px; }
.location-action-icon { width:18px; height:18px; flex:0 0 auto; fill:none; stroke:currentColor; stroke-width:2; overflow:visible; }
.location-action-pulse { opacity:0; stroke:#71d6ff; }
.location-action.locating .location-action-icon { color:#8fdfff; animation:gps-button-spin 1.4s linear infinite; }
.location-action.locating .location-action-pulse { opacity:.8; animation:gps-button-pulse 1.35s ease-out infinite; transform-origin:center; }
.location-action.active .location-action-icon { color:#9be7ff; filter:drop-shadow(0 0 5px rgba(60,190,255,.7)); }
@keyframes gps-button-spin { to { transform:rotate(360deg); } }
@keyframes gps-button-pulse { from { transform:scale(.55); opacity:.95; } to { transform:scale(1.45); opacity:0; } }
.download-progress { display:grid; gap:5px; margin-top:8px; }
.download-progress-track { height:8px; overflow:hidden; border-radius:999px; background:rgba(255,255,255,.10); }
.download-progress-track i { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#68b95a,#b3ea79); transition:width .18s ease; }
.download-progress-track i.indeterminate { animation:gis-install-progress 1.6s ease-in-out infinite; }
@keyframes gis-install-progress { from { transform:translateX(-110%); } to { transform:translateX(300%); } }
@media (prefers-reduced-motion:reduce) { .download-progress-track i.indeterminate { animation:none; width:100%!important; opacity:.65; } }
.download-progress small { color:#cce4d0; font-size:9px; }
.gps-source-panel { position:absolute; z-index:710; top:74px; left:50%; transform:translateX(-50%); width:min(460px,calc(100% - 24px)); box-sizing:border-box; padding:14px; border:1px solid rgba(102,220,226,.55); border-radius:16px; background:rgba(7,28,22,.97); color:#eff9f1; box-shadow:0 18px 52px rgba(0,0,0,.48); backdrop-filter:blur(15px); }
.gps-source-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.gps-source-heading span,.gps-source-heading strong { display:block; }
.gps-source-heading span { color:#66dce2; font-size:8px; font-weight:950; letter-spacing:.13em; }
.gps-source-heading strong { margin-top:3px; font-size:14px; }
.gps-source-heading>button { width:32px; height:32px; border:1px solid rgba(255,255,255,.15); border-radius:9px; background:rgba(255,255,255,.06); color:#fff; font-size:20px; }
.gps-source-modes { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:12px; }
.gps-source-modes button,.gps-external-actions button { min-height:42px; border:1px solid rgba(102,220,226,.35); border-radius:10px; background:#123b35; color:#efffff; font-weight:850; }
.gps-source-modes button.active { border-color:#79c267; background:#2e6b3e; color:#fff; }
.gps-external-settings { margin-top:10px; padding:10px; border:1px solid rgba(102,220,226,.23); border-radius:11px; background:rgba(3,17,13,.42); }
.gps-external-settings label { display:block; color:#b6d7d8; font-size:10px; font-weight:850; }
.gps-external-settings select { box-sizing:border-box; width:100%; min-height:43px; margin-top:6px; padding:8px 10px; border:1px solid rgba(102,220,226,.38); border-radius:9px; background:#08180e; color:#fff; font:inherit; }
.gps-external-actions { display:grid; grid-template-columns:1fr 1.15fr; gap:7px; margin-top:8px; }
.gps-external-actions button:last-child { border-color:#f6c453; background:#f6c453; color:#302400; }
.gps-external-actions button:disabled { opacity:.5; }
.gps-external-settings p,#gps-source-state { display:block; margin:9px 0 0; color:#a8bdb1; font-size:10px; line-height:1.45; }
@media (max-width:850px) { .gps-source-panel { position:fixed; top:calc(66px + env(safe-area-inset-top)); } }
.management-project-item.archive { border-color:rgba(230,200,94,.28); background:rgba(94,77,25,.10); }
.management-project-status.archive { background:rgba(230,200,94,.14); color:#ead98f; }

.app-update-overlay {
    position:fixed; z-index:5200; inset:0; display:grid; place-items:center; padding:20px;
    background:rgba(3,12,7,.82); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
}

.data-download-overlay {
    position:fixed;
    z-index:5000;
    inset:0;
    display:grid;
    place-items:center;
    padding:24px;
    background:rgba(4,14,8,.72);
    backdrop-filter:blur(8px);
}
.data-download-overlay section {
    width:min(420px,100%);
    padding:26px;
    border:1px solid rgba(167,222,137,.35);
    border-radius:22px;
    background:#10241a;
    color:#f4fff0;
    box-shadow:0 24px 70px rgba(0,0,0,.48);
}
.data-download-overlay span { color:#a7de89; font-size:12px; font-weight:800; letter-spacing:.08em; }
.data-download-overlay h2 { margin:8px 0; font-size:23px; }
.data-download-overlay p { margin:0 0 20px; color:#c6d5c8; line-height:1.45; }
.app-update-card {
    width:min(430px,100%); padding:24px; border:1px solid rgba(139,214,119,.32); border-radius:24px;
    background:linear-gradient(145deg,#102d1b,#07150d); box-shadow:0 30px 90px rgba(0,0,0,.58); color:#f1fbf3;
}
.app-update-badge {
    display:inline-flex; padding:5px 9px; border-radius:999px; background:rgba(121,194,103,.16);
    color:#baf0ab; font-size:9px; font-weight:950; letter-spacing:.1em;
}
.app-update-card h2 { margin:13px 0 5px; font-size:24px; line-height:1.12; }
.app-update-card p { margin:10px 0; color:#c5d7c9; font-size:12px; line-height:1.55; }
.app-update-card .app-update-versions { margin-top:0; color:#9fe190; font-weight:850; }
.app-update-card .app-update-notes { padding:10px 12px; border-left:3px solid #79c267; border-radius:8px; background:rgba(121,194,103,.08); color:#e4f2e6; }
.app-update-actions { display:grid; gap:9px; margin-top:18px; }
.app-update-actions a,.app-update-actions button {
    display:flex; align-items:center; justify-content:center; min-height:48px; padding:0 14px; border-radius:12px;
    font-size:13px; font-weight:900; text-decoration:none;
}
.app-update-download { border:1px solid #8fd47c; background:#79c267; color:#09200d; box-shadow:0 8px 24px rgba(77,156,64,.24); }
.app-update-actions button { border:1px solid rgba(255,255,255,.13); background:rgba(255,255,255,.06); color:#d8e7db; }

.mobile-app-actions .mobile-measure-toggle { border-color:rgba(246,196,83,.42); color:#ffe099; background:rgba(246,196,83,.09); }
.mobile-app-actions .mobile-user-coupes-toggle { border-color:rgba(255,138,0,.55); color:#ffd093; background:rgba(255,138,0,.10); }
.mobile-app-actions .mobile-user-coupes-toggle.active { border-color:#ff9b25; color:#fff2dc; background:rgba(194,86,0,.38); box-shadow:0 0 0 2px rgba(255,138,0,.16) inset; }
.measure-panel {
    position:absolute; z-index:665; left:14px; bottom:18px; width:min(390px,calc(100% - 28px)); padding:14px;
    border:1px solid rgba(246,196,83,.34); border-radius:18px; background:rgba(9,24,15,.96); color:#f3faf4;
    box-shadow:0 20px 58px rgba(0,0,0,.42); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
}
.measure-panel-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.measure-panel-heading span,.measure-panel-heading strong { display:block; }
.measure-panel-heading span { color:#eacb7c; font-size:8px; font-weight:950; letter-spacing:.12em; }
.measure-panel-heading strong { margin-top:2px; font-size:14px; }
.measure-panel-heading>button { width:32px; height:32px; padding:0; border:1px solid rgba(255,255,255,.12); border-radius:9px; background:rgba(255,255,255,.05); color:#fff; font-size:21px; }

.user-coupes-panel { position:absolute; z-index:665; top:116px; right:18px; width:min(390px,calc(100vw - 36px)); padding:14px; border:1px solid rgba(121,194,103,.46); border-radius:16px; background:rgba(8,25,15,.96); color:var(--text); box-shadow:0 14px 36px rgba(0,0,0,.34); backdrop-filter:blur(12px); }
.user-coupes-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.user-coupes-heading span,.user-coupes-heading strong { display:block; }
.user-coupes-heading span { color:#eacb7c; font-size:8px; font-weight:950; letter-spacing:.12em; }
.user-coupes-heading strong { margin-top:2px; font-size:15px; }
.user-coupes-heading>button { width:32px; height:32px; padding:0; border:1px solid rgba(255,255,255,.12); border-radius:9px; background:rgba(255,255,255,.05); color:#fff; font-size:21px; }
.user-coupes-panel p { margin:11px 0; padding:9px 10px; border:1px solid rgba(255,255,255,.1); border-radius:10px; background:rgba(255,255,255,.035); color:#d7e7db; font-size:11px; line-height:1.45; overflow-wrap:anywhere; }
.user-coupes-panel p.error { border-color:rgba(255,107,107,.45); color:#ffd0d0; }
.user-coupes-panel p.success { border-color:rgba(121,194,103,.45); color:#dbffd5; }
.user-coupes-actions { display:grid; grid-template-columns:1.35fr 1fr 1fr; gap:7px; }
.user-coupes-actions button { min-height:40px; padding:8px; border:1px solid rgba(121,194,103,.4); border-radius:10px; background:#183324; color:#f4fff6; font-size:10px; font-weight:850; }
.user-coupes-actions button:first-child { background:#79c267; color:#0b210e; }
.user-coupes-actions button:disabled { opacity:.45; }
.user-coupes-panel small { display:block; margin-top:9px; color:var(--muted); font-size:9px; line-height:1.45; }
.coupe-workspace { margin-top:12px; padding-top:12px; border-top:1px solid rgba(79,203,212,.28); }
.coupe-workspace-heading { display:flex; flex-direction:column; gap:2px; }
.coupe-workspace-heading span { color:#66dce2; font-size:9px; font-weight:900; letter-spacing:.12em; }
.coupe-workspace-heading strong { font-size:14px; }
.coupe-workspace-quick-actions { display:grid; grid-template-columns:1.4fr 1fr; gap:7px; margin:9px 0; }
.coupe-workspace-quick-actions button { min-height:43px; border:1px solid rgba(102,220,226,.42); border-radius:10px; background:#143c43; color:#efffff; padding:8px; font:inherit; font-size:10px; font-weight:850; }
.coupe-workspace-quick-actions button:first-child { background:#66dce2; color:#052427; }
.coupe-workspace textarea,.coupe-workspace input { box-sizing:border-box; width:100%; margin:7px 0; padding:9px 10px; border:1px solid rgba(102,220,226,.34); border-radius:10px; background:#08180e; color:var(--text); font:inherit; font-size:11px; }
.coupe-workspace .user-coupes-actions { grid-template-columns:1fr 1fr; }
.coupe-workspace .user-coupes-actions button:first-child { background:#17606a; color:#efffff; }
.user-coupes-actions #user-coupes-draw { grid-column:1 / -1; border-color:rgba(246,196,83,.72); background:#f6c453; color:#302400; }
.coupe-workspace-importer { margin:8px 0; border:1px solid rgba(102,220,226,.22); border-radius:10px; padding:8px; }
.coupe-workspace-importer summary { cursor:pointer; color:#bff8fb; font-size:10px; font-weight:850; }
.coupe-workspace-section { margin-top:10px; }
.coupe-workspace-section>span { color:#86c8cb; font-size:8px; font-weight:900; letter-spacing:.1em; }
.coupe-workspace-list { max-height:130px; overflow:auto; margin:5px 0; display:grid; gap:5px; }
.coupe-workspace-item { display:flex; align-items:center; justify-content:space-between; gap:7px; padding:7px 8px; border:1px solid rgba(255,255,255,.1); border-radius:9px; background:rgba(255,255,255,.035); font-size:10px; }
.coupe-workspace-item .coupe-workspace-row-actions { display:flex; gap:5px; }
.coupe-workspace-item button,.coupe-workspace-draw-actions button,.coupe-workspace-export button,.coupe-workspace-editor>button { border:1px solid rgba(102,220,226,.42); border-radius:9px; background:#143c43; color:#efffff; padding:8px; font:inherit; font-size:10px; font-weight:800; }
.coupe-workspace-editor { margin-top:12px; padding:10px; border:1px solid rgba(102,220,226,.38); border-radius:12px; background:rgba(6,35,37,.65); }
.coupe-workspace-editor-title { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.coupe-workspace-editor-title>button { width:30px; padding:3px; font-size:18px; }
.coupe-workspace-area { display:block; margin:7px 0 2px; padding:8px 9px; border-radius:9px; background:rgba(102,220,226,.1); color:#bff8fb; font-size:11px; font-weight:850; }
.coupe-workspace-editor label { display:block; color:#b6d7d8; font-size:9px; font-weight:800; }
.coupe-workspace-editor select { box-sizing:border-box; width:100%; margin:7px 0; padding:9px 10px; border:1px solid rgba(102,220,226,.34); border-radius:10px; background:#08180e; color:var(--text); font:inherit; font-size:11px; }
.coupe-workspace-grid,.coupe-workspace-draw-actions,.coupe-workspace-export { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:7px; }
.coupe-workspace-editor>button { width:100%; margin-top:7px; background:#2c786e; }
.coupe-workspace-editor>button:disabled { opacity:.42; }
.legend-swatch.user-coupe { background:rgba(255,145,0,.32); border:2px solid #ff7a00; }
.user-coupe-popup>b,.user-coupe-popup>span { display:block; }
.user-coupe-popup>b { color:#f4fff6; font-size:14px; }
.user-coupe-popup>span { margin-top:3px; color:#ffc46b; font-weight:850; }
.user-coupe-popup dl { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr); gap:5px 9px; margin:10px 0 0; padding-top:9px; border-top:1px solid rgba(255,255,255,.12); }
.user-coupe-popup dt { color:#aebdb2; overflow-wrap:anywhere; }
.user-coupe-popup dd { margin:0; color:#eef8f0; font-weight:700; text-align:right; overflow-wrap:anywhere; }
.measure-mode-buttons { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin-top:11px; }
.measure-mode-buttons button,.measure-actions button { min-height:39px; border:1px solid rgba(255,255,255,.13); border-radius:10px; background:#172b1e; color:#e8f3ea; font-size:11px; font-weight:850; }
.measure-mode-buttons button.active { border-color:#f6c453; background:rgba(246,196,83,.17); color:#ffe7a9; }
.measure-instruction { margin-top:9px; color:#aebeb2; font-size:10px; line-height:1.4; }
.measure-result { display:block; margin-top:6px; color:#ffe39c; font-size:17px; font-weight:950; line-height:1.25; }
.measure-actions { display:grid; grid-template-columns:1.2fr .8fr .8fr; gap:6px; margin-top:10px; }
.measure-actions button:disabled { opacity:.38; }
body.measure-drawing-active #map canvas { cursor:crosshair!important; }
body.coupe-drawing-active #map canvas { cursor:crosshair!important; }
.coupe-draw-hud { position:absolute; z-index:680; top:16px; left:50%; transform:translateX(-50%); width:min(470px,calc(100% - 28px)); padding:12px; border:1px solid rgba(246,196,83,.72); border-radius:16px; background:rgba(8,25,15,.96); color:#f3faf4; box-shadow:0 18px 48px rgba(0,0,0,.42); backdrop-filter:blur(14px); }
.coupe-draw-hud-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; }
.coupe-draw-hud-heading span,.coupe-draw-hud-heading strong { display:block; }
.coupe-draw-hud-heading span { color:#f6c453; font-size:8px; font-weight:950; letter-spacing:.13em; }
.coupe-draw-hud-heading strong { margin-top:3px; font-size:13px; }
.coupe-draw-hud-heading>button { width:31px; height:31px; border:1px solid rgba(255,255,255,.15); border-radius:9px; background:rgba(255,255,255,.06); color:#fff; font-size:20px; }
.coupe-draw-hud .coupe-draw-guide { margin:7px 0 0; color:#c9d8cc; font-size:10px; line-height:1.35; }
.coupe-draw-hud output { display:block; margin:8px 0; color:#ffe49a; font-size:15px; font-weight:950; }
.coupe-draw-hud-actions { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
.coupe-draw-hud-actions button { min-height:39px; border:1px solid rgba(255,255,255,.15); border-radius:10px; background:#183324; color:#eff9f1; font-size:10px; font-weight:850; }
.coupe-draw-hud-actions button.active { border-color:#79c267; background:rgba(67,134,71,.42); }
.coupe-draw-hud-actions button.primary { border-color:#f6c453; background:#f6c453; color:#302400; }
.coupe-draw-hud-actions #coupe-draw-library { grid-column:span 2; }
.coupe-draw-hud-actions button:disabled { opacity:.38; }
body.measure-mode-active .map-legend-mini { display:none; }
.cadastre-report-button { border-color:rgba(121,194,103,.5)!important; color:#dcffd5!important; background:rgba(47,116,67,.28)!important; }
.cadastre-report-button:disabled { opacity:.42; cursor:wait; }
.cadastre-report-button.generating { position:relative; color:transparent!important; }
.cadastre-report-button.generating:after { content:'Ruošiamas PDF…'; position:absolute; inset:0; display:grid; place-items:center; color:#dcffd5; }

@media (max-width: 560px) {
    .mobile-app-actions button span { display:none; }
    .mobile-app-actions button { padding:0 9px; }
}

@media (max-width: 430px) {
    .mobile-app-actions { gap:4px; }
    .mobile-app-actions button { min-width:38px; width:38px; height:38px; padding:0 5px; }
}

@media (max-width: 850px) {
    .measure-panel { position:fixed; left:8px; right:8px; bottom:calc(204px + env(safe-area-inset-bottom)); width:auto; padding:12px; border-radius:16px; }
    .user-coupes-panel { position:fixed; left:8px; right:8px; top:calc(70px + env(safe-area-inset-top)); bottom:calc(204px + env(safe-area-inset-bottom)); width:auto; max-height:none; overflow:auto; padding:12px; border-radius:16px; }
    .coupe-draw-hud { position:fixed; top:calc(72px + env(safe-area-inset-top)); width:calc(100% - 16px); padding:10px; }
    .coupe-draw-hud-heading strong { font-size:12px; }
    .coupe-draw-hud output { font-size:14px; }
    .measure-panel-heading strong { font-size:13px; }
    .measure-result { font-size:15px; }
    .measure-actions button { min-height:38px; padding:0 6px; font-size:9px; }
}

/* Internetinis paslaugų katalogas. Jis naudoja esamą GIS aktyvaciją,
   tačiau teikėjų kontaktų ir taškų nekopijuoja į offline duomenų paketą. */
.mobile-app-actions .mobile-service-providers-toggle { border-color:rgba(20,184,166,.56); color:#bdfcf4; background:rgba(20,184,166,.10); }
.mobile-app-actions .mobile-service-providers-toggle.active { border-color:#2dd4bf; color:#f0fffc; background:rgba(13,148,136,.42); box-shadow:0 0 0 2px rgba(45,212,191,.14) inset; }
.service-providers-panel { position:absolute; z-index:666; top:116px; right:18px; width:min(410px,calc(100vw - 36px)); max-height:calc(100% - 140px); overflow:auto; padding:14px; border:1px solid rgba(20,184,166,.46); border-radius:16px; background:rgba(8,25,20,.97); color:var(--text); box-shadow:0 14px 36px rgba(0,0,0,.38); backdrop-filter:blur(12px); }
.service-providers-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.service-providers-heading span,.service-providers-heading strong { display:block; }
.service-providers-heading span,.service-provider-form-heading { color:#82ede2; font-size:8px; font-weight:950; letter-spacing:.12em; }
.service-providers-heading strong { margin-top:2px; font-size:15px; }
.service-providers-heading>button { width:32px; height:32px; padding:0; border:1px solid rgba(255,255,255,.12); border-radius:9px; background:rgba(255,255,255,.05); color:#fff; font-size:21px; }
.service-providers-panel>p { margin:11px 0 9px; padding:9px 10px; border:1px solid rgba(255,255,255,.1); border-radius:10px; background:rgba(255,255,255,.035); color:#d7e7db; font-size:11px; line-height:1.45; overflow-wrap:anywhere; }
.service-providers-panel>p.error { border-color:rgba(255,107,107,.45); color:#ffd0d0; }
.service-providers-panel>p.success { border-color:rgba(121,194,103,.45); color:#dbffd5; }
.service-providers-actions { display:grid; grid-template-columns:1.45fr 1fr; gap:7px; }
.service-providers-actions button,.service-provider-form-toggle { min-height:39px; padding:8px; border:1px solid rgba(20,184,166,.38); border-radius:10px; background:#123a35; color:#ecfffc; font-size:10px; font-weight:850; }
.service-providers-actions button:first-child { background:#22b8a8; color:#06221f; }
.service-providers-actions button.active { background:#236d63; color:#edfffc; border-color:#55e8d9; }
.service-provider-form-toggle { width:100%; margin-top:9px; background:rgba(255,255,255,.055); }
.service-providers-panel>small { display:block; margin-top:9px; color:var(--muted); font-size:9px; line-height:1.45; }
.service-provider-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin-top:11px; }
.service-provider-form label { display:grid; gap:4px; color:#b6c7ba; font-size:9px; font-weight:750; }
.service-provider-form input,.service-provider-form select,.service-provider-form textarea { width:100%; min-width:0; border:1px solid rgba(255,255,255,.14); border-radius:9px; padding:9px 10px; background:#08130d!important; background-color:#08130d!important; color:var(--text)!important; -webkit-text-fill-color:var(--text)!important; font:inherit; outline:none; -webkit-box-shadow:0 0 0 1000px #08130d inset!important; box-shadow:0 0 0 1000px #08130d inset!important; }
.service-provider-form input:focus,.service-provider-form select:focus,.service-provider-form textarea:focus { border-color:#52d7cb!important; }
.service-provider-form textarea { min-height:68px; resize:vertical; line-height:1.35; }
.service-provider-wide { grid-column:1/-1; }
.service-provider-form-heading { grid-column:1/-1; padding-top:2px; }
.service-provider-form button { min-height:40px; border:1px solid rgba(20,184,166,.38); border-radius:10px; padding:8px; font-size:10px; font-weight:850; }
.service-provider-pick { background:#173a37; color:#d8fffa; }
.service-provider-pick.picking { border-color:#f6c453; background:#6f5721; color:#fff8dc; }
.service-provider-submit { background:#79c267; color:#09200d; border-color:#9ee68b!important; }
.service-provider-submit:disabled { opacity:.55; }
.legend-service-provider { display:inline-block; width:10px; height:10px; border:2px solid #ecfeff; border-radius:50%; background:#14b8a6; box-shadow:0 0 0 2px rgba(20,184,166,.26); }
.service-provider-popup>b,.service-provider-popup>span { display:block; }
.service-provider-popup>b { color:#f2fffc; font-size:14px; }
.service-provider-popup>span { margin-top:3px; color:#7be9dd; font-weight:800; font-size:11px; }
.service-provider-popup>p { margin:8px 0; color:#d2e8df; font-size:11px; line-height:1.45; }
.service-provider-popup .contacts { display:flex; flex-wrap:wrap; gap:6px 9px; font-size:11px; }
.service-provider-popup .contacts a { color:#8eece1; }
@media (max-width:850px) {
    .service-providers-panel { position:fixed; left:8px; right:8px; top:auto; bottom:calc(204px + env(safe-area-inset-bottom)); width:auto; max-height:min(70vh,620px); padding:12px; border-radius:16px; }
}
@media (max-width:390px) {
    .service-provider-form { grid-template-columns:1fr; }
    .service-provider-wide { grid-column:auto; }
}
