/* =========================================================================
   FAKTURÁK — designový systém v1
   Inspirace: alesfodor.wixsite.com/umenidreva-af (řemeslnické dřevěné téma).
   Tmavé téma s přírodní paletou. PDF má vlastní CSS uvnitř pdf.blade.php.
   ========================================================================= */

:root {
  /* --- Pozadí a povrchy --- */
  --bg: #1c1612;            /* tmavá hlína / lesní podlaha */
  --surface: #2a221c;        /* karty, formuláře — teplejší hnědá */
  --surface-2: #231b16;      /* alternativní řádky tabulky */
  --surface-hover: #33291f;
  --border: #3d342c;
  --border-light: #2f2620;

  /* --- Text --- */
  --text: #f0e6d8;           /* krémová */
  --text-strong: #fff5e6;    /* nadpisy */
  --muted: #9a8a78;          /* sekundární text, labely */
  --muted-2: #6b5e4f;        /* terciární */

  /* --- Akcent (medová zlatá) --- */
  --primary: #c89b3c;
  --primary-dark: #a07d2a;
  --primary-light: #dfb558;
  --primary-bg: rgba(200, 155, 60, 0.12);
  --primary-bg-hover: rgba(200, 155, 60, 0.2);

  /* --- Stavové barvy --- */
  --ok: #7a9a5a;             /* lesní zelená */
  --ok-bg: rgba(122, 154, 90, 0.15);
  --ok-border: rgba(122, 154, 90, 0.4);

  --warning: #d4a648;        /* jantar */
  --warning-bg: rgba(212, 166, 72, 0.15);
  --warning-border: rgba(212, 166, 72, 0.4);

  --danger: #b8654a;         /* rezavá červená */
  --danger-bg: rgba(184, 101, 74, 0.15);
  --danger-border: rgba(184, 101, 74, 0.4);

  /* --- Tvary --- */
  --radius: 6px;
  --radius-lg: 10px;
  --shadow: 0 2px 4px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.2);
  --shadow-lg: 0 4px 8px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.3);

  /* --- Typografie --- */
  --font-heading: 'Enriqueta', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* =========================================================================
   Topbar + nav
   ========================================================================= */

.topbar {
  background: linear-gradient(to bottom, #221a14, #1c1612);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  gap: 32px;
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-strong);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.5px;
}

.brand-logo {
  height: 44px;
  width: auto;
  border-radius: 8px;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}

.topnav {
  display: flex;
  gap: 28px;
  margin-left: auto;
  align-items: center;
}

.topnav a {
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
  padding: 8px 4px;
  position: relative;
  transition: color .15s;
}

.topnav a:hover { color: var(--text); }

.topnav a::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width .2s, left .2s;
}
.topnav a:hover::after {
  width: 100%;
  left: 0;
}

/* Odhlásit — tlačítko ve tvaru odkazu v navigaci */
.topnav-logout { margin: 0; padding: 0; display: inline; background: none; border: none; box-shadow: none; }
.topnav-logout button {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  padding: 8px 4px;
}
.topnav-logout button:hover { color: var(--text); }

/* =========================================================================
   Container & layout helpers
   ========================================================================= */

.container {
  max-width: 1080px;
  margin: 32px auto 64px;
  padding: 0 32px;
}
/* Širší varianta pro stránky s rozsáhlými tabulkami (seznam faktur) */
.container.container-wide { max-width: min(1560px, 95vw); }

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--text-strong);
  font-weight: 700;
  letter-spacing: 0.2px;
}

h1 {
  margin: 0 0 24px;
  font-size: 30px;
  line-height: 1.2;
}

h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--font-mono); font-size: 14px; letter-spacing: 0; }

a { color: var(--primary-light); text-decoration: none; }
a:hover { color: var(--primary); text-decoration: underline; }

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

form.inline { display: inline; margin: 0; padding: 0; background: none; border: none; box-shadow: none; }

/* =========================================================================
   Card
   ========================================================================= */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.card h2 {
  font-family: var(--font-heading);
  font-size: 16px;
  text-transform: none;
  letter-spacing: 0.3px;
  color: var(--text-strong);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.card-action {
  background: linear-gradient(135deg, rgba(200,155,60,.08), var(--surface));
  border-left: 3px solid var(--primary);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.card-wide { grid-column: 1 / -1; }

.card dl.kv {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 18px;
  font-size: 14px;
}
.card dl.kv dt {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  align-self: center;
}
.card dl.kv dd { margin: 0; color: var(--text); }

/* =========================================================================
   Form
   ========================================================================= */

.form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}

fieldset { border: none; padding: 0; margin: 0 0 28px 0; }
fieldset:last-of-type { margin-bottom: 16px; }

legend {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-strong);
  margin-bottom: 16px;
  padding: 0 0 8px;
  border-bottom: 1px solid var(--border-light);
  width: 100%;
}

label {
  display: block;
  margin-bottom: 16px;
  flex: 1;
}

label > span {
  display: block;
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s, background .15s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-bg);
}

input::placeholder, textarea::placeholder { color: var(--muted-2); }

textarea { resize: vertical; font-family: var(--font-body); }

select {
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%239a8a78' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px;
  padding-right: 36px;
  appearance: none;
}

.row { display: flex; gap: 16px; }
.row > label { flex: 1; }
.row > label.grow { flex: 2; }

code {
  background: var(--surface-2);
  color: var(--primary-light);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 13px;
}

small { font-size: 12px; color: var(--muted); }

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
}

/* =========================================================================
   Tlačítka
   ========================================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font-body);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
  line-height: 1.3;
}

.btn:hover {
  background: var(--surface-hover);
  border-color: var(--muted-2);
  color: var(--text-strong);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--primary);
  color: #1c1612;
  border-color: var(--primary);
  font-weight: 600;
}
.btn-primary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: #1c1612;
}

.btn-secondary {
  background: transparent;
  color: var(--primary-light);
  border-color: var(--primary);
}
.btn-secondary:hover {
  background: var(--primary-bg);
  color: var(--primary-light);
  border-color: var(--primary-light);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}
.btn-ghost:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.btn:disabled, .btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-danger {
  color: var(--danger);
}
.btn-danger:hover {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}

.btn-icon {
  background: none;
  border: none;
  color: var(--muted-2);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 6px 10px;
  border-radius: var(--radius);
  transition: background .15s, color .15s;
}
.btn-icon:hover { color: var(--danger); background: var(--danger-bg); }

/* =========================================================================
   Filtry / chips
   ========================================================================= */

.filters {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.chip {
  display: inline-block;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
  transition: all .15s;
}
.chip:hover { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.chip-on {
  background: var(--primary-bg);
  color: var(--primary-light);
  border-color: var(--primary);
}

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  align-items: stretch;
  background: none;
  border: none;
  padding: 0;
  box-shadow: none;
}
.filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.vlastni-label { color: var(--muted); font-size: 13px; }
.filter-bar select {
  width: auto;
  min-width: 180px;
  padding: 8px 36px 8px 12px;
  font-size: 13px;
}
.vlastni-obdobi {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.vlastni-obdobi input[type="date"] {
  width: auto;
  padding: 8px 12px;
  font-size: 13px;
}
.vlastni-pomlcka { color: var(--muted); }

/* Měna / kurz ve formuláři */
.kurz-input-group { display: flex; gap: 8px; align-items: stretch; }
.kurz-input-group input { flex: 1; }
.kurz-input-group .btn { white-space: nowrap; }

/* Pravidelné opakování ve formuláři faktury */
.opakovani-box {
  margin-top: 18px;
  padding: 16px 18px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.check-inline {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.check-inline input[type="checkbox"] { width: auto; margin: 0; }
.check-inline span { margin: 0; }
.opakovani-box .hint { margin: 12px 0 0; font-size: 12px; color: var(--muted); }

/* =========================================================================
   Tabulka
   ========================================================================= */

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.table th, .table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}
.table thead th {
  background: var(--surface-2);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-weight: 600;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-2); }

.table td a {
  color: var(--primary-light);
  text-decoration: none;
  font-weight: 500;
}
.table td a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
  font-size: 13.5px;
  white-space: nowrap;
}
.table tfoot td {
  background: var(--surface-2);
  font-weight: 600;
  border-top: 1px solid var(--border);
}

.table .actions { text-align: right; white-space: nowrap; }
.table .actions > a,
.table .actions > form.inline { margin-left: 14px; }
.table .actions > a:first-child { margin-left: 0; }
.row-archived td { color: var(--muted-2); }
.row-archived td a { color: var(--muted); }

.link {
  color: var(--primary-light);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
}
.link:hover { color: var(--primary); text-decoration: underline; }

/* <button class="link"> — vizuálně jako textový odkaz */
button.link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
}
.link-danger { color: var(--danger); }
.link-danger:hover { color: var(--danger); }

/* =========================================================================
   Badge / stav
   ========================================================================= */

.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
  margin-left: 4px;
}
.badge-muted {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}
.badge-proforma {
  background: rgba(122, 154, 90, 0.10);
  color: var(--ok);
  border: 1px solid rgba(122, 154, 90, 0.35);
  font-size: 9px;
}
.badge-ok {
  background: rgba(122, 154, 90, 0.12);
  color: var(--ok);
  border: 1px solid rgba(122, 154, 90, 0.35);
}
.row-proforma td { color: var(--muted); font-style: italic; }
.row-proforma td a { color: var(--muted); }

.stav {
  display: inline-block;
  padding: 3px 12px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-family: var(--font-body);
  white-space: nowrap;
}
.stav-vystaveno  { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.stav-zaplaceno  { background: var(--ok-bg);     color: var(--ok);     border: 1px solid var(--ok-border); }
.stav-stornovano { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); text-decoration: line-through; }
.stav-po-splatnosti { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }

/* =========================================================================
   Flash zprávy
   ========================================================================= */

.flash {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 14px;
}
.flash-ok  { background: var(--ok-bg);     color: var(--ok);     border: 1px solid var(--ok-border); }
.flash-err { background: var(--danger-bg); color: var(--danger); border: 1px solid var(--danger-border); }

/* =========================================================================
   Empty state
   ========================================================================= */

.empty {
  padding: 56px 24px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
}
.empty p { margin: 0 0 20px 0; color: var(--muted); font-size: 16px; }

/* =========================================================================
   Položky faktury (formulář) — inline tabulka inputs
   ========================================================================= */

.table-polozky { box-shadow: none; }
.table-polozky thead th {
  background: transparent;
  border-bottom: 1px solid var(--border);
}
.table-polozky tbody tr:hover { background: transparent; }
.table-polozky input {
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-family: var(--font-body);
}
.table-polozky tbody tr:hover input,
.table-polozky tbody tr input:focus {
  background: var(--bg);
}
.table-polozky tbody tr input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-bg);
}
.num-input input, .num-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-family: var(--font-mono);
}
.unit-input { width: 100px; }
.num-input { width: 140px; }
.cena-celkem {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  padding: 10px 16px;
  color: var(--text-strong);
}
.actions-cell { text-align: left; padding: 14px 16px; }
.total-cell { font-size: 17px; padding: 14px 16px; font-family: var(--font-mono); }
.total-cell strong {
  font-size: 22px;
  color: var(--primary-light);
  font-family: var(--font-heading);
  font-weight: 700;
}

/* =========================================================================
   ARES action button
   ========================================================================= */

.ares-action {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-bottom: 16px;
}
.htmx-indicator {
  opacity: 0;
  transition: opacity .2s;
  color: var(--muted);
  font-size: 13px;
  padding-bottom: 12px;
}
.htmx-request .htmx-indicator { opacity: 1; }
.htmx-request.htmx-indicator { opacity: 1; }

/* =========================================================================
   Inline form (např. označit zaplaceno)
   ========================================================================= */

.inline-form {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}
.inline-form label { margin: 0; min-width: 180px; }
.inline-form input, .inline-form select { padding: 9px 12px; }

/* =========================================================================
   Login (auth) — samostatný layout
   ========================================================================= */

.auth-page {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse at top, rgba(200,155,60,.08), transparent 50%),
    radial-gradient(ellipse at bottom, rgba(122,154,90,.06), transparent 50%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 24px;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}
.auth-logo {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.3));
}
.auth-brand h1 {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 26px;
  color: var(--primary-light);
  letter-spacing: 0.5px;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 16px;
}
.checkbox input { margin: 0; width: auto; }

/* =========================================================================
   Statistické karty (faktury overview)
   ========================================================================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--muted-2);
}
.stat-vystaveno::before    { background: var(--primary); }
.stat-zaplaceno::before    { background: var(--ok); }
.stat-po-splatnosti::before{ background: var(--danger); }
.stat-stornovano::before   { background: var(--muted); }

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.stat-value .kc {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.stat-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

/* Dashboard */
.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.dashboard-hero h1 { margin: 0; }
.dashboard-hero-text .muted { margin: 4px 0 0 0; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.stats-grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stat-card-link {
  text-decoration: none;
  display: block;
  transition: border-color .15s, transform .15s;
}
.stat-card-link:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  text-decoration: none;
}

/* DPH obrat — 12měsíční ukazatel */
.dph-card { margin-bottom: 24px; }
.dph-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.dph-head h2 { margin: 0; }
.dph-period { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dph-amounts { display: flex; align-items: baseline; gap: 10px; margin: 10px 0 12px; }
.dph-value { font-family: var(--font-heading); font-size: 28px; font-weight: 700; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.dph-of { color: var(--muted); font-size: 14px; }
.dph-bar { height: 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.dph-bar-fill { height: 100%; border-radius: 999px; transition: width .3s; }
.dph-meta { font-size: 13px; color: var(--text); margin-top: 10px; }
.dph-ok   .dph-bar-fill { background: var(--ok); }
.dph-warn .dph-bar-fill { background: var(--warning); }
.dph-over .dph-bar-fill { background: var(--danger); }
.dph-over { border-color: var(--danger); }
.dph-warn { border-color: var(--warning); }

.chart-card { padding-top: 20px; }
.chart-card h2 { border-bottom: none; padding-bottom: 0; margin-bottom: 14px; }
.chart-card canvas { width: 100% !important; max-height: 280px; }

/* Inline „Zaplacena" v řádku /faktury tabulky */
.inline-pay {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  box-shadow: none;
}
.inline-pay input[type="date"] {
  padding: 4px 8px;
  font-size: 12.5px;
  width: auto;
  min-width: 130px;
}
.btn-sm {
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 600;
}

.rozpocet-link {
  display: inline-block;
  padding: 8px 14px;
  background: var(--primary-bg);
  color: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
}
.rozpocet-link:hover {
  background: var(--primary-bg-hover);
  color: var(--text-strong);
  text-decoration: none;
}

/* =========================================================================
   Selection & scrollbar
   ========================================================================= */

::selection {
  background: var(--primary-bg);
  color: var(--text-strong);
}

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--surface);
  border: 3px solid var(--bg);
  border-radius: 6px;
}
::-webkit-scrollbar-thumb:hover { background: var(--border); }

/* =========================================================================
   Responzivní layout (mobil / tablet)
   ========================================================================= */

/* Burger tlačítko — na desktopu skryté, ukáže se až na mobilu */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 38px;
  margin-left: auto;
  padding: 0;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--text);
}

@media (max-width: 760px) {
  body { font-size: 14px; }

  /* Topbar — brand vlevo, burger vpravo; navigace = plovoucí panel pod topbarem */
  .topbar { height: auto; min-height: 56px; padding: 8px 16px; gap: 10px; }
  .brand-logo { height: 34px; }
  .nav-toggle { display: flex; }
  .topnav {
    display: none;
    position: absolute;
    top: 100%;
    left: auto;
    right: 0;
    width: 60%;
    min-width: 200px;
    max-width: 280px;
    flex-direction: column;
    gap: 0;
    margin: 0;
    background: #1c1612;
    border: 1px solid var(--border);
    border-top: none;
    border-bottom-left-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 4px 16px 10px;
    z-index: 99;
  }
  .topnav.open { display: flex; }
  .topnav a { padding: 13px 4px; border-top: 1px solid var(--border); font-size: 16px; text-align: left; }
  .topnav a:first-child { border-top: none; }
  .topnav a::after { display: none; }
  .topnav-logout { width: 100%; }
  .topnav-logout button { width: 100%; text-align: left; padding: 13px 4px; border-top: 1px solid var(--border); font-size: 16px; }

  /* Obsah — menší okraje */
  .container { margin: 16px auto 40px; padding: 0 14px; }

  /* Hlavička stránky — nadpis a akce pod sebe */
  .page-header { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-header .actions, .actions { flex-wrap: wrap; }

  /* Formuláře — pole pod sebe, menší padding */
  .form { padding: 18px 16px; }
  .row { flex-direction: column; gap: 0; }
  .row > label, .row > label.grow { flex: 1; }

  /* Filtr — selecty na plnou šířku */
  .filter-bar select, .filter-row select { min-width: 0; width: 100%; }
  .filter-row { width: 100%; }
  .vlastni-obdobi { flex-wrap: wrap; }
  .vlastni-obdobi input[type="date"] { flex: 1; }

  /* === Tabulky → kartičky (jen svislý scroll, žádné přetékání do stran) === */
  .table { display: block; border: none; background: none; box-shadow: none; }
  .table thead { display: none; }
  .table tbody { display: block; }
  .table tr {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 12px;
    padding: 4px 14px;
  }
  .table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
    text-align: right;
    white-space: normal;
  }
  .table tr td:last-child { border-bottom: none; }
  .table td[data-label]::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .5px;
    text-align: left;
    flex-shrink: 0;
  }
  .table .num { text-align: right; }
  /* V kartičkách nezalamovat částky, štítky stavu ani jmenovky sloupců */
  .table td.num,
  .table td[data-label]::before { white-space: nowrap; }
  .table .stav, .table .badge { white-space: nowrap; }
  .table td > .stav, .table td > .badge { flex-shrink: 0; }

  /* Buňky akcí — celá šířka, ovládací prvky vedle sebe / pod sebe */
  .table td.actions {
    display: block;
    text-align: left;
    white-space: normal;
    padding-top: 10px;
  }
  .table td.actions > a,
  .table td.actions > form.inline { margin: 0 14px 0 0; }
  .inline-pay { flex-wrap: wrap; margin-bottom: 6px; }

  /* Součtové řádky (tfoot) */
  .table tfoot { display: block; }
  .table tfoot tr { display: block; }
  .table tfoot td { display: flex; justify-content: space-between; }

  /* Editovatelná tabulka položek — řádek = kartička; jmenovka NAD polem */
  .table-polozky tr.polozka-row {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 8px 12px 10px;
    margin-bottom: 12px;
    overflow: hidden; /* obalí floatované buňky */
  }
  .table-polozky td {
    display: block;
    text-align: left;
    border-bottom: none;
    padding: 6px 0;
  }
  .table-polozky td[data-label]::before {
    display: block;
    margin-bottom: 5px;
  }
  .table-polozky input { width: 100%; flex: none; text-align: left; }

  /* Množství + Jednotka vedle sebe na jednom řádku */
  .table-polozky td.pol-mn { float: left; width: 48%; }
  .table-polozky td.pol-jed { float: right; width: 48%; }
  .table-polozky td.pol-cena { clear: both; }

  /* Cena za jednotku zarovnaná doprava */
  .table-polozky td.pol-cena input { text-align: right; }

  /* Celkem — výrazný řádek oddělený čárou: popis vlevo, částka vpravo */
  .table-polozky td.cena-celkem {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-top: 2px solid var(--border);
    margin-top: 8px;
    padding-top: 12px;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-light);
  }
  .table-polozky td.cena-celkem::before {
    margin-bottom: 0;
    align-self: baseline;
    font-size: 13px;
    color: var(--muted);
  }

  .table-polozky td.actions { text-align: right; padding-top: 8px; }
  .table-polozky tfoot td { display: block; }

  /* Mřížky karet — jistota jednoho sloupce na úzké šířce */
  .cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid, .stats-grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  .form { padding: 16px 12px; }
  .page-header .actions .btn,
  .form-actions .btn,
  .page-header .actions form.inline,
  .page-header .actions form.inline .btn { width: 100%; }
}

/* ─── Verze + prostředí (2.0) ─────────────────────────────── */
.env-banner {
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 5px 12px;
  color: #1c1612;
  background: var(--warning);
}
.env-banner-local { background: var(--muted); color: var(--text-strong); }

.appfoot {
  max-width: 1100px;
  margin: 40px auto 24px;
  padding: 16px 24px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.appfoot .env-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 1px 7px;
  border-radius: 999px;
  color: #1c1612;
  background: var(--warning);
}

/* =========================================================================
   UX-1 — rychlé vystavení faktury (combobox klienta, Pokročilé, dialog)
   ========================================================================= */

/* Combobox výběru klienta */
.combo { position: relative; display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.combo .combo-input { flex: 1; min-width: 220px; }
.combo .combo-add { white-space: nowrap; }
.combo .input-err { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  margin: 0;
  padding: 4px;
  list-style: none;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}
.combo-list li {
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}
.combo-list li.active,
.combo-list li:hover { background: var(--primary-bg); color: var(--text-strong); }

/* Rozbalovací „Pokročilé" pole ve formuláři */
details.advanced {
  margin-top: 18px;
  border-top: 1px dashed var(--border);
  padding-top: 6px;
}
details.advanced > summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 0;
  font-weight: 600;
  color: var(--primary-light);
  user-select: none;
}
details.advanced > summary::-webkit-details-marker { display: none; }
details.advanced > summary::before { content: "▸ "; color: var(--muted); }
details.advanced[open] > summary::before { content: "▾ "; }
details.advanced > summary .muted { font-weight: 400; }
details.advanced > .row:first-of-type { margin-top: 8px; }

/* Dialog „Nový klient" */
dialog.dialog {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 640px;
  width: calc(100% - 32px);
}
dialog.dialog::backdrop { background: rgba(0, 0, 0, .55); }
.dialog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.dialog-card h2 { margin: 0 0 16px; }
.dialog-card .form-actions { margin-top: 20px; }

/* =========================================================================
   UX-2 — hledání, řazení, hromadné akce v /faktury
   ========================================================================= */

.search-input {
  width: 100%;
  max-width: 420px;
  font-size: 15px;
}

/* Řaditelné hlavičky tabulky */
.table th .sort-link {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.table th .sort-link:hover { color: var(--primary-light); }
.table th .sort-link.active { color: var(--primary); }

/* Sloupec s checkboxy pro hromadné akce */
.table .bulk-col { width: 34px; text-align: center; padding-left: 10px; padding-right: 4px; }
.table .bulk-col input { cursor: pointer; }

/* Indikátor odeslání e-mailem */
.sent-mark {
  margin-left: 6px;
  color: var(--ok);
  font-size: 13px;
  cursor: default;
}

/* Lišta hromadných akcí */
.bulk-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  padding: 10px 16px;
  background: var(--surface);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.bulk-bar[hidden] { display: none; }   /* atribut hidden musí přebít display:flex */
.bulk-bar .bulk-info { color: var(--muted); margin-right: 4px; }
.bulk-bar .bulk-info strong { color: var(--text-strong); }

/* Hlavička seznamu faktur 2×2: vlevo titulek + filtry, vpravo akce + výběr období. */
.faktury-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-bottom: 18px;
}
.faktury-head h1 { margin: 0; }
.fh-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fh-right { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.fh-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.fh-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.fh-period { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.fh-filters select { width: auto; min-width: 130px; max-width: 200px; }
.faktury-head .search-wrap { display: flex; align-items: center; }
.faktury-head .search-input { width: 240px; }
@media (max-width: 760px) {
  .faktury-head { flex-direction: column; }
  .fh-right { align-items: stretch; width: 100%; }
  .fh-actions, .fh-period { justify-content: flex-start; }
  .fh-filters select, .faktury-head .search-input { width: 100%; max-width: none; flex: 1 1 100%; }
}

/* Přehled: statistické karty v úzkém levém sloupci, graf vyplní zbytek */
.overview-row { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 18px; }
.overview-row .stats-grid { flex: 0 0 320px; grid-template-columns: 1fr; gap: 10px; margin: 0; align-content: start; }
.overview-row .chart-card { flex: 1; min-width: 0; margin: 0; }
.overview-row .chart-wrap { height: 300px; }
@media (max-width: 900px) {
  .overview-row { flex-direction: column; }
  .overview-row .stats-grid { flex: auto; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .overview-row .chart-wrap { height: 220px; }
}

/* Karta grafu: čistý graf přes celou kartu (bez nadpisu a legendy) */
.chart-card { display: flex; }
/* Pevná výška grafu (Chart.js responsive container) — graf vyplní kartu */
.chart-wrap { flex: 1; min-width: 0; position: relative; height: 260px; }
@media (max-width: 760px) {
  .chart-wrap { height: 200px; }
}

/* =========================================================================
   Výběr období ve stylu Clockify (daterange)
   ========================================================================= */
.daterange { position: relative; display: inline-flex; align-items: stretch; }
.dr-main {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--radius) 0 0 var(--radius);
  padding: 8px 12px; font: inherit; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.dr-ico { opacity: .8; }
.dr-nav {
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-left: none;
  padding: 0 10px; font-size: 16px; line-height: 1; cursor: pointer;
}
.dr-nav:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.dr-main:hover, .dr-nav:hover { border-color: var(--primary); color: var(--primary-light); }

.dr-pop {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 50;
  display: flex;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  overflow: hidden;
}
.dr-pop[hidden] { display: none; }
.dr-presets {
  display: flex; flex-direction: column; gap: 2px;
  padding: 8px; min-width: 170px;
  border-right: 1px solid var(--border); background: var(--surface-2);
}
.dr-presets button {
  text-align: left; background: none; border: none; color: var(--text);
  padding: 8px 12px; border-radius: 6px; font: inherit; font-size: 13px; cursor: pointer;
}
.dr-presets button:hover { background: var(--primary-bg); color: var(--text-strong); }
.dr-presets button.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }

.dr-cals { display: flex; gap: 20px; padding: 14px 16px; }
.dr-month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dr-month-head .dr-mlabel { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--text-strong); }
.dr-mnav { background: none; border: none; color: var(--muted); font-size: 16px; line-height: 1; cursor: pointer; padding: 0 6px; }
.dr-mnav:hover { color: var(--primary); }
.dr-grid { border-collapse: collapse; }
.dr-grid th { color: var(--muted); font-size: 11px; font-weight: 600; padding: 4px 0; width: 32px; }
.dr-grid td { padding: 1px; }
.dr-grid td button {
  width: 32px; height: 30px; background: none; border: none;
  color: var(--text); font: inherit; font-size: 12px; cursor: pointer; border-radius: 6px;
}
.dr-grid td button:hover { background: var(--primary-bg); }
.dr-grid td.dr-out button { color: var(--muted-2); }
.dr-grid td.dr-today button { box-shadow: inset 0 0 0 1px var(--border); }
.dr-grid td.in-range button { background: var(--primary-bg); border-radius: 0; }
.dr-grid td.range-end button { background: var(--primary); color: #1c1612; border-radius: 6px; }
@media (max-width: 760px) {
  .dr-pop { flex-direction: column; left: auto; right: 0; }
  .dr-presets { flex-direction: row; flex-wrap: wrap; border-right: none; border-bottom: 1px solid var(--border); }
  .dr-cals { flex-direction: column; gap: 14px; }
}

/* Kompaktní statistické karty na seznamu faktur (dashboard zůstává velký) */
.stats-compact {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.stats-compact .stat-card { padding: 9px 14px; }
.stats-compact .stat-label { margin-bottom: 2px; }
.stats-compact .stat-value { font-size: 19px; }
.stats-compact .stat-meta { margin-top: 1px; font-size: 11px; }

.hidden-form { display: none; }

/* HTMX loading indikátor (sdílí .htmx-indicator) — drobný spinner u hledání */
#list-spin { margin-left: 8px; color: var(--muted); }

/* =========================================================================
   UX-3 — toasty, dropdown „⋯ Více", focus, loading
   ========================================================================= */

/* Toasty (úspěšná potvrzení) */
.toast-wrap {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
}
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--ok-border);
  border-left: 4px solid var(--ok);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  font-size: 14px;
  animation: toast-in .25s ease;
}
.toast span { flex: 1; color: var(--text-strong); }
.toast-x {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 18px; line-height: 1; padding: 0 2px;
}
.toast-x:hover { color: var(--text-strong); }
.toast-leaving { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* Dropdown „⋯ Více" */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 40;
  min-width: 190px;
  display: none;
  flex-direction: column;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
}
.dropdown.open .dropdown-menu { display: flex; }
.dropdown-menu a,
.dropdown-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 6px;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.dropdown-menu form { margin: 0; }
.dropdown-menu a:hover,
.dropdown-menu button:hover { background: var(--primary-bg); color: var(--text-strong); }
.dropdown-menu .menu-danger { color: var(--danger); }
.dropdown-menu .menu-danger:hover { background: var(--danger-bg); color: var(--danger); }

/* Viditelný focus pro ovládání klávesnicí */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:focus-visible { outline-offset: 3px; }

/* Ztlumení výsledků během HTMX dotazu */
#filter-form.htmx-request ~ #vysledky { opacity: .55; transition: opacity .12s ease; }

/* Detail faktury: sekundární akce jako samostatná tlačítka na široké obrazovce
   (display:contents → splynou s flexem .actions), dropdown „⋯ Více" jen na úzké. */
.actions-secondary { display: contents; }
.actions-overflow { display: none; }
@media (max-width: 760px) {
  .actions-secondary { display: none; }
  .actions-overflow { display: inline-block; }
}

/* =========================================================================
   2.4 — Detail faktury: kopírovací tlačítka + náhled PDF v modalu
   ========================================================================= */

/* Kopírovací tlačítko u hodnoty (VS, účet, IBAN, částka) */
.copy-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  border-radius: 6px;
  padding: 1px 7px;
  margin-left: 6px;
  font-size: 12px;
  line-height: 1.4;
  cursor: pointer;
  vertical-align: middle;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
}
.copy-btn:hover { color: var(--text); border-color: var(--primary); }
.copy-btn.copied { color: var(--ok); border-color: var(--ok); }
/* Dlouhé hodnoty (IBAN) se zalomí uvnitř karty místo přetečení přes okraj. */
.card dl.kv dd { overflow-wrap: anywhere; }

/* Náhled PDF v modalu */
dialog.pdf-dialog {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0;
  border-radius: 12px;
  width: min(900px, 94vw);
  height: min(90vh, 1100px);
  max-width: 94vw;
  overflow: hidden;
}
dialog.pdf-dialog::backdrop { background: rgba(0, 0, 0, .6); }
.pdf-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.pdf-dialog-head strong { font-size: 15px; }
.pdf-dialog-actions { display: flex; gap: 8px; }
.pdf-dialog-frame {
  width: 100%;
  height: calc(100% - 54px);
  border: 0;
  display: block;
  background: #fff;
}

/* =========================================================================
   2.5 — Akční dashboard: blok „Vyžaduje pozornost"
   ========================================================================= */
.akce-card { border-left: 3px solid var(--primary); }
.akce-list { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.akce-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--border);
}
.akce-item:last-child { border-bottom: 0; }
.akce-ico { flex: 0 0 auto; font-size: 15px; line-height: 1; width: 20px; text-align: center; }
.akce-ico-red { color: #d06a5a; }
.akce-ico-blue { filter: grayscale(.1); }
.akce-ico-amber { filter: grayscale(.05); }
.akce-text { flex: 1 1 auto; min-width: 0; }
.akce-text .mono { white-space: nowrap; }
.akce-item .btn { flex: 0 0 auto; }
@media (max-width: 560px) {
  .akce-item { flex-wrap: wrap; gap: 6px 10px; }
  .akce-item .btn { margin-left: 32px; }
}

/* =========================================================================
   2.6 — Automatické upomínky: checkbox řádek + trojice polí
   ========================================================================= */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 10px 0;
  cursor: pointer;
}
.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
  accent-color: var(--primary);
}
.check-row > span { line-height: 1.4; }
.check-row small { display: block; margin-top: 2px; }
.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 6px;
}
@media (max-width: 640px) {
  .form-grid-3 { grid-template-columns: 1fr; }
}
