/* AgroSat – vzhled
   Paleta: pole a porost. Inkoust jehličí, papírově studená bílá, zeleň chlorofylu, žluť řepky. */
:root {
  --ink: #1F2B25;
  --ink-2: #3E4C44;
  --muted: #66756C;
  --line: #DCE2DC;
  --line-2: #EBEFEA;
  --paper: #FBFCFA;
  --paper-2: #F2F5F1;
  --leaf: #2F7D4F;
  --leaf-600: #256641;
  --leaf-50: #E6F1E9;
  --rape: #E8B62C;
  --rape-50: #FBF1D4;
  --soil: #8A5A3B;
  --danger: #B3402E;
  --shadow: 0 1px 2px rgba(31, 43, 37, .08), 0 8px 24px rgba(31, 43, 37, .10);
  --r-s: 6px;
  --r-m: 10px;
  --panel-w: 480px;
  --chart-h: 230px;
  --browse-w: 340px;
  --font: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #E6ECE7; --ink-2: #C5D0C8; --muted: #93A298; --line: #34413A; --line-2: #2A3530;
    --paper: #18201C; --paper-2: #1E2823; --leaf: #4FA36F; --leaf-600: #5DB57D; --leaf-50: #213328;
    --rape: #EBC04A; --rape-50: #3A3320; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #E6ECE7; --ink-2: #C5D0C8; --muted: #93A298; --line: #34413A; --line-2: #2A3530;
  --paper: #18201C; --paper-2: #1E2823; --leaf: #4FA36F; --leaf-600: #5DB57D; --leaf-50: #213328;
  --rape: #EBC04A; --rape-50: #3A3320; color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--paper);
  display: flex; flex-direction: column; overflow: hidden; font-feature-settings: 'tnum' 1;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h3 { font-size: 13.5px; }
a { color: var(--leaf); }
kbd { font-family: inherit; font-size: 12px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--paper); }
code { font-size: 12.5px; background: var(--paper-2); padding: 1px 4px; border-radius: 4px; }
:focus-visible { outline: 2px solid var(--leaf); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- tlačítka a formuláře ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--r-s);
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: inherit; font-weight: 550; cursor: pointer;
  white-space: nowrap; transition: background .12s, border-color .12s;
}
.btn:hover { background: var(--paper-2); border-color: #C9D2CA; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.btn.primary:hover { background: var(--leaf-600); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--paper-2); }
.btn.small { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { padding: 0 8px; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.field > span { font-weight: 500; }
input[type=text], input[type=number], input[type=date], input[type=search], input[type=password], input[type=email], select {
  height: 32px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); color: var(--ink);
  font: inherit; font-size: 13.5px; padding: 0 8px; min-width: 0; width: 100%;
}
input:focus, select:focus { border-color: var(--leaf); outline: none; box-shadow: 0 0 0 3px var(--leaf-50); }
.check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.check.small { font-size: 12.5px; color: var(--muted); }
input[type=checkbox], input[type=radio] { accent-color: var(--leaf); width: 15px; height: 15px; margin: 0; }
input[type=range] { accent-color: var(--leaf); }
.hint { color: var(--muted); font-size: 12.5px; }
.note { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; max-width: 62ch; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; background: var(--paper); }
.seg button { border: 0; background: transparent; font: inherit; font-size: 12.5px; padding: 5px 10px; color: var(--ink-2); cursor: pointer; border-right: 1px solid var(--line); }
.seg button:last-child { border-right: 0; }
.seg button.on { background: var(--ink); color: var(--paper); }
.seg.small button { padding: 4px 9px; }

/* ---------- horní lišta ---------- */
.topbar {
  height: 56px; flex: 0 0 auto; display: flex; align-items: center; gap: 20px; padding: 0 14px 0 16px;
  border-bottom: 1px solid var(--line); background: var(--paper); position: relative; z-index: 5;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; font-stretch: 85%; }
.search { position: relative; flex: 1; max-width: 460px; display: flex; align-items: center; color: var(--muted); }
.search svg { position: absolute; left: 10px; }
.search input { padding-left: 32px; height: 36px; background: var(--paper-2); border-color: transparent; }
.search-results {
  position: absolute; top: 42px; left: 0; right: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m);
  box-shadow: var(--shadow); max-height: 360px; overflow: auto; z-index: 20; padding: 4px;
}
.search-results button { display: flex; width: 100%; justify-content: space-between; gap: 12px; border: 0; background: none; padding: 8px 10px; border-radius: var(--r-s); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.search-results button:hover, .search-results button.on { background: var(--paper-2); }
.search-results small { color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.source-badge { font-size: 12px; color: var(--muted); padding: 4px 10px; border-radius: 99px; background: var(--paper-2); margin-right: 6px; white-space: nowrap; }

/* ---------- pracovní plocha ---------- */
.workspace { flex: 1; display: flex; min-height: 0; }
.map-wrap { position: relative; flex: 1; min-width: 0; }
#map { position: absolute; inset: 0; }
.map-ctrl { position: absolute; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); z-index: 3; }
.basemaps { top: 12px; left: 12px; display: flex; padding: 3px; gap: 2px; }
.basemaps button { border: 0; background: transparent; font: inherit; font-size: 12.5px; padding: 5px 10px; border-radius: 7px; color: var(--ink-2); cursor: pointer; }
.basemaps button.on { background: var(--ink); color: var(--paper); }
.legend { left: 12px; bottom: 28px; padding: 10px 12px; min-width: 220px; max-width: 300px; font-size: 12px; }
.legend h4 { margin: 0 0 6px; font-size: 12.5px; font-weight: 600; }
.legend .ramp { height: 10px; border-radius: 3px; }
.legend .ramp-labels { display: flex; justify-content: space-between; color: var(--muted); margin-top: 3px; }
.legend .sw { display: grid; grid-template-columns: 14px 1fr auto; gap: 4px 8px; align-items: center; }
.legend .sw i { width: 14px; height: 10px; border-radius: 2px; }
.overlay-ctrl { right: 12px; top: 12px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.overlay-ctrl .row { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.maplibregl-ctrl-bottom-right { right: 0; }
.tooltip {
  position: absolute; z-index: 6; pointer-events: none; background: var(--ink); color: var(--paper); border-radius: var(--r-s);
  padding: 7px 10px; font-size: 12.5px; max-width: 300px; box-shadow: var(--shadow);
}
.tooltip b { display: block; font-weight: 600; margin-bottom: 2px; }
.tooltip dl { display: grid; grid-template-columns: auto 1fr; gap: 1px 10px; margin: 0; }
.tooltip dt { opacity: .7; } .tooltip dd { margin: 0; }
.empty-hint {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; background: var(--paper); border-radius: 14px;
  padding: 22px 26px; max-width: 420px; box-shadow: var(--shadow); border: 1px solid var(--line);
}
.empty-hint h2 { font-size: 18px; margin-bottom: 6px; }
.empty-hint p { margin: 0; color: var(--ink-2); }
.drop-zone { position: absolute; inset: 0; z-index: 10; background: rgba(47, 125, 79, .18); display: flex; align-items: center; justify-content: center; border: 3px dashed var(--leaf); }
.drop-zone div { background: var(--paper); padding: 14px 20px; border-radius: var(--r-m); font-weight: 600; box-shadow: var(--shadow); }

/* ---------- panel ---------- */
.panel {
  width: var(--panel-w); flex: 0 0 auto; border-left: 1px solid var(--line); background: var(--paper); position: relative;
  display: flex; flex-direction: column; min-height: 0;
}
.panel-resize { position: absolute; left: -4px; top: 0; bottom: 0; width: 8px; cursor: col-resize; z-index: 4; }
.panel-empty { padding: 48px 32px; text-align: left; }
.panel-empty h2 { font-size: 18px; margin: 18px 0 8px; }
.panel-empty p { color: var(--ink-2); margin: 0; max-width: 46ch; }
.multi-info { margin-top: 18px; padding: 12px 14px; border-radius: var(--r-m); background: var(--rape-50); }
.panel-body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.parcel-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 10px 16px; }
.parcel-shape { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 9px; background: var(--leaf-50); display: grid; place-items: center; }
.parcel-title { min-width: 0; flex: 1; }
.parcel-title h1 { font-size: 18px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.parcel-meta { color: var(--muted); font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 2px; }
.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: none; font: inherit; font-weight: 550; color: var(--muted); padding: 9px 10px; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; }
.tab.active { color: var(--ink); border-bottom-color: var(--leaf); }
.tabs.small .tab { font-size: 13px; }
.tab-pages { flex: 1; overflow: auto; min-height: 120px; }
.tab-page { display: none; padding: 12px 16px 20px; }
.tab-page.active { display: block; }
.block { margin-bottom: 16px; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.index-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 99px; padding: 4px 11px 4px 8px;
  font-size: 12.5px; cursor: pointer; user-select: none; background: var(--paper);
}
.chip input { width: 13px; height: 13px; }
.chip.on { background: var(--leaf-50); border-color: color-mix(in srgb, var(--leaf) 45%, transparent); }
.period { display: flex; flex-direction: column; gap: 8px; }
.dates { display: flex; align-items: center; gap: 6px; }
.dates input { width: auto; flex: 1; }
.progress { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; font-size: 12.5px; color: var(--muted); }
.progress .bar { flex: 0 0 120px; height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.progress .bar i { display: block; height: 100%; width: 0; background: var(--leaf); transition: width .2s; }
.progress .txt { flex: 1; min-width: 0; }
.callout { background: var(--rape-50); border-radius: var(--r-m); padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.callout.err { background: #F6E1DC; color: #5b1d12; }

/* snímky */
.scene-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.scene {
  border: 1px solid var(--line); border-radius: var(--r-s); padding: 0; background: var(--paper); cursor: pointer; text-align: left;
  font: inherit; color: inherit; overflow: hidden; position: relative; display: flex; flex-direction: column;
}
.scene:hover { border-color: #B9C5BB; }
.scene.sel { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.scene.rej { opacity: .62; }
.scene .thumb { aspect-ratio: 4 / 3; background: var(--paper-2); display: grid; place-items: center; }
.scene .thumb canvas, .scene .thumb img { width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; }
.scene .cap { padding: 4px 6px 5px; font-size: 11.5px; line-height: 1.25; }
.scene .cap b { font-weight: 600; display: block; }
.scene .cap span { color: var(--muted); }
.scene .peak-mark { position: absolute; top: 4px; right: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--rape); box-shadow: 0 0 0 2px var(--paper); }
.scene .cloud-mark { position: absolute; top: 4px; left: 4px; font-size: 10.5px; background: rgba(31,43,37,.75); color: #fff; border-radius: 4px; padding: 0 4px; }
.peak-groups { display: flex; flex-direction: column; gap: 10px; }
.peak-group h4 { margin: 0 0 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.peak-group .scene-grid { grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); }

/* zóny */
.settings-box { border: 1px solid var(--line); border-radius: var(--r-m); padding: 0 12px; }
.settings-box[open] { padding-bottom: 12px; }
.settings-box summary { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 0; cursor: pointer; list-style: none; }
.settings-box summary::-webkit-details-marker { display: none; }
.settings-box summary h3::before { content: '▸'; display: inline-block; margin-right: 6px; transition: transform .15s; color: var(--muted); }
.settings-box[open] summary h3::before { transform: rotate(90deg); }
.zone-years { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.zyear { border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 12px; }
.zyear.off { background: var(--paper-2); }
.zyear-head { display: flex; align-items: center; gap: 10px; }
.zyear-head h4 { margin: 0; font-size: 15px; font-weight: 650; }
.zyear-head .hint { flex: 1; }
.zyear .scene-grid { margin-top: 8px; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.zyear .scene .pick { position: absolute; left: 4px; top: 4px; }
.zyear .scene.picked { border-color: var(--rape); box-shadow: 0 0 0 1px var(--rape); }
.zyear .more { margin-top: 6px; font-size: 12.5px; }
.zyear .warn { font-size: 12px; color: var(--soil); margin-top: 6px; }
.zone-result { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.zone-result .grid2 { margin-bottom: 10px; }
.zone-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 10px 0; }
.zone-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 4px 6px; border-bottom: 1px solid var(--line); }
.zone-table td { padding: 4px 6px; border-bottom: 1px solid var(--line-2); }
.zone-table td.num, .zone-table th.num { text-align: right; }
.zone-table .sw { display: inline-block; width: 14px; height: 10px; border-radius: 2px; vertical-align: -1px; margin-right: 6px; }
.zone-table .barc { width: 34%; }
.zone-table .barc i { display: block; height: 8px; border-radius: 2px; }
.years-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 8px; margin: 12px 0; }
.years-strip figure { margin: 0; font-size: 11.5px; }
.years-strip canvas { width: 100%; aspect-ratio: 4/3; object-fit: contain; background: var(--paper-2); border-radius: 4px; image-rendering: pixelated; }
.years-strip figcaption { display: flex; justify-content: space-between; color: var(--muted); }
.years-strip figcaption b { color: var(--ink); font-weight: 600; }
.export-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; justify-content: space-between; padding-top: 6px; }
.batch { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 18px; }

/* atributy */
.attr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.attr-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 5px 8px 5px 0; width: 42%; vertical-align: top; border-bottom: 1px solid var(--line-2); }
.attr-table td { padding: 5px 0; border-bottom: 1px solid var(--line-2); word-break: break-word; }

/* graf */
.chart-dock { flex: 0 0 var(--chart-h); border-top: 1px solid var(--line); display: flex; flex-direction: column; position: relative; background: var(--paper); }
.chart-resize { position: absolute; top: -4px; left: 0; right: 0; height: 8px; cursor: row-resize; z-index: 3; }
.chart-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 0 16px; flex-wrap: wrap; }
.chart-head h3 { font-size: 13.5px; }
.chart-head select { width: auto; height: 28px; font-size: 12.5px; }
.chart-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.peak-toggle { font-size: 12.5px; padding: 0 8px; height: 28px; border-radius: var(--r-s); background: var(--rape-50); }
.chart { flex: 1; min-height: 0; }
.pop { position: relative; }
.pop summary { list-style: none; }
.pop summary::-webkit-details-marker { display: none; }
.pop-body { position: absolute; right: 0; bottom: 34px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); padding: 10px 12px; display: flex; flex-direction: column; gap: 7px; z-index: 10; min-width: 230px; font-size: 13px; }

/* dialogy */
.dlg { border: 0; padding: 0; border-radius: 14px; box-shadow: var(--shadow); background: var(--paper); color: var(--ink); width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 48px); }
.dlg.narrow { width: min(460px, calc(100vw - 32px)); }
.dlg::backdrop { background: rgba(20, 28, 24, .35); }
.dlg-inner { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px 20px; }
.dlg-head h2 { font-size: 17px; }
.st-page { display: none; padding: 16px 20px; overflow: auto; }
.st-page.active { display: block; }
.st-page > .field, .st-page > .grid2, .st-page > .check { margin-bottom: 12px; }
.st-page h3 { margin: 18px 0 6px; }
.dlg-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
.scl-set { border: 1px solid var(--line); border-radius: var(--r-m); padding: 8px 12px 10px; margin-top: 6px; }
.scl-set legend { font-size: 12.5px; color: var(--muted); padding: 0 4px; }
#sclList { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13px; }
.attr-cfg { width: 100%; border-collapse: collapse; font-size: 13px; }
.attr-cfg th { text-align: left; font-weight: 500; color: var(--muted); padding: 6px 4px; border-bottom: 1px solid var(--line); }
.attr-cfg td { padding: 4px; border-bottom: 1px solid var(--line-2); }
.attr-cfg td:nth-child(2) { width: 80px; text-align: center; }
.attr-cfg input[type=text] { height: 28px; }
.layer-list { list-style: none; margin: 0; padding: 8px 20px; display: flex; flex-direction: column; gap: 6px; }
.layer-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-s); }
.layer-list li .nm { flex: 1; min-width: 0; }
.layer-list li .nm small { display: block; color: var(--muted); }
.dlg .hint { padding: 0 20px 16px; }
.st-page .hint { padding: 0; }

/* toasty */
.toasts { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; z-index: 50; align-items: center; }
.toast { background: var(--ink); color: var(--paper); padding: 9px 14px; border-radius: var(--r-m); box-shadow: var(--shadow); font-size: 13px; max-width: 520px; }
.toast.err { background: var(--danger); color: #fff; }

/* MapLibre drobnosti */
.maplibregl-ctrl-group { border-radius: var(--r-m) !important; box-shadow: var(--shadow) !important; }
.maplibregl-ctrl-attrib { font-size: 10.5px; }

/* responzivita */
@media (max-width: 900px) {
  body { overflow: auto; }
  .workspace { flex-direction: column; }
  .map-wrap { flex: 0 0 55vh; }
  .panel { width: 100% !important; border-left: 0; border-top: 1px solid var(--line); }
  .panel-resize { display: none; }
  .topbar { gap: 10px; padding: 0 10px; }
  .source-badge, #btnLayers { display: none; }
  .btn#btnImport { padding: 0 10px; }
  .basemaps { flex-wrap: wrap; max-width: calc(100% - 24px); }
  .grid2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .brand-name { display: none; }
  #btnImport { font-size: 0; gap: 0; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

.chart-dock.collapsed { flex-basis: 46px; }
.chart-dock.collapsed .chart, .chart-dock.collapsed .chart-resize { display: none; }
.chart-dock.collapsed #btnChartToggle svg { transform: rotate(180deg); }
.zone-table td.num { white-space: nowrap; }

/* graf přes celou šířku dole */
.chart-dock { flex: 0 0 var(--chart-h); width: 100%; min-height: 0; }
.chart-head { padding: 8px 14px 0 16px; }
.chart-parcel { color: var(--muted); font-size: 13px; margin-right: 6px; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* kreslení */
.draw-hint {
  position: absolute; top: 60px; left: 12px; right: 12px; margin: 0 auto; width: max-content; z-index: 5; background: var(--ink); color: var(--paper);
  border-radius: var(--r-m); box-shadow: var(--shadow); padding: 8px 10px 8px 14px; display: flex; align-items: center; gap: 12px; font-size: 13px; max-width: calc(100% - 24px); flex-wrap: wrap;
}
.draw-hint .keys { opacity: .75; font-size: 12px; }
.draw-hint kbd { background: transparent; color: inherit; border-color: rgba(255,255,255,.35); }
.draw-hint .btn { height: 28px; }
.draw-hint .btn.ghost { color: var(--paper); }
.draw-hint .btn.ghost:hover { background: rgba(255,255,255,.12); }
.btn.on { background: var(--rape-50); border-color: var(--rape); }
.btn.danger { color: var(--danger); }

/* načítání a chyby */
.loading-veil { position: absolute; inset: 0; z-index: 8; background: rgba(251, 252, 250, .55); display: grid; place-items: center; }
.loading-veil > div { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: var(--r-m); padding: 14px 18px; display: flex; align-items: center; gap: 12px; font-weight: 550; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid var(--leaf-50); border-top-color: var(--leaf); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.boot-error { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 60; background: #F6E1DC; color: #5b1d12; border: 1px solid #e3b5aa; border-radius: var(--r-m); padding: 14px 18px; max-width: 640px; box-shadow: var(--shadow); font-size: 14px; }
@media (max-width: 900px) { .chart-dock { flex-basis: 300px; } #btnDraw { display: none; } }

.scene-grid > p { grid-column: 1 / -1; margin: 0; }

.zoom-hint { position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 3; background: var(--ink); color: var(--paper); padding: 7px 14px; border-radius: 99px; font-size: 13px; box-shadow: var(--shadow); max-width: calc(100% - 140px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }

/* ===== v3: levý panel Pozemky ===== */
.browse { width: var(--browse-w); flex: 0 0 auto; border-right: 1px solid var(--line); background: var(--paper); display: flex; flex-direction: column; min-height: 0; }
.browse-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 6px 16px; }
.browse-head h2 { font-size: 16px; }
.browse-body { flex: 1; overflow: auto; padding: 4px 16px 12px; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.browse-toggles { display: flex; flex-direction: column; gap: 4px; }
.browse-sum { font-size: 13px; color: var(--ink-2); border-top: 1px solid var(--line-2); padding-top: 8px; }
.browse-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.browse-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.browse-list li { display: flex; align-items: center; gap: 8px; padding: 3px 4px; border-radius: var(--r-s); }
.browse-list li.cur { background: var(--rape-50); }
.browse-list li:hover { background: var(--paper-2); }
.browse-list li.more { font-size: 12px; padding: 8px 4px; }
.b-item { flex: 1; min-width: 0; border: 0; background: none; text-align: left; font: inherit; color: inherit; padding: 4px 0; cursor: pointer; display: flex; flex-direction: column; }
.b-item b { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.b-item small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { background: var(--leaf-50); color: var(--leaf-600); border-radius: 4px; padding: 0 4px; font-weight: 600; }
.browse-foot { border-top: 1px solid var(--line); padding: 10px 16px 12px; font-size: 13px; background: var(--paper); }
.browse-foot .actions { margin: 8px 0 0; }
.browse-foot .progress { margin: 8px 0 0; }
.filters { display: flex; flex-direction: column; gap: 6px; }
.filter-row { display: grid; grid-template-columns: 96px 1fr auto; gap: 4px; align-items: center; padding: 6px; background: var(--paper-2); border-radius: var(--r-s); }
.filter-row .f-k { grid-column: 1 / -1; }
.filter-row select, .filter-row input { height: 30px; font-size: 12.5px; padding: 0 6px; }
.count-pill { background: var(--rape); color: var(--ink); border-radius: 99px; font-size: 11px; font-weight: 700; padding: 0 6px; margin-left: 2px; }
.btn.on { background: var(--rape-50); border-color: var(--rape); }

/* rozbalovací vícenásobný výběr */
.multi-select { position: relative; }
.multi-select > summary { list-style: none; height: 32px; border: 1px solid var(--line); border-radius: var(--r-s); padding: 0 28px 0 10px; display: flex; align-items: center; cursor: pointer; background: var(--paper); color: var(--ink); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.multi-select > summary::-webkit-details-marker { display: none; }
.multi-select > summary::after { content: '▾'; position: absolute; right: 10px; color: var(--muted); }
.multi-select[open] > summary { border-color: var(--leaf); box-shadow: 0 0 0 3px var(--leaf-50); }
.ms-body { position: absolute; z-index: 30; left: 0; right: 0; top: 36px; min-width: 240px; max-height: 320px; overflow: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-m); box-shadow: var(--shadow); padding: 6px; display: flex; flex-direction: column; gap: 1px; }
.ms-item { padding: 5px 6px; border-radius: var(--r-s); font-size: 13px; color: var(--ink); align-items: flex-start; }
.ms-item:hover { background: var(--paper-2); }
.ms-item.on { background: var(--leaf-50); }
.ms-item small { display: inline; }
.align-end { align-items: end; }

/* nástroje snímku v mapě */
.scene-tools { top: 12px; right: 12px; display: flex; align-items: center; gap: 2px; padding: 3px 3px 3px 10px; font-size: 12px; }
.st-label { color: var(--ink-2); margin-right: 4px; white-space: nowrap; max-width: 200px; overflow: hidden; text-overflow: ellipsis; }
.tool { width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; list-style: none; }
.tool::-webkit-details-marker { display: none; }
.tool:hover { background: var(--paper-2); }
.tool.off { color: var(--muted); opacity: .5; }
.tool-pop { position: relative; }
.pop-body.down { top: 36px; bottom: auto; right: 0; min-width: 220px; }
.bm-sep { width: 1px; background: var(--line); margin: 4px 4px; }

/* hlavička panelu */
.mark-toggle { white-space: nowrap; }

/* zóny */
h4.sub { font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 10px 0 8px; }
.cls-row { margin: 10px 0; }
.zone-scenes { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; }
.zone-scenes > summary { list-style: none; display: flex; align-items: baseline; justify-content: space-between; cursor: pointer; margin-bottom: 8px; }
.zone-scenes > summary::-webkit-details-marker { display: none; }
.zone-scenes > summary h3::before { content: '▸'; display: inline-block; margin-right: 6px; transition: transform .15s; color: var(--muted); }
.zone-scenes[open] > summary h3::before { transform: rotate(90deg); }
.recalc-bar { position: sticky; bottom: 0; margin: 10px -16px -20px; padding: 10px 16px; background: var(--ink); color: var(--paper); display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; z-index: 5; }

/* předpis */
.rx-scene { margin-top: 10px; }
.rx-table input.rx-rate { width: 84px; height: 28px; text-align: right; border-left: 4px solid var(--sw, var(--line)); }
.rx-table td:first-child { width: 22px; }
.rx-rule-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 6px 0; }
.rx-rule-table td, .rx-rule-table th { padding: 3px 6px; border-bottom: 1px solid var(--line-2); text-align: left; }
.rx-rule-table th { color: var(--muted); font-weight: 500; }
.rx-rule-table input { height: 26px; width: 110px; }
.rx-rule-table .sw { display: inline-block; width: 12px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
#rxExportBlock .btn-group { margin-top: 10px; }

@media (max-width: 900px) { .browse { width: 100%; position: absolute; inset: 0; z-index: 20; } }

/* záloha */
.backup-pill { border: 1px solid var(--line); border-radius: 99px; font: inherit; font-size: 12px; padding: 4px 10px; cursor: pointer; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.backup-pill.warn { background: var(--rape-50); border-color: var(--rape); color: var(--ink); }
.backup-pill.pending { background: var(--rape); border-color: var(--rape); color: #1F2B25; font-weight: 600; }
.backup-pill.ok { color: var(--leaf-600); background: var(--leaf-50); border-color: transparent; }
.backup-notice { margin-top: 18px; padding: 14px 16px; border-radius: var(--r-m); background: var(--rape-50); border: 1px solid color-mix(in srgb, var(--rape) 50%, transparent); }
.backup-notice h3 { font-size: 14.5px; margin-bottom: 6px; }
.backup-notice p { margin: 0 0 6px; font-size: 13px; }
.backup-box { border: 1px solid var(--line); border-radius: var(--r-m); padding: 12px 14px; margin: 12px 0; }
.backup-box h3 { margin: 0 0 6px; }
.err-text { color: var(--danger); }
@media (max-width: 900px) { .backup-pill { display: none; } }

/* ===== v4: lišta mapy, vrstvy, WMS ===== */
.mapbar { top: 12px; left: 12px; display: flex; align-items: center; padding: 3px; gap: 2px; }
.mb-btn { border: 0; background: transparent; font: inherit; font-size: 12.5px; padding: 5px 9px; border-radius: 7px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; list-style: none; height: 30px; }
.mb-btn::-webkit-details-marker { display: none; }
.mb-btn:hover { background: var(--paper-2); }
.mb-btn.on { background: var(--ink); color: var(--paper); }
#btnLabels.on, #btnWeatherLayer.on { background: var(--ink); color: var(--paper); }
#btnLabels { border: 0; background: transparent; font: inherit; font-size: 12.5px; padding: 5px 9px; border-radius: 7px; color: var(--ink-2); cursor: pointer; height: 30px; }
#btnLabels:hover { background: var(--paper-2); }
.mb-btn .caret { color: var(--muted); font-size: 11px; }
.bm-pop > summary b, #bmName { font-weight: 600; color: var(--ink); }
.pop-body.left { left: 0; right: auto; }
.pop-title { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 2px 4px 4px; }
.bm-item { padding: 6px 6px; border-radius: var(--r-s); align-items: flex-start; }
.bm-item span { display: flex; flex-direction: column; }
.bm-item small { color: var(--muted); font-size: 11.5px; }
.bm-item.on { background: var(--leaf-50); }
.mb-count { background: var(--rape); color: #1F2B25; border-radius: 99px; font-size: 10.5px; font-weight: 700; padding: 0 5px; }
.layer-panel { top: 56px; left: 12px; width: 330px; max-height: calc(100% - 120px); display: flex; flex-direction: column; z-index: 4; }
.lp-head { display: flex; align-items: center; gap: 8px; padding: 10px 8px 4px 12px; }
.lp-head h3 { flex: 1; font-size: 14px; }
.lp-hint { padding: 0 12px 6px; margin: 0; font-size: 11.5px; }
.lp-list { list-style: none; margin: 0; padding: 0 8px 10px; overflow: auto; display: flex; flex-direction: column; gap: 4px; }
.lp-list li { border: 1px solid var(--line); border-radius: var(--r-s); padding: 6px 8px; background: var(--paper); }
.lp-list li.drag { opacity: .5; }
.lp-list li.far .lp-nm b { color: var(--muted); }
.lp-list li.fixed { background: var(--paper-2); }
.lp-row { display: flex; align-items: center; gap: 6px; }
.lp-nm { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lp-nm b { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-nm small { font-size: 11px; color: var(--muted); }
.lp-list input[type=range] { width: 100%; margin: 4px 0 0; height: 14px; }
.lp-pin { width: 15px; text-align: center; color: var(--muted); }
.tool.sm { width: 24px; height: 24px; font-size: 10px; }
.tool:disabled { opacity: .3; cursor: default; }
.wms-catalog { display: flex; flex-direction: column; gap: 6px; max-height: 46vh; overflow: auto; margin: 6px 0 4px; }
.wms-svc { border: 1px solid var(--line); border-radius: var(--r-m); padding: 0 10px; }
.wms-svc > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 8px; padding: 8px 0; flex-wrap: wrap; }
.wms-svc > summary::-webkit-details-marker { display: none; }
.wms-svc > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.wms-svc[open] > summary::before { transform: rotate(90deg); }
.wms-svc > summary small { color: var(--muted); flex: 1; }
.wms-svc ul { list-style: none; margin: 0 0 8px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.wms-svc li label { align-items: flex-start; font-size: 13px; padding: 3px 0; }
.wms-svc li span { display: flex; flex-direction: column; }
.wms-svc li small { color: var(--muted); font-size: 11px; }
.dlg-foot .foot-note { margin-right: auto; padding: 0; }
.dlg-foot { gap: 8px; align-items: center; }
.dlg-foot .spacer, .zed-foot .spacer { flex: 1; }
.dlg-sub { font-size: 13px; margin: 6px 20px 0; color: var(--ink-2); }
.no-basemap #map { background: #eef1ec; }
.place-pin { width: 22px; height: 30px; cursor: pointer; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 30'%3E%3Cpath d='M11 1C5.5 1 1 5.4 1 10.9 1 18 11 29 11 29s10-11 10-18.1C21 5.4 16.5 1 11 1z' fill='%23D9534F' stroke='%23fff' stroke-width='2'/%3E%3Ccircle cx='11' cy='11' r='4' fill='%23fff'/%3E%3C/svg%3E"); }
.sr-head { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px 2px; }

/* skupiny a vlastní atributy */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.gchip { display: inline-flex; align-items: center; gap: 4px; border-radius: 99px; padding: 2px 4px 2px 10px; font-size: 12.5px; background: color-mix(in srgb, var(--gc) 18%, var(--paper)); border: 1px solid color-mix(in srgb, var(--gc) 60%, transparent); }
.gchip button { border: 0; background: transparent; cursor: pointer; color: var(--muted); font-size: 11px; padding: 0 4px; }
.gchip.sm { padding: 0 8px; font-size: 11.5px; }
.parcel-groups { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.inline-select { width: auto; height: 28px; font-size: 12.5px; }
.ua-table input[type=text] { height: 28px; }
.ua-table th { width: 34%; }
.ua-act { width: 76px; padding-left: 6px !important; }
#attrExtra { margin-top: 18px; }
.layer-list li.grp input[type=color] { width: 26px; height: 22px; border: 0; padding: 0; background: none; cursor: pointer; }
.pop-body.menu { gap: 0; padding: 4px; min-width: 220px; }
.pop-body.menu button { border: 0; background: none; font: inherit; font-size: 13px; text-align: left; padding: 6px 8px; border-radius: var(--r-s); cursor: pointer; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.pop-body.menu button:hover { background: var(--paper-2); }
.pop-body.menu button.danger { color: var(--danger); }
.pop-body.menu button.sub { color: var(--muted); font-size: 12px; }
.pop-body.floating { position: fixed; z-index: 60; bottom: auto; right: auto; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* nápověda k indexům */
.info-btn { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--muted); background: transparent; color: var(--muted); font: italic 600 10.5px/1 Georgia, serif; cursor: pointer; padding: 0; margin-left: 4px; vertical-align: 1px; }
.info-btn:hover { background: var(--leaf); color: #fff; border-color: var(--leaf); }
.ms-item .info-btn { margin-left: auto; flex: 0 0 auto; }
.ms-item .ms-txt { flex: 1; }
.info-body { max-height: 70vh; }
.info-item { border-bottom: 1px solid var(--line-2); padding: 10px 0; }
.info-item.focus { background: var(--rape-50); margin: 0 -12px; padding: 10px 12px; border-radius: var(--r-m); }
.info-item h3 { margin: 0 0 4px; font-size: 14px; }
.info-item h3 small { font-weight: 400; color: var(--muted); font-size: 12.5px; }
.info-item p { margin: 0 0 4px; font-size: 13px; }
.info-item .use { color: var(--ink-2); }

/* zóny: rozdíl, úpravy */
.diff-box { border: 1px solid var(--line); border-radius: var(--r-m); padding: 10px 12px; margin: 10px 0; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin: 8px 0; }
.kpis > div { background: var(--paper-2); border-radius: var(--r-s); padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.kpis b { font-size: 17px; font-weight: 650; letter-spacing: -.01em; }
.kpis span { font-size: 11.5px; color: var(--muted); line-height: 1.25; }
.kpis .pos { color: #2166ac; } .kpis .neg { color: #b2182b; }
.edit-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.zed-panel { top: 56px; left: 12px; width: 360px; max-height: calc(100% - 110px); overflow: auto; padding: 12px; z-index: 4; }
.zed-head small { display: block; color: var(--muted); font-size: 12px; }
.zed-head b { font-size: 14px; }
.zed-table input { margin: 0; }
.zed-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.zed-line { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); flex-wrap: wrap; }
.zed-line select { width: auto; max-width: 170px; height: 28px; font-size: 12.5px; }
.zed-line input { width: 80px; height: 28px; }
.zed-foot { display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.zed-pop { display: flex; flex-direction: column; gap: 2px; font: 13px var(--font); color: #1F2B25; }
.zed-pop button { border: 0; background: none; text-align: left; padding: 5px 6px; border-radius: 6px; cursor: pointer; font: inherit; display: flex; align-items: center; gap: 6px; }
.zed-pop button:hover { background: #EEF2EE; }
.zed-pop .sw { width: 14px; height: 10px; border-radius: 2px; display: inline-block; }
.zed-pop .sw.new { background: repeating-linear-gradient(45deg, #c9a227 0 3px, #fff 3px 6px); border: 1px solid #c9a227; }
.zed-pop .hint { color: #66756C; margin-bottom: 4px; }

/* počasí */
.wx-loc { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.wx-ctrl { margin-bottom: 4px; }
.wx-chart { height: 230px; margin: 4px -4px 8px; }
.wx-table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin: 6px 0 10px; }
.wx-table th { text-align: left; font-weight: 500; color: var(--muted); padding: 4px 5px; border-bottom: 1px solid var(--line); }
.wx-table td { padding: 4px 5px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.wx-table .num { text-align: right; }
.wx-table td.rain { color: #2166ac; font-weight: 600; }
.wx-windows { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.wx-windows li { background: var(--leaf-50); border-radius: 99px; padding: 3px 10px; font-size: 12.5px; }
.wx-formula { display: flex; gap: 6px; align-items: center; }
.wx-formula select { flex: 1; }
.wx-expr { margin: 6px 0; }
.wx-src { margin-top: 10px; }
.wx-meta { color: var(--muted); font-size: 12.5px; margin-bottom: 6px; }
.dlg.wide { width: min(860px, calc(100vw - 32px)); }
.gdd-expr { min-height: 44px; border: 1px solid var(--line); border-radius: var(--r-m); padding: 8px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 8px 0 6px; background: var(--paper-2); }
.tok { border-radius: 6px; padding: 2px 7px; font-size: 13px; font-weight: 600; background: var(--paper); border: 1px solid var(--line); }
.tok.var { background: #E3EEF9; border-color: #b9d2ec; color: #1d4f80; }
.tok.num { background: var(--rape-50); border-color: color-mix(in srgb, var(--rape) 50%, transparent); }
.tok.fn { background: #EFE6F7; border-color: #d4c1e8; color: #5a2f86; }
.tok.cmp { background: #F8E3DF; border-color: #ecc0b6; color: #8a2e1c; }
.gdd-text { font-family: ui-monospace, Menlo, Consolas, monospace !important; font-size: 13px !important; }
.gdd-tiles { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; align-items: center; }
.tile { border: 1px solid var(--line); background: var(--paper); border-radius: 7px; padding: 5px 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; min-width: 34px; }
.tile:hover { border-color: var(--leaf); }
.tile.var { background: #E3EEF9; color: #1d4f80; } .tile.fn { background: #EFE6F7; color: #5a2f86; } .tile.cmp { background: #F8E3DF; color: #8a2e1c; } .tile.del { color: var(--muted); }
.tile-num { display: inline-flex; gap: 4px; align-items: center; }
.tile-num input { width: 70px; height: 30px; }
.gdd-preview { font-size: 12.5px; color: var(--ink-2); margin-bottom: 10px; }
.pkg-layers { display: flex; flex-direction: column; gap: 4px; margin: 8px 0; }
@media (max-width: 900px) { .layer-panel, .zed-panel { width: calc(100% - 24px); } .wms-svc ul { grid-template-columns: 1fr; } .mapbar { flex-wrap: wrap; max-width: calc(100% - 24px); } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tok.var, :root:not([data-theme="light"]) .tile.var { background: #1d3550; color: #cfe2f7; } :root:not([data-theme="light"]) .tok.fn, :root:not([data-theme="light"]) .tile.fn { background: #3a2850; color: #e6d6f7; } :root:not([data-theme="light"]) .tok.cmp, :root:not([data-theme="light"]) .tile.cmp { background: #4a2a22; color: #f6d3ca; } }
#mainTabs { overflow-x: auto; scrollbar-width: none; padding: 0 8px; }
#mainTabs::-webkit-scrollbar { display: none; }
#mainTabs .tab { white-space: nowrap; padding: 9px 8px; font-size: 13.5px; flex: 0 0 auto; }
.radar-ctrl { left: 50%; transform: translateX(-50%); bottom: 34px; display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; font-size: 12.5px; z-index: 4; }
.radar-ctrl input[type=range] { width: 160px; }
.radar-time { min-width: 120px; color: var(--ink-2); white-space: nowrap; }
.radar-ramp { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.radar-ramp i { width: 60px; height: 8px; border-radius: 2px; background: linear-gradient(90deg, #88ddee, #0099cc, #0077aa, #005588, #ffee00, #ffaa00, #ff4400, #c10000); }
#btnMeteo.on { background: var(--ink); color: var(--paper); } #btnMeteo.on .caret { color: inherit; }
.radar-strip { display: flex; gap: 3px; margin: 6px 0 4px; }
.radar-strip i { flex: 1; height: 18px; border-radius: 3px; background: var(--paper-2); border: 1px solid var(--line); }
.radar-strip i.err { background: repeating-linear-gradient(45deg, var(--paper-2) 0 3px, var(--line) 3px 6px); }
@media (max-width: 900px) { .radar-ramp { display: none; } .radar-ctrl input[type=range] { width: 100px; } }
.years-strip figure { cursor: pointer; border-radius: 6px; padding: 3px; border: 1px solid transparent; }
.years-strip figure:hover { border-color: var(--line); background: var(--paper-2); }
.years-strip figure.on { border-color: var(--leaf); background: var(--leaf-50); }
.batch-panel { right: 12px; top: 56px; width: 360px; max-height: calc(100% - 120px); display: flex; flex-direction: column; padding: 10px 12px; z-index: 4; }
.bp-head { display: flex; align-items: center; justify-content: space-between; font-size: 14px; }
.bp-sum { font-size: 12.5px; color: var(--ink-2); margin: 4px 0; }
.batch-panel .progress { margin: 4px 0 6px; }
.bp-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.bp-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; min-height: 60px; border-top: 1px solid var(--line-2); }
.bp-list li { display: flex; align-items: center; gap: 8px; padding: 2px 4px; border-bottom: 1px solid var(--line-2); }
.bp-list .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: 0 0 auto; }
.bp-list .s-run .dot { background: var(--rape); animation: spin 1s linear infinite; box-shadow: 0 0 0 2px var(--rape-50); }
.bp-list .s-ok .dot, .bp-list .s-skip .dot { background: var(--leaf); }
.bp-list .s-empty .dot { background: var(--soil); }
.bp-list .s-err .dot, .bp-list .s-missing .dot { background: var(--danger); }
.bp-list .hint { font-size: 11.5px; white-space: nowrap; }
.wx-alerts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wx-alerts li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r-s); border-left: 4px solid var(--line); background: var(--paper-2); font-size: 13px; }
.wx-alerts li .ic { font-size: 17px; line-height: 1.2; }
.wx-alerts li small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 1px; }
.wx-alerts li span { color: var(--ink-2); }
.wx-alerts .lvl-high { border-left-color: #c0392b; background: color-mix(in srgb, #c0392b 9%, var(--paper)); }
.wx-alerts .lvl-mid { border-left-color: var(--rape); background: var(--rape-50); }
.wx-alerts .lvl-low { border-left-color: #6baed6; }
.wx-ok { color: var(--leaf-600) !important; }
.years-strip figure.all { background: var(--paper-2); }
.years-strip figure.all figcaption b { color: var(--leaf-600); }
.job-pill { border: 1px solid var(--line); border-radius: 99px; font: inherit; font-size: 12px; padding: 4px 10px; cursor: pointer; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.job-pill.run { background: var(--leaf-50); color: var(--leaf-600); border-color: color-mix(in srgb, var(--leaf) 40%, transparent); font-weight: 600; }
.job-pill.wait { background: var(--rape-50); border-color: var(--rape); }
.job-pill .spin { width: 11px; height: 11px; border-radius: 50%; border: 2px solid var(--leaf-50); border-top-color: var(--leaf); animation: spin .8s linear infinite; }
.sel-bar { bottom: 84px; right: 56px; display: flex; align-items: center; gap: 6px; padding: 4px 4px 4px 12px; font-size: 13px; white-space: nowrap; z-index: 5; }
.sel-bar span { color: var(--muted); margin-right: 4px; }
.rx-multi { border: 1px solid color-mix(in srgb, var(--rape) 60%, transparent); background: var(--rape-50); border-radius: var(--r-m); padding: 10px 12px; }
.rx-multi .rx-table input.rxm-rate { width: 84px; height: 28px; text-align: right; }
.rx-pop-rate { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-size: 13px; }
.rx-pop-rate input { width: 90px; height: 28px; border: 1px solid #ccd5cc; border-radius: 6px; padding: 0 6px; font: inherit; }
.batch-panel { width: 420px; }
.bp-tabs { margin-right: 8px; }
.zl-tools { display: grid; grid-template-columns: 1fr auto; gap: 6px; margin: 6px 0; align-items: center; }
.zl-tools input[type=search] { grid-column: 1 / -1; height: 30px; }
.zl-tools .multi-select > summary { height: 30px; font-size: 12.5px; }
.zl-tools .field.inline select { width: auto; height: 30px; font-size: 12.5px; }
.zl-wrap { overflow: auto; flex: 1; min-height: 80px; border-top: 1px solid var(--line-2); }
.zl-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.zl-table th { position: sticky; top: 0; background: var(--paper); text-align: left; font-weight: 500; color: var(--muted); padding: 4px 5px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.zl-table td { padding: 3px 5px; border-bottom: 1px solid var(--line-2); white-space: nowrap; max-width: 140px; overflow: hidden; text-overflow: ellipsis; }
.zl-table .num { text-align: right; }
.zl-table .zl-name { cursor: pointer; color: var(--leaf-600); font-weight: 600; }
.zl-table .zl-name:hover { text-decoration: underline; }
.zl-table .grp-row td { background: var(--paper-2); padding-top: 6px; }
.rx-color-seg { margin: 0 0 8px; }
.rx-table tbody tr:hover td, .zone-table tbody tr:hover td { background: var(--rape-50); }
.cls-chip { display: inline-block; padding: 1px 7px; border-radius: 99px; font-size: 11.5px; background: color-mix(in srgb, var(--c) 30%, var(--paper)); border: 1px solid color-mix(in srgb, var(--c) 70%, transparent); color: var(--ink); margin: 1px 0; }
.brand-name { font-size: 19px; letter-spacing: -0.02em; font-stretch: 90%; }
.brand-name b { color: #fff; background: var(--leaf); border-radius: 5px; padding: 0 4px; margin-left: 2px; font-weight: 700; }
/* hodnocení období */
.wx-per-ctrl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:8px}
.wx-per-ctrl .field{margin:0}
.wx-per-ctrl input,.wx-per-ctrl select{width:100%}
@media (max-width:520px){.wx-per-ctrl{grid-template-columns:1fr 1fr}}
.wx-per-metrics{display:flex;flex-wrap:wrap;gap:5px;margin-bottom:8px}
.pm-chip{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;padding:3px 9px 3px 7px;border-radius:999px;border:1px solid var(--line,rgba(128,128,128,.3));cursor:pointer;user-select:none;opacity:.75}
.pm-chip input{display:none}
.pm-chip::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--c);opacity:.35}
.pm-chip.on{opacity:1;border-color:var(--c);background:color-mix(in srgb,var(--c) 12%,transparent)}
.pm-chip.on::before{opacity:1}
.wx-chart.tall{height:320px}
.block-head{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.block-head h3{margin:0}
/* napojení na LPIS */
#btnLpis { position: relative; }
.lpis-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 2px; background: var(--muted); }
.lpis-dot.ok { background: var(--leaf); } .lpis-dot.warn { background: #d9a227; } .lpis-dot.err { background: var(--danger); }
.lpis-dot.run { background: #d9a227; animation: lpisPulse 1s ease-in-out infinite; }
@keyframes lpisPulse { 50% { opacity: .3; } }
.lpis-seg { margin-bottom: 12px; }
.lpis-sources h3 { margin: 4px 0 8px; font-size: 13px; }
.lpis-sources { margin-bottom: 14px; }
.lpis-empty { margin: 0 0 4px; }
.lpis-src { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; padding: 10px 12px; border: 1px solid var(--line); border-left: 3px solid var(--leaf); border-radius: var(--r-s); margin-bottom: 8px; }
.lpis-src.err { border-left-color: var(--danger); } .lpis-src.warn, .lpis-src.run { border-left-color: #d9a227; } .lpis-src.idle { border-left-color: var(--muted); }
.lpis-src-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lpis-src-main small { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.lpis-src-act { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }
.lpis-search { display: flex; gap: 6px; margin: 8px 0 10px; flex-wrap: wrap; }
.lpis-search input { flex: 1 1 240px; height: 32px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper); color: var(--ink); padding: 0 10px; font: inherit; min-width: 0; }
.lpis-kult { max-width: 320px; margin-bottom: 10px; }
.lpis-results { max-height: 300px; overflow: auto; }
.lpis-user { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.lpis-user > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lpis-user small { color: var(--muted); font-size: 12px; }
.lpis-mostbox { border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; margin: 10px 0 12px; }
.lpis-most { font-size: 13px; margin-bottom: 8px; padding-left: 16px; position: relative; }
.lpis-most::before { content: ""; position: absolute; left: 0; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.lpis-most.ok::before { background: var(--leaf); } .lpis-most.off::before { background: var(--danger); }
.lpis-mostbox .actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.lpis-howto { margin-top: 8px; font-size: 12.5px; color: var(--ink-2); }
.lpis-howto summary { cursor: pointer; color: var(--muted); }
.lpis-howto ol { padding-left: 18px; margin: 6px 0 0; } .lpis-howto li { margin-bottom: 6px; }
.lpis-howto code { font-size: 11.5px; background: var(--line-2); padding: 1px 4px; border-radius: 3px; overflow-wrap: anywhere; }
#lpisPagePf .check { display: flex; margin: 4px 0; }
#lpisPagePf .actions { margin-top: 10px; }
.lpis-pfmsg { margin-top: 8px; font-size: 12.5px; }
.ok-text { color: #2f8a50; } .warn-text { color: #a87a12; }
@media (max-width: 560px) { .lpis-src { flex-direction: column; } .lpis-src-act { justify-content: flex-start; } }
/* půdní vzorky */
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px 12px; margin-bottom: 12px; }
@media (max-width: 640px) { .grid3 { grid-template-columns: 1fr; } }
.soil-imp-sum { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-s); background: var(--paper-2); margin-bottom: 12px; font-size: 13px; line-height: 1.5; }
.soil-imp-map { max-height: 280px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r-s); }
.soil-imp-map table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.soil-imp-map td { padding: 4px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.soil-imp-map td:nth-child(2) { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.soil-imp-map select { height: 28px; font-size: 12.5px; }
.soil-imp-soilmap { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 4px 0 8px; }
.soil-imp-soilmap .hint { flex-basis: 100%; margin: 0; }
.soil-val { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; }
.soil-val span { min-width: 28px; font-weight: 600; }
.soil-val select { width: auto; height: 28px; }
.soil-empty { padding: 4px 2px; }
.soil-empty h3 { margin: 4px 0 6px; }
.soil-empty .btn { margin: 6px 0 10px; }
.soil-stat { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 10px; }
.soil-stat th, .soil-stat td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.soil-stat thead th { font-weight: 500; color: var(--muted); font-size: 11.5px; }
.soil-stat tbody th { font-weight: 600; white-space: nowrap; }
.soil-stat tbody th small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.soil-stat tbody tr { cursor: pointer; }
.soil-stat tbody tr:hover { background: var(--paper-2); }
.soil-stat tbody tr.on { background: var(--leaf-50); box-shadow: inset 3px 0 0 var(--leaf); }
.soil-dist { display: flex; height: 6px; border-radius: 3px; overflow: hidden; margin-top: 4px; min-width: 80px; }
.soil-cls { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.soil-cls td { padding: 4px 6px; border-bottom: 1px solid var(--line-2); }
.lg-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -2px; border: 1px solid rgba(0,0,0,.15); }
.lg-row { margin: 2px 0; }
.lg-src { margin-top: 4px; font-size: 11px; }
.soil-sets { display: flex; flex-direction: column; gap: 6px; }
.soil-set { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.soil-set small { grid-column: 1; color: var(--muted); font-size: 12px; padding-left: 22px; }
.soil-set button { grid-column: 2; grid-row: 1 / span 2; }
.soil-pop b { display: block; } .soil-pop small { color: var(--muted); display: block; margin-bottom: 6px; }
.soil-pop table { border-collapse: collapse; font-size: 12px; }
.soil-pop th { text-align: left; font-weight: 500; padding: 2px 8px 2px 0; color: var(--ink-2); }
.soil-pop td { padding: 2px 6px 2px 0; }
/* půdní mapa: kroky, histogram, koeficienty */
.soil-steps { display: flex; flex-direction: column; gap: 12px; }
.soil-step { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.soil-step > b { width: 22px; height: 22px; border-radius: 50%; background: var(--leaf); color: #fff; font-size: 12px; display: grid; place-items: center; margin-top: 2px; }
.soil-step > div { min-width: 0; }
.soil-row { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-bottom: 6px; }
.soil-row .field { flex: 1 1 140px; margin: 0; }
#soilView { margin-bottom: 8px; }
.soil-hist { display: flex; align-items: flex-end; gap: 2px; height: 56px; margin-top: 6px; }
.soil-hist span { flex: 1; border-radius: 2px 2px 0 0; min-height: 2px; }
.soil-hist-ax { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 2px; }
.soil-coef { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 2px 0 8px; font-size: 12px; }
.soil-coef label { display: inline-flex; align-items: center; gap: 4px; }
.soil-coef span { padding: 1px 6px; border-radius: 99px; background: color-mix(in srgb, var(--c) 25%, var(--paper)); border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); }
.soil-coef input { width: 58px; height: 26px; }
.soil-cls th { font-weight: 500; color: var(--muted); font-size: 11.5px; text-align: left; padding: 4px 6px; }
.soil-cls .num { text-align: right; white-space: nowrap; }
.soil-cls tfoot td { font-weight: 600; border-top: 1px solid var(--line); }
.soil-cls input.soil-rate { width: 76px; height: 26px; text-align: right; }
.soil-export { margin-top: 10px; }
/* online verze: přihlášení, stav synchronizace, správa */
.cloud-screen { position: fixed; inset: 0; z-index: 9000; background: var(--paper-2); display: grid; place-items: center; padding: 16px; }
.cloud-card { width: min(420px, 100%); background: var(--paper); border-radius: 14px; box-shadow: var(--shadow); padding: 28px 28px 22px; }
.cloud-card h1 { font-size: 20px; margin: 10px 0 14px; }
.cloud-card .field { margin-bottom: 12px; }
.cloud-card input[type=email], .cloud-card input[type=password] { width: 100%; height: 38px; border: 1px solid var(--line); border-radius: var(--r-s); padding: 0 10px; font: inherit; background: var(--paper); color: var(--ink); }
.cloud-card .btn.primary { width: 100%; height: 40px; justify-content: center; }
.cloud-brand { font-size: 22px; font-weight: 500; letter-spacing: -.01em; }
.cloud-brand b { background: var(--leaf); color: #fff; border-radius: 6px; padding: 0 6px; margin-left: 2px; }
.cloud-msg { min-height: 1.4em; font-size: 13px; margin: 2px 0 10px; }
.cloud-orgs { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; max-height: 50vh; overflow: auto; }
.cloud-org-btn { text-align: left; border: 1px solid var(--line); background: var(--paper); border-radius: var(--r-s); padding: 10px 12px; cursor: pointer; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.cloud-org-btn:hover { border-color: var(--leaf); background: var(--leaf-50); }
.cloud-org-btn small { color: var(--muted); }
.cloud-foot { display: flex; gap: 8px; justify-content: space-between; }
.cloud-bar { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.cloud-bar span { display: block; height: 100%; width: 0; background: var(--leaf); transition: width .2s; }
.cloud-chip { max-width: 220px; }
.cloud-chip .cloud-org { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; background: var(--muted); }
.cloud-dot.ok { background: var(--leaf); } .cloud-dot.run { background: #d9a227; animation: lpisPulse 1s ease-in-out infinite; } .cloud-dot.warn { background: #d9a227; } .cloud-dot.err { background: var(--danger); }
.cloud-menu { position: fixed; z-index: 8000; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); min-width: 260px; padding: 6px; display: flex; flex-direction: column; }
.cloud-menu .cm-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; }
.cloud-menu .cm-head small { color: var(--muted); font-size: 12px; }
.cloud-menu button { text-align: left; border: 0; background: none; font: inherit; color: var(--ink); padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.cloud-menu button:hover { background: var(--paper-2); } .cloud-menu button.danger { color: var(--danger); }
.cloud-banner { position: fixed; z-index: 7000; left: 50%; transform: translateX(-50%); top: 64px; background: var(--ink); color: var(--paper); border-radius: 10px; padding: 10px 12px 10px 16px; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow); max-width: calc(100vw - 32px); font-size: 13px; }
.cloud-admin h3 { margin: 14px 0 8px; font-size: 14px; }
.ca-new { border: 1px solid var(--line); border-radius: var(--r-s); padding: 4px 12px 10px; margin-bottom: 10px; }
.ca-row { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.ca-row input[type=text], .ca-row input[type=email] { flex: 1 1 160px; width: auto; }
.ca-row input[type=number] { width: 80px; } .ca-row select { width: auto; }
.ca-org { border: 1px solid var(--line); border-radius: var(--r-s); padding: 10px 12px; margin-bottom: 10px; }
.ca-org-head { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.ca-org-head .hint { flex: 1 1 260px; }
.ca-act { display: inline-flex; gap: 2px; flex-wrap: wrap; }
.ca-bar { height: 4px; background: var(--line-2); border-radius: 2px; margin: 8px 0; overflow: hidden; } .ca-bar span { display: block; height: 100%; background: var(--leaf); }
.ca-users { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ca-users td { padding: 4px 6px; border-top: 1px solid var(--line-2); vertical-align: middle; }
.ca-users select { width: auto; height: 28px; }
