@font-face {
  font-family: 'Galton';
  src: url('https://galton-ai-assets.vercel.app/brand/fonts/GaltonVariable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --canvas:      #1A1A1A;
  --ink:         #FFFFFF;
  --body:        rgba(255,255,255,0.80);
  --muted:       #999999;
  --primary:     #FFD700;
  --on-primary:  #1A1A1A;
  --surface:     rgba(255,255,255,0.04);
  --hairline:    rgba(255,255,255,0.12);
  --radius-component: 10px;
  --radius-card:      20px;
  --radius-pill:      100px;

  /* absence type colours — lightened for dark bg */
  --rd:   #6B8CFF;
  --nl:   #FFB347;
  --sd:   #FF6B6B;
  --ocr:  #C97DE8;
  --mv:   #4ECDC4;
  --pn:   #FFD166;
  --nv:   #74B9E0;
  --warn: #FFD700; /* KPI "approaching target" tier — gold has good contrast on dark canvas */
  --status-good: #4ECD85; /* Completeness/On Time ≥95% tier */
  --status-bad:  #FF6B6B; /* Completeness/On Time <85% tier */

  /* role badge colours — lightened for dark bg */
  --role-superadmin:   #E0664E;
  --role-admin:        #7FB2D4;
  --role-team-leader:  #5FB87A;
}

[data-theme="light"] {
  --canvas:      #FFFFFF;
  --ink:         #1A1A1A;
  --body:        rgba(0,0,0,0.80);
  --muted:       #777777;
  --primary:     #FFD700;
  --on-primary:  #1A1A1A;
  --surface:     rgba(0,0,0,0.04);
  --hairline:    rgba(0,0,0,0.12);
  --warn: #7A5C00; /* darker amber — plain gold fails WCAG AA against the light card background */
  --status-good: #1F7A4D;
  --status-bad:  #B33A3A;
  --rd:   #4060CC;
  --nl:   #CC7700;
  --sd:   #CC3333;
  --ocr:  #8833BB;
  --mv:   #228888;
  --pn:   #AA8800;
  --nv:   #3377AA;

  /* role badge colours — darker for legibility on light bg (plain lightened versions fail WCAG AA) */
  --role-superadmin:   #B8422C;
  --role-admin:        #2E6A94;
  --role-team-leader:  #257040;
}

/* Light mode: override hardcoded dark backgrounds */
[data-theme="light"] thead tr th,
[data-theme="light"] .sub-header th,
[data-theme="light"] th.sticky-col {
  background: #F5F5F5;
}
[data-theme="light"] td.sticky-col,
[data-theme="light"] #summaryTable tbody td:first-child {
  background: #FFFFFF;
}
[data-theme="light"] #summaryTable tbody tr:hover td:first-child,
[data-theme="light"] tbody tr:hover td.sticky-col {
  background: #F0F0F0;
}
[data-theme="light"] .modal-box {
  background: #FFFFFF;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
[data-theme="light"] .filters select option,
[data-theme="light"] .form-row select option {
  background: #FFFFFF;
  color: #1A1A1A;
}
[data-theme="light"] .form-row input[type=date]::-webkit-calendar-picker-indicator {
  filter: opacity(0.4);
}
[data-theme="light"] .setup-input {
  color: #1A1A1A;
  border-bottom-color: rgba(0,0,0,0.2);
}
[data-theme="light"] .btn-secondary,
[data-theme="light"] .btn-ghost {
  background: #FFFFFF;
  border-color: rgba(0,0,0,0.18);
  color: #1A1A1A;
}
[data-theme="light"] .btn-secondary:hover,
[data-theme="light"] .btn-ghost:hover {
  border-color: #1A1A1A;
  background: #F5F5F5;
}
[data-theme="light"] .view-toggle {
  border-color: rgba(0,0,0,0.18);
}
[data-theme="light"] .view-toggle-btn.active {
  background: #1A1A1A;
  color: #FFFFFF;
}

body {
  font-family: 'Galton', 'Montserrat', ui-sans-serif, system-ui, sans-serif;
  font-weight: 300;
  background: var(--canvas);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh;
}

/* ── NAV ───────────────────────────────────────────────────────────────────── */
nav {
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand img { height: 20px; }

.nav-brand span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--muted);
  text-transform: uppercase;
  border-left: 1px solid var(--hairline);
  padding-left: 12px;
}

.nav-links { display: flex; gap: 2px; align-items: center; }

.nav-links a {
  padding: 6px 16px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color .15s, background .15s;
}

.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--primary); }

nav .btn { margin-left: 0; }

/* Admin dropdown */
.nav-dropdown { position: relative; display: flex; align-items: center; }
.nav-dropdown-toggle { display: inline-flex; align-items: center; gap: 5px; }
.nav-dropdown-caret { font-size: 9px; opacity: 0.7; line-height: 1; position: relative; top: 1px; }
.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  padding: 6px;
  display: none;
  flex-direction: column;
  gap: 2px;
  z-index: 1000;
}
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a {
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--surface); }
.nav-dropdown-toggle.active { color: var(--primary); }

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.nav-user {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  border-left: 1px solid var(--hairline);
  padding-left: 12px;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-component);
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 8px;
  line-height: 1;
  transition: border-color .2s;
}
.theme-toggle:hover { border-color: var(--primary); }

.nav-mobile-toggle {
  display: none;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-component);
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--ink);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-mobile-user { display: none; }
.btn-label-short { display: none; }

/* ── RESPONSIVE NAV ────────────────────────────────────────────────────────── */
/* Breakpoint measured against real content (long email + Superadmin badge + eye icon +
   6 page links + Admin dropdown + CTA): desktop nav needs ~1294px with zero margin to
   avoid clipping on the right — 1360px keeps a comfortable buffer before that. */
@media (max-width: 1360px) {
  nav { padding: 0 16px; gap: 12px; }
  .nav-brand span { display: none; }
  .nav-mobile-toggle { display: inline-flex; }

  .nav-links {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--canvas);
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px;
    display: none;
    overflow-y: auto;
    z-index: 200;
    border-top: 1px solid var(--hairline);
  }
  nav.mobile-nav-open .nav-links { display: flex; }

  .nav-links a { padding: 14px 16px; border-radius: 8px; font-size: 15px; }
  .nav-links a.active { background: var(--surface); }

  .nav-dropdown { flex-direction: column; align-items: stretch; }
  .nav-dropdown-menu {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 16px;
    background: transparent;
    min-width: 0;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: flex; }

  .nav-mobile-user {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 12px;
    padding: 14px 16px 4px;
    border-top: 1px solid var(--hairline);
    font-size: 13px;
  }
  .nav-mobile-user span:first-child { color: var(--muted); }
  .nav-mobile-user a { color: var(--muted); text-decoration: none; margin-top: 6px; }

  .nav-right { gap: 8px; }
  .nav-user { display: none; }
  .btn-label-full { display: none; }
  .btn-label-short { display: inline; }
  #addAbsenceBtn { width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
}

/* ── PAGES ─────────────────────────────────────────────────────────────────── */
.page { display: none; padding: 36px 32px; max-width: 1400px; margin: 0 auto; }
.page.active { display: block; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header h1 {
  font-size: 30px;
  font-weight: 300;
  line-height: 1.2;
  color: var(--ink);
}

.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.filters select,
.filters input[type=text] {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 300;
  padding: 6px 0;
  outline: none;
  transition: border-color .15s;
}

.filters select { padding-right: 20px; color: var(--muted); cursor: pointer; }
.filters select:focus,
.filters input[type=text]:focus { border-bottom-color: var(--primary); color: var(--ink); }
.filters select option { background: #2a2a2a; color: var(--ink); }
.filters input[type=text] { width: 180px; }
.filters input::placeholder { color: var(--muted); }

/* ── LEGEND ────────────────────────────────────────────────────────────────── */
.legend { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }

/* ── BADGES ────────────────────────────────────────────────────────────────── */
.badge {
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.badge.rd  { border-color: var(--rd);  color: var(--rd); }
.badge.nl  { border-color: var(--nl);  color: var(--nl); }
.badge.sd  { border-color: var(--sd);  color: var(--sd); }
.badge.ocr { border-color: var(--ocr); color: var(--ocr); }
.badge.mv  { border-color: var(--mv);  color: var(--mv); }
.badge.pn  { border-color: var(--pn);  color: var(--pn); }
.badge.nv  { border-color: var(--nv);  color: var(--nv); }

/* ── TABLE ─────────────────────────────────────────────────────────────────── */
.table-wrap {
  border-radius: var(--radius-card);
  border: 1px solid var(--hairline);
  overflow: auto;
  max-height: calc(100vh - 180px);
  background: var(--surface);
}

table { width: 100%; border-collapse: collapse; }

thead tr th {
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  white-space: nowrap;
  background: #222222;
  position: sticky;
  top: 0;
  z-index: 10;
}

.sub-header th {
  padding: 6px 16px;
  font-size: 10px;
  letter-spacing: 2px;
  background: #1e1e1e;
  top: 45px;
}

/* Sticky first column */
th.sticky-col,
td.sticky-col,
#summaryTable tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  background: #1f1f1f;
}
th.sticky-col {
  z-index: 15;
  background: #222222;
}
#summaryTable tbody tr:hover td:first-child,
tbody tr:hover td.sticky-col {
  background: #2a2a2a;
}

/* Sortable column headers */
th.sortable {
  cursor: pointer;
  user-select: none;
}
th.sortable:hover { color: var(--ink); }
th.sortable::after { content: ' ↕'; opacity: 0.3; font-size: 10px; }
th.sort-asc::after  { content: ' ↑'; opacity: 1; color: var(--primary); }
th.sort-desc::after { content: ' ↓'; opacity: 1; color: var(--primary); }

.section-header {
  text-align: center;
  font-size: 10px !important;
  letter-spacing: 2px;
  padding: 8px 16px !important;
  border-bottom: 1px solid var(--hairline);
}

.section-opening { color: var(--muted) !important; border-right: 1px solid var(--hairline); }
.section-used    { color: var(--nl)   !important; border-right: 1px solid var(--hairline); }
.section-closing { color: var(--mv)   !important; border-right: 1px solid var(--hairline); }

tbody td.section-sep { border-right: 1px solid var(--hairline); }

tbody tr { border-bottom: 1px solid var(--hairline); transition: background .12s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--surface); }
td { padding: 12px 16px; vertical-align: middle; color: var(--body); }

/* Group header colours */
.group-rd  { color: var(--rd)  !important; }
.group-nl  { color: var(--nl)  !important; }
.group-sd  { color: var(--sd)  !important; }
.group-ocr { color: var(--ocr) !important; }
.group-mv  { color: var(--mv)  !important; }
.group-pn  { color: var(--pn)  !important; }
.group-nv  { color: var(--nv)  !important; }

/* Employee cell */
.emp-cell  { display: flex; flex-direction: column; gap: 2px; }
.emp-name  { font-weight: 500; color: var(--ink); }
.emp-email { font-size: 12px; color: var(--muted); }

/* Number cells */
.num { text-align: right; font-variant-numeric: tabular-nums; }
.num.warn { color: var(--sd); font-weight: 600; }
.num.ok   { color: var(--mv); }

/* Code badges in table */
td .code-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.code-RD  { border-color: var(--rd);  color: var(--rd); }
.code-NL  { border-color: var(--nl);  color: var(--nl); }
.code-SD  { border-color: var(--sd);  color: var(--sd); }
.code-OČR { border-color: var(--ocr); color: var(--ocr); }
.code-MV  { border-color: var(--mv);  color: var(--mv); }
.code-PN  { border-color: var(--pn);  color: var(--pn); }
.code-NV  { border-color: var(--nv);  color: var(--nv); }

/* ── BUTTONS ───────────────────────────────────────────────────────────────── */
.btn {
  padding: 11px 30px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
  line-height: 1;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* Yellow CTA */
.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  border-color: transparent;
}
.btn-primary:hover {
  background: var(--canvas);
  color: var(--ink);
  border-color: var(--ink);
}

/* Secondary / outline */
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: rgba(255,255,255,0.35);
}
.btn-secondary:hover { border-color: var(--ink); }

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: rgba(255,255,255,0.25);
}
.btn-ghost:hover { color: var(--ink); border-color: var(--ink); }

/* Danger */
.btn-danger {
  background: transparent;
  color: var(--sd);
  border-color: var(--sd);
}
.btn-danger:hover { background: var(--sd); color: var(--ink); }

/* Icon buttons */
.btn-icon {
  padding: 5px 9px;
  font-size: 13px;
  border-radius: var(--radius-component);
  border: 1px solid var(--hairline);
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  transition: .15s;
  line-height: 1;
}
.btn-icon:hover { border-color: var(--ink); color: var(--ink); }
.btn-icon.del:hover { border-color: var(--sd); color: var(--sd); }
.actions { display: flex; gap: 4px; }

/* ── MODAL ─────────────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal.hidden { display: none; }

.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
}

.modal-box {
  position: relative;
  background: #222222;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 32px;
  width: 500px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: none;
}
.modal-box.small { width: 380px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 300;
  color: var(--ink);
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  padding: 4px 6px;
  border-radius: var(--radius-component);
  transition: color .15s;
}
.modal-close:hover { color: var(--ink); }

/* Form rows */
.form-row { margin-bottom: 24px; }

.form-row label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.form-row input,
.form-row select {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  font-weight: 300;
  padding: 10px 0;
  outline: none;
  transition: border-color .15s;
  -webkit-appearance: none;
}

.form-row input:focus,
.form-row select:focus { border-bottom-color: var(--primary); }

.form-row input::placeholder { color: var(--muted); }
.form-row select option { background: #2a2a2a; color: var(--ink); }
.form-row input[type=date]::-webkit-calendar-picker-indicator { filter: invert(1) opacity(0.4); cursor: pointer; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
}

.modal-box p { color: var(--body); line-height: 1.6; margin-bottom: 4px; }

/* ── YEAR SETUP INPUTS ─────────────────────────────────────────────────────── */
.setup-input {
  width: 64px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 300;
  padding: 4px 0;
  text-align: right;
  outline: none;
  transition: border-color .15s;
}
.setup-input:focus  { border-bottom-color: var(--primary); }
.setup-input:disabled { color: var(--muted); cursor: not-allowed; }

/* ── METRICS ROW ──────────────────────────────────────────────────────────── */
.metrics-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.metric-card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 24px 28px;
}

.metric-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.metric-value {
  font-size: 42px;
  font-weight: 300;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 16px;
}

.metric-value span {
  font-size: 20px;
  color: var(--muted);
}

.metric-sub {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
}

.metric-bar-track {
  height: 4px;
  background: var(--hairline);
  border-radius: 2px;
  overflow: hidden;
}

.metric-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width .4s ease;
}

/* ── CARD ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  padding: 28px 32px;
  margin-bottom: 24px;
}
.card-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ── EMPTY STATE ───────────────────────────────────────────────────────────── */
.empty-row td {
  text-align: center;
  color: var(--muted);
  padding: 48px;
  font-style: normal;
  letter-spacing: 0.5px;
}

/* ── SCROLLBAR ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hairline); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ── VIEW TOGGLE (Kapacita) ────────────────────────────────────────────────── */
.view-toggle {
  display: flex;
  border: 1px solid var(--hairline);
  border-radius: 6px;
  overflow: hidden;
}
.view-toggle-btn {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 5px 14px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.view-toggle-btn.active {
  background: var(--ink);
  color: var(--canvas);
}
.view-toggle-btn:hover:not(.active) { background: var(--surface); color: var(--ink); }

/* ── KAPACITA CELL ─────────────────────────────────────────────────────────── */
.kap-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  justify-content: center;
}
.kap-pct {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  min-width: 44px;
  text-align: right;
}
.kap-meta {
  display: flex;
  flex-direction: column;
  font-size: 10px;
  color: var(--muted);
  gap: 1px;
  min-width: 36px;
}
.kap-meta .kap-hd  { color: var(--muted); }
.kap-meta .kap-track { font-weight: 300; }
.kap-meta .kap-divider { border-top: 1px solid var(--hairline); margin: 1px 0; }
.kap-meta .kap-cap  { }

/* ── KAPACITA TOTALS ROW ───────────────────────────────────────────────────── */
#kapacitaBody tr.kap-totals td {
  border-top: 1px solid var(--hairline);
  font-weight: 600;
}

/* ── TOOLTIP ───────────────────────────────────────────────────────────────── */
.tooltip-wrap:hover .tooltip-box { display: block !important; }

/* ── RESPONSIVE CONTENT (Dashboard, Log, + Nová absencia, Kapacita — see project scope) ─ */
@media (max-width: 640px) {
  .page { padding: 20px 16px; }

  /* Dashboard KPI tiles: 1 per row instead of 2 */
  .metrics-row { grid-template-columns: 1fr; }

  /* Kapacita charts page: stack the donut + team-hours cards instead of side-by-side */
  #kapacitaTeamDonutSection { flex-direction: column; }
  #page-kapacita .kap-card { padding: 16px !important; }
  #kapacitaTeamDonutSection canvas#chartTeam { min-height: 0 !important; }
  #kapacitaTeamDonutSection > .kap-card:first-child > div { min-height: 240px !important; }
  #kapacitaMonthlySection > div { height: 280px !important; }
  #kapacitaTeamLinesSection > div { height: 260px !important; }

  /* + Nová absencia modal: stack side-by-side fields, tighten padding */
  .modal-box { padding: 20px; }
  .two-col { grid-template-columns: 1fr; }

  /* Log table → card list */
  #logTable thead { display: none; }
  #logTable, #logTable tbody, #logTable tr, #logTable td { display: block; width: 100%; }
  #logTable { border-collapse: separate; border-spacing: 0; }
  #logTable tr {
    border: 1px solid var(--hairline);
    border-radius: var(--radius-card);
    margin: 10px;
    padding: 4px 14px;
  }
  #logTable tr.empty-row { border: none; margin: 10px; padding: 14px; }
  #logTable td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--hairline);
    text-align: right;
  }
  #logTable td:last-child { border-bottom: none; }
  #logTable td:first-child {
    justify-content: flex-start;
    border-bottom: 1px solid var(--hairline);
    padding: 10px 0;
  }
  #logTable td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    flex-shrink: 0;
  }
  #logTable .actions { justify-content: flex-end; width: 100%; }
}
