:root {
  --bg: #f4f4f3;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --ink: #1f1e21;
  --ink-2: #3e3c3f;
  --muted: #7d7b80;
  --line: #e6e3da;
  --line-2: #efede6;
  --accent: #f93d14;
  --accent-hover: #dc3110;
  --brand-dark: #3e3c3f;
  --accent-2: #f93d14;
  --tint: #fff0eb;
  --tint-2: #fff8f5;
  --ok: #3d7a52;
  --ok-bg: #e6f2e9;
  --warn: #a8660f;
  --warn-bg: #fbf0dc;
  --bad: #b83a26;
  --bad-bg: #fbe6e1;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(20, 32, 35, .04), 0 8px 24px -12px rgba(20, 32, 35, .12);
  --shadow-lg: 0 24px 60px -20px rgba(20, 32, 35, .35);
  --display: 'Bricolage Grotesque', 'Figtree', system-ui, sans-serif;
  --sans: 'Figtree', system-ui, -apple-system, sans-serif;
  --day: 34px;
  --namecol: 210px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-feature-settings: 'ss01';
  background: var(--bg);
  color: var(--ink);
  font: 14.5px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-2); }
::selection { background: var(--tint); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }

/* ---------- přihlášení ---------- */
.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(360px, 1fr); }
.login-hero {
  position: relative; overflow: hidden; padding: 56px clamp(24px, 5vw, 80px) 48px;
  display: flex; flex-direction: column; justify-content: center; gap: 26px;
}
.login-hero::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(62, 60, 63, .09) 1px, transparent 1.2px); background-size: 22px 22px;
  mask-image: linear-gradient(180deg, #000 20%, transparent 95%);
}
.login-hero > * { position: relative; }
.hero-title { font: 800 clamp(54px, 7.4vw, 118px)/0.9 var(--display); letter-spacing: -0.055em; margin: 0; }
.hero-title .hl { color: var(--accent); }
.hero-sub { margin: 0; max-width: 31em; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.5; color: var(--ink-2); font-weight: 500; }
.demo { max-width: 540px; padding: 16px 18px 12px; border-radius: 18px; }
.demo-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.demo-head b { font: 800 17px var(--display); letter-spacing: -0.02em; }
.demo-head span { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.demo-row { display: grid; grid-template-columns: 96px 1fr; align-items: center; height: 32px; border-top: 1px solid var(--line-2); }
.demo-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.demo-name i { width: 9px; height: 9px; border-radius: 50%; }
.demo-track { position: relative; height: 18px; border-radius: 6px; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 14 - 1px), var(--line-2) calc(100% / 14 - 1px) calc(100% / 14)); }
.demo-bar { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--c); transform-origin: left; }
.demo-bar.pend { background: repeating-linear-gradient(-45deg, var(--c) 0 4px, color-mix(in srgb, var(--c) 35%, #fff) 4px 8px); }
.demo-cov .demo-name { color: var(--muted); font-weight: 500; font-size: 12px; }
.demo-cov .demo-track { display: grid; grid-template-columns: repeat(14, 1fr); background: none; height: auto; }
.demo-cov b { text-align: center; font-size: 12px; font-weight: 800; color: var(--ok); }
.demo-cov b.low { color: var(--bad); background: var(--bad-bg); border-radius: 5px; }
.hero-branches { display: flex; flex-wrap: wrap; gap: 8px; }
.hero-branches span { border: 1px solid var(--line); background: var(--surface); border-radius: 99px; padding: 6px 13px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.login-side {
  background: var(--accent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 34px; padding: 40px 28px;
}
.login-brand { width: 100%; max-width: 390px; }
.login-brand img { display: block; width: 100%; height: auto; }
.login-card { width: 100%; max-width: 390px; background: var(--surface); border-radius: 24px; padding: 34px 30px 26px; box-shadow: 0 40px 80px -30px rgba(62, 30, 20, .55); }
.login-card h2 { font: 800 36px/1 var(--display); letter-spacing: -0.04em; margin: 0 0 10px; }
.login-card p { margin: 0 0 24px; color: var(--muted); font-size: 14.5px; }
.login-card .err { color: var(--bad); font-size: 13.5px; font-weight: 600; min-height: 20px; margin-top: 12px; }
.btn-xl { height: 54px; font-size: 16px; border-radius: 14px; margin-top: 6px; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .92em; }
.cred { display: grid; gap: 10px; margin: 14px 0; padding: 16px 18px; border-radius: 14px; background: var(--tint); }
.cred div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.cred span { font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.cred b { font: 700 20px ui-monospace, 'SF Mono', Menlo, monospace; color: var(--brand-dark); user-select: all; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-family: var(--display); letter-spacing: -0.01em; }
/* logo je světlé – vždy na oranžovém podkladu značky, stejně jako na jejich webu */
.logo-tile { display: flex; align-items: center; background: var(--accent); border-radius: 14px; padding: 12px 14px; }
.logo-tile img { display: block; width: 100%; height: auto; }
.logo-sm { padding: 7px 10px; border-radius: 10px; width: 150px; }
.side-brand { display: flex; flex-direction: column; gap: 8px; }
.app-label { font: 800 13px var(--display); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 0 6px; }
.brand small { display: block; font-family: var(--sans); font-weight: 500; color: var(--muted); font-size: 12px; line-height: 1.2; }

/* ---------- rozvržení ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100dvh; }
.side {
  position: sticky; top: 0; height: 100dvh;
  padding: 22px 14px; display: flex; flex-direction: column; gap: 22px;
  border-right: 1px solid var(--line);
}
.side .brand { padding: 0 8px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button {
  display: flex; align-items: center; gap: 11px; font-weight: 600;
  border: 0; background: none; text-align: left;
  padding: 9px 10px; border-radius: 10px; color: var(--ink-2); font-weight: 500;
  transition: background .15s, color .15s;
}
.nav button svg { width: 18px; height: 18px; flex: none; opacity: .75; }
.nav button:hover { background: rgba(62, 60, 63, .05); }
.nav button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.nav button.active svg { opacity: 1; color: var(--accent-2); }
.nav .badge { margin-left: auto; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
.me-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line);
}
.me-chip .who { min-width: 0; flex: 1; }
.me-chip .who b { display: block; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-chip .who span { font-size: 12px; color: var(--muted); }

.main { padding: 28px clamp(16px, 3.2vw, 44px) 80px; min-width: 0; }
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-bottom: 26px;
}
.page-head h1 { font: 400 clamp(34px, 4vw, 46px)/1 var(--display); margin: 0; letter-spacing: -0.01em; }
.page-head .sub { color: var(--muted); margin-top: 8px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.mobile-bar, .tabbar { display: none; }

/* ---------- prvky ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 15px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { border-color: #d6d2c6; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: var(--bad-bg); border-color: #f0c4ba; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(62, 60, 63, .06); border-color: transparent; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; border-radius: 9px; }
.btn-icon { width: 38px; padding: 0; }
.btn-sm.btn-icon { width: 32px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; height: 42px; padding: 0 13px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 76px; padding: 10px 13px; resize: vertical; }
.input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 4px rgba(249, 61, 20, .12); }
.input-lg { height: 52px; font-size: 17px; letter-spacing: .02em; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.seg {
  display: inline-flex; padding: 3px; gap: 2px; border-radius: 11px;
  background: rgba(62, 60, 63, .06);
}
.seg button {
  border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 500; font-size: 13.5px; color: var(--ink-2);
}
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line); background: var(--surface); border-radius: 99px;
  padding: 5px 12px; font-size: 13px; font-weight: 500; color: var(--ink-2);
}
.chip.on { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }

.badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 99px; background: var(--bad); color: #fff; font-size: 11.5px; font-weight: 700;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-approved { background: var(--ok-bg); color: var(--ok); }
.pill-pending { background: var(--warn-bg); color: var(--warn); }
.pill-rejected { background: var(--bad-bg); color: var(--bad); }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 11.5px; font-weight: 600;
  background: var(--line-2); color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em;
}
.tag-admin { background: var(--brand-dark); color: #fff; }
.tag-vedouci { background: var(--tint); color: #c22d0b; }

.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .02em;
}
.avatar-sm { width: 24px; height: 24px; font-size: 10px; }
.avatar-lg { width: 44px; height: 44px; font-size: 15px; }
.avatar.away { filter: grayscale(1); opacity: .4; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.card h3, .section-title {
  margin: 0 0 14px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.section { margin-top: 34px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.section-head .section-title { margin: 0; }

/* ---------- přehled ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 18px 20px; }
.stat .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.stat .value { font: 800 42px/1.05 var(--display); margin-top: 6px; letter-spacing: -0.04em; }
.stat .value small { font: 500 14px var(--sans); color: var(--muted); margin-left: 4px; }
.stat .meter { height: 5px; border-radius: 9px; background: var(--line-2); margin-top: 12px; overflow: hidden; display: flex; }
.stat .meter i { display: block; height: 100%; background: var(--brand-dark); }
.stat .meter i.pend { background: repeating-linear-gradient(-45deg, #e8b660 0 4px, #f3d49a 4px 8px); }
.stat .foot { font-size: 12.5px; color: var(--muted); margin-top: 8px; }

.day-nav { display: flex; align-items: center; gap: 6px; }
.day-nav .lbl { font-weight: 600; min-width: 170px; text-align: center; }

.branch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.bcard { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.bcard-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.bcard-head b { font-size: 16px; font-weight: 600; }
.bcard-head .muted { font-size: 12.5px; }
.cover { text-align: right; }
.cover .n { font: 800 34px/1 var(--display); }
.cover .n small { font: 500 14px var(--sans); color: var(--muted); }
.cover-bar { display: flex; gap: 3px; }
.cover-bar i { flex: 1; height: 6px; border-radius: 3px; background: var(--line-2); }
.cover-bar i.in { background: var(--ok); }
.cover-bar i.min { box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .0); }
.bcard.low .cover .n { color: var(--bad); }
.bcard.low .cover-bar i.in { background: var(--bad); }
.bcard.edge .cover .n { color: var(--warn); }
.bcard.edge .cover-bar i.in { background: var(--warn); }
.bcard.low { border-color: #f0c4ba; background: linear-gradient(180deg, #fff7f5, #fff 40%); }
.people { display: flex; flex-direction: column; gap: 7px; }
.person { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.person .nm { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .hrs { color: var(--muted); font-size: 12.5px; }
.person.away .nm { color: var(--muted); }
.reason { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--line-2); color: var(--ink-2); }
.closed-note { font-size: 13px; color: var(--muted); padding: 6px 0; }
.status-line { font-size: 12.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.status-line.low { color: var(--bad); }
.status-line.edge { color: var(--warn); }
.status-line.ok { color: var(--ok); }

.two-col { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; }
.list { display: flex; flex-direction: column; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line-2);
}
.list-item:first-child { border-top: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { font-weight: 600; }
.list-item .grow div { font-size: 13px; color: var(--muted); }
.date-box {
  width: 46px; flex: none; text-align: center; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); padding: 4px 0;
}
.date-box b { display: block; font: 800 21px/1.1 var(--display); }
.date-box span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.warn-item .date-box { background: var(--bad-bg); border-color: #f3cfc6; }
.warn-item .date-box b { color: var(--bad); }
.empty { padding: 26px 8px; text-align: center; color: var(--muted); font-size: 14px; }
.empty .big { font: 700 24px var(--display); color: var(--ink-2); display: block; margin-bottom: 4px; }

/* ---------- kalendář / časová osa ---------- */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav .lbl { font: 800 26px/1 var(--display); letter-spacing: -0.03em; min-width: 190px; text-align: center; text-transform: capitalize; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); align-items: center; }
.legend i { display: inline-block; width: 18px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: middle; }

.tl-wrap { overflow: auto; border-radius: var(--radius); max-height: calc(100dvh - 230px); }
.tl { min-width: max-content; }
.tl-row {
  display: grid; grid-template-columns: var(--namecol) repeat(var(--days), var(--day));
  position: relative; border-top: 1px solid var(--line-2);
}
.tl-row > * { grid-row: 1; }
.tl-name {
  grid-column: 1; position: sticky; left: 0; z-index: 3; background: var(--surface);
  display: flex; align-items: center; gap: 9px; padding: 0 12px; height: 40px; min-width: 0;
  border-right: 1px solid var(--line);
}
.tl-name .nm { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-name .pos { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-cell { height: 40px; border-left: 1px solid var(--line-2); }
.tl-cell.we { background: var(--surface-2); }
.tl-cell.hol { background: repeating-linear-gradient(-45deg, #f6f1e4 0 5px, #fbf8ef 5px 10px); }
.tl-cell.off { background-image: radial-gradient(circle, #d8d4c8 1.2px, transparent 1.5px); background-size: 8px 8px; background-position: center; }
.tl-cell.today { box-shadow: inset 2px 0 0 var(--accent-2); }
.tl-head { position: sticky; top: 0; z-index: 5; border-top: 0; background: var(--surface); }
.tl-head .tl-name { z-index: 6; font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; height: 50px; }
.tl-dh {
  height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: 10.5px; color: var(--muted); border-left: 1px solid var(--line-2); border-bottom: 1px solid var(--line);
  background: var(--surface); padding: 0; border-top: 0; border-right: 0;
}
.tl-dh b { font-size: 14px; color: var(--ink); font-weight: 600; }
.tl-dh.we { background: var(--surface-2); }
.tl-dh.we b { color: var(--muted); }
.tl-dh.hol b { color: var(--warn); }
.tl-dh.today b {
  background: var(--accent); color: #fff; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
}
.tl-dh:hover { background: var(--tint-2); }
.tl-group .tl-name {
  background: var(--surface-2); font-weight: 600; font-size: 13px; height: 34px; gap: 8px;
}
.tl-group { background: var(--surface-2); }
.tl-group .tl-name .cnt { color: var(--muted); font-weight: 500; font-size: 12px; }
.tl-bar {
  z-index: 2; align-self: center; height: 26px; margin: 0 2px; border-radius: 8px;
  display: flex; align-items: center; gap: 6px; padding: 0 8px; overflow: hidden;
  color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 0; text-align: left;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
  transition: transform .15s, box-shadow .15s;
}
.tl-bar:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .35); }
.tl-bar.pending {
  background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .55) 0 5px, rgba(255, 255, 255, .15) 5px 10px) !important;
  color: var(--ink); box-shadow: inset 0 0 0 1.5px currentColor;
}
.tl-bar.pending span { color: var(--ink); }
.tl-cov .tl-name { font-size: 12px; color: var(--muted); height: 34px; font-weight: 500; }
.tl-cov .tl-cell { height: 34px; display: grid; place-items: center; font-size: 12px; font-weight: 700; }
.cov-ok { color: var(--ok); }
.cov-edge { color: var(--warn); background: var(--warn-bg) !important; }
.cov-low { color: var(--bad); background: var(--bad-bg) !important; }
.cov-closed { color: #c9c5b9; font-weight: 500 !important; }

/* rok – teplotní mapa */
.year { padding: 18px; overflow: auto; }
.year-grid { display: grid; grid-template-columns: 120px repeat(12, minmax(62px, 1fr)); gap: 14px 8px; min-width: 940px; align-items: center; }
.year-grid .mh { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: capitalize; }
.year-grid .bn { font-weight: 600; font-size: 13.5px; }
.ym { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.ym i { aspect-ratio: 1; border-radius: 2px; background: var(--line-2); display: block; }
.ym i.pad { background: transparent; }
.ym i.we { background: #f3f1ea; }
.ym i.a1 { background: #d9d8da; }
.ym i.a2 { background: #9a989c; }
.ym i.a3 { background: #5d5b60; }
.ym i.lowd { background: var(--bad) !important; }
.ym i.today { outline: 1.5px solid var(--ink); outline-offset: 1px; }

/* ---------- žádosti ---------- */
.req { display: grid; grid-template-columns: auto 1fr auto; gap: 16px; align-items: center; padding: 16px 18px; }
.req + .req { border-top: 1px solid var(--line-2); }
.req .who b { font-weight: 600; }
.req .who .meta { font-size: 13px; color: var(--muted); }
.req .when { font-weight: 600; }
.req .note { font-size: 13px; color: var(--ink-2); margin-top: 4px; font-style: italic; }
.req .acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.conflict {
  margin-top: 8px; font-size: 12.5px; color: var(--bad); background: var(--bad-bg); border-radius: 8px; padding: 6px 10px; display: inline-block;
}
.conflict.ok { color: var(--ok); background: var(--ok-bg); }

/* ---------- tým ---------- */
.emp-row { display: grid; grid-template-columns: 32px 1.4fr 1fr 1.1fr 104px; gap: 14px; align-items: center; padding: 12px 18px; cursor: pointer; transition: background .15s; }
.emp-row + .emp-row { border-top: 1px solid var(--line-2); }
.emp-row:hover { background: var(--tint-2); }
.emp-row .nm b { font-weight: 600; display: block; }
.emp-row .nm span, .emp-row .sm { font-size: 13px; color: var(--muted); }
.mini-meter { height: 5px; border-radius: 9px; background: var(--line-2); overflow: hidden; margin-top: 5px; max-width: 140px; }
.mini-meter i { display: block; height: 100%; background: var(--brand-dark); }
.emp-row.inactive { opacity: .5; }

.sched { display: flex; flex-direction: column; gap: 6px; }
.sched-row { display: grid; grid-template-columns: 34px 44px 1fr 1fr; gap: 8px; align-items: center; }
.sched-row b { font-size: 13px; }
.sched-row .input { height: 36px; }
.sched-row.off .input { opacity: .35; }
.switch { position: relative; width: 38px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #d9d6cc; transition: background .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked + span { background: var(--accent-2); }
.switch input:checked + span::after { transform: translateX(16px); }
.colors { display: flex; gap: 8px; flex-wrap: wrap; }
.colors button { width: 28px; height: 28px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.colors button.on { box-shadow: 0 0 0 2px var(--ink); }

/* ---------- nastavení ---------- */
.settings { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.branch-edit { display: grid; grid-template-columns: 1fr 110px auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.copy-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.copy-row .input { font-size: 12.5px; height: 36px; font-family: ui-monospace, Menlo, monospace; color: var(--ink-2); }
.copy-row label { font-size: 13px; font-weight: 600; min-width: 110px; }
.steps { margin: 0; padding-left: 20px; color: var(--ink-2); font-size: 13.5px; }
.steps li { margin-bottom: 6px; }
.pw-show {
  font: 600 24px/1.2 ui-monospace, Menlo, monospace; letter-spacing: .04em; text-align: center;
  padding: 18px; border-radius: 12px; background: var(--tint); color: var(--accent); margin: 12px 0; user-select: all;
}
.callout { font-size: 13px; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }

/* ---------- modal ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 50; background: rgba(20, 32, 35, .34);
  backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  width: 100%; max-width: 480px; max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg);
}
.modal.wide { max-width: 620px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 4px; gap: 10px; }
.modal-head h2 { font: 800 26px/1.1 var(--display); margin: 0; letter-spacing: -0.03em; }
.modal-body { padding: 14px 22px 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 20px; flex-wrap: wrap; }
.modal-foot .left { margin-right: auto; }
.type-pick { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.type-pick button {
  border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.type-pick button span { font-size: 18px; line-height: 1; }
.type-pick button.on { border-color: var(--accent); background: var(--tint); color: var(--accent); }
.calc { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13.5px; }
.calc b { font: 800 26px/1 var(--display); }
.detail-grid { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: 14px; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { margin: 0; font-weight: 500; }

#toast-root { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-lg); }
.toast.err { background: var(--bad); }

.loading { min-height: 100dvh; display: grid; place-items: center; color: var(--muted); }

/* ---------- mobil ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col, .settings { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  :root { --namecol: 132px; --day: 32px; }
  .login { grid-template-columns: 1fr; }
  .login-hero { padding: 36px 20px 32px; gap: 18px; }
  .demo { display: none; }
  .login-side { padding: 28px 16px 40px; }
  .login-card { padding: 26px 22px 20px; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { display: none; }
  .main { padding: 14px 16px 100px; }
  .mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    position: sticky; top: 0; z-index: 20; padding: 10px 16px; background: rgba(244, 244, 243, .92); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20;
    background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tabbar button {
    flex: 1; border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 4px 0; position: relative;
  }
  .tabbar button svg { width: 21px; height: 21px; }
  .tabbar button.active { color: var(--accent); }
  .tabbar .badge { position: absolute; top: 0; left: calc(50% + 6px); height: 16px; min-width: 16px; font-size: 10px; padding: 0 4px; }
  .page-head { margin-bottom: 18px; }
  .stats { gap: 10px; }
  .stat { padding: 14px; }
  .stat .value { font-size: 34px; }
  .req { grid-template-columns: auto 1fr; }
  .req .acts { grid-column: 1 / -1; justify-content: flex-start; }
  .emp-row { grid-template-columns: 32px 1fr auto; }
  .emp-row .hide-m { display: none; }
  .row-3 { grid-template-columns: 1fr 1fr; }
  .type-pick { grid-template-columns: repeat(3, 1fr); }
  .tl-name .pos { display: none; }
  .tl-wrap { max-height: none; }
  .month-nav .lbl { font-size: 22px; min-width: 140px; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92dvh; }
  .overlay { align-items: flex-end; padding: 0; }
  .day-nav .lbl { min-width: 0; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat .value { font-size: 30px; }
  .branch-grid { grid-template-columns: 1fr; }
}
.emp-row .tag { justify-self: end; }
.stat .value small, .cover .n small { letter-spacing: 0; word-spacing: .1em; font-weight: 600; margin-left: 6px; }

/* ===== kalendář v3: přehlednější časová osa ===== */
:root { --day: 36px; --namecol: 220px; }
.tl-cell, .tl-dh { transition: background-color .12s; }
.tl-cell.today { background-color: rgba(249, 61, 20, .05); box-shadow: inset 2px 0 0 rgba(249, 61, 20, .55); }
.tl-dh.today { background: #fff4f0; }
.tl-dh.today b { background: var(--accent); }
.tl-dh em { width: 4px; height: 4px; border-radius: 50%; background: var(--warn); display: block; }
.tl-cell.hcol, .tl-dh.hcol { box-shadow: inset 0 0 0 100px rgba(62, 60, 63, .055); }
.tl-emp.editable .tl-cell { cursor: cell; }
.tl-cell.sel { background: var(--tint) !important; box-shadow: inset 0 0 0 1.5px var(--accent) !important; }
.tl-emp:hover .tl-name { background: var(--tint-2); }

.tl-bar {
  height: 28px; margin: 0 3px; border-radius: 8px; gap: 5px; padding: 0 8px;
  background: color-mix(in srgb, var(--c) 15%, #fff); color: var(--ink);
  box-shadow: inset 3px 0 0 var(--c); font-size: 12px; font-weight: 700;
}
.tl-bar .ic { font-size: 12px; }
.tl-bar .lb { overflow: hidden; text-overflow: ellipsis; }
.tl-bar:hover { box-shadow: inset 3px 0 0 var(--c), 0 6px 14px -8px rgba(0, 0, 0, .35); }
.tl-bar.pending {
  background: repeating-linear-gradient(-45deg, #fff 0 5px, color-mix(in srgb, var(--c) 10%, #fff) 5px 10px) !important;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 70%, #fff); color: var(--ink-2); font-weight: 600;
}
.tl-bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.tl-bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }

.tl-group .tl-name { height: 38px; gap: 8px; }
.tl-group .tl-name b { font: 800 14.5px var(--display); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grp-warn { margin-left: auto; font-size: 11px; font-weight: 800; color: var(--bad); background: var(--bad-bg); padding: 2px 7px; border-radius: 99px; white-space: nowrap; }
.grp-ok { margin-left: auto; font-size: 12px; font-weight: 800; color: var(--ok); }

.tl-cov { border-bottom: 2px solid var(--line); }
.tl-cov .tl-name { height: 46px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; }
.tl-cov .tl-name span { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.tl-cov .tl-name .min { font-size: 11px; font-weight: 500; color: var(--muted); }
.tl-cov .tl-cell { height: 46px; display: grid; place-items: center; padding: 0; border: 0; border-left: 1px solid var(--line-2); font: inherit; cursor: pointer; }
.cov-ok { color: var(--ok); }
.cov-edge { color: var(--warn); background-color: var(--warn-bg) !important; }
.cov-low { color: var(--bad); background-color: var(--bad-bg) !important; }
.dots { display: grid; grid-template-columns: 7px; gap: 2px; justify-content: center; align-content: center; }
.dots.two { grid-template-columns: 7px 7px; }
.dots i { display: block; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px currentColor; opacity: .9; }
.dots i.in { background: currentColor; }
.cov-none { width: 8px; height: 2px; border-radius: 2px; background: #d6d4d0; }

.toggle { display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }

.cal-status { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: 14px; margin-bottom: 14px; border: 1px solid transparent; }
.cal-status.bad { background: var(--bad-bg); border-color: #f2cbc2; }
.cal-status.good { background: var(--ok-bg); border-color: #cfe5d5; }
.cs-head { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.cs-head b { font: 800 16px var(--display); letter-spacing: -0.01em; }
.cal-status.bad .cs-head b { color: var(--bad); }
.cal-status.good .cs-head b { color: var(--ok); }
.cs-head span { font-size: 13px; color: var(--ink-2); }
.probs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.prob { border: 0; background: #fff; border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .06); transition: transform .12s; }
.prob:hover { transform: translateY(-1px); }
.prob span { color: var(--bad); font-weight: 800; margin-left: 4px; }
.probs .more { font-size: 13px; color: var(--ink-2); font-weight: 600; }

.cal-legend { margin-top: 14px; gap: 18px; }
.cal-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.cal-legend .dots { color: var(--brand-dark); grid-template-columns: 7px 7px 7px; }
.lg-bar { display: inline-block; width: 24px; height: 12px; border-radius: 4px; background: color-mix(in srgb, #3e3c3f 15%, #fff); box-shadow: inset 3px 0 0 #3e3c3f; }
.lg-bar.pend { background: repeating-linear-gradient(-45deg, #fff 0 3px, #ebeaeb 3px 6px); box-shadow: inset 0 0 0 1.5px #8c8a8f; }
.lg-sw { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line); }
.lg-sw.ok { background: var(--surface); }
.lg-sw.edge { background: var(--warn-bg); border-color: #efd8ac; }
.lg-sw.low { background: var(--bad-bg); border-color: #f2cbc2; }
.lg-sw.hol { background: repeating-linear-gradient(-45deg, #f6f1e4 0 3px, #fbf8ef 3px 6px); }

.modal.xl { max-width: 1040px; }
.modal.xl .branch-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 820px) {
  :root { --namecol: 128px; --day: 34px; }
  .tl-group .tl-name .cnt { display: none; }
  .cal-legend .muted { display: none; }
}
/* obsazenost jako sloupcový graf */
.tl-cell.off { background-image: none; background-color: #f7f6f3; }
.tl-cov .tl-cell { grid-template-rows: 1fr auto; padding: 5px 0 3px; gap: 1px; }
.cbar { position: relative; width: 16px; height: 26px; border-radius: 4px; background: rgba(62, 60, 63, .07); overflow: visible; display: block; }
.cbar i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 4px; background: currentColor; opacity: .85; }
.cbar b { position: absolute; left: -3px; right: -3px; height: 2px; margin-bottom: -1px; background: var(--brand-dark); border-radius: 2px; }
.cnum { font-size: 10.5px; font-weight: 800; line-height: 1; }
.cov-ok .cnum { color: var(--muted); }
.cbar.lg { width: 12px; height: 16px; color: var(--ok); }
.tl-group .tl-name .cnt { margin-left: auto; }
.grp-warn { font-size: 11.5px; }
.tl-group .tl-name .cnt + .grp-ok { margin-left: 4px; }
.cbar b { left: -6px; right: -6px; background: linear-gradient(90deg, var(--brand-dark) 0 5px, transparent 5px calc(100% - 5px), var(--brand-dark) calc(100% - 5px)); }
.reason.pend { background: var(--warn-bg); color: var(--warn); }
.shell > div { min-width: 0; }

/* ===== kalendář v4: graf překryvů, celý měsíc na šířku stránky ===== */
.gc-list { display: flex; flex-direction: column; gap: 14px; }
.gc { padding: 16px 18px 14px; }
.gc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.gc-head h3 { font: 800 19px/1.1 var(--display); letter-spacing: -0.02em; margin: 0; color: var(--ink); text-transform: none; }
.gc-head span { font-size: 12.5px; color: var(--muted); }
.gc-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.gb { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.gb.ok { background: var(--ok-bg); color: var(--ok); }
.gb.low { background: var(--bad-bg); color: var(--bad); }
.gb.over { background: #fdeee2; color: #b4530e; }

.gc-grid { --lane: 30px; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); row-gap: 3px; position: relative; user-select: none; }
.gc-dh { grid-row: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; padding-bottom: 6px; font-size: 10px; color: var(--muted); min-width: 0; }
.gc-dh b { font-size: 12.5px; font-weight: 700; color: var(--ink); width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; }
.gc-dh.we b, .gc-dh.we span { color: #b4b2b6; }
.gc-dh.hol b { color: var(--warn); }
.gc-dh.today b { background: var(--accent); color: #fff; }

.gc-bg { border-left: 1px solid var(--line-2); min-width: 0; cursor: cell; transition: background-color .12s; }
.gc-bg:first-of-type { border-left: 0; }
.gc-bg.we { background: #f7f6f3; }
.gc-bg.hol { background: repeating-linear-gradient(-45deg, #f6f1e4 0 5px, #fbf8ef 5px 10px); }
.gc-bg.over { background: #fdf1e7; }
.gc-bg.low { background: var(--bad-bg); }
.gc-bg.today { box-shadow: inset 2px 0 0 var(--accent); }
.gc-bg:hover { background-color: rgba(62, 60, 63, .06); }
.gc-bg.sel { background: var(--tint) !important; box-shadow: inset 0 0 0 1.5px var(--accent); }

.gc-bar {
  z-index: 1; min-width: 0; height: calc(var(--lane) - 2px); align-self: center; margin: 0 1px;
  display: flex; align-items: center; gap: 6px; padding: 0 6px 0 3px; border: 0; border-radius: 99px; overflow: hidden;
  background: color-mix(in srgb, var(--c) 22%, #fff); color: var(--ink); font-size: 12px; font-weight: 700; white-space: nowrap; text-align: left;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, #fff);
  transition: transform .12s, box-shadow .12s;
}
.gc-bar:hover { transform: translateY(-1px); box-shadow: inset 0 0 0 1px var(--c), 0 6px 14px -8px rgba(0, 0, 0, .4); z-index: 2; }
.gc-bar .av { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 9.5px; font-weight: 800; }
.gc-bar .tx { overflow: hidden; text-overflow: ellipsis; }
.gc-bar .pq { margin-left: auto; flex: none; font-size: 11px; font-weight: 800; color: var(--warn); }
.gc-bar.pending {
  background: repeating-linear-gradient(-45deg, #fff 0 5px, color-mix(in srgb, var(--c) 14%, #fff) 5px 10px);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 60%, #fff); font-weight: 600;
}
.gc-bar.pending .av { opacity: .65; }
.gc-empty { align-self: center; justify-self: center; font-size: 13px; color: var(--muted); font-style: italic; pointer-events: none; z-index: 1; }

.gc-cov { margin: 4px 1px 0; height: 8px; border: 0; padding: 0; border-radius: 3px; cursor: pointer; background: transparent; }
.gc-cov.ok { background: #bfdcc8; }
.gc-cov.edge { background: #efc27a; }
.gc-cov.low { background: var(--bad); }
.gc-cov.closed { background: transparent; box-shadow: inset 0 -1px 0 var(--line); }
.gc-cov:hover { transform: scaleY(1.4); }

.lg-sw.over { background: #fdf1e7; border-color: #f4d7bf; }
.lg-strip { display: inline-flex; gap: 2px; }
.lg-strip i { width: 12px; height: 7px; border-radius: 2px; display: block; }
.lg-strip .ok { background: #bfdcc8; } .lg-strip .edge { background: #efc27a; } .lg-strip .low { background: var(--bad); }
.lg-bar { border-radius: 99px; }

@media (max-width: 820px) {
  .gc { padding: 12px 10px 10px; }
  .gc-grid { --lane: 22px; }
  .gc-dh span { display: none; }
  .gc-dh b { width: auto; height: 18px; font-size: 9.5px; }
  .gc-dh.today b { width: 16px; height: 16px; }
  .gc-bar { padding: 0 2px; gap: 3px; font-size: 10.5px; }
  .gc-bar .av { width: 16px; height: 16px; font-size: 7.5px; }
  .gc-bar .pq { display: none; }
}
.gc-bg.over { background: #fde4cf; }
.gc-bg.low { background: #fbcfc5; }
.lg-sw.over { background: #fde4cf; }
.lg-sw.low { background: #fbcfc5; }
.gc-dh { border: 0; background: none; font: inherit; cursor: pointer; padding-top: 0; }
.gc-dh.over b { background: #fde4cf; color: #b4530e; }
.gc-dh.low b { background: var(--bad); color: #fff; }
.gc-dh.today b { box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--accent); }
.gc-dh.today:not(.low):not(.over) b { box-shadow: none; }
@media (max-width: 820px) {
  .gc-dh:not(.tick):not(.today):not(.low):not(.over) b { color: transparent; }
  .gc-dh:not(.tick):not(.today):not(.low):not(.over) b::after { content: ''; width: 2px; height: 2px; border-radius: 50%; background: #c9c7cb; position: absolute; }
  .gc-dh b { position: relative; font-size: 10px; }
  .gc-dh.low b, .gc-dh.over b, .gc-dh.today b { width: 15px; height: 15px; font-size: 8.5px; }
  .gc-cov { height: 6px; margin-top: 3px; }
}

/* ===== kalendář v5: měsíční mřížka po pobočkách ===== */
.btabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.btab {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; color: var(--ink-2);
  transition: background .15s, color .15s, border-color .15s;
}
.btab:hover { border-color: #d3d1cc; }
.btab.on { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.bt-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; font-size: 11.5px; display: grid; place-items: center; }
.bt-dot { width: 8px; height: 8px; border-radius: 50%; }
.bt-dot.ok { background: #5fae79; }
.bt-dot.none { background: #c9c7cb; }
.year-grid .bn small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }

.cal-empty { padding: 48px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.cal-empty b { font: 800 22px var(--display); letter-spacing: -0.02em; }
.cal-empty p { margin: 0 0 10px; color: var(--muted); max-width: 32em; }

.mc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.mc { overflow: hidden; }
.mc-dow { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.mc-dow span { padding: 10px 12px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.mc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--line-2); gap: 1px; user-select: none; }
.mc-day {
  background: var(--surface); min-height: 118px; padding: 8px 8px 10px; display: flex; flex-direction: column; gap: 6px;
  cursor: pointer; position: relative; min-width: 0; transition: background-color .12s;
}
.mc-day:hover { background: #fbfaf8; }
.mc-day.we { background: #faf9f7; }
.mc-day.out { background: #fafaf9; cursor: default; }
.mc-day.out .mc-num { color: #cfcdd0; }
.mc-day.lvl-low { background: #fff4f1; box-shadow: inset 3px 0 0 var(--bad); }
.mc-day.sel { background: var(--tint) !important; box-shadow: inset 0 0 0 2px var(--accent) !important; }
.mc-top { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.mc-num { font: 800 15px/1 var(--display); color: var(--ink); width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; margin: -2px 0 0 -2px; }
.mc-day.we .mc-num { color: var(--muted); }
.mc-day.today .mc-num { background: var(--accent); color: #fff; }
.mc-pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px;
  font-size: 12px; font-weight: 800; font-style: normal; white-space: nowrap;
}
.mc-pill small { font-size: 11px; font-weight: 600; opacity: .7; }
.mc-pill > i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mc-pill.ok { background: var(--ok-bg); color: var(--ok); }
.mc-pill.edge { background: var(--warn-bg); color: var(--warn); }
.mc-pill.low { background: var(--bad); color: #fff; }
.mc-hol { font-size: 11px; font-weight: 700; color: var(--warn); line-height: 1.2; }
.mc-chips { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.mc-chip {
  display: flex; align-items: center; gap: 6px; min-width: 0; height: 24px; padding: 0 7px 0 2px; border-radius: 99px; border: 0;
  background: color-mix(in srgb, var(--c) 16%, #fff); color: var(--ink); font-size: 12px; font-weight: 700; text-align: left; cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.mc-chip:hover { transform: translateY(-1px); box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .4); }
.mc-chip i { flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--c); color: #fff; font-size: 8.5px; font-weight: 800; font-style: normal; display: grid; place-items: center; }
.mc-chip span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-chip em { flex: none; font-style: normal; font-size: 11px; }
.mc-chip.pending { background: #fff; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 55%, #fff); }
.mc-chip.pending em { color: var(--warn); font-weight: 800; font-size: 10.5px; }
.mc-chip.pending i { opacity: .6; }
.mc-more { font-size: 11.5px; font-weight: 700; color: var(--muted); padding-left: 4px; }

.mc-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 16px; }
.mc-sum { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: var(--radius); border: 1px solid transparent; }
.mc-sum b { display: block; font: 800 16px/1.2 var(--display); letter-spacing: -0.01em; }
.mc-sum span { font-size: 12.5px; color: var(--ink-2); }
.mc-sum-ico { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font: 800 19px var(--display); color: #fff; }
.mc-sum.good { background: var(--ok-bg); border-color: #cfe5d5; } .mc-sum.good .mc-sum-ico { background: var(--ok); } .mc-sum.good b { color: var(--ok); }
.mc-sum.warn { background: var(--warn-bg); border-color: #efd8ac; } .mc-sum.warn .mc-sum-ico { background: var(--warn); } .mc-sum.warn b { color: var(--warn); }
.mc-sum.bad { background: var(--bad-bg); border-color: #f2cbc2; } .mc-sum.bad .mc-sum-ico { background: var(--bad); } .mc-sum.bad b { color: var(--bad); }
.mc-list { padding: 16px 16px 8px; }
.mc-list h3 { margin-bottom: 8px; }
.mc-li { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 0; border: 0; border-top: 1px solid var(--line-2); background: none; text-align: left; }
.mc-li:first-of-type { border-top: 0; }
.mc-li:hover b { color: var(--accent); }
.mc-li .grow { flex: 1; min-width: 0; }
.mc-li b { display: block; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mc-li .grow span { font-size: 12.5px; color: var(--muted); }
.mc-legend { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--ink-2); padding: 4px 4px 0; }
.mc-legend > span { display: flex; align-items: center; gap: 8px; }
.mc-legend .mc-pill { width: 26px; height: 14px; padding: 0; justify-content: center; }
.mc-legend .muted { display: block; font-size: 12px; line-height: 1.45; margin-top: 4px; }

@media (max-width: 1180px) {
  .mc-layout { grid-template-columns: 1fr; }
  .mc-side { position: static; }
}
@media (max-width: 820px) {
  .btabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 14px; padding: 0 16px; scrollbar-width: none; }
  .btab { flex: none; height: 36px; padding: 0 12px; font-size: 13px; }
  .mc-dow span { padding: 8px 0; text-align: center; font-size: 10.5px; }
  .mc-day { min-height: 70px; padding: 5px 3px 6px; gap: 4px; align-items: center; }
  .mc-top { flex-direction: column; gap: 3px; }
  .mc-num { width: 24px; height: 24px; font-size: 13px; margin: 0; }
  .mc-pill { height: 16px; padding: 0 5px; font-size: 10px; gap: 0; }
  .mc-pill > i, .mc-pill small { display: none; }
  .mc-hol { display: none; }
  .mc-chips { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 2px; }
  .mc-chip { width: 18px; height: 18px; padding: 0; justify-content: center; background: none; }
  .mc-chip span, .mc-chip em { display: none; }
  .mc-chip i { width: 18px; height: 18px; font-size: 7px; }
  .mc-chip.pending { box-shadow: none; }
  .mc-chip.pending i { opacity: 1; background: #fff; color: var(--c); box-shadow: inset 0 0 0 1.5px var(--c); }
  .mc-more { font-size: 9.5px; padding: 0; }
  .mc-day.lvl-low { box-shadow: inset 0 3px 0 var(--bad); }
}
.mc-pill.ok { background: transparent; color: var(--muted); padding: 0 2px; }
.mc-pill.ok > i { background: #6fb98a; }
.mc-legend .mc-pill.ok { background: var(--line-2); }

/* ===== grafové zobrazení (jako ukázka na přihlašovací stránce) ===== */
.ch { padding: 18px 20px 14px; }
.ch-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.ch-top h3 { font: 800 20px/1.1 var(--display); letter-spacing: -0.02em; margin: 0; color: var(--ink); text-transform: none; }
.ch-top span { font-size: 12.5px; color: var(--muted); }
.ch-sum b { font: 800 14px var(--display); padding: 6px 12px; border-radius: 99px; display: inline-block; }
.ch-sum .good { background: var(--ok-bg); color: var(--ok); }
.ch-sum .warn { background: var(--warn-bg); color: var(--warn); }
.ch-sum .bad { background: var(--bad-bg); color: var(--bad); }

.ch-grid { user-select: none; }
.ch-row { display: grid; grid-template-columns: 190px minmax(0, 1fr); align-items: center; border-top: 1px solid var(--line-2); }
.ch-head { border-top: 0; }
.ch-name { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 700; min-width: 0; padding-right: 10px; }
.ch-name i { flex: none; width: 10px; height: 10px; border-radius: 50%; }
.ch-name .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-name .nm-s { display: none; }
.ch-head .ch-name { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.ch-track { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); position: relative; }
.ch-track > * { grid-row: 1; }

.ch-dh { border: 0; background: none; font: inherit; padding: 4px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; min-width: 0; }
.ch-dh span { font-size: 9.5px; color: var(--muted); font-weight: 600; }
.ch-dh b { font-size: 12px; font-weight: 800; color: var(--ink); width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; }
.ch-dh.we b, .ch-dh.we span { color: #b6b4b8; }
.ch-dh.hol b { color: var(--warn); }
.ch-dh.today b { background: var(--accent); color: #fff; }
.ch-dh.low:not(.today) b { background: var(--bad-bg); color: var(--bad); }
.ch-dh:hover b { box-shadow: inset 0 0 0 1.5px var(--line); }

.ch-c { height: 44px; border-left: 1px solid var(--line-2); min-width: 0; }
.ch-c:first-child { border-left: 0; }
.ch-c.we { background: #f9f8f6; }
.ch-c.off { background: repeating-linear-gradient(-45deg, #f6f5f2 0 4px, #fbfaf8 4px 8px); }
.ch-c.hol { background: #fbf4e6; }
.ch-c.today { box-shadow: inset 2px 0 0 rgba(249, 61, 20, .5); }
.ch-emp.editable .ch-c { cursor: cell; }
.ch-c.sel { background: var(--tint) !important; box-shadow: inset 0 0 0 1.5px var(--accent) !important; }
.ch-emp:hover .ch-name .nm { color: var(--accent); }

.ch-bar {
  z-index: 1; align-self: center; height: 26px; margin: 0 2px; border: 0; border-radius: 8px; min-width: 0; overflow: hidden;
  background: var(--c); color: #fff; font-size: 11.5px; font-weight: 700; text-align: left; padding: 0 8px; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12); transition: transform .12s, box-shadow .12s;
}
.ch-bar span { overflow: hidden; text-overflow: ellipsis; display: block; }
.ch-bar:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -6px rgba(0, 0, 0, .4); }
.ch-bar.pending { background: repeating-linear-gradient(-45deg, var(--c) 0 5px, color-mix(in srgb, var(--c) 35%, #fff) 5px 10px); color: var(--ink); }
.ch-bar.pending span { background: rgba(255, 255, 255, .85); border-radius: 4px; padding: 0 4px; display: inline-block; max-width: 100%; }

.ch-cov { border-top: 2px solid var(--line); }
.ch-cov .ch-name { color: var(--muted); font-weight: 600; font-size: 12.5px; flex-direction: column; align-items: flex-start; gap: 0; }
.ch-cov .ch-name small { font-size: 11px; font-weight: 500; }
.ch-n { border: 0; background: none; font: 800 12.5px var(--sans); height: 30px; margin: 6px 1px; border-radius: 6px; cursor: pointer; min-width: 0; padding: 0; }
.ch-n.ok { color: var(--ok); }
.ch-n.edge { color: var(--warn); background: var(--warn-bg); }
.ch-n.low { color: #fff; background: var(--bad); }
.ch-n:hover { box-shadow: inset 0 0 0 1.5px var(--line); }

.lg-solid { display: inline-block; width: 22px; height: 10px; border-radius: 3px; background: #3e3c3f; }
.lg-solid.pend { background: repeating-linear-gradient(-45deg, #3e3c3f 0 3px, #bdbbbf 3px 6px); }
.lg-n { display: inline-grid; place-items: center; min-width: 20px; height: 18px; border-radius: 5px; font-size: 11px; font-weight: 800; }
.lg-n.ok { color: var(--ok); } .lg-n.edge { color: var(--warn); background: var(--warn-bg); } .lg-n.low { color: #fff; background: var(--bad); }

@media (max-width: 820px) {
  .ch { padding: 12px 10px 10px; }
  .ch-row { grid-template-columns: 74px minmax(0, 1fr); }
  .ch-name { font-size: 11px; gap: 5px; padding-right: 4px; }
  .ch-name i { width: 7px; height: 7px; }
  .ch-name .nm { display: none; }
  .ch-name .nm-s { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ch-dh span { display: none; }
  .ch-dh b { width: auto; height: 16px; font-size: 8.5px; }
  .ch-dh.today b, .ch-dh.low b { width: 14px; height: 14px; }
  .ch-c { height: 34px; }
  .ch-bar { height: 18px; margin: 0 1px; border-radius: 5px; padding: 0; }
  .ch-bar span { display: none; }
  .ch-n { font-size: 9px; height: 20px; margin: 4px 0; border-radius: 4px; }
}
@media (max-width: 820px) {
  .ch-dh:not(.tick):not(.today):not(.low) b { color: transparent; position: relative; }
  .ch-dh:not(.tick):not(.today):not(.low) b::after { content: ''; position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #c9c7cb; }
  .ch-n { font-size: 8.5px; letter-spacing: -0.02em; }
}

/* ===== režim „Jen já“ ===== */
.seg button svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: 5px; }
.seg-who button.on { background: var(--brand-dark); color: #fff; }
.my { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 22px; padding: 20px 22px; margin-bottom: 16px; align-items: center; }
.my .lbl { display: block; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 6px; }
.my-bal .big { font: 800 46px/1 var(--display); letter-spacing: -0.04em; }
.my-bal .big small { font: 600 15px var(--sans); color: var(--muted); letter-spacing: 0; margin-left: 8px; }
.my-bal .meter { height: 7px; border-radius: 9px; background: var(--line-2); overflow: hidden; display: flex; margin: 12px 0 8px; }
.my-bal .meter i { display: block; height: 100%; background: var(--brand-dark); }
.my-bal .meter i.pend { background: repeating-linear-gradient(-45deg, #e8b660 0 4px, #f3d49a 4px 8px); }
.my-bal .foot { font-size: 12.5px; color: var(--muted); }
.my-next { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.my-li { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border: 0; border-radius: 10px; background: var(--surface-2); text-align: left; }
.my-li:hover { background: var(--tint); }
.my-li .d { font-weight: 800; font-size: 13.5px; }
.my-li .t { font-size: 13px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.my-next .none, .my-next .more { font-size: 13px; color: var(--muted); }
.mc-day.myoff { background: color-mix(in srgb, var(--c) 14%, #fff); }
.mc-day.myoff.pending { background: repeating-linear-gradient(-45deg, #fff 0 6px, color-mix(in srgb, var(--c) 10%, #fff) 6px 12px); }
.mc-chip.mine { background: var(--c); color: #fff; padding: 0 10px; }
.mc-chip.mine.pending { background: #fff; color: var(--ink); }
.mc-layout.mine .mc-day { min-height: 92px; }
.ym i.ma { background: var(--brand-dark); }
.ym i.mp { background: #efc27a; }
.ch-grid.mine .ch-c { height: 52px; }
.ch-grid.mine .ch-bar { height: 32px; font-size: 12.5px; }
@media (max-width: 1000px) {
  .my { grid-template-columns: 1fr; gap: 16px; }
  .my-cta .btn { width: 100%; }
}
@media (max-width: 820px) {
  .seg-who button { padding: 6px 9px; }
  .head-actions { width: 100%; }
  .my-bal .big { font-size: 38px; }
  .my-li { grid-template-columns: 1fr auto; }
  .my-li .t { grid-column: 1; grid-row: 2; }
  .my-li .pill { grid-row: 1 / span 2; grid-column: 2; }
  .mc-chip.mine { width: auto; height: 18px; padding: 0 4px; }
  .mc-chip.mine span { display: block; font-size: 9px; }
  .mc-layout.mine .mc-day { min-height: 64px; }
}

/* ===== graf v2: pracovní dny v řádcích + sloupcový graf obsazenosti ===== */
html { scrollbar-gutter: stable; }
.page-head > div:first-child { flex: 1 1 320px; min-width: 0; }
.ch-emp .ch-name i { background: var(--c); }
.ch-c { position: relative; }
.ch-c.work::before {
  content: ''; position: absolute; left: 0; right: 0; top: 14px; bottom: 14px;
  background: color-mix(in srgb, var(--c) 24%, #fff);
}
.ch-c.work.ws::before { left: 3px; border-radius: 6px 0 0 6px; }
.ch-c.work.we2::before { right: 3px; border-radius: 0 6px 6px 0; }
.ch-c.work.ws.we2::before { border-radius: 6px; }
.ch-c.off { background: repeating-linear-gradient(-45deg, #f4f3f0 0 4px, #fbfaf8 4px 8px); }
.ch-bar { background: var(--c); }
.ch-bar.pending { background: repeating-linear-gradient(-45deg, var(--c) 0 5px, color-mix(in srgb, var(--c) 35%, #fff) 5px 10px); }

.ch-chart { border-top: 2px solid var(--line); }
.ch-chart .ch-name { flex-direction: column; align-items: flex-start; gap: 2px; align-self: end; padding-bottom: 6px; }
.ch-chart .ch-name span { font-size: 13px; font-weight: 800; color: var(--ink); }
.ch-chart .ch-name small { font-size: 11px; color: var(--muted); font-weight: 500; }
.ch-chart .ch-track { position: relative; align-items: end; padding-top: 6px; }
.ch-col {
  grid-row: 1; height: 100%; border: 0; background: none; padding: 0 0 2px; margin: 0 1px; border-radius: 6px 6px 0 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; cursor: pointer; min-width: 0; font: inherit;
  transition: background-color .12s;
}
.ch-col:hover { background: rgba(62, 60, 63, .06); }
.ch-col b { font-size: 11px; font-weight: 800; line-height: 1; color: var(--ok); }
.ch-col.edge b { color: var(--warn); }
.ch-col.low { background: var(--bad-bg); }
.ch-col.low b { color: #fff; background: var(--bad); border-radius: 4px; padding: 2px 4px; }
.ch-col.closed { cursor: default; }
.ch-col.today { box-shadow: inset 0 -3px 0 var(--accent); }
.stk { display: flex; flex-direction: column-reverse; gap: 2px; width: min(72%, 20px); }
.stk i { display: block; height: var(--bh); border-radius: 3px; background: var(--c); }
.stk i.away {
  background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--c) 30%, #fff) 0 3px, #fff 3px 6px);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 60%, #fff);
}
.ch-min { position: absolute; left: 0; right: 0; height: 0; border-top: 2px dashed rgba(62, 60, 63, .55); pointer-events: none; z-index: 2; }
.ch-min span { position: absolute; right: 0; top: -17px; font-size: 10.5px; font-weight: 800; color: var(--ink-2); background: var(--surface); padding: 0 4px; border-radius: 4px; }

.lg-work { display: inline-block; width: 24px; height: 10px; border-radius: 4px; background: #d8d7d9; }
.lg-off { display: inline-block; width: 18px; height: 14px; border-radius: 3px; background: repeating-linear-gradient(-45deg, #e6e4df 0 3px, #fbfaf8 3px 6px); }
.lg-blk { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: #3e3c3f; }
.lg-blk.away { background: repeating-linear-gradient(-45deg, #c9c7cb 0 2px, #fff 2px 4px); box-shadow: inset 0 0 0 1.5px #9a989c; }
.lg-minl { display: inline-block; width: 22px; border-top: 2px dashed #8c8a8f; }
.lg-gap { margin-left: 14px; padding-left: 14px; border-left: 1px solid var(--line); }

@media (max-width: 820px) {
  .ch-c.work::before { top: 11px; bottom: 11px; }
  .ch-col b { font-size: 8.5px; }
  .ch-col.low b { padding: 1px 2px; }
  .stk { width: 80%; gap: 1px; }
  .ch-chart .ch-name small { display: none; }
  .ch-min span { font-size: 9px; top: -14px; }
  .lg-gap { margin-left: 0; padding-left: 0; border-left: 0; }
}
@media (max-width: 820px) { .ch-col:not(.low) b { visibility: hidden; } }
.lg-lowday { background: var(--bad-bg); color: var(--bad); border-radius: 50%; min-width: 22px; height: 22px; }

/* ===== v práci = sytá barva, volno = vybledlé ===== */
.ch-c.work::before { background: var(--c); top: 13px; bottom: 13px; }
.ch-bar {
  background: color-mix(in srgb, var(--c) 8%, #fff); color: var(--muted);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 30%, #fff); font-weight: 700;
}
.ch-bar span { color: var(--ink-2); }
.ch-bar:hover { box-shadow: inset 0 0 0 1.5px var(--c), 0 6px 14px -8px rgba(0, 0, 0, .3); }
.ch-bar.pending {
  background: repeating-linear-gradient(-45deg, #fff 0 5px, color-mix(in srgb, var(--c) 10%, #fff) 5px 10px);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 30%, #fff); border: 0;
}
.ch-bar.pending span { background: none; padding: 0; }
.lg-work { background: #3e3c3f; }
.lg-solid { background: #f7f6f7; box-shadow: inset 0 0 0 1.5px #d6d4d7; }
.lg-solid.pend { background: repeating-linear-gradient(-45deg, #fff 0 3px, #ecebed 3px 6px); box-shadow: inset 0 0 0 1.5px #d6d4d7; }
@media (max-width: 820px) { .ch-c.work::before { top: 10px; bottom: 10px; } }

/* ===== všechny pobočky pod sebou (admin) ===== */
.btab.all svg { width: 16px; height: 16px; }
.btab.all { border-style: dashed; }
.btab.all.on { border-style: solid; }
.all-sec { margin-bottom: 18px; }
.all-sec .ch { margin-bottom: 0; }
.all-sec .cal-legend { display: none; }
.all-sec:last-child .cal-legend { display: flex; }
.all-sec .cal-empty { padding: 22px; flex-direction: row; justify-content: space-between; text-align: left; flex-wrap: wrap; }
.all-sec .cal-empty b { font-size: 17px; }
.all-sec .cal-empty p { margin: 0; }
.all-h { font: 800 22px/1.1 var(--display); letter-spacing: -0.02em; margin: 26px 0 10px; }
.all-sec:first-of-type .all-h { margin-top: 4px; }
