/* MITEL HR - design podle MITEL Reporting (CI MITEL: základní modrá #020F59 a její tóny, Montserrat + Lato).
   Rozvržení: horní lišta v gradientu značky, bílý levý panel se skupinami a ikonami, obsah na světle modrém pozadí.
   Všechny barvy, písmo a rozměry jsou tokeny v :root, komponenty používají jen je. */

/* ---------- písmo (self-hosted, latin + latin-ext kvůli češtině) ---------- */
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 600;
  src: url(../fonts/montserrat-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 600;
  src: url(../fonts/montserrat-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 700;
  src: url(../fonts/montserrat-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 700;
  src: url(../fonts/montserrat-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 800;
  src: url(../fonts/montserrat-latin-ext-800-normal.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 800;
  src: url(../fonts/montserrat-latin-800-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lato"; font-style: normal; font-display: swap; font-weight: 400;
  src: url(../fonts/lato-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lato"; font-style: normal; font-display: swap; font-weight: 400;
  src: url(../fonts/lato-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Lato"; font-style: normal; font-display: swap; font-weight: 700;
  src: url(../fonts/lato-latin-ext-700-normal.woff2) format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Lato"; font-style: normal; font-display: swap; font-weight: 700;
  src: url(../fonts/lato-latin-700-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- tokeny (shodné s MITEL Reporting, client/src/styles/tokens.css) ---------- */
:root {
  /* základní modrá CI MITEL a její tóny */
  --brand: #020f59;
  --brand-90: #0d1a64;
  --brand-60: #5a62a0;
  --brand-30: #b3b7d6;
  --brand-10: #e6e7f0;
  --brand-gradient: linear-gradient(105deg, #020f59, #0d1a64);
  --brand-gradient-card: linear-gradient(135deg, #020f59, #0d1a64);

  /* plochy a text */
  --bg: #f2f3f8;
  --surface: #ffffff;
  --surface-head: #fafbfd;
  --line: #e3e5ee;
  --text: #1c2340;
  --muted: #5d6582;

  /* funkční stavové barvy (text / podklad štítku) */
  --success: #1f8a4d;
  --success-bg: #e4f6ea;
  --danger: #d8434f;
  --danger-bg: #fdeced;
  --warning: #b45309;
  --warning-bg: #fef3e2;
  --neutral-bg: #eef0f5;
  /* mezistav schvalování (schváleno vedoucím, čeká na HR) - tón základní modré, ne další barva */
  --info: #2e3880;
  --info-bg: #e9eaf5;

  /* písmo podle CI: Montserrat (nadpisy, navigace, tlačítka, štítky), Lato (text, formuláře, tabulky) */
  --font-display: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Lato", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-base: 13.5px;
  --fs-small: 12px;
  --fs-table: 13px;
  --fs-label: 11px;

  /* rozměry */
  --topbar-h: 62px;
  --sidebar-w: 238px;
  --radius-card: 16px;
  --radius-modal: 12px;
  --radius-control: 10px;
  --radius-pill: 20px;
  --shadow-rest: 0 1px 2px rgba(2, 15, 89, .04);
  --shadow-hover: 0 12px 26px rgba(2, 15, 89, .10);
  --shadow-topbar: 0 6px 20px rgba(2, 15, 89, .18);

  /* starší názvy používané v inline stylech app.js */
  --primary: var(--brand);
  --primary-soft: var(--brand-10);
  --border: var(--line);
  --text-soft: var(--muted);
  --green: var(--success);
  --green-soft: var(--success-bg);
  --red: var(--danger);
  --red-soft: var(--danger-bg);
  --orange: var(--warning);
  --orange-soft: var(--warning-bg);
  --violet: var(--info);
  --violet-soft: var(--info-bg);

  font-size: 14px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font-body); font-size: var(--fs-base); line-height: 1.5;
  background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, button, .btn, .badge, .tab, label { font-family: var(--font-display); }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.num, td.right, .right { font-variant-numeric: tabular-nums; }
.loading-screen { display: flex; align-items: center; justify-content: center; height: 100vh;
  color: var(--muted); font-family: var(--font-display); font-weight: 600; }
.ico { width: 17px; height: 17px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.shell { display: flex; flex-direction: column; height: 100vh; }
.topbar { height: var(--topbar-h); flex-shrink: 0; display: flex; align-items: center; gap: 16px;
  padding: 0 22px; background: var(--brand-gradient); color: #fff; box-shadow: var(--shadow-topbar);
  position: relative; z-index: 20; }
.topbar .menu-toggle { display: none; background: none; border: 0; box-shadow: none; color: #fff; padding: 6px; }
.topbar .menu-toggle:hover { background: rgba(255, 255, 255, .12); }
.topbar .menu-toggle .ico { width: 22px; height: 22px; }
.topbar .logo { height: 26px; display: block; }
.topbar .app-name { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: .01em;
  padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .25); }
.topbar .today { font-size: var(--fs-small); opacity: .8; }
.topbar .spacer { flex: 1; }
.topbar .user { display: flex; align-items: center; gap: 10px; font-size: var(--fs-small); min-width: 0; }
.topbar .user-name { font-weight: 700; white-space: nowrap; }
.role-pill { background: rgba(255, 255, 255, .18); border-radius: var(--radius-pill); padding: 2px 10px;
  font-size: var(--fs-label); font-weight: 700; font-family: var(--font-display); white-space: nowrap;
  max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.topbar .logout { background: transparent; border: 1px solid rgba(255, 255, 255, .45); color: #fff; box-shadow: none;
  border-radius: var(--radius-control); padding: 6px 12px; font-size: var(--fs-small); font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px; }
.topbar .logout:hover { background: rgba(255, 255, 255, .12); }
.topbar .logout .ico { width: 14px; height: 14px; }

.body { flex: 1; display: flex; min-height: 0; }
.sidebar { width: var(--sidebar-w); flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line);
  display: flex; flex-direction: column; overflow-y: auto; }
.sidebar nav { flex: 1; padding: 14px 0; }
.nav-section { padding: 14px 18px 6px; font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav-item { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: 100%; padding: 9px 16px; text-align: left;
  background: transparent; border: 0; border-left: 3px solid transparent; border-radius: 0; box-shadow: none;
  color: var(--text); font-family: var(--font-display); font-size: var(--fs-base); font-weight: 600; }
.nav-item:hover { background: var(--bg); }
.nav-item:active { transform: none; }
.nav-item.active { background: var(--brand-10); border-left-color: var(--brand); color: var(--brand); font-weight: 700; }
.nav-item .nav-badge { margin-left: auto; background: var(--warning); color: #fff; border-radius: var(--radius-pill);
  font-size: var(--fs-label); padding: 0 7px; }
.sidebar-footer { padding: 12px 18px; border-top: 1px solid var(--line); font-size: var(--fs-label); color: var(--muted);
  white-space: nowrap; font-variant-numeric: tabular-nums; }
.sidebar-footer:hover { color: var(--brand); }
.drawer-backdrop { display: none; }
.main { flex: 1; overflow-y: auto; padding: 26px 30px 44px; min-width: 0; }
.main.page-in { animation: screen-in .32s ease; }
@keyframes screen-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .main.page-in { animation: none; } }

/* ---------- hlavička stránky ---------- */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-header h1 { margin: 0; flex: 1; font-size: 27px; font-weight: 800; letter-spacing: -.01em; color: var(--brand); line-height: 1.2; }

/* ---------- karty a mřížka ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-card);
  box-shadow: var(--shadow-rest); padding: 22px 24px; }
.card + .card { margin-top: 18px; }
.card h2 { font-size: 15px; font-weight: 700; color: var(--brand); margin-bottom: 14px; }
.card h3 { font-size: 13.5px; font-weight: 700; color: var(--brand); margin: 16px 0 8px; }
.grid { display: grid; gap: 14px; }
.grid > .card + .card { margin-top: 0; } /* rozestupy v gridu řeší gap */
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
@media (max-width: 1100px) { .grid.cols-3 { grid-template-columns: 1fr 1fr; } }

/* KPI dlaždice (popisek verzálkami nahoře, hodnota v barvě značky) */
.stat-tile { display: flex; flex-direction: column; justify-content: flex-start; padding: 16px 18px;
  cursor: pointer; transition: transform .12s, box-shadow .12s; }
.stat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.stat-tile:not([data-go]) { cursor: default; }
.stat-tile:not([data-go]):hover { transform: none; box-shadow: var(--shadow-rest); }
.stat-tile .num { font-family: var(--font-display); font-size: 28px; font-weight: 700; letter-spacing: -.02em;
  line-height: 1.15; color: var(--brand); margin-top: 4px; }
.stat-tile .lbl { font-family: var(--font-display); font-size: var(--fs-label); font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted); }
/* pořadí jako KPI v Reportingu: popisek, hodnota, podtitulek (v DOM je hodnota první) */
.stat-tile .lbl { order: 1; }
.stat-tile .num { order: 2; }
.stat-tile .kpi-sub { order: 3; font-size: var(--fs-small); color: var(--muted); margin-top: 2px; }

/* ---------- tlačítka ---------- */
button, .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--brand);
  background: var(--surface); border: 1px solid var(--brand); border-radius: var(--radius-control);
  padding: 9px 18px; cursor: pointer; text-decoration: none; transition: background .12s, color .12s; }
button:hover, .btn:hover { background: var(--brand-10); text-decoration: none; }
button:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-90); }
.btn-green { background: var(--success); border-color: var(--success); color: #fff; }
.btn-green:hover { background: #18723f; }
.btn-red { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.btn-red:hover { background: var(--danger-bg); }
.btn-sm { padding: 6px 13px; font-size: var(--fs-small); border-radius: 9px; }
.btn-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- formuláře ---------- */
input, select, textarea { font: inherit; font-size: var(--fs-base); color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-control); padding: 8px 10px; outline: none; width: 100%; }
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--brand); }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-10); }
textarea { resize: vertical; min-height: 72px; }
label { display: block; font-size: var(--fs-small); font-weight: 700; color: var(--muted); margin: 12px 0 4px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.field-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
input.invalid, select.invalid, textarea.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px var(--danger-bg); }
.field-error { display: block; color: var(--danger); font-size: var(--fs-small); margin-top: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: none; }

/* ---------- tabulky ---------- */
table { width: 100%; border-collapse: collapse; font-size: var(--fs-table); }
th { text-align: left; background: var(--surface-head); padding: 10px; font-family: var(--font-display);
  font-size: var(--fs-label); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; }
tbody tr:hover td { background: var(--brand-10); }
.table-wrap { overflow-x: auto; }
.card .table-wrap { margin: 0 -24px; padding: 0 24px; }
.card > .table-wrap:first-child { margin-top: -8px; }

/* ---------- štítky ---------- */
.badge { display: inline-block; padding: 3px 9px; border-radius: var(--radius-pill); font-size: var(--fs-label);
  font-weight: 700; background: var(--neutral-bg); color: var(--muted); border: 0; white-space: nowrap; }
.badge.green { background: var(--success-bg); color: var(--success); }
.badge.red { background: var(--danger-bg); color: var(--danger); }
.badge.orange { background: var(--warning-bg); color: var(--warning); }
.badge.primary { background: var(--brand-10); color: var(--brand); }
.badge.violet { background: var(--info-bg); color: var(--info); }

/* ---------- záložky (podtržené jako v Reportingu) ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: thin; scrollbar-color: var(--brand-30) transparent; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; border-radius: 0; padding: 9px 16px;
  font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tab:hover { background: none; color: var(--brand); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-count { display: inline-block; margin-left: 6px; min-width: 18px; padding: 0 7px; border-radius: var(--radius-pill);
  background: var(--warning); color: #fff; font-size: var(--fs-label); text-align: center; }

.empty { text-align: center; color: var(--muted); padding: 40px 16px; }
.banner { padding: 12px 16px; border-radius: var(--radius-control); margin-bottom: 14px; font-weight: 700;
  background: var(--brand-10); color: var(--brand); }

.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 12px; }
.kv dt { color: var(--muted); font-size: var(--fs-small); padding-top: 1px; }
.kv dd { font-weight: 700; }

/* ---------- org strom ---------- */
.org-card { padding: 14px 18px; }
.org-node { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius-control);
  border-bottom: 1px solid var(--line); }
.org-node:last-child { border-bottom: none; }
.org-node:hover { background: var(--brand-10); }
.org-node .o-name { font-family: var(--font-display); font-weight: 700; font-size: 14px; color: var(--brand); }
.org-node .o-meta { color: var(--muted); font-size: var(--fs-small); margin-top: 1px; }
.org-node .o-meta b { color: var(--text); font-weight: 700; }
.org-node-main { flex: 1; min-width: 0; }
.org-connector { color: var(--brand-30); width: 14px; flex: none; }
.org-node .btn-row { flex: none; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 3px 10px; border-radius: var(--radius-pill); font-size: var(--fs-small); background: var(--neutral-bg);
  border: 1px solid var(--line); white-space: nowrap; }
.o-name + .chip { margin-left: 8px; font-family: var(--font-display); font-size: 10px; padding: 1px 8px; color: var(--muted); vertical-align: 1px; }

/* ---------- kalendář absencí ---------- */
.cal-wrap { overflow-x: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; min-width: 720px; }
.cal-dow { font-family: var(--font-display); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted); text-align: center; padding: 2px 0 4px; font-weight: 700; }
.cal-cell { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-control);
  min-height: 88px; padding: 6px; min-width: 0; }
.cal-cell.off { background: var(--bg); }
.cal-cell.dim { opacity: .4; }
.cal-cell.today { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-10); }
.cal-day { font-family: var(--font-display); font-size: var(--fs-small); font-weight: 700; color: var(--muted); text-align: right; margin-bottom: 4px; }
.cal-cell.today .cal-day { color: var(--brand); }
.cal-chip { font-size: var(--fs-label); font-weight: 700; border-radius: 6px; padding: 2px 6px; margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-chip.st-HR_POSTED { background: var(--success-bg); color: var(--success); }
.cal-chip.st-MANAGER_APPROVED { background: var(--info-bg); color: var(--info); }
.cal-chip.st-SUBMITTED { background: var(--bg); color: var(--muted); border: 1px dashed var(--line); }
.cal-chip[class*="fill-"] { color: var(--text); }
.cal-chip.pending { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.7) 0 3px, transparent 3px 6px);
  border: 1px dashed rgba(28, 35, 64, .35); }
.cal-more { font-size: var(--fs-label); color: var(--muted); padding-left: 2px; }
.cal-nav { display: flex; align-items: center; gap: 10px; }
.cal-nav h2 { margin: 0; min-width: 140px; text-align: center; font-size: 15px; }
.cal-legend { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: var(--fs-small); color: var(--muted); }

/* ---------- firemní kalendář ---------- */
.ccal { border-collapse: separate; border-spacing: 2px; width: auto; }
.ccal th, .ccal td { padding: 0; border: none; background: none; text-transform: none; letter-spacing: 0; }
.ccal tbody tr:hover td { background: none; }
.ccal tbody tr:hover td.ccal-name { background: var(--brand-10); }
.ccal-head { font-family: var(--font-display); font-size: 10px; color: var(--muted); text-align: center; min-width: 24px; padding: 2px 1px; font-weight: 700; }
.ccal-head span { font-weight: 600; font-size: 9px; }
.ccal-head.off { color: var(--brand-30); }
.ccal-head.today { color: var(--brand); }
.ccal-name { text-align: left; padding: 4px 10px 4px 4px; white-space: nowrap; font-size: var(--fs-table);
  position: sticky; left: 0; background: var(--surface); z-index: 2; }
.ccal-name .muted { font-size: var(--fs-label); }
.ccal-day { width: 24px; height: 30px; min-width: 24px; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.ccal-day.off { background: var(--bg); border-color: transparent; }
.ccal-day.today { outline: 2px solid var(--brand); outline-offset: -1px; }
/* barvy typů absencí jsou datové (rozlišení typů v kalendáři), ne barvy rozhraní */
.fill-green { background: #9fd8b9 !important; }
.fill-red { background: #f2a9ae !important; }
.fill-pink { background: #f6c6dd !important; }
.fill-violet { background: #cbb7ec !important; }
.fill-slate { background: #b9c4d6 !important; }
.fill-blue { background: #a9d2ef !important; }
.fill-yellow { background: #f3d87c !important; }
.fill-orange { background: #f4bd7d !important; }
.fill-teal { background: #93d6cd !important; }
.fill-indigo { background: #aab6ee !important; }
.ccal-day.pending { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.7) 0 3px, transparent 3px 6px); }
.ccal-day.half { background-image: linear-gradient(to bottom, transparent 0 50%, rgba(255,255,255,.75) 50% 100%); }
.ccal-day.pending.half { background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.7) 0 3px, transparent 3px 6px),
  linear-gradient(to bottom, transparent 0 50%, rgba(255,255,255,.75) 50% 100%); }
.now-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; }
.now-dot.work { background: var(--success); box-shadow: 0 0 0 3px var(--success-bg); }
.now-dot.pause { background: var(--warning); box-shadow: 0 0 0 3px var(--warning-bg); }
.now-dot.offline { background: var(--brand-30); box-shadow: none; }
.ccal-name .now-dot { width: 9px; height: 9px; margin-right: 6px; }
.ccal-name b.name-work { color: var(--success); }
.ccal-name b.name-pause { color: var(--warning); }
.ccal-name .muted { margin-left: 15px; }
.legend-box { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; vertical-align: middle; margin-right: 4px; }
.legend-box.ccal-day { display: inline-block; height: 22px; }

/* ---------- časová osa žádosti ---------- */
.wf-step { display: flex; align-items: flex-start; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.wf-step:last-of-type { border-bottom: none; }
.wf-line { line-height: 1.4; }
.wf-line small { color: var(--muted); display: block; font-size: var(--fs-small); }

/* ---------- přihlášení ---------- */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px; background: var(--bg); }
.login-card { width: 100%; max-width: 380px; padding: 36px 32px 28px; text-align: center; }
.login-card .login-logo { height: 42px; margin-bottom: 12px; }
.login-card h1 { font-size: 20px; font-weight: 800; color: var(--brand); margin-bottom: 4px; }
.login-sub { color: var(--muted); margin-bottom: 24px; }
.login-card p, .login-card .btn-row { text-align: left; }
.login-notice { text-align: left; border-radius: var(--radius-control); padding: 10px 12px; margin-bottom: 16px; font-size: var(--fs-small); line-height: 1.45; }
.login-notice.pending { background: var(--warning-bg); color: var(--warning); }
.login-notice.error { background: var(--danger-bg); color: var(--danger); }
.btn-microsoft { display: flex; width: 100%; padding: 10px 14px; background: var(--brand); border: 1px solid var(--brand);
  border-radius: var(--radius-control); color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 13px;
  align-items: center; justify-content: center; gap: 10px; }
.btn-microsoft:hover { background: var(--brand-90); text-decoration: none; }
.login-divider { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--line); text-align: left;
  font-family: var(--font-display); font-size: var(--fs-label); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.dev-users { margin-top: 8px; text-align: left; }
.dev-users button { display: block; width: 100%; text-align: left; margin-top: 6px; padding: 7px 12px;
  font-size: var(--fs-small); font-weight: 600; color: var(--text); border-color: var(--line); }
.dev-users button:hover { border-color: var(--brand); }
.dev-users button b { color: var(--brand); font-weight: 700; }
.dev-users button small { color: var(--muted); display: block; font-family: var(--font-body); font-weight: 400; }
.login-meta { margin-top: 18px; color: var(--muted); font-size: var(--fs-label); font-variant-numeric: tabular-nums; }

/* ---------- modál a toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(2, 15, 89, .35); display: flex; align-items: center;
  justify-content: center; z-index: 100; padding: 16px; }
.modal { background: var(--surface); border-radius: var(--radius-modal); box-shadow: var(--shadow-hover);
  padding: 24px 26px 20px; width: 560px; max-width: 95vw; max-height: 90vh; overflow-y: auto; }
.modal h2 { font-size: 18px; color: var(--brand); margin-bottom: 12px; }
.modal .btn-row { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); justify-content: flex-end; }
#toast-root { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 260px; max-width: 420px; padding: 12px 16px; border-radius: var(--radius-modal); background: var(--brand);
  color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 13px; box-shadow: var(--shadow-hover);
  animation: slideIn .18s ease-out; }
.toast.error { background: var(--danger); }
.toast.ok { background: var(--success); }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- pomocné ---------- */
.muted { color: var(--muted); font-size: var(--fs-small); }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }
.right { text-align: right; } .center { text-align: center; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.hidden { display: none !important; }
tr.pending-row td { background: var(--warning-bg); }

/* ---------- mobil (zlomy 768 / 480 px jako Reporting) ---------- */
@media (max-width: 768px) {
  .topbar { height: 48px; padding: 0 12px; gap: 10px; }
  .topbar .menu-toggle { display: inline-flex; }
  .topbar .logo { height: 22px; }
  .topbar .today, .topbar .role-pill, .topbar .user-name { display: none; }
  .topbar .app-name { padding-left: 10px; }
  .sidebar { position: fixed; top: 48px; bottom: 0; left: calc(-1 * var(--sidebar-w) - 20px); z-index: 30;
    transition: left .2s ease; box-shadow: var(--shadow-hover); }
  .sidebar.open { left: 0; }
  .drawer-backdrop.open { display: block; position: fixed; inset: 48px 0 0 0; background: rgba(2, 15, 89, .3); z-index: 25; }
  .main { padding: 16px 12px 32px; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header h1 { font-size: 20px; }
  .card { padding: 16px 14px; }
  .card .table-wrap { margin: 0 -14px; padding: 0 14px; }
  .grid.cols-2 { grid-template-columns: 1fr; }
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .stat-tile .num { font-size: 22px; }
  .field-row, .field-row-3 { grid-template-columns: 1fr; }
  input, select, textarea { font-size: 16px; }
  .modal-backdrop { padding: 10px; }
  .modal { width: 100%; max-width: 100%; max-height: 92dvh; padding: 20px 16px 16px; }
  .kv { grid-template-columns: 110px 1fr; }
}
@media (max-width: 480px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}
