/* ══════════════════════════════════════════════════════════════
   DochádzkaPRO — téma „Moduly“ (fáza 1: rám aplikácie + admin „Dnes“)
   Biele zaoblené plochy na svetlosivom, atrament #14161A, Manrope s tabuľkovými číslami,
   stavby ako farebné moduly, oranžová vyhradená pre „Chýba“, žltá pre mesiac a hlavnú akciu.
   Načítava sa ako posledný štýl, ostatné súbory nemení.
   ══════════════════════════════════════════════════════════════ */

:root {
  --bg: #F1F3F6;
  --surface: #FFFFFF;
  --card: #FFFFFF;
  --border: #E4E7EC;
  --border-md: #D3D8DF;
  --text: #14161A;
  --text-2: #4A515C;
  --text-3: #626A77;
  --muted: #4A515C;

  --ink: #14161A;
  --ink-hover: #262A31;
  --brand: #14161A;
  --brand-h: #262A31;
  --accent: #2559E8;
  --blue: #2559E8;
  --red: #B42318;
  --danger: #B42318;

  --st-atfirm: #12845F;
  --st-onsite: #2559E8;
  --st-left: #9AA2AE;
  --st-absent: #D9480F;
  --sun: #FFC23D;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 24px;
  --shadow-xs: 0 1px 2px rgba(20,22,26,.05);
  --shadow-sm: 0 2px 6px rgba(20,22,26,.06), 0 1px 2px rgba(20,22,26,.04);
  --shadow-md: 0 8px 20px rgba(20,22,26,.08), 0 2px 4px rgba(20,22,26,.04);
  --font: 'Manrope', system-ui, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-feature-settings: "tnum", "cv11";
}
::selection { background: #FFE3A3; color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
* { scrollbar-width: thin; scrollbar-color: #C9CFD8 transparent; }

/* ── Písmo všade, kde ho staré štýly nastavili natvrdo ── */
.btn, .nav-item, input, select, textarea, button, .card-title, .page-title, .logo,
.stat-val, .modal-title, th, td, .badge { font-family: var(--font); }

/* ══ Rám: bočný panel ══ */
.sidebar {
  background: var(--bg);
  border-right: none;
  width: 248px;
  padding: 18px 14px 14px;
}
.sidebar-logo { border-bottom: none; padding: 4px 8px 22px; }
.sidebar-logo .logo, .mobile-topbar .logo { color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -.4px; }
.sidebar-logo .logo span, .mobile-topbar .logo span { color: inherit; } /* bez farby — modrá znamená „na stavbe“ */
.sidebar-tag { color: var(--text-3); letter-spacing: 0; text-transform: none; font-size: 12px; font-weight: 500; }
.sidebar .hamburger { color: var(--text-2); }
.sidebar .hamburger:hover { background: #fff; color: var(--ink); }
.nav-section { display: none; }

.nav-item {
  margin: 1px 0; width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 15px; font-weight: 600;
  color: var(--text-2);
  letter-spacing: 0;
}
.nav-item svg { opacity: 1; color: var(--tone, #9AA2AE); width: 17px; height: 17px; }
.nav-item:hover { color: var(--ink); background: rgba(255,255,255,.7); }
.nav-item.active { color: var(--ink); background: #fff; font-weight: 700; box-shadow: var(--shadow-sm); }
.nav-item.active svg { color: var(--tone, var(--ink)); }
/* Každá hlavná sekcia má svoj tón */
.nav-item[data-page="dashboard"]     { --tone: #2559E8; }
.nav-item[data-page="workers"]       { --tone: #12845F; }
.nav-item[data-page="attendance"]    { --tone: #6B4EE6; }
.nav-item[data-page="sites"],
.nav-item[data-page="projects"]      { --tone: #D9480F; }
.nav-item[data-page="billing"],
.nav-item[data-page="reports"]       { --tone: #C98A00; }
#billingBadge { background: var(--sun) !important; color: var(--ink) !important; }

.sidebar-footer { border-top: 1px solid var(--border); padding: 14px 6px 4px; }
.sidebar-footer .btn { background: #fff; color: var(--text-2); border: 1px solid var(--border); font-weight: 600; }
.sidebar-footer .btn:hover { color: var(--ink); border-color: var(--border-md); background: #fff; }
.user-avatar { background: #EEF1F5; color: var(--ink); font-weight: 800; }
.user-name { color: var(--ink); font-weight: 700; font-size: 14px; }
.user-role { color: var(--text-3); font-size: 12px; }
.sidebar-LangSwitcher { border-top: 1px solid var(--border); }

.main { margin-left: 248px; }
.page { padding: 26px 30px 40px; max-width: 1480px; }

/* Mobilná horná lišta */
.mobile-topbar { background: var(--bg); border-bottom: none; padding: 12px 14px; }
.mobile-logout { background: #fff; border: 1px solid var(--border); color: var(--text-2); border-radius: 10px; font-family: var(--font); font-weight: 600; }

/* ══ Základné prvky ══ */
.page-title { font-size: 30px; font-weight: 800; letter-spacing: -.8px; }
.card { border: none; border-radius: var(--r-lg); box-shadow: var(--shadow-xs); padding: 20px 22px; }
.card:hover { border-color: transparent; box-shadow: var(--shadow-xs); }
.card-title { font-size: 16px; font-weight: 800; letter-spacing: -.2px; }

.btn { border-radius: 12px; font-weight: 600; }
.btn-primary { background: var(--ink); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink-hover); box-shadow: var(--shadow-md); }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--border-md); }
.btn:focus-visible { outline-color: var(--accent); }

input, select, textarea { border-radius: 12px; border-color: var(--border-md); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,89,232,.14); }

th { color: var(--text-3); letter-spacing: .3px; font-weight: 700; }
td { border-bottom-color: #EEF0F3; }
.modal { border-radius: var(--r-xl); }
.badge { letter-spacing: .2px; }

/* Okná sa otvárajú plynulo, bez odrazu */
.modal { animation-timing-function: cubic-bezier(.16,1,.3,1) !important; }

/* ══ DNES ══ */
.dnes-head { margin-bottom: 18px; }
.dnes-greet { font-size: 14px; font-weight: 600; color: var(--text-3); min-height: 20px; }
.dnes-title { font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.15; margin-top: 2px; }
.dnes-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.dnes-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dnes-side { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 20px; }

/* Počty */
#statsGrid.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 0; }
.stat {
  all: unset; box-sizing: border-box; cursor: pointer;
  background: #fff; border-radius: var(--r-lg); padding: 16px 18px 14px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow .2s cubic-bezier(.2,.8,.2,1), transform .2s cubic-bezier(.2,.8,.2,1);
}
.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.stat b { display: block; font-size: 44px; font-weight: 800; letter-spacing: -1.6px; line-height: 1; }
.stat span { display: flex; align-items: center; gap: 7px; margin-top: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.stat span i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); flex-shrink: 0; }
.stat em { font-style: normal; color: var(--text-3); font-weight: 500; }
.s-present { --c: var(--st-atfirm); }
.s-onsite  { --c: var(--st-onsite); }
.s-left    { --c: var(--st-left); }
.s-absent  { --c: var(--st-absent); }
.s-absent b { color: var(--st-absent); }
.s-present b { color: var(--st-atfirm); }

/* Moduly */
.mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; align-items: start; }
.mod { background: #fff; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-xs); animation: mod-in .45s cubic-bezier(.16,1,.3,1) both; }
.mod:nth-child(2) { animation-delay: .04s } .mod:nth-child(3) { animation-delay: .08s }
.mod:nth-child(4) { animation-delay: .12s } .mod:nth-child(n+5) { animation-delay: .16s }
@keyframes mod-in { from { opacity: .001; transform: translateY(8px) scale(.985); } }
@media (prefers-reduced-motion: reduce) { .mod { animation: none; } }

.mod-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  background: var(--mod, #4A515C); color: #fff; padding: 14px 16px 15px; min-height: 72px;
}
.mod-head b { display: block; font-size: 16px; font-weight: 800; line-height: 1.25; letter-spacing: -.2px; }
.mod-head small { display: block; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.82); margin-top: 3px; }
.mod-head > span { font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.mod-firm { --mod: var(--st-atfirm); }
.mod-missing { --mod: #D9480F; }
.mod-quiet { --mod: #E7EAEF; color: var(--ink); }
.mod-quiet small { color: var(--text-3); }

.mod-body { padding: 6px 8px 10px; }
.person {
  all: unset; box-sizing: border-box; cursor: pointer; width: 100%;
  display: flex; align-items: center; gap: 11px; padding: 8px; border-radius: 14px;
  transition: background .15s;
}
.person:hover { background: #F4F6F9; }
.person:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; background: #EEF1F5; color: var(--ink);
  font-size: 12.5px; font-weight: 800;
}
.person-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.person-txt b { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-txt span { font-size: 12.5px; font-weight: 500; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person em { font-style: normal; font-weight: 800; font-size: 15px; }
.person.is-muted { opacity: .55; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--st-atfirm); flex-shrink: 0; box-shadow: 0 0 0 3px rgba(18,132,95,.18); }
.mini-btn {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  background: var(--ink); color: #fff; text-decoration: none;
  border-radius: 10px; padding: 7px 11px; font-size: 13.5px; font-weight: 700;
}
.mini-btn:hover { background: var(--ink-hover); }
.mod-empty { padding: 12px 8px; font-size: 13.5px; color: var(--text-3); font-weight: 500; }
.idle-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 12px 14px; }
.idle-site { display: inline-flex; align-items: center; gap: 7px; background: #F4F6F9; border-radius: 8px; padding: 6px 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.idle-site i { width: 8px; height: 8px; border-radius: 3px; }

/* Týždeň */
.week-card .chart-wrap { height: 190px; }

/* Mesiac — tmavá karta */
.month-card { background: var(--ink); color: #fff; border-radius: 24px; padding: 20px 20px 18px; min-height: 120px; }
.month-card small { font-size: 13.5px; color: #A5ADB9; font-weight: 600; }
.month-hours { display: block; font-size: 50px; font-weight: 800; letter-spacing: -1.8px; line-height: 1.05; margin: 6px 0 4px; }
.month-card p { font-size: 13.5px; color: #C9CFD8; font-weight: 500; }
.month-bar { height: 8px; border-radius: 8px; background: #2A2E36; overflow: hidden; margin: 14px 0 6px; }
.month-bar i { display: block; height: 100%; background: var(--sun); border-radius: 8px; }
.month-pending { margin-top: 6px; color: #fff !important; font-weight: 700 !important; }
.month-cta {
  all: unset; box-sizing: border-box; cursor: pointer; display: block; width: 100%; text-align: center;
  margin-top: 16px; background: var(--sun); color: var(--ink); border-radius: 12px; padding: 12px; font-weight: 800; font-size: 15px;
  transition: filter .15s;
}
.month-cta:hover { filter: brightness(1.05); }
.month-cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Udalosti */
.events { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.events li { display: grid; grid-template-columns: 44px 8px 1fr; gap: 10px; align-items: baseline; padding: 6px 0; font-size: 13.5px; color: var(--text-2); line-height: 1.4; }
.events time { font-weight: 800; color: var(--ink); }
.events li > i { width: 8px; height: 8px; border-radius: 3px; align-self: center; }
.events b { color: var(--ink); font-weight: 700; }
.events-empty { color: var(--text-3) !important; display: block !important; }

/* ══ Mobil ══ */
@media (max-width: 1100px) {
  /* Jeden stĺpec: počty → moduly → mesiac a udalosti → týždeň */
  .dnes-layout { display: flex; flex-direction: column; gap: 16px; }
  .dnes-main { display: contents; }
  #statsGrid { order: 1; } .mods { order: 2; } .dnes-side { order: 3; } .week-card { order: 4; }
  .dnes-side { position: static; display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
}
@media (max-width: 768px) {
  .main { margin-left: 0; }
  .sidebar { background: #fff; width: 78vw; max-width: 300px; }
  .page { padding: 6px 14px 32px; }
  .dnes-title { font-size: 26px; }
  #statsGrid.stats-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .stat { padding: 12px 8px 10px; text-align: center; border-radius: 14px; }
  .stat b { font-size: 26px; letter-spacing: -.8px; }
  .stat span { justify-content: center; font-size: 12px; gap: 5px; margin-top: 5px; }
  .stat em { display: none; }
  .mods { grid-template-columns: 1fr; }
  .dnes-side { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════
   FÁZA 2 — zvyšok admin panela
   ══════════════════════════════════════════════════════════════ */

/* Hlavičky stránok: podnadpis ako veta, nie veľkými písmenami */
.page-sub { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--text-3); margin: 2px 0 18px; }
.page > .flex.justify-between { margin-bottom: 0 !important; align-items: flex-start !important; gap: 16px; }
.page > .flex.justify-between .page-sub { margin-bottom: 18px; }

/* Štítky: čitateľné, bez veľkých písmen */
.badge { text-transform: none; letter-spacing: 0; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 8px; }
.chip {
  display: inline-flex; align-items: center; white-space: nowrap;
  background: var(--chip-bg, #EEF1F5); color: var(--chip-fg, var(--text-2));
  font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: 8px;
}
.chip-dept { --chip-bg: #EEF1F5; --chip-fg: #3A4250; }
.muted-dash { color: var(--text-3); }

/* Tabuľky */
.table-wrap { border-radius: 14px; }
thead tr { background: transparent !important; }
th { background: transparent !important; text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 700; color: var(--text-3); padding: 10px 12px; border-bottom: 1px solid var(--border) !important; }
td { font-size: 14px; padding: 12px; }
tbody tr:last-child td { border-bottom: none; }
.gps-small { font-size: 12px; color: var(--text-3); max-width: 200px; }
td .btn { font-size: 13.5px; padding: 7px 11px; border-radius: 10px; font-weight: 600; }
td .btn-secondary, td .btn-edit { background: #fff; color: var(--ink); border: 1px solid var(--border-md); }
td .btn-secondary:hover, td .btn-edit:hover { background: #F4F6F9; }
td .btn-danger, td .btn-del { background: transparent; color: #B42318; border: 1px solid transparent; }
td .btn-danger:hover, td .btn-del:hover { background: #FDECEA; }
td .btn-warn, td .btn-deact { background: #FFF4EC; color: #B5470F; border: 1px solid transparent; }

/* Filtre v jednom riadku */
.search-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 16px; }
.search-bar input, .search-bar select { margin-bottom: 0; background: #fff; }

/* Čísla a čas bežným písmom (nie písmom s pevnou šírkou) */
input[type="number"], input[type="time"], input[type="tel"], input[type="date"], input[type="month"] { font-family: var(--font); }
input::placeholder, textarea::placeholder { color: #626A77; }

/* Formuláre v oknách */
.form-section-label { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 800; color: var(--ink); border-bottom: none; margin: 18px 0 6px; padding: 0; }
.modal label, .card label { font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.modal { max-width: 560px; padding: 24px; }
.modal-title { font-size: 20px; font-weight: 800; letter-spacing: -.4px; }
.modal-close-btn { border-radius: 10px; }
.modal-footer { border-top: none; }
#wClientRateWrap > div { font-size: 12.5px !important; line-height: 1.45; }

/* Dochádzka — návštevy stavieb */
.site-visit-row { padding: 4px 0 !important; }
.visit-name { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.visit-name i { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.visit-meta { font-size: 12.5px; color: var(--text-3); padding-left: 17px; }
.visit-live { color: var(--st-onsite); font-weight: 700; }
.att-hours { font-weight: 800; }

/* Stavby */
.site-geo { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.site-geo.is-warn { color: #B5470F; }

/* Roly — počty ako na Dnes */
.stat-card.role-stat { border: none !important; border-radius: var(--r-lg); box-shadow: var(--shadow-xs); cursor: pointer; }
.stat-card.role-stat::before { display: none; }
.stat-card.role-stat .stat-val { font-size: 44px; font-weight: 800; letter-spacing: -1.4px; color: var(--ink); }
.stat-card.role-stat .stat-label { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; color: var(--text-2); }
.stat-card.role-stat:hover { box-shadow: var(--shadow-md); }

/* Oznámenia — stav upozornení v telefóne */
.push-on { color: var(--st-atfirm); display: inline-flex; }
.push-off { color: #9AA2AE; display: inline-flex; }
#notifWorkerList tr:hover td { background: #F7F8FA; }
#notifWorkerList input[type="checkbox"] { accent-color: var(--ink) !important; }

/* Reporty */
.rep-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rep-sum > div { background: #F4F6F9; border-radius: 14px; padding: 14px 16px; }
.rep-sum b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.rep-sum span { display: flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-top: 2px; }
.rep-sum span i { width: 8px; height: 8px; border-radius: 50%; }
.rep-sum .is-ok span i { background: var(--st-atfirm); }
.rep-sum .is-wait span i { background: var(--st-absent); }
.rep-sum .is-wait b { color: var(--st-absent); }
.appr { margin-left: 8px; }
.rep-section-label, .rep-period-label { font-size: 13.5px !important; letter-spacing: 0 !important; text-transform: none !important; font-weight: 700; color: var(--text-3); }
.rep-card { border: none !important; border-radius: 20px !important; box-shadow: var(--shadow-xs); }
.rep-card-meta { font-size: 12.5px !important; color: var(--text-3) !important; }
.rep-card-title { font-size: 15px !important; font-weight: 800 !important; }
.rep-total-hours { font-size: 16px !important; font-weight: 800 !important; color: var(--ink) !important; }
.rep-total-label { font-size: 12px !important; text-transform: none !important; letter-spacing: 0 !important; color: var(--text-3) !important; }
.rep-sub-total, .rep-visit-dur { color: var(--ink) !important; font-weight: 800; }
.rep-visit-row { font-size: 13.5px !important; }

/* Výstrahy a mapa v okne stavby */
#billingWarn { color: #8A4B00 !important; font-size: 13.5px !important; background: #FFF6E5 !important; border-color: #FFD68A !important; border-radius: 12px !important; }
.site-geo-status { font-size: 12.5px; color: var(--text-3); }
#siteMap { border-radius: 14px; }

/* ══ Mobil — fáza 2 ══ */
@media (max-width: 768px) {
  .page-title { font-size: 26px; }
  /* Tabuľky sa dajú posúvať do strany, nič sa neoreže */
  .table-wrap > table { min-width: 620px; }
  /* Dochádzka ako karty */
  .table-wrap > table:has(.att-row) { min-width: 0; }
  table:has(.att-row) thead { display: none; }
  table:has(.att-row), table:has(.att-row) tbody, .att-row, .att-row td { display: block; width: 100%; }
  .att-row { position: relative; padding: 14px 2px; border-bottom: 1px solid var(--border); display: grid !important; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
  .att-row td { border: none !important; padding: 0 !important; }
  .att-row td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 700; color: var(--text-3); margin-bottom: 1px; }
  .att-who, .att-sites { grid-column: 1 / -1; }
  .att-status { position: absolute; top: 14px; right: 2px; width: auto !important; }
  .att-status::before { display: none !important; }
  .att-act { grid-column: 1 / -1; }
  .att-act .btn { width: 100%; justify-content: center; }
  .rep-sum { grid-template-columns: 1fr; }
  .modal { padding: 20px 18px; }
}
#wClientRateWrap > div { margin-bottom: 12px; }
.rep-chevron { display: inline-flex; color: var(--text-3); transition: transform .2s cubic-bezier(.16,1,.3,1); }
.role-box { background: #F4F6F9; border-radius: 14px; padding: 12px 14px; }
.role-box-t { font-weight: 800; font-size: 14px; color: var(--ink); margin-bottom: 2px; }
.role-box code { color: var(--ink); background: #fff; padding: 1px 5px; border-radius: 8px; }
input::placeholder, textarea::placeholder { color: #626A77; }
.btn-accent, .btn-amber { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-accent:hover, .btn-amber:hover { background: var(--ink-hover); box-shadow: var(--shadow-md); }

/* Upozornenie: nepridelení živnostníci */
.assign-warn { display: flex; gap: 12px; align-items: flex-start; background: #FFF4EC; border-radius: 20px; padding: 14px 16px; margin-bottom: 16px; }
.assign-warn[hidden] { display: none; }
.assign-warn-ico { width: 36px; height: 36px; border-radius: 12px; background: #fff; color: #B5470F; display: grid; place-items: center; flex-shrink: 0; }
.assign-warn b { font-size: 15px; font-weight: 800; color: var(--ink); }
.assign-warn p { font-size: 14px; color: var(--text-2); margin-top: 2px; line-height: 1.5; }
.assign-warn em { font-style: normal; font-weight: 700; color: var(--ink); }

.badge-red { color: #B42318; }
input::placeholder, textarea::placeholder { color: #626A77; }

/* ══ Tlačidlá: jednotná škála vnútorných okrajov a výšok (pohodlné na ťuknutie) ══ */
.btn { padding: 10px 18px; min-height: 42px; gap: 8px; justify-content: center; line-height: 1.2; }
.btn-sm { padding: 8px 14px; min-height: 36px; font-size: 13.5px; }
.btn-md { padding: 11px 20px; min-height: 44px; font-size: 14px; }
.btn-lg { padding: 12px 22px; min-height: 48px; font-size: 15px; }
.btn-primary { padding: 11px 20px !important; }
.btn-primary.btn-sm { padding: 8px 14px !important; }
.btn-primary.btn-lg { padding: 12px 22px !important; }
td .btn { padding: 8px 14px; min-height: 36px; font-size: 13.5px; }
td .flex.gap-2, td > div[style*="display:flex"] { gap: 8px !important; flex-wrap: wrap; }
.sidebar-footer .btn { min-height: 40px; padding: 9px 14px; margin-top: 0 !important; }
.sidebar-footer { gap: 8px; }
.mobile-logout { padding: 9px 14px; min-height: 40px; }
.pw-gen-row .btn { height: auto; min-height: 44px; padding: 10px 16px; }
.modal-footer { gap: 10px; padding-top: 6px; }
.modal-footer .btn { min-height: 46px; }
@media (max-width: 768px) {
  td .btn, .table-wrap td .btn { padding: 8px 14px !important; min-height: 38px; }
}
.worker-card-actions .btn { padding: 9px 14px; min-height: 40px; font-size: 13.5px; font-weight: 600; font-family: var(--font); border-radius: 12px; }
.worker-card-actions .btn-edit { background: #fff; color: var(--ink); border-color: var(--border-md); }
.worker-card-actions .btn-danger, .worker-card-actions .btn-del { background: transparent; color: #B42318; border-color: transparent; }

/* ══ Mobil: viac vzduchu pod hornou lištou, počty na celú šírku ══ */
@media (max-width: 768px) {
  .mobile-topbar { padding: 12px 16px; min-height: 64px; box-shadow: 0 1px 0 rgba(20,22,26,.06); }
  .page { padding: 22px 16px 36px; }
  .dnes-head { margin-bottom: 20px; }
  #statsGrid.stats-grid { width: 100%; align-self: stretch; }
}
@media (max-width: 768px) {
  /* Dochádzka na mobile vždy po kartách — aj prázdna (bez orezanej hlavičky) */
  .table-wrap > table:has(#attendanceTable) { min-width: 0; }
  table:has(#attendanceTable) thead { display: none; }
  #attendanceTable td[colspan] { display: block; text-align: center; white-space: normal; }
}

/* ══ Úpravy po záverečnej kontrole ══ */
/* Moduly ako murovanie: celé bunky v stĺpcoch, žiadne prázdne diery pod kratšími modulmi */
.mods { display: block; columns: 3 230px; column-gap: 14px; }
.mods > .mod { break-inside: avoid; margin-bottom: 14px; display: block; width: 100%; }
.mods > .mod-empty { column-span: all; }

/* Mobil a úzke obrazovky: všetky karty na celú šírku */
@media (max-width: 1100px) {
  .dnes-layout > *, .mods, .week-card, .dnes-side { width: 100%; }
  .dnes-side { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .mods { columns: 1; }
  .dnes-side { display: flex; flex-direction: column; gap: 16px; }
  .dnes-side > * { width: 100%; }
  .week-card .chart-wrap { height: 200px; }
}

/* Štítky profesií neutrálne — farba patrí stavom (zelená = prítomný, oranžová = chýba) */
.chip { --chip-bg: #EEF1F5 !important; --chip-fg: #3A4250 !important; }

/* Detail živnostníka: nadpisy sekcií ako veta, štítky bez veľkých písmen */
.wd-section { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 800; color: var(--ink); }
.wd-section span { color: var(--text-3); font-weight: 500; }
.wd-stat { border: none; background: #F4F6F9; border-radius: 14px; }
.wd-today, .wd-days { border-color: #EEF0F3; border-radius: 14px; }

/* Dochádzka */
.visit-place { font-size: 12.5px; color: var(--text-3); padding-left: 17px; }
.visit-place em { font-style: normal; font-weight: 700; color: var(--text-2); }
.map-link { color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; gap: 2px; font-weight: 600; }
.att-row td[data-label="Dátum"], .att-row td[data-label="Odpracované"], .att-hours { white-space: nowrap; }

/* Toast s ikonou */
.app-toast { display: inline-flex; align-items: center; gap: 8px; }

/* Malé texty a riadkovanie */
@media (max-width: 768px) { .stat span { font-size: 12px; } }
.dnes-title, .page-title { line-height: 1.2; }
.mod-head b { line-height: 1.3; }
/* Úzky modul: Zavolať len ako ikona, aby sa mená neorezávali */
.mod { container-type: inline-size; }
@container (max-width: 300px) {
  .mini-btn .lbl { display: none; }
  .mini-btn { padding: 9px; border-radius: 12px; }
}
@media (max-width: 768px) {
  #statsGrid .stat { padding: 12px 4px 10px; }
  #statsGrid .stat span { gap: 4px; white-space: nowrap; }
}

/* ── Kolo 2 záverečnej kontroly ── */
/* Chýba dnes a Bez ľudí dnes cez celú šírku pod modulmi stavieb: Zavolať s textom, stavby v jednom riadku */
.mods > .mod-wide { column-span: all; }
.mod-wide .mod-body:not(.idle-list) { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 2px 14px; }
.mod-wide .idle-list { padding: 12px 14px 14px; }
.idle-site { white-space: nowrap; }
@container (max-width: 300px) { .mini-btn .lbl { display: inline; } .mini-btn { padding: 7px 11px; } }
@container (max-width: 220px) { .mini-btn .lbl { display: none; } .mini-btn { padding: 9px; } }
@media (max-width: 768px) { .idle-site { white-space: normal; } }

/* Čitateľné drobné texty (min. 12 px) */
.worker-card-meta { font-size: 12.5px; font-family: var(--font); color: var(--text-3); }
.user-badge { font-size: 12.5px; color: var(--text-3); }
.user-badge strong { color: var(--ink); font-size: 14px; font-weight: 700; }
.wd-stat-label { font-size: 12.5px; }
.btn { line-height: 1.3; }
.wd-arrow { display: inline-grid; place-items: center; }
/* Chýba dnes v úzkom stĺpci: Zavolať (s textom) pod menom, mená sa neorezávajú */
@container (max-width: 320px) {
  .person:has(.mini-btn) { flex-wrap: wrap; row-gap: 6px; }
  .person:has(.mini-btn) .person-txt { flex: 1 1 calc(100% - 50px); }
  .person:has(.mini-btn) .mini-btn { margin-left: 47px; }
  .mini-btn .lbl { display: inline; }
  .mini-btn { padding: 7px 12px; }
}
/* Murovanie modulov cez JS (layoutModules): mriežka stĺpcov, moduly pod sebou bez dier */
.mods { columns: auto !important; display: flex; flex-direction: column; gap: 14px; }
.mods-cols { display: grid; gap: 14px; align-items: start; }
.mods-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mods > .mod, .mods-col > .mod { margin-bottom: 0; }
.mods { align-items: stretch; }
.mods-cols { width: 100%; }
/* Riadok profesia · od čas sa v úzkom module zalomí namiesto orezania */
.person-txt span { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.35; }

/* Toast v paletе témy */
.app-toast { background: var(--ink); }
.app-toast.err { background: #B42318; }

/* ── Stavby ako farebné plochy (Stavby, Dochádzka) ── */
.site-row-name { display: flex; align-items: flex-start; gap: 12px; }
.site-tile { width: 34px; height: 34px; border-radius: 12px; background: var(--site); color: #fff; display: grid; place-items: center; flex-shrink: 0; }
.site-rep { padding: 0 !important; overflow: hidden; margin-bottom: 12px; border: none !important; border-radius: 20px !important; box-shadow: var(--shadow-xs); background: #fff; }
.site-rep-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; background: var(--site); color: #fff; cursor: pointer; }
.site-rep-name { font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.site-rep-meta { font-size: 12.5px; color: rgba(255,255,255,.85); font-weight: 600; }
.site-rep-hours { font-size: 22px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }
.site-rep-head .rep-chevron { color: #fff; }
.site-rep .site-card-body { border-top: none !important; padding-top: 12px !important; }
.visit-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 8px; border-radius: 8px; font-size: 13.5px; font-weight: 700; color: var(--ink); background: color-mix(in srgb, var(--site) 12%, #fff); }
.visit-chip i { width: 9px; height: 9px; border-radius: 3px; background: var(--site); flex-shrink: 0; }
.visit-meta, .visit-place { padding-left: 4px; margin-top: 3px; }

/* ── Schvaľovanie hodín (admin): 1. majster → 2. admin odklepne ── */
.ap-bar { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:4px 0 16px; }
.ap-bar select { width:auto; min-width:240px; margin:0; font-weight:700; }
.ap-week { display:flex; align-items:center; gap:8px; }
.ap-nav { min-height:42px; width:42px; padding:0; display:inline-flex; align-items:center; justify-content:center; }
.ap-week-label { font-size:16px; font-weight:800; min-width:190px; text-align:center; font-variant-numeric:tabular-nums; }
.ap-flow { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:14px; font-size:13.5px; font-weight:600; color:var(--text-2); }
.ap-step { display:inline-flex; align-items:center; gap:8px; background:#fff; border-radius:12px; padding:6px 12px 6px 6px; box-shadow:var(--shadow-xs); color:var(--ink); }
.ap-step b { width:22px; height:22px; border-radius:50%; background:var(--ink); color:#fff; display:inline-grid; place-items:center; font-size:12px; }
.ap-arrow { color:var(--text-3); }
.ap-flow-note { color:var(--text-3); }

.ap-summary { display:flex; flex-wrap:wrap; align-items:stretch; gap:12px; margin-bottom:16px; }
.ap-stat { background:#fff; border-radius:14px; padding:12px 18px; min-width:130px; box-shadow:var(--shadow-xs); }
.ap-stat b { display:block; font-size:26px; font-weight:800; letter-spacing:-0.6px; font-variant-numeric:tabular-nums; }
.ap-stat span { display:flex; align-items:center; gap:6px; font-size:13.5px; font-weight:600; color:var(--text-2); }
.ap-cta { margin-left:auto; align-self:center; background:var(--sun); color:var(--ink); border:0; min-height:46px; padding:10px 18px; font-weight:800; }
.ap-cta:hover { background:#FFE3A3; }

/* stavové bodky — farba len pre význam */
.ap-dot { width:8px; height:8px; border-radius:50%; display:inline-block; flex:none; background:var(--st-left); }
.is-ready .ap-dot { background:var(--sun); }
.is-wait .ap-dot { background:var(--st-left); }
.is-passed .ap-dot { background:transparent; box-shadow:inset 0 0 0 2px var(--st-atfirm); }
.is-final .ap-dot { background:var(--st-atfirm); }
.is-rejected .ap-dot { background:var(--danger); }
.is-running .ap-dot { background:var(--st-onsite); }

.ap-card { background:#fff; border-radius:20px; box-shadow:var(--shadow-xs); overflow:hidden; }
.ap-scroll { overflow-x:auto; }
.ap-table { width:100%; border-collapse:separate; border-spacing:0; min-width:640px; }
.ap-table th, .ap-table td { padding:8px 6px; border-bottom:1px solid #EEF0F3; text-align:center; vertical-align:middle; }
.ap-table thead th { font-size:12.5px; font-weight:700; color:var(--text-2); background:#fff; }
.ap-table tbody tr:last-child > * { border-bottom:0; }
.ap-dh span { display:block; font-size:12px; font-weight:600; color:var(--text-3); }
.ap-dh.is-today { color:var(--ink); }
.ap-dh.is-today span { color:var(--st-onsite); }
.ap-who-col { text-align:left !important; padding-left:20px !important; position:sticky; left:0; background:#fff; z-index:1; min-width:170px; }
.ap-person { font-size:15px; font-weight:700; color:var(--ink); white-space:nowrap; }
.ap-prof { font-size:12.5px; font-weight:600; color:var(--text-3); }
.ap-total { font-size:14px; font-weight:800; font-variant-numeric:tabular-nums; color:var(--ink); }
.ap-act { text-align:right !important; padding-right:20px !important; white-space:nowrap; }
.ap-row-ok { display:inline-flex; align-items:center; gap:6px; font-size:13.5px; font-weight:700; color:var(--st-atfirm); }
.ap-row-wait { font-size:13.5px; font-weight:600; color:var(--text-3); }

.ap-c { min-width:64px; }
.ap-c.is-none span { color:#C9CFD8; font-weight:700; }
.ap-cell { width:100%; min-height:48px; border:0; border-radius:12px; cursor:pointer; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px;
  font:inherit; background:#F7F8FA; color:var(--ink); transition:transform .12s ease-out, box-shadow .12s ease-out; }
.ap-cell:hover { transform:translateY(-1px); box-shadow:var(--shadow-sm); }
.ap-cell:focus-visible { outline:2px solid var(--st-onsite); outline-offset:2px; }
.ap-h { font-size:14px; font-weight:800; font-variant-numeric:tabular-nums; }
.ap-ico { height:14px; display:inline-flex; font-style:normal; }
.ap-cell.is-final { background:#E6F4EE; color:var(--st-atfirm); }
.ap-cell.is-final .ap-h { color:var(--ink); }
.ap-cell.is-ready { background:#FFF6E5; box-shadow:inset 0 0 0 1.5px #FFD68A; color:#8A4B00; }
.ap-cell.is-ready .ap-h { color:var(--ink); }
.ap-cell.is-wait { background:#F7F8FA; color:var(--text-3); }
.ap-cell.is-passed { background:#fff; box-shadow:inset 0 0 0 2px #E6F4EE; color:var(--st-atfirm); }
.ap-cell.is-wait .ap-ico::before { content:""; width:10px; height:10px; border-radius:50%; border:2px solid var(--st-left); }
.ap-cell.is-rejected { background:#FDECEA; color:var(--danger); }
.ap-cell.is-running { background:#EEF3FD; color:var(--st-onsite); }
.ap-cell.is-running .ap-h { font-size:12.5px; color:var(--st-onsite); }

.ap-legend { display:flex; flex-wrap:wrap; gap:8px 16px; padding:12px 20px; border-top:1px solid #EEF0F3; font-size:12.5px; font-weight:600; color:var(--text-2); }
.ap-leg { display:inline-flex; align-items:center; gap:6px; }
.ap-leg-hint { margin-left:auto; color:var(--text-3); }

.ap-empty { text-align:center; color:var(--text-2); padding:32px 16px; font-size:14px; background:#fff; border-radius:20px; box-shadow:var(--shadow-xs); }
.ap-empty strong { display:block; font-size:16px; color:var(--ink); margin-bottom:4px; }
.ap-proj-link { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; font-size:14px; color:var(--text-2); }

/* detail dňa */
.ap-day-sub { font-size:13.5px; font-weight:600; color:var(--text-2); margin-top:2px; }
.ap-day-sub::first-letter { text-transform:uppercase; }
.ap-timeline { display:flex; flex-direction:column; gap:4px; margin:8px 0 12px; }
.ap-tl { display:flex; gap:12px; align-items:flex-start; padding:10px 12px; border-radius:14px; background:#F7F8FA; }
.ap-tl-dot { width:28px; height:28px; border-radius:50%; flex:none; display:grid; place-items:center; font-style:normal; font-size:12.5px; font-weight:800; background:#E7EAEF; color:var(--text-2); }
.ap-tl.is-done .ap-tl-dot { background:var(--st-atfirm); color:#fff; }
.ap-tl.is-bad .ap-tl-dot { background:var(--danger); color:#fff; }
.ap-tl.is-wait { background:#FFF6E5; }
.ap-tl.is-wait .ap-tl-dot { background:var(--sun); color:var(--ink); }
.ap-tl-k { font-size:12.5px; font-weight:700; color:var(--text-3); }
.ap-tl-t { font-size:15px; font-weight:700; color:var(--ink); }
.ap-tl-d { font-size:13.5px; font-weight:600; color:var(--text-2); }
.ap-note { font-size:13.5px; background:#FFF6E5; color:#8A4B00; border-radius:8px; padding:8px 12px; margin-bottom:8px; }
.ap-note.is-reject { background:#FDECEA; color:var(--danger); }
.ap-edit { font-size:13.5px; color:var(--text-2); margin-bottom:6px; }
.ap-day-actions { gap:8px; }

@media (max-width: 760px) {
  .ap-bar select { flex:1 1 100%; min-width:0; }
  .ap-week { flex:1 1 100%; }
  .ap-week-label { flex:1; min-width:0; font-size:15px; }
  .ap-summary { display:grid; grid-template-columns:repeat(2, 1fr); gap:8px; }
  .ap-stat { min-width:0; padding:10px 12px; }
  .ap-stat b { font-size:22px; }
  .ap-cta { grid-column:1 / -1; margin-left:0; width:100%; justify-content:center; }
  .ap-who-col { min-width:120px; padding-left:12px !important; }
  .ap-person { font-size:14px; }
  .ap-leg-hint { margin-left:0; flex-basis:100%; }
}
.ap-day-actions .btn { flex:1 1 0; justify-content:center; }

.ap-step.is-me { box-shadow:inset 0 0 0 1.5px var(--ink); }
.ap-hint { font-size:12.5px; color:var(--text-2); margin:6px 0 4px; }
.ap-confirm { font-size:15px; font-weight:600; margin:4px 0 8px; }
.ap-toast { position:fixed; left:50%; bottom:24px; transform:translate(-50%, 12px); opacity:0; pointer-events:none; z-index:10001;
  background:var(--ink); color:#fff; font-size:14px; font-weight:700; padding:12px 18px; border-radius:12px; box-shadow:var(--shadow-md);
  transition:opacity .18s ease-out, transform .18s ease-out; }
.ap-toast.show { opacity:1; transform:translate(-50%, 0); }
.ap-toast.is-bad { background:var(--danger); }

.ap-step-bill { background:transparent; box-shadow:inset 0 0 0 1.5px #E7EAEF; padding:6px 12px; color:var(--text-2); }
.ap-step-bill.is-me { box-shadow:inset 0 0 0 1.5px var(--ink); color:var(--ink); }
.ap-row-bad { display:inline-flex; align-items:center; gap:6px; font-size:13.5px; font-weight:700; color:var(--danger); }
.ap-cell.is-free { background:#F7F8FA; color:var(--text-2); cursor:default; }
.is-final .ap-dot { background:var(--st-atfirm); }

/* Faktúry: stav dní v mesiaci */
.bl-banner { display:flex; align-items:center; gap:16px; flex-wrap:wrap; background:#FFF6E5; border:1px solid #FFD68A; color:#8A4B00; border-radius:14px; padding:14px 18px; margin-bottom:12px; font-size:14px; font-weight:600; line-height:1.45; }
.bl-banner > div { flex:1 1 320px; }
.bl-banner b { color:var(--ink); }
.bl-days { display:flex; flex-direction:column; gap:6px; min-width:170px; }
.bl-days-t { font-size:13.5px; font-weight:700; color:var(--text-2); }
.bl-days.is-ok .bl-days-t { color:var(--st-atfirm); }
.bl-days.is-wait .bl-days-t { color:#8A4B00; }
.bl-days.is-bad .bl-days-t { color:var(--danger); }
.bl-days-x { font-weight:600; color:var(--text-3); }
.bl-bar { display:flex; height:6px; border-radius:3px; background:#EEF0F3; overflow:hidden; }
.bl-bar i { background:var(--st-atfirm); }
.bl-days.is-wait .bl-bar i { background:var(--sun); }
.bl-bar b { background:var(--danger); }
.billing-card .bl-days { margin:10px 0 4px; }

/* Detail živnostníka: mesiac cez celú šírku, šípky na krajoch */
.wd-month-nav { justify-content: space-between; }
.wd-month-nav span { flex: 1; min-width: 0; font-size: 16px; font-weight: 800; color: var(--ink); }

/* ── Slovenský kalendár (víkendy, sviatky) — len informácia, neutrálne ── */
.cal-chip { display:inline-flex; align-items:center; gap:6px; background:#EEF1F5; color:#3A4250; font-size:12.5px; font-weight:700; border-radius:8px; padding:2px 8px; white-space:nowrap; }
.cal-chip.is-off { background:#E7EAEF; color:var(--ink); }
.dnes-head .cal-chip { margin-top:8px; font-size:13.5px; padding:4px 10px; }
.stat.s-absent.is-off b { color:var(--st-left); }
.ap-dh.is-off, .ap-c.is-off { background:#F7F8FA; }
.ap-hol { display:block; font-style:normal; font-size:12px; font-weight:700; color:var(--ink); }
.wd-of { font-size:14px; font-weight:700; color:var(--text-3); }
.bl-off { font-size:12.5px; font-weight:600; color:var(--text-3); margin-top:2px; }
.wd-day .cal-chip { margin-left:4px; font-size:12px; padding:1px 6px; }

/* Prepínač jazyka (prihlásenie, menu) — neutrálne čipy, aktívny ink */
.lang-btn { font-family: var(--font); font-size: 12.5px; font-weight: 700; min-width: 36px; min-height: 32px; padding: 4px 8px; border-radius: 8px;
  border: 1px solid #E7EAEF; background: #fff; color: var(--text-2); cursor: pointer; transition: background .12s ease-out, color .12s ease-out; }
.lang-btn:hover { background: #F7F8FA; color: var(--ink); }
.lang-btn.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.lang-btn:focus-visible { outline: 2px solid var(--st-onsite); outline-offset: 2px; }
.lang-switcher { display: flex; gap: 6px; justify-content: flex-end; }
.sidebar-LangSwitcher { justify-content: flex-start; }
.cal-chip[hidden] { display: none !important; }
