:root {
  color-scheme: light;
  --ink: #20342e;
  --muted: #64746d;
  --green: #245c49;
  --border: #dce5df;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f5f7f3;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.container { width: min(100% - 2rem, 1440px); margin: 0 auto; padding: 3rem 0; }
.page-header { margin-bottom: 1.5rem; }
h1 { margin: 0 0 .5rem; font-size: clamp(2rem, 4vw, 3rem); font-weight: 700; letter-spacing: -.04em; }
h2 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.intro { margin: 0; color: var(--muted); font-size: 1.15rem; font-weight: 400; }
.summary { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: 1rem; }
.summary-badge { display: inline-flex; align-items: center; gap: .35rem; padding: .35rem .4rem; border: 1px solid var(--border); border-radius: .5rem; background: #edf4ee; color: #40564b; font-size: .85rem; white-space: nowrap; }
.summary-badge svg { width: 1rem; height: 1rem; flex: none; fill: none; stroke: var(--green); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: var(--green); }
.summary-badge strong { color: var(--ink); }
.sample-notice, .load-error { margin-bottom: 1rem; padding: .8rem 1rem; border-radius: .6rem; }
.sample-notice { background: #fff3d4; color: #74510c; }
.load-error { background: #fbe9e7; color: #8d2521; }
.filter-panel, .table-shell { background: #fff; border: 1px solid var(--border); border-radius: .85rem; }
.filter-panel { padding: 1rem; }
.filter-panel h2 { margin-bottom: .65rem; font-size: 1rem; }
.reset-button { align-self: end; min-height: 2.25rem; padding: .35rem .65rem; border: 1px solid var(--border); border-radius: .4rem; background: #fff; color: var(--green); font: inherit; font-size: .875rem; font-weight: 600; cursor: pointer; }
.reset-button:hover { text-decoration: underline; }
.filter-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; align-items: end; gap: .75rem; }
label, .status-fieldset legend { display: block; margin-bottom: .3rem; color: #465a50; font-size: .875rem; font-weight: 600; }
.form-control, .form-select { display: block; width: 100%; min-height: 2.25rem; padding: .35rem .6rem; border: 1px solid #cbd9d0; border-radius: .4rem; background-color: #fff; color: var(--ink); font: inherit; font-size: .875rem; }
.form-select { padding-right: 2rem; }
.form-control:focus, .form-select:focus, button:focus-visible { outline: 3px solid #a7cfb6; outline-offset: 2px; }
.status-fieldset { min-width: 0; margin: .75rem 0 0; padding: 0; border: 0; }
.status-fieldset legend { float: none; width: auto; font-size: .875rem; }
.status-filters { display: flex; flex-wrap: wrap; gap: .4rem; }
.status-filter { padding: .35rem .7rem; border: 1px solid var(--border); border-radius: 2rem; background: #fff; color: #40564b; font: inherit; font-size: .875rem; cursor: pointer; }
.status-filter:hover { border-color: var(--green); }
.status-filter.active { border-color: var(--green); background: var(--green); color: #fff; }
.results { margin-top: 2rem; }
.results-heading { margin-bottom: .9rem; }
.table-shell { overflow-x: auto; }
.table { width: 100%; min-width: 800px; margin: 0; border-collapse: collapse; }
.table th, .table td { padding: .6rem .75rem; border-bottom: 1px solid #e8eee9; text-align: left; vertical-align: top; }
.table thead th { background: #eef4ef; color: #4c6054; font-size: .75rem; letter-spacing: .035em; }
.table th abbr { text-decoration: none; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td:nth-child(1), .table td:nth-child(2), .table td:nth-child(3) { white-space: nowrap; }
.table td:nth-child(2) { color: var(--muted); font-size: .8rem; }
.table td:nth-child(4), .table td:nth-child(5) { min-width: 220px; white-space: pre-wrap; overflow-wrap: anywhere; }
.status-badge { display: inline-block; padding: .3rem .6rem; border-radius: 2rem; background: #eef1ef; color: #52635a; font-size: .8rem; font-weight: 600; white-space: normal; }
.status-1 { background: #e4f3e8; color: #256242; }
.status-2 { background: #fbeae7; color: #9c3d31; }
.status-3 { background: #fff2d6; color: #805c0a; }
.status-4 { background: #e4effa; color: #315d83; }
.status-5 { background: #f0eafa; color: #684493; }
.status-6 { background: #fbeef1; color: #964b61; }
.empty-state { margin: 0; padding: 2rem 1rem; color: var(--muted); text-align: center; }
[hidden] { display: none !important; }
@media (min-width: 992px) and (max-width: 1199px) {
  .summary { gap: .2rem; }
  .summary-badge { gap: .2rem; padding-inline: .2rem; font-size: .75rem; }
  .summary-badge svg { width: .85rem; height: .85rem; }
}
@media (max-width: 600px) {
  .container { padding: 2rem 0; }
  .filter-grid { grid-template-columns: 1fr; }
  .reset-button { justify-self: start; }
}
@media (max-width: 767px) {
  .table { display: block; min-width: 0; }
  .table thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .table tbody { display: block; }
  .table tbody tr { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .65rem; padding: .7rem .75rem; border-bottom: 1px solid #e8eee9; }
  .table tbody tr:last-child { border-bottom: 0; }
  .table > tbody > tr > td { padding: 0; border: 0; }
  .table td:nth-child(1)::before { content: "PČ "; color: var(--muted); font-size: .75rem; }
  .table td:nth-child(3) { margin-left: auto; max-width: 100%; white-space: normal; }
  .table td:nth-child(3) .status-badge { max-width: 100%; overflow-wrap: anywhere; }
  .table td:nth-child(4), .table td:nth-child(5) { flex: 0 0 100%; min-width: 0; }
  .table td:nth-child(5) { color: var(--muted); font-size: .85rem; }
  .table td:nth-child(5):not([data-empty])::before { content: "Poznámka: "; font-weight: 600; }
  .table td:nth-child(5)[data-empty] { display: none; }
}
