/* ROLNIK — Księga pól. Samowystarczalny system, bez importów i zasobów z sieci. */

/* 01. Lokalne fonty. Oddzielne podzbiory zachowują polskie znaki. */
@font-face {
  font-family:Plex;
  src:url('fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
  font-weight:400;
  font-display:swap
}
@font-face {
  font-family:Plex;
  src:url('fonts/ibm-plex-sans-latin-ext-400-normal.woff2') format('woff2');
  font-weight:400;
  font-display:swap;
  unicode-range:U+0100-02FF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF
}
@font-face {
  font-family:Plex;
  src:url('fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
  font-weight:600;
  font-display:swap
}
@font-face {
  font-family:Plex;
  src:url('fonts/ibm-plex-sans-latin-ext-600-normal.woff2') format('woff2');
  font-weight:600;
  font-display:swap;
  unicode-range:U+0100-02FF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF
}
@font-face {
  font-family:Barlow;
  src:url('fonts/barlow-condensed-latin-600-normal.woff2') format('woff2');
  font-weight:600;
  font-display:swap
}
@font-face {
  font-family:Barlow;
  src:url('fonts/barlow-condensed-latin-ext-600-normal.woff2') format('woff2');
  font-weight:600;
  font-display:swap;
  unicode-range:U+0100-02FF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF
}
@font-face {
  font-family:Barlow;
  src:url('fonts/barlow-condensed-latin-700-normal.woff2') format('woff2');
  font-weight:700;
  font-display:swap
}
@font-face {
  font-family:Barlow;
  src:url('fonts/barlow-condensed-latin-ext-700-normal.woff2') format('woff2');
  font-weight:700;
  font-display:swap;
  unicode-range:U+0100-02FF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF
}
@font-face {
  font-family:'Plex Mono';
  src:url('fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  font-weight:500;
  font-display:swap
}
@font-face {
  font-family:'Plex Mono';
  src:url('fonts/ibm-plex-mono-latin-ext-500-normal.woff2') format('woff2');
  font-weight:500;
  font-display:swap;
  unicode-range:U+0100-02FF,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF
}

/* 02. Tokeny. Kolory statusu łącz zawsze z ikoną oraz tekstem. */
:root {
  --paper:#f4f3ec;
  --surface:#fff;
  --ink:#202c25;
  --muted:#556253;
  --line:#d7dcd1;
  --line-strong:#84907f;
  --green:#254d38;
  --green-dark:#173d2b;
  --green-soft:#eaf0e5;
  --harvest:#e7c86a;
  --ok:#216243;
  --ok-bg:#e8f2e8;
  --warning:#78520d;
  --warning-bg:#fff2cf;
  --danger:#a42c28;
  --danger-bg:#fbeae6;
  --info:#26536f;
  --info-bg:#e5eff5;
  --review:#6b4b83;
  --review-bg:#f1eaf7;
  --crop-corn:#b99935;
  --crop-wheat:#547456;
  --crop-triticale:#8b9d70;
  --crop-rye:#d8bd73;
  --crop-oats:#b0b998;
  --crop-beans:#686080;
  --font-body:Plex,Arial,sans-serif;
  --font-heading:Barlow,'Arial Narrow',sans-serif;
  --font-mono:'Plex Mono',monospace;
  --text-sm:1rem;
  --text-base:1rem;
  --text-lg:1.111rem;
  --text-xl:1.333rem;
  --title:2.444rem;
  --space-1:4px;
  --space-2:8px;
  --space-3:12px;
  --space-4:16px;
  --space-5:20px;
  --space-6:24px;
  --space-8:32px;
  --space-10:40px;
  --space-12:48px;
  --space-16:64px;
  --radius-sm:4px;
  --radius:8px;
  --radius-lg:12px;
  --radius-pill:999px;
  --shadow:0 4px 18px #202c250c;
  --shadow-dialog:0 20px 70px #173d2b30;
  --sidebar:224px;
  --focus:#245b97;
  --touch:48px;
  --motion:140ms;
}

/* 03. Reset, typografia, dostępność. Minimum tekstu: 18 px, TV: 22 px. */
*,*::before,*::after {
  box-sizing:border-box
}
html {
  font-size:18px;
  scroll-behavior:smooth
}
body {
  margin:0;
  background:var(--paper);
  color:var(--ink);
  font-family:var(--font-body);
  font-weight:400;
  line-height:1.5
}
h1,h2,h3,p,ul,ol,figure,dl,dd {
  margin:0
}
h1,h2,h3 {
  line-height:1.12;
  font-family:var(--font-heading);
  font-weight:600
}
h1 {
  font-size:var(--title);
  letter-spacing:-.02em
}
h2 {
  font-size:1.778rem
}
h3 {
  font-size:1.444rem
}
a {
  color:var(--green);
  text-underline-offset:4px
}
button,input,select,textarea {
  font:inherit;
  color:inherit
}
button,a,input,select,textarea,summary {
  touch-action:manipulation
}
button {
  cursor:pointer
}
a:hover {
  color:var(--green-dark)
}
button:disabled {
  cursor:not-allowed;
  opacity:.58
}
img,svg {
  max-width:100%
}
button {
  border:0
}
fieldset {
  min-width:0;
  margin:0;
  padding:0;
  border:0
}
legend {
  padding:0
}
ul,ol {
  padding-left:24px
}
:focus-visible {
  outline:3px solid var(--focus);
  outline-offset:4px
}
::selection {
  background:var(--harvest);
  color:var(--ink)
}
[hidden] {
  display:none!important
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap
}
.skip-link {
  position:fixed;
  top:-100px;
  left:16px;
  z-index:100;
  padding:12px 20px;
  background:var(--surface)
}
.skip-link:focus {
  top:12px
}
.icon {
  width:24px;
  height:24px;
  flex:0 0 24px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
  vertical-align:middle
}
.icon--lg {
  width:32px;
  height:32px;
  flex-basis:32px
}
.sprite {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden
}
.muted,.help {
  color:var(--muted)
}
.help {
  margin-top:8px
}
.number {
  font-variant-numeric:tabular-nums
}
.mono {
  font-family:var(--font-mono);
  font-weight:500
}
.text-link {
  display:inline-flex;
  gap:8px;
  align-items:center;
  font-weight:600
}
.eyeline {
  display:flex;
  gap:12px;
  align-items:center;
  color:var(--muted)
}
.divider {
  border:0;
  border-top:1px solid var(--line);
  margin:24px 0
}
.stack {
  display:flex;
  flex-direction:column;
  gap:20px
}
.stack--sm {
  gap:12px
}
.row {
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap
}
.spread {
  justify-content:space-between
}
.grow {
  flex:1;
  min-width:0
}
.full {
  width:100%
}

/* 04. Powłoka aplikacji: boczny spis, pasek sezonu, obszar roboczy. */
.app-shell {
  display:grid;
  grid-template-columns:var(--sidebar) minmax(0,1fr);
  min-height:100vh
}
.sidebar {
  position:sticky;
  top:0;
  height:100vh;
  background:var(--green-dark);
  color:#fff;
  display:flex;
  flex-direction:column;
  padding:32px 18px;
  gap:32px
}
.brand {
  display:inline-flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  font-family:var(--font-heading);
  font-size:2.222rem;
  font-weight:700;
  line-height:1;
  color:inherit
}
.brand:hover {
  color:inherit
}
.brand-mark {
  width:38px;
  height:38px;
  border:1px solid currentColor;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:4px;
  padding:5px;
  transform:skewY(-8deg);
  color:var(--harvest)
}
.brand-mark i {
  border:1px solid currentColor
}
.brand-note {
  margin-top:12px;
  color:#c4d4c7
}
.nav-list {
  display:flex;
  flex-direction:column;
  gap:8px
}
.nav-link {
  display:flex;
  align-items:center;
  gap:12px;
  min-height:52px;
  padding:12px;
  border-radius:var(--radius-sm);
  color:#e4ece5;
  text-decoration:none
}
.nav-link:hover {
  background:#ffffff10;
  color:#fff
}
.nav-link[aria-current=page] {
  background:var(--green-soft);
  color:var(--green-dark);
  font-weight:600;
  border-left:4px solid var(--harvest);
  padding-left:8px
}
.sidebar-foot {
  margin-top:auto;
  border-top:1px solid #63836c;
  padding-top:20px;
  display:flex;
  flex-direction:column;
  gap:12px
}
.sidebar-foot a {
  color:#e4ece5
}
.workspace {
  min-width:0
}
.topbar {
  min-height:80px;
  padding:16px 32px;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  gap:20px;
  justify-content:space-between;
  background:var(--surface)
}
.topbar-group {
  display:flex;
  align-items:center;
  gap:16px;
  flex-wrap:wrap
}
.topbar select {
  min-height:48px;
  background:transparent;
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  padding:8px 34px 8px 12px
}
.content {
  padding:32px;
  max-width:1740px;
  margin-inline:auto
}
.page-heading {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  margin-bottom:28px
}
.page-heading p {
  color:var(--muted);
  margin-top:10px
}
.page-actions {
  display:flex;
  gap:12px;
  align-items:center;
  flex-wrap:wrap
}
.demo-note {
  padding:12px 16px;
  background:var(--green-soft);
  border-left:3px solid var(--green);
  color:var(--green-dark)
}
.page-foot {
  margin-top:32px;
  padding-top:20px;
  border-top:1px solid var(--line);
  color:var(--muted);
  display:flex;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap
}
.bottom-nav {
  display:none
}

/* 05. Przyciski i kontrolki wyboru widoku. Duży wariant terenowy: 64 px. */
.btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  min-height:48px;
  padding:10px 18px;
  border:1px solid transparent;
  border-radius:var(--radius-sm);
  font-weight:600;
  text-decoration:none;
  line-height:1.3;
  transition:background var(--motion),border-color var(--motion)
}
.btn--primary {
  background:var(--green);
  color:#fff
}
.btn--primary:hover {
  background:var(--green-dark);
  color:#fff
}
.btn--secondary {
  background:var(--surface);
  border-color:var(--line-strong);
  color:var(--green-dark)
}
.btn--secondary:hover {
  background:var(--green-soft)
}
.btn--danger {
  background:var(--danger);
  color:#fff
}
.btn--danger:hover {
  background:#82201d;
  color:#fff
}
.btn--ghost {
  background:transparent;
  color:var(--green);
  border-color:transparent
}
.btn--ghost:hover {
  background:var(--green-soft)
}
.btn--large {
  min-height:64px;
  font-size:20px;
  padding:16px 24px
}
.btn--icon {
  width:48px;
  padding:10px
}
.btn--light {
  background:#f6f6ed;
  color:var(--green-dark)
}
.view-switch {
  display:inline-flex;
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  background:var(--surface);
  padding:4px;
  gap:4px;
  flex-wrap:wrap
}
.view-switch label,.view-switch button {
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:8px 16px;
  cursor:pointer;
  border-radius:2px;
  background:transparent
}
.view-switch [aria-pressed=true] {
  background:var(--green);
  color:#fff
}
.view-radio {
  position:absolute;
  width:1px;
  height:1px;
  opacity:0
}
.view-panel {
  display:none
}
.view-group:has(.view-radio[value=table]:checked) .view-panel--table,.view-group:has(.view-radio[value=cards]:checked) .view-panel--cards,.view-group:has(.view-radio[value=chart]:checked) .view-panel--chart {
  display:block
}
.view-group:has(.view-radio[value=table]:checked) label[for=view-table],.view-group:has(.view-radio[value=cards]:checked) label[for=view-cards],.view-group:has(.view-radio[value=chart]:checked) label[for=view-chart] {
  background:var(--green);
  color:#fff
}
.view-radio:focus-visible + label {
  outline:3px solid var(--focus);
  outline-offset:2px
}

/* 06. Pola, formularze i kafelki. Natywne radio/checkbox zostają dostępne. */
.form-field {
  display:flex;
  flex-direction:column;
  gap:8px;
  min-width:0
}
.form-field label,.form-label {
  font-weight:600
}
.input,.select,.textarea {
  width:100%;
  min-height:52px;
  padding:12px 14px;
  background:var(--surface);
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  line-height:1.4
}
.input::placeholder {
  color:var(--muted)
}
.input[aria-invalid=true] {
  border:2px solid var(--danger);
  background:var(--danger-bg)
}
.input:disabled {
  background:var(--paper)
}
.input-unit {
  display:flex;
  align-items:center;
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  background:var(--surface);
  overflow:hidden
}
.input-unit .input {
  border:0;
  min-width:0;
  border-radius:0
}
.input-unit span {
  padding-right:16px;
  color:var(--muted);
  white-space:nowrap
}
.input-unit:focus-within {
  outline:3px solid var(--focus);
  outline-offset:3px
}
.form-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:20px
}
.filters {
  display:flex;
  align-items:flex-end;
  flex-wrap:wrap;
  gap:16px;
  margin-bottom:24px
}
.filters .form-field {
  flex:1;
  min-width:170px
}
.tile-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:10px
}
.choice {
  position:relative;
  display:block
}
.choice input {
  position:absolute;
  left:12px;
  top:12px;
  width:22px;
  height:22px;
  accent-color:var(--green)
}
.choice-body {
  min-height:96px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:8px;
  background:var(--surface);
  border:1px solid var(--line-strong);
  border-radius:var(--radius-sm);
  padding:18px 8px 12px;
  cursor:pointer
}
.choice input {
  opacity:0
}
.choice input:checked + .choice-body {
  background:var(--green-soft);
  border:2px solid var(--green);
  padding:17px 7px 11px;
  font-weight:600
}
.choice input:checked + .choice-body::after {
  content:'✓';
  position:absolute;
  right:7px;
  top:1px;
  color:var(--green)
}
.choice input:focus-visible + .choice-body {
  outline:3px solid var(--focus);
  outline-offset:3px
}
.checkbox {
  display:flex;
  min-height:48px;
  align-items:center;
  gap:12px;
  cursor:pointer
}
.checkbox input {
  width:24px;
  height:24px;
  flex:0 0 24px;
  accent-color:var(--green);
  margin:1px 0 0
}
.form-step {
  border:0;
  border-top:1px solid var(--line);
  padding-top:20px;
  margin-top:24px
}
.form-step legend {
  font-family:var(--font-heading);
  font-size:26px;
  font-weight:600;
  margin-bottom:16px;
  display:flex;
  align-items:center;
  gap:12px
}
.step-number {
  display:inline-grid;
  place-items:center;
  width:30px;
  height:30px;
  font:600 18px var(--font-body);
  background:var(--green-soft);
  color:var(--green);
  border-radius:50%
}
.calculation {
  padding:16px;
  background:var(--green-soft);
  border-left:3px solid var(--green);
  font-size:20px
}
.error-text {
  color:var(--danger);
  font-weight:600
}

/* 07. Powierzchnie, KPI i siatki treści. */
.card {
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  min-width:0
}
.card-body {
  padding:24px
}
.card-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:20px 24px;
  border-bottom:1px solid var(--line);
  flex-wrap:wrap
}
.card-foot {
  padding:16px 24px;
  background:#fafbf8;
  border-top:1px solid var(--line);
  border-radius:0 0 var(--radius) var(--radius);
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap
}
.kpi-grid {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  margin-bottom:28px
}
.kpi {
  padding:20px 24px;
  border-top:3px solid var(--green);
  background:var(--surface);
  border-bottom:1px solid var(--line)
}
.kpi-label {
  color:var(--muted)
}
.kpi-value {
  display:block;
  font:600 2.667rem/1.15 var(--font-heading);
  font-variant-numeric:tabular-nums;
  margin:10px 0
}
.kpi-value small {
  font:400 20px var(--font-body)
}
.kpi--warning {
  border-top-color:var(--warning)
}
.dashboard-grid {
  display:grid;
  grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);
  gap:24px
}
.grid-2 {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:24px
}
.grid-3 {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px
}
.span-all {
  grid-column:1/-1
}
.section-gap {
  margin-top:28px
}

/* 08. Statusy: słowo + znak; niepewność ma osobny fioletowy język wizualny. */
.status {
  display:inline-flex;
  align-items:center;
  gap:7px;
  padding:4px 10px;
  border-radius:var(--radius-sm);
  font-weight:600;
  line-height:1.5;
  white-space:normal
}
.status .icon {
  width:20px;
  height:20px;
  flex-basis:20px
}
.status--ok {
  background:var(--ok-bg);
  color:var(--ok)
}
.status--warning {
  background:var(--warning-bg);
  color:var(--warning)
}
.status--danger {
  background:var(--danger-bg);
  color:var(--danger)
}
.status--info {
  background:var(--info-bg);
  color:var(--info)
}
.status--review {
  background:var(--review-bg);
  color:var(--review)
}
.alert {
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:16px 20px;
  border-left:4px solid currentColor;
  border-radius:var(--radius-sm);
  line-height:1.5
}
.alert>.icon {
  margin-top:3px
}
.alert--warning {
  background:var(--warning-bg);
  color:var(--warning)
}
.alert--danger {
  background:var(--danger-bg);
  color:var(--danger)
}
.alert--info {
  background:var(--info-bg);
  color:var(--info)
}
.alert--review {
  background:var(--review-bg);
  color:var(--review)
}
.alert--ok {
  background:var(--ok-bg);
  color:var(--ok)
}
.alert a {
  color:inherit
}
.attention-list {
  list-style:none;
  padding:0
}
.attention-item {
  display:flex;
  align-items:flex-start;
  gap:14px;
  padding:20px 24px;
  border-bottom:1px solid var(--line)
}
.attention-item:last-child {
  border-bottom:0
}
.attention-item>.icon {
  color:var(--warning);
  margin-top:3px
}
.attention-item p {
  color:var(--muted);
  margin:6px 0 8px
}

/* 09. Tabela arkuszowa. Przewijanie jest lokalne, nagłówek sticky, liczby wyrównane. */
.table-scroll {
  overflow:auto;
  max-height:680px;
  scrollbar-color:var(--line-strong) var(--paper);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface);
  isolation:isolate
}
.table-scroll:focus-visible {
  outline-offset:2px
}
.data-table {
  border-collapse:separate;
  border-spacing:0;
  width:100%;
  font-size:18px;
  line-height:1.5
}
.data-table caption {
  text-align:left;
  padding:16px;
  font-weight:600;
  background:var(--surface);
  caption-side:top
}
.data-table th,.data-table td {
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  border-right:1px solid var(--line);
  text-align:left;
  vertical-align:top
}
.data-table tr>:last-child {
  border-right:0
}
.data-table thead th {
  position:sticky;
  top:0;
  background:#e9eee4;
  z-index:2;
  font-weight:600;
  color:var(--green-dark);
  border-bottom:2px solid var(--line-strong)
}
.data-table tbody tr:nth-child(even) {
  background:#f6f7f2
}
.data-table tbody tr:hover {
  background:var(--green-soft)
}
.data-table tfoot th,.data-table tfoot td {
  background:#e9eee4;
  border-top:2px solid var(--line-strong);
  font-weight:600;
  border-bottom:0
}
.data-table .cell-number {
  text-align:right;
  font-family:var(--font-mono);
  font-weight:500;
  white-space:nowrap;
  font-variant-numeric:tabular-nums
}
.data-table .cell-review {
  background:var(--review-bg);
  box-shadow:inset 4px 0 var(--review);
  color:var(--review)
}
.cell-review-note {
  display:block;
  font-family:var(--font-body);
  font-weight:600;
  white-space:normal;
  margin-top:4px
}
.data-table--works {
  min-width:1570px
}
.data-table--plan {
  min-width:850px
}
.table-hint {
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:12px;
  margin:12px 0;
  color:var(--muted)
}
.table-scroll--short {
  max-height:390px
}

/* 10. Plan upraw: udział powierzchni, legendy i alternatywy do tabeli. */
.crop-dot {
  display:inline-block;
  width:12px;
  height:12px;
  border-radius:2px;
  margin-right:8px;
  background:var(--crop-color,var(--green));
  border:1px solid #202c2526
}
.crop--corn {
  --crop-color:var(--crop-corn)
}
.crop--wheat {
  --crop-color:var(--crop-wheat)
}
.crop--triticale {
  --crop-color:var(--crop-triticale)
}
.crop--rye {
  --crop-color:var(--crop-rye)
}
.crop--oats {
  --crop-color:var(--crop-oats)
}
.crop--beans {
  --crop-color:var(--crop-beans)
}
.crop-strip {
  display:flex;
  height:32px;
  overflow:hidden;
  border-radius:var(--radius-sm);
  gap:3px;
  margin:20px 0
}
.crop-strip span {
  flex:var(--share);
  background:var(--crop-color)
}
.crop-legend {
  list-style:none;
  padding:0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px 20px
}
.crop-legend li {
  display:flex;
  justify-content:space-between;
  gap:8px;
  border-bottom:1px solid var(--line);
  padding-bottom:8px
}
.crop-summary {
  display:flex;
  align-items:center;
  gap:32px;
  flex-wrap:wrap
}
.donut {
  width:210px;
  height:210px;
  flex:0 0 210px;
  border-radius:50%;
  background:conic-gradient(var(--crop-corn) 0 34.444%,var(--crop-wheat) 34.444% 58.389%,var(--crop-triticale) 58.389% 69.444%,var(--crop-rye) 69.444% 77.778%,var(--crop-oats) 77.778% 85%,var(--crop-beans) 85%);
  display:grid;
  place-items:center
}
.donut-center {
  width:148px;
  height:148px;
  border-radius:50%;
  background:var(--surface);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center
}
.donut-center strong {
  font:600 44px var(--font-heading)
}
.bar-chart {
  display:flex;
  flex-direction:column;
  gap:20px
}
.bar-row {
  display:grid;
  grid-template-columns:135px minmax(0,1fr) 100px;
  align-items:center;
  gap:16px
}
.bar-track {
  height:24px;
  background:var(--paper);
  border-radius:2px
}
.bar-fill {
  width:var(--bar);
  height:100%;
  background:var(--crop-color,var(--green));
  border-radius:2px
}
.requirements {
  list-style:none;
  padding:0
}
.requirement {
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:16px 0;
  border-bottom:1px solid var(--line)
}
.requirement:last-child {
  border-bottom:0
}
.requirement-mark {
  font-size:24px;
  font-weight:600;
  line-height:1.2
}
.requirement--ok .requirement-mark {
  color:var(--ok)
}
.requirement--fail .requirement-mark {
  color:var(--danger)
}
.requirement--na {
  color:var(--muted)
}
.requirement p {
  color:var(--muted);
  margin-top:4px
}
.field-card {
  border-left:5px solid var(--crop-color,var(--green));
  padding:20px
}
.field-card h3 {
  margin:12px 0 8px
}
.field-card-foot {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-top:20px;
  padding-top:12px;
  border-top:1px solid var(--line)
}

/* 11. Kopia robocza i historia wersji — niebieski pas odcina tryb od danych zapisanych. */
.sandbox-bar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  flex-wrap:wrap;
  padding:20px 24px;
  background:var(--info-bg);
  color:var(--info);
  border:1px solid #a9c1d0;
  border-left:5px solid var(--info);
  border-radius:var(--radius-sm);
  margin-bottom:24px
}
.sandbox-bar p {
  margin-top:4px
}
.version-history {
  margin-top:24px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--surface)
}
.version-history>summary {
  padding:18px 24px;
  cursor:pointer;
  font-weight:600
}
.version-list {
  list-style:none;
  padding:0 24px 20px
}
.version-list li {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
  flex-wrap:wrap;
  padding:16px 0;
  border-top:1px solid var(--line)
}

/* 12. Oś prac, dokumenty, sprawdzarka. */
.timeline {
  list-style:none;
  padding:0
}
.timeline-item {
  display:grid;
  grid-template-columns:38px 1fr;
  gap:14px;
  position:relative;
  padding:0 0 24px
}
.timeline-item::before {
  content:'';
  position:absolute;
  left:18px;
  top:38px;
  bottom:0;
  border-left:1px solid var(--line-strong)
}
.timeline-item:last-child {
  padding-bottom:0
}
.timeline-item:last-child::before {
  display:none
}
.timeline-icon {
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  background:var(--green-soft);
  border-radius:var(--radius-sm);
  color:var(--green)
}
.timeline-item time {
  color:var(--muted)
}
.timeline-item strong {
  display:block;
  margin:4px 0
}
.assistant-card {
  background:var(--green-dark);
  color:#fff;
  border-radius:var(--radius);
  padding:24px;
  display:flex;
  justify-content:space-between;
  gap:20px;
  align-items:center
}
.assistant-card p {
  color:#d2dfd3;
  margin:8px 0 16px
}
.voice-disc {
  display:grid;
  place-items:center;
  width:64px;
  height:64px;
  flex:0 0 64px;
  border:1px solid #6c8975;
  border-radius:50%;
  color:var(--harvest)
}
.document-card {
  display:flex;
  flex-direction:column
}
.document-card .card-body {
  flex:1
}
.document-icon {
  color:var(--green);
  margin-bottom:18px
}
.document-card h2 {
  margin-bottom:12px
}
.document-card p {
  margin-top:12px;
  color:var(--muted)
}
.document-card .card-foot .btn {
  flex:1
}
.progress {
  width:100%;
  height:8px;
  accent-color:var(--green);
  border:0;
  border-radius:2px;
  display:block;
  margin:16px 0 8px
}
.progress::-webkit-progress-bar {
  background:var(--line);
  border-radius:2px
}
.progress::-webkit-progress-value {
  background:var(--green);
  border-radius:2px
}
.review-list {
  list-style:none;
  padding:0
}
.review-list li {
  padding:18px 0;
  border-bottom:1px solid var(--line);
  display:flex;
  gap:12px;
  align-items:flex-start
}
.review-list li:last-child {
  border:0
}
.review-list .icon {
  color:var(--review);
  margin-top:2px
}
.review-list p {
  color:var(--muted);
  margin:4px 0 8px
}
.result-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 28px
}
.result-grid>div {
  padding:16px 0;
  border-bottom:1px solid var(--line)
}
.result-grid dt {
  color:var(--muted);
  margin-bottom:6px
}
.result-grid dd {
  font-weight:600
}
.result-grid .span-all {
  grid-column:1/-1
}
.date-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
  margin:24px 0
}
.date-cell {
  background:var(--paper);
  padding:16px;
  border-radius:var(--radius-sm)
}
.date-cell time {
  display:block;
  font:500 20px var(--font-mono);
  margin-top:8px
}

/* 13. Modal przez :target. Integracja docelowa: dialog + fokus/trap w backendowym UI. */
.modal {
  display:none;
  position:fixed;
  inset:0;
  z-index:80;
  background:#142e22aa;
  align-items:center;
  justify-content:center;
  padding:24px
}
.modal:target {
  display:flex
}
.modal-dialog {
  width:min(600px,100%);
  max-height:90vh;
  overflow:auto;
  background:var(--surface);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-dialog);
  padding:28px
}
.modal-dialog h2 {
  margin-bottom:16px
}
.modal-actions {
  display:flex;
  justify-content:flex-end;
  flex-wrap:wrap;
  gap:12px;
  margin-top:24px
}
.sheet .modal-dialog {
  align-self:flex-end;
  width:min(640px,100%);
  border-radius:16px 16px 0 0
}
.sheet {
  padding-bottom:0
}
.sheet-handle {
  display:block;
  width:40px;
  height:4px;
  background:var(--line-strong);
  border-radius:8px;
  margin:0 auto 20px
}
.toast {
  display:flex;
  align-items:center;
  gap:12px;
  max-width:520px;
  padding:16px 20px;
  background:var(--green-dark);
  color:#fff;
  border-radius:var(--radius);
  box-shadow:var(--shadow-dialog)
}
.toast--floating {
  position:fixed;
  bottom:32px;
  right:32px;
  z-index:90
}
.empty-state {
  text-align:center;
  padding:40px 24px;
  color:var(--muted)
}
.empty-state h3 {
  color:var(--ink);
  margin:16px 0 8px
}

/* 14. Logowanie — rysunek działek jest elementem identyfikacji, nie prawdziwą mapą. */
.login-page {
  min-height:100vh;
  display:grid;
  grid-template-columns:1.05fr 1fr
}
.login-story {
  background:var(--green-dark);
  color:#fff;
  padding:48px 56px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  min-height:860px;
  position:relative;
  overflow:hidden
}
.login-story h1 {
  font-size:64px;
  line-height:1;
  max-width:420px;
  margin:44px 0 20px
}
.login-story p {
  color:#d0ddcd;
  max-width:390px;
  font-size:20px
}
.cadastral {
  width:100%;
  height:auto;
  display:block;
  margin:30px 0
}
.cadastral text {
  font-family:var(--font-mono);
  font-size:20px;
  fill:#d2decb
}
.login-panel {
  display:flex;
  align-items:center;
  justify-content:center;
  padding:48px
}
.login-form {
  width:100%;
  max-width:440px
}
.login-form h2 {
  font-size:44px;
  margin-bottom:12px
}
.login-form>p {
  margin-bottom:32px
}
.login-form .form-field {
  margin-bottom:20px
}
.login-foot {
  border-top:1px solid var(--line);
  margin-top:32px;
  padding-top:24px;
  color:var(--muted)
}

/* 15. Teren — duży cel dotykowy, dolna nawigacja i przypięta akcja. */
.mobile-page {
  max-width:520px;
  margin:auto;
  min-height:100vh;
  background:var(--paper);
  padding-bottom:96px
}
.mobile-header {
  padding:20px;
  border-bottom:1px solid var(--line);
  background:var(--surface);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px
}
.mobile-header .brand {
  font-size:32px;
  color:var(--green-dark)
}
.mobile-content {
  padding:24px 20px
}
.mobile-content h1 {
  font-size:36px
}
.mobile-content .page-heading {
  margin-bottom:24px;
  display:block
}
.mobile-content .page-heading p {
  margin-top:8px
}
.mobile-subhead {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:24px 0 16px
}
.mobile-field {
  display:block;
  color:var(--ink);
  text-decoration:none;
  padding:20px;
  background:var(--surface);
  border:1px solid var(--line);
  border-left:5px solid var(--crop-color,var(--green));
  border-radius:var(--radius-sm)
}
.mobile-field:hover {
  background:var(--green-soft)
}
.mobile-field h3 {
  font-size:28px;
  margin:10px 0 8px
}
.mobile-field p {
  color:var(--muted);
  margin-top:12px
}
.mobile-field .field-card-foot {
  margin-top:16px
}
.mobile-field .icon {
  color:var(--green)
}
.mobile-bottom-nav {
  position:fixed;
  bottom:0;
  left:50%;
  transform:translateX(-50%);
  width:min(520px,100%);
  padding:8px 12px max(8px,env(safe-area-inset-bottom));
  z-index:30;
  display:flex;
  justify-content:space-around;
  gap:8px;
  background:var(--surface);
  border-top:1px solid var(--line-strong)
}
.mobile-bottom-nav a {
  display:flex;
  flex:1;
  min-height:64px;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  gap:4px;
  text-decoration:none;
  color:var(--muted);
  font-size:18px;
  border-radius:var(--radius-sm)
}
.mobile-bottom-nav a[aria-current=page] {
  background:var(--green-soft);
  color:var(--green);
  font-weight:600
}
.mobile-primary {
  margin:24px 0
}
.mobile-save {
  position:sticky;
  bottom:0;
  background:var(--surface);
  padding:16px 20px;
  border-top:1px solid var(--line-strong);
  z-index:20
}
.mobile-form {
  padding-bottom:0
}
.mobile-form .input,.mobile-form .select {
  min-height:60px;
  font-size:20px
}
.mobile-form .form-step:first-child {
  border-top:0;
  margin-top:0;
  padding-top:0
}
.mobile-form .tile-grid {
  gap:8px
}
.mobile-form .choice-body {
  font-size:18px;
  min-height:100px
}
.mobile-form .alert {
  padding:14px;
  gap:10px
}
.mobile-form .form-grid {
  gap:12px
}
.mobile-form .form-step legend {
  font-size:26px
}
.area-options {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px
}
.area-options .choice-body {
  min-height:60px;
  padding:12px
}
.mobile-back {
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  font-weight:600
}

/* 16. Asystent TV — duży tekst, scena danych i panel rozmowy, bez ruchu w tle. */
.tv-page {
  font-size:22px;
  min-height:100vh;
  background:#edf0e8;
  padding:36px 48px
}
.tv-page .btn {
  font-size:22px;
  min-height:60px;
  padding:14px 24px
}
.tv-top {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;
  margin-bottom:32px
}
.tv-top .brand {
  font-size:44px;
  color:var(--green-dark)
}
.tv-top h1 {
  font-size:44px
}
.tv-layout {
  display:grid;
  grid-template-columns:minmax(0,1fr) 430px;
  gap:28px
}
.tv-stage {
  background:var(--surface);
  border:1px solid var(--line);
  padding:36px;
  min-height:720px;
  display:flex;
  flex-direction:column
}
.tv-stage h2 {
  font-size:48px
}
.tv-stage>p {
  margin-top:12px;
  color:var(--muted)
}
.tv-stage .bar-chart {
  margin:36px 0;
  gap:32px;
  flex:1;
  justify-content:center
}
.tv-stage .bar-row {
  grid-template-columns:160px 1fr 120px
}
.tv-stage .bar-track {
  height:48px
}
.tv-stage .bar-row strong {
  font:500 28px var(--font-mono);
  text-align:right
}
.tv-stage .stage-foot {
  border-top:1px solid var(--line);
  padding-top:20px;
  color:var(--muted)
}
.tv-conversation .btn {
  padding:14px 18px
}
.tv-conversation {
  background:var(--green-dark);
  color:#fff;
  padding:24px;
  border-radius:var(--radius);
  display:flex;
  flex-direction:column;
  gap:20px
}
.tv-conversation h2 {
  font-size:36px
}
.voice-status {
  display:flex;
  align-items:center;
  gap:16px;
  font-weight:600;
  font-size:26px
}
.voice-status--listening {
  color:#fff
}
.voice-status--speaking {
  color:var(--harvest)
}
.voice-status--idle {
  color:#d2dfd3
}
.voice-meter {
  display:flex;
  align-items:center;
  gap:5px;
  height:40px
}
.voice-meter i {
  width:5px;
  height:var(--height,15px);
  background:currentColor;
  border-radius:3px
}
.transcript {
  list-style:none;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:20px
}
.transcript li {
  border-left:2px solid #749080;
  padding-left:16px
}
.transcript .speaker {
  display:block;
  color:#c5d8c8;
  margin-bottom:6px
}
.voice-prompts {
  margin-top:auto
}
.voice-prompts ul {
  list-style:none;
  padding:0;
  margin-top:12px;
  display:flex;
  flex-direction:column;
  gap:10px
}
.voice-prompts li {
  padding:12px 14px;
  border:1px solid #749080;
  border-radius:var(--radius-sm)
}
.tv-foot {
  display:flex;
  justify-content:space-between;
  gap:24px;
  align-items:center;
  flex-wrap:wrap;
  margin-top:24px;
  color:var(--muted)
}
.tv-status-demo {
  display:none
}
.tv-status-demo:target {
  display:flex
}
.tv-page:has(.tv-status-demo:target) .tv-status-default {
  display:none
}

/* 17. Katalog i małe narzędzia dokumentacji projektowej. */
.screen-index {
  padding:48px;
  max-width:1240px;
  margin:auto
}
.screen-index .brand {
  color:var(--green-dark);
  margin-bottom:32px
}
.screen-list {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:20px;
  margin-top:32px;
  list-style:none;
  padding:0
}
.screen-list a {
  display:block;
  height:100%;
  text-decoration:none;
  padding:24px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius)
}
.screen-list a:hover {
  border-color:var(--green);
  background:var(--green-soft)
}
.screen-list strong {
  display:block;
  font:600 30px var(--font-heading);
  margin:12px 0
}
.component-section {
  padding:24px;
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:var(--radius);
  margin-bottom:24px
}
.component-section h2 {
  margin-bottom:20px
}
.component-section>p {
  margin-bottom:20px;
  color:var(--muted)
}

/* 18. Responsywność: desktop 1280/1920, telefon 390, bez przewijania całego dokumentu w bok. */
@media(min-width:1600px) {
  :root {
    --sidebar:248px
  }
  .content {
    padding:40px 48px
  }
  .dashboard-grid {
    grid-template-columns:minmax(0,1.25fr) minmax(0,1fr)
  }
  .data-table th,.data-table td {
    padding:14px 18px
  }
}
@media(max-width:1100px) {
  :root {
    --sidebar:200px
  }
  .sidebar {
    padding:24px 12px
  }
  .topbar {
    padding:16px 24px
  }
  .content {
    padding:24px
  }
  .page-heading {
    flex-wrap:wrap
  }
  .kpi-grid {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .dashboard-grid {
    grid-template-columns:1fr
  }
  .grid-3 {
    grid-template-columns:repeat(2,minmax(0,1fr))
  }
  .login-story {
    padding:40px 32px
  }
  .login-panel {
    padding:32px
  }
  .tv-layout {
    grid-template-columns:1fr
  }
  .tv-stage {
    min-height:560px
  }
  .tv-conversation {
    display:grid;
    grid-template-columns:1fr 1fr
  }
  .tv-conversation .voice-prompts {
    grid-column:1/-1
  }
  .tv-page {
    padding:24px
  }
  .tv-top {
    flex-wrap:wrap
  }
  .date-grid {
    grid-template-columns:1fr
  }
}
@media(max-width:760px) {
  .app-shell {
    display:block;
    padding-bottom:88px
  }
  .sidebar {
    display:none
  }
  .topbar {
    padding:12px 20px;
    gap:12px;
    flex-wrap:wrap
  }
  .topbar-group {
    gap:12px
  }
  .content {
    padding:24px 20px
  }
  .page-heading {
    gap:16px
  }
  .page-actions {
    width:100%
  }
  .page-heading h1 {
    font-size:38px
  }
  .grid-2,.grid-3 {
    grid-template-columns:1fr
  }
  .kpi-grid {
    gap:12px
  }
  .kpi {
    padding:16px
  }
  .kpi-value {
    font-size:40px
  }
  .bottom-nav {
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    display:flex;
    align-items:center;
    justify-content:space-around;
    padding:8px 8px max(8px,env(safe-area-inset-bottom));
    background:var(--surface);
    border-top:1px solid var(--line-strong);
    z-index:30
  }
  .bottom-nav a {
    min-height:60px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:1;
    gap:4px;
    flex-direction:column;
    text-decoration:none;
    font-size:18px
  }
  .bottom-nav a[aria-current=page] {
    background:var(--green-soft);
    border-radius:var(--radius-sm)
  }
  .card-head,.card-body {
    padding:20px
  }
  .card-foot {
    padding:16px 20px
  }
  .attention-item {
    padding:20px
  }
  .assistant-card {
    flex-wrap:wrap
  }
  .result-grid {
    grid-template-columns:1fr
  }
  .result-grid .span-all {
    grid-column:auto
  }
  .crop-legend {
    grid-template-columns:1fr
  }
  .bar-row {
    grid-template-columns:100px 1fr 80px;
    gap:10px
  }
  .form-grid {
    grid-template-columns:1fr
  }
  .login-page {
    display:block
  }
  .login-story {
    min-height:0;
    padding:24px
  }
  .login-story h1,.login-story>p,.login-story .cadastral,.login-story .eyeline {
    display:none
  }
  .login-story .brand {
    font-size:34px
  }
  .login-panel {
    padding:32px 24px
  }
  .login-form h2 {
    font-size:38px
  }
  .screen-index {
    padding:28px 20px
  }
  .screen-list {
    grid-template-columns:1fr
  }
  .tv-page {
    font-size:22px;
    padding:20px
  }
  .tv-top h1 {
    font-size:36px
  }
  .tv-stage {
    padding:24px;
    min-height:520px
  }
  .tv-stage h2 {
    font-size:38px
  }
  .tv-stage .bar-row {
    grid-template-columns:110px 1fr 90px;
    gap:10px
  }
  .tv-stage .bar-row strong {
    font-size:22px
  }
  .tv-conversation {
    display:flex
  }
  .toast--floating {
    left:20px;
    right:20px;
    bottom:100px
  }
  .sandbox-bar {
    padding:16px
  }
  .modal {
    padding:20px
  }
  .sheet {
    padding:0
  }
  .modal-dialog {
    padding:24px
  }
  .crop-summary {
    justify-content:center
  }
}
@media(prefers-reduced-motion:reduce) {
  html {
    scroll-behavior:auto
  }
  *,*::before,*::after {
    transition:none!important;
    animation:none!important
  }
}

/* 19. Druk: czytelne dokumenty bez nawigacji i przycisków. */
@media print {
  body {
    background:#fff;
    color:#000
  }
  .app-shell {
    display:block
  }
  .sidebar,.topbar,.bottom-nav,.page-actions,.view-switch,.modal,.mobile-bottom-nav,.mobile-save,.btn,.skip-link {
    display:none!important
  }
  .content {
    padding:0;
    max-width:none
  }
  .card {
    box-shadow:none;
    break-inside:avoid
  }
  .table-scroll {
    overflow:visible;
    max-height:none;
    border:0
  }
  .data-table {
    font-size:10pt;
    min-width:0
  }
  .data-table th,.data-table td {
    padding:5pt
  }
  .data-table thead th {
    position:static
  }
  .data-table thead {
    display:table-header-group
  }
  .data-table tfoot {
    display:table-row-group
  }
  .view-panel--table {
    display:block!important
  }
  .view-panel--cards,.view-panel--chart {
    display:none!important
  }
  .cell-review {
    outline:1px dashed #6b4b83
  }
  .sandbox-bar {
    border:2px solid #000
  }
  .page-foot {
    font-size:10pt
  }
  a {
    color:inherit;
    text-decoration:none
  }
}
