/* Vzhled aplikace D'Eclair shifts. Vychází z maket a z firemní identity:
   Barlow + Playfair Display, petrolejová #0E2E39, červená #CA172B. */

:root {
  --ground: #F7F5F1;
  --surface: #FFFFFF;
  --surface-sunk: #F2EFE9;
  --band: #EAE7E1;
  --ink: #0E2E39;
  --ink-soft: #4F6B77;
  --ink-faint: #8AA1AB;
  --rule: #E3DED5;
  --rule-soft: #EFEBE4;
  --accent: #CA172B;
  --accent-soft: #FDECEE;

  --konf: #FFE7B3;   --konf-ink: #8A5700;
  --vcn:  #C4F0E2;   --vcn-ink:  #0B6A55;
  --priv: #CCE2FF;   --priv-ink: #14508F;
  --palm: #E4D9FF;   --palm-ink: #5334A6;
  --quad: #FFDBC6;   --quad-ink: #A04517;
  --absence: #E9E5DD; --absence-ink: #6B6659;

  --weekend: #EFEBE2;
  --hair: #EFECE6;
  --hair-week: #DFDAD0;
  --gap: #FDE7EA;

  --shadow: 0 1px 2px rgba(14,46,57,.05), 0 10px 30px -16px rgba(14,46,57,.22);
  --radius: 6px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #0E2730;
    --surface: #14313B;
    --surface-sunk: #112A33;
    --band: #1B3D48;
    --ink: #EAF2F4;
    --ink-soft: #A6C0C8;
    --ink-faint: #7594A0;
    --rule: #23454F;
    --rule-soft: #1B3A44;
    --accent: #FF6B7E;
    --accent-soft: #3C2229;

    --konf: #6A552C; --konf-ink: #FFE3AC;
    --vcn:  #14574A; --vcn-ink:  #A8EBD8;
    --priv: #1B3F68; --priv-ink: #BDD9FF;
    --palm: #3B2F63; --palm-ink: #DCCFFF;
    --quad: #6A3A1E; --quad-ink: #FFD2B6;
    --absence: #2A3A42; --absence-ink: #A9BDC5;

    --weekend: #0C222A;
    --hair: #193740;
    --hair-week: #26474F;
    --gap: #45222A;

    --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 30px -16px rgba(0,0,0,.6);
  }
}

:root[data-theme="dark"] {
  --ground: #0E2730;
  --surface: #14313B;
  --surface-sunk: #112A33;
  --band: #1B3D48;
  --ink: #EAF2F4;
  --ink-soft: #A6C0C8;
  --ink-faint: #7594A0;
  --rule: #23454F;
  --rule-soft: #1B3A44;
  --accent: #FF6B7E;
  --accent-soft: #3C2229;

  --konf: #6A552C; --konf-ink: #FFE3AC;
  --vcn:  #14574A; --vcn-ink:  #A8EBD8;
  --priv: #1B3F68; --priv-ink: #BDD9FF;
  --palm: #3B2F63; --palm-ink: #DCCFFF;
  --quad: #6A3A1E; --quad-ink: #FFD2B6;
  --absence: #2A3A42; --absence-ink: #A9BDC5;

  --weekend: #0C222A;
  --hair: #193740;
  --hair-week: #26474F;
  --gap: #45222A;

  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 30px -16px rgba(0,0,0,.6);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: Barlow, "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1800px; margin: 0 auto; padding: 38px 28px 72px; }

header.top { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }

.logo { height: 40px; width: auto; display: block; }
.logo.on-dark { display: none; }
:root[data-theme="dark"] .logo.on-light { display: none; }
:root[data-theme="dark"] .logo.on-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo.on-light { display: none; }
  :root:not([data-theme="light"]) .logo.on-dark { display: block; }
}

.headtools { display: flex; align-items: center; gap: 18px; }
.meta { color: var(--ink-faint); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; font-weight: 500; }

.themetoggle {
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  background: var(--surface); color: var(--ink-soft);
  border: 1px solid var(--rule); border-radius: 999px; padding: 7px 15px;
  display: inline-flex; align-items: center; gap: 7px;
}
.themetoggle:hover { color: var(--ink); border-color: var(--ink-faint); }
.themetoggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

h1 {
  font-weight: 200; font-size: clamp(30px, 4.5vw, 46px); letter-spacing: -1px;
  margin: 30px 0 10px; text-wrap: balance; line-height: 1.08;
}
.lede { color: var(--ink-soft); max-width: 62ch; font-size: 17px; font-weight: 300; margin: 0; }

nav.views { display: flex; gap: 6px; margin: 36px 0 6px; flex-wrap: wrap; }
nav.views button {
  font: inherit; font-weight: 500; font-size: 14px;
  background: var(--surface); color: var(--ink-soft);
  border: 1px solid var(--rule); border-radius: 999px;
  padding: 9px 18px; cursor: pointer; transition: .16s;
}
nav.views button:hover { border-color: var(--ink-faint); color: var(--ink); }
nav.views button[aria-selected="true"] {
  background: var(--ink); color: var(--surface); border-color: var(--ink);
}
nav.views button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.verdict {
  display: flex; gap: 14px; align-items: flex-start;
  border-left: 3px solid var(--accent); background: var(--surface);
  padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0;
  margin: 22px 0 26px; box-shadow: var(--shadow);
}
.verdict p { margin: 0; font-size: 15px; color: var(--ink-soft); max-width: 78ch; }
.verdict strong { color: var(--ink); font-weight: 600; }
.verdict code { background: var(--surface-sunk); padding: 1px 5px; border-radius: 4px; font-family: Barlow, sans-serif; font-weight: 600; font-size: 13px; color: var(--ink); }

section.view { display: none; }
section.view.active { display: block; }

/* ---- POHLED 1: plánovací mřížka ---- */
.gridwrap {
  background: var(--surface); border-radius: 10px; box-shadow: var(--shadow);
  overflow-x: auto; overflow-y: visible;
}
table.plan { border-collapse: separate; border-spacing: 0; width: max-content; min-width: 100%; }
table.plan th, table.plan td { padding: 0; }

.colname {
  position: sticky; left: 0; z-index: 3; background: var(--surface);
  width: 210px; min-width: 210px; text-align: left;
  padding: 0 16px 0 20px !important;
  border-right: 1px solid var(--rule-soft);
}
thead .colname { z-index: 5; }

thead th {
  position: sticky; top: 0; background: var(--surface); z-index: 2;
  border-bottom: 1px solid var(--rule); padding-bottom: 8px !important; padding-top: 14px !important;
}
thead th.day { width: 36px; min-width: 36px; }
.dnum { font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.dwd { font-size: 10px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .06em; }
thead th.we .dnum, thead th.we .dwd { color: var(--ink-faint); }
thead th.sumcol { width: 78px; min-width: 78px; text-align: right; padding-right: 20px !important; font-size: 11px; color: var(--ink-faint); text-transform: uppercase; letter-spacing: .1em; }

tbody td.day {
  height: 40px; text-align: center; vertical-align: middle;
  /* Mřížka je záměrně na hraně viditelnosti — má pomoct oku sledovat řádek
     a sloupec, ne orámovat každou buňku jako v tabulkovém procesoru. */
  border-right: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
}
thead th.day { border-right: 1px solid var(--hair); }

/* Pondělí dostane o kousek výraznější čáru, takže jsou týdny vidět jako celky. */
thead th.day.weekstart, tbody td.day.weekstart { border-left: 1px solid var(--hair-week); }
tbody tr td.we { background: var(--weekend); }
tbody tr:last-child td.day { border-bottom: none; }
tbody tr:hover td { background: var(--surface-sunk); }
tbody tr:hover td.we { background: var(--weekend); }
tbody tr:hover td.colname { background: var(--surface-sunk); }

.person { display: flex; align-items: center; gap: 11px; height: 40px; }
.avatar {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 26px;
  background: var(--band); color: var(--ink-soft);
  font-size: 10px; font-weight: 600; letter-spacing: .02em;
  display: grid; place-items: center;
}
.pname { font-size: 14px; font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pill {
  display: inline-block; min-width: 30px; padding: 3px 6px; border-radius: 5px;
  font-size: 11.5px; font-weight: 600; letter-spacing: .01em; line-height: 1.4;
  font-variant-numeric: tabular-nums; cursor: default;
}
.pill.konf { background: var(--konf); color: var(--konf-ink); }
.pill.vcn  { background: var(--vcn);  color: var(--vcn-ink); }
.pill.priv { background: var(--priv); color: var(--priv-ink); }
.pill.palm { background: var(--palm); color: var(--palm-ink); }
.pill.quad { background: var(--quad); color: var(--quad-ink); }
.pill.abs  { background: var(--absence); color: var(--absence-ink); font-weight: 500; }
.pill.foreign { opacity: .62; }
.pill.unknown { background: transparent; color: var(--accent); border: 1px dashed var(--accent); font-weight: 600; }

td.sum { text-align: right; padding-right: 20px !important; font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--ink-soft); }
td.sum b { color: var(--ink); font-weight: 600; }

tr.grouphead td {
  background: var(--surface-sunk); padding: 7px 20px !important;
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink-faint); border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft);
}
tr.grouphead td.colname { position: sticky; left: 0; z-index: 3; background: var(--surface-sunk); }

tr.open td.colname .pname { color: var(--accent); font-weight: 600; }
.pill.open { background: var(--gap); color: var(--accent); border: 1px dashed var(--accent); font-weight: 600; }

tfoot td { border-top: 1px solid var(--rule); padding-top: 10px !important; padding-bottom: 14px !important; }
tfoot .cover { font-size: 10px; font-variant-numeric: tabular-nums; color: var(--ink-faint); text-align: center; }
tfoot .cover.short { color: var(--accent); font-weight: 700; }
tfoot td.colname { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-faint); }

.legend { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 20px 2px 0; }
.legend span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-soft); }
.swatch { width: 13px; height: 13px; border-radius: 3px; display: inline-block; }

/* ---- POHLED 2: kalendář ---- */
.calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--rule-soft); border: 1px solid var(--rule-soft); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); }
.calhead { background: var(--surface); padding: 10px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint); font-weight: 600; }
.calday { background: var(--surface); min-height: 132px; padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 5px; }
.calday.off { background: var(--surface-sunk); }
.calday.blank { background: var(--surface-sunk); min-height: 132px; }
.caldate { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.calday.off .caldate { color: var(--ink-faint); }
.calrow { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; }
.calrow .pill { min-width: 0; padding: 1px 5px; font-size: 10.5px; }
.calmore { font-size: 11px; color: var(--accent); font-weight: 600; margin-top: auto; }

/* ---- POHLED 3: denní osa ---- */
.daypick { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.daypick button {
  font: inherit; font-size: 13px; font-weight: 500; background: var(--surface); color: var(--ink-soft);
  border: 1px solid var(--rule); border-radius: var(--radius); padding: 7px 13px; cursor: pointer;
  font-variant-numeric: tabular-nums;
}
.daypick button[aria-selected="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.daypick button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.timeline { background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); padding: 20px 24px 26px; overflow-x: auto; }
.tlrow { display: grid; grid-template-columns: 190px 1fr; gap: 18px; align-items: center; min-width: 700px; }
.tlrow + .tlrow { margin-top: 6px; }
.tlname { font-size: 13.5px; font-weight: 500; }
.tlname small { display: block; font-size: 11px; color: var(--ink-faint); font-weight: 400; }
.track { position: relative; height: 42px; background: var(--surface-sunk); border-radius: var(--radius); }
.bar {
  position: absolute; top: 5px; height: 32px; border-radius: 5px;
  display: flex; align-items: center; padding: 0 9px; gap: 7px;
  font-size: 11.5px; font-weight: 500; overflow: hidden; white-space: nowrap;
}
.bar code { font-weight: 700; font-size: 10.5px; opacity: .75; font-family: Barlow, sans-serif; }
.hole {
  position: absolute; top: 5px; height: 32px; border-radius: 5px;
  background: var(--gap); border: 1px dashed var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--accent);
}
.axis { display: grid; grid-template-columns: 190px 1fr; gap: 18px; margin-top: 10px; min-width: 700px; }
.ticks { position: relative; height: 18px; }
.tick { position: absolute; font-size: 10.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; transform: translateX(-50%); }

footer.note { margin-top: 46px; padding-top: 22px; border-top: 1px solid var(--rule); color: var(--ink-faint); font-size: 13px; max-width: 76ch; }
footer.note b { color: var(--ink-soft); font-weight: 600; }
footer.note code { background: var(--surface-sunk); padding: 1px 5px; border-radius: 4px; font-family: Barlow, sans-serif; font-weight: 600; color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---- doplňky pro živou aplikaci ---- */
.brandline { display: flex; align-items: baseline; gap: 9px; }
.wordmark { font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 26px; letter-spacing: -.5px; }
.wordmark .wm-accent { color: var(--accent); }
.wordmark-sub { font-size: 13px; text-transform: uppercase; letter-spacing: .22em; color: var(--ink-faint); font-weight: 500; }

.pagehead { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 30px 0 4px; }
.pagehead h1 { margin: 0; }
.monthnav { display: flex; gap: 14px; }
.monthnav a { color: var(--ink-soft); text-decoration: none; font-size: 14px; font-weight: 500; border-bottom: 1px solid transparent; }
.monthnav a:hover { color: var(--ink); border-bottom-color: var(--accent); }
.monthnav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.lede strong { color: var(--ink); font-weight: 600; }

.siteform select {
  font: inherit; font-size: 14px; font-weight: 500;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 999px; padding: 7px 14px; cursor: pointer;
}
.siteform select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

thead th.holiday .dnum { color: var(--accent); }
tbody td.holiday { background: var(--accent-soft); }

.sw-konf { background: var(--konf); }
.sw-vcn { background: var(--vcn); }
.sw-priv { background: var(--priv); }
.sw-palm { background: var(--palm); }
.sw-quad { background: var(--quad); }
.sw-absence { background: var(--absence); }
.sw-open { background: var(--gap); border: 1px dashed var(--accent); }

tfoot td.cover { border-top: 1px solid var(--rule); padding-top: 10px; padding-bottom: 14px; }

.empty { background: var(--surface); border-radius: 10px; box-shadow: var(--shadow); padding: 40px; margin-top: 40px; }
.empty h1 { margin-top: 0; }
.empty pre { background: var(--surface-sunk); padding: 14px 16px; border-radius: var(--radius); overflow-x: auto; font-size: 13px; }

/* ---- plnění matice ---- */

table.plan[data-editable] td.day[data-user] { position: relative; cursor: cell; }

td.day.selected {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
  border-radius: 3px;
}

td.day.saving { opacity: .5; }

td.day.rejected { background: var(--gap) !important; }

/* Rozepsaná buňka přeroste svůj sloupec, aby se dal kód i našeptávač přečíst. */
.celleditor { position: absolute; inset: 0 auto 0 0; z-index: 20; width: 150px; }

.celleditor input {
  font: inherit; font-size: 12.5px; font-weight: 600;
  width: 100%; height: 100%;
  padding: 0 8px; border: 2px solid var(--accent); border-radius: 4px;
  background: var(--surface); color: var(--ink);
}
.celleditor input:focus { outline: none; }

.suggestions {
  list-style: none; margin: 3px 0 0; padding: 4px;
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-height: 260px; overflow-y: auto; min-width: 230px;
}
.suggestions:empty { display: none; }
.suggestions li {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 7px; border-radius: 4px; cursor: pointer; white-space: nowrap;
}
.suggestions li.active { background: var(--surface-sunk); }
.suggestions .sdesc { font-size: 11.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; }

.hint { margin: 18px 2px 0; font-size: 12.5px; color: var(--ink-faint); }
.hint kbd {
  font: inherit; font-size: 11.5px; font-weight: 600;
  background: var(--surface); border: 1px solid var(--rule); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 6px; color: var(--ink-soft);
}

.notice {
  position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 16px);
  background: var(--ink); color: var(--surface);
  padding: 12px 20px; border-radius: 999px; font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow); max-width: min(640px, 90vw);
  opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 100;
}
.notice.visible { opacity: 1; transform: translate(-50%, 0); }
.notice[data-kind="error"] { background: var(--accent); color: #fff; }

/* ---- výběr oblasti, protahování ---- */

td.day.selected { background: var(--accent-soft) !important; }
td.day.anchor { outline: 2px solid var(--accent); outline-offset: -2px; border-radius: 3px; }
td.day.fillpreview { background: var(--band) !important; }

/* Úchyt pro protažení kódu přes další dny — jako v tabulkovém procesoru,
   protože právě tenhle pohyb dělá plnění rychlým. */
.fillhandle {
  position: absolute; right: -3px; bottom: -3px;
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--accent); border: 1px solid var(--surface);
  cursor: crosshair; z-index: 15;
}

table.plan[data-editable] { user-select: none; }
table.plan[data-editable] td.day[data-user] { position: relative; cursor: cell; }

/* ---- stav rozpisu ---- */

.statebar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin: 18px 0 24px; padding: 12px 18px;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
}
.state {
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em;
  padding: 4px 11px; border-radius: 999px;
}
.state--draft { background: var(--band); color: var(--ink-soft); }
.state--published { background: var(--vcn); color: var(--vcn-ink); }
.state--closed { background: var(--ink); color: var(--surface); }
.statedesc { font-size: 13.5px; color: var(--ink-soft); flex: 1 1 auto; }
.stateactions { display: flex; gap: 8px; }
.stateactions form { margin: 0; }

.btn {
  font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); border-radius: var(--radius); padding: 7px 14px;
}
.btn:hover { border-color: var(--ink-faint); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn--warn { border-color: var(--accent); color: var(--accent); }
.btn--primary { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.flash {
  background: var(--vcn); color: var(--vcn-ink);
  padding: 12px 18px; border-radius: var(--radius); font-size: 14px; font-weight: 500;
  margin: 0 0 22px;
}

/* ---- navigace a správa ---- */

.mainnav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.mainnav a {
  font-size: 14px; font-weight: 500; color: var(--ink-soft); text-decoration: none;
  padding: 7px 13px; border-radius: 999px; border: 1px solid transparent;
}
.mainnav a:hover { color: var(--ink); background: var(--surface); }
.mainnav a.active { background: var(--ink); color: var(--surface); }
.mainnav a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mainnav .themetoggle { margin-left: 10px; }
a.brandline { text-decoration: none; color: inherit; }

.panel {
  background: var(--surface); border-radius: 10px; box-shadow: var(--shadow);
  padding: 4px 0; margin-bottom: 22px; overflow-x: auto;
}
.panel.form, .panel.inlineform { padding: 22px 24px; }

table.list { width: 100%; border-collapse: collapse; font-size: 14px; }
table.list th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--ink-faint); font-weight: 600; padding: 14px 16px 10px;
  border-bottom: 1px solid var(--rule);
}
table.list td { padding: 11px 16px; border-bottom: 1px solid var(--rule-soft); vertical-align: middle; }
table.list tr:last-child td { border-bottom: none; }
table.list tr.muted td { opacity: .5; }
table.list td.num, table.list th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.list td.right { text-align: right; }
table.list td.nowrap { white-space: nowrap; }
table.list td.wrapcell { max-width: 340px; }
table.list a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
table.list a:hover { border-bottom-color: var(--accent); }
.empty-row { color: var(--ink-faint); font-style: italic; }
.dim { color: var(--ink-faint); }

.tag {
  display: inline-block; background: var(--surface-sunk); color: var(--ink-soft);
  font-size: 11.5px; padding: 2px 8px; border-radius: 999px; margin: 1px 3px 1px 0;
}

h2.section { font-size: 20px; font-weight: 300; margin: 34px 0 4px; }
.sectionnote { color: var(--ink-soft); font-size: 14px; margin: 0 0 16px; max-width: 72ch; }

/* ---- formuláře ---- */

.form { display: flex; flex-direction: column; gap: 18px; }
.fieldrow { display: flex; gap: 18px; flex-wrap: wrap; }
.fieldrow > .field { flex: 1 1 190px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.field .req { color: var(--accent); }
.field input, .field select, .field textarea, .inlineform input, .inlineform select, .filterbar select {
  font: inherit; font-size: 14px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--rule); border-radius: var(--radius); padding: 8px 11px;
}
.field input[type="color"] { padding: 3px; height: 38px; }
.field input:focus, .field select:focus, .field textarea:focus,
.inlineform input:focus, .inlineform select:focus {
  outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent);
}
.fieldhint { font-size: 12px; color: var(--ink-faint); }
.fielderror { font-size: 12.5px; color: var(--accent); font-weight: 500; }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }

.checkgroup { border: 1px solid var(--rule); border-radius: var(--radius); padding: 16px 18px; }
.checkgroup legend { font-size: 13px; font-weight: 500; color: var(--ink-soft); padding: 0 6px; }
.checkgroup__site { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; margin-top: 12px; }
.checkgroup__site strong { font-size: 12.5px; color: var(--ink-faint); min-width: 120px; }

.formactions { display: flex; gap: 10px; }
.inlineform { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inlineform.addrow { padding: 14px 16px; border-top: 1px solid var(--rule-soft); }
.filterbar { display: flex; gap: 10px; align-items: center; margin-bottom: 18px; font-size: 13px; color: var(--ink-soft); }

.danger { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.danger .hint { margin: 0; }
.linkbtn {
  font: inherit; font-size: 13.5px; background: none; border: none; cursor: pointer;
  color: var(--ink-soft); border-bottom: 1px solid var(--rule); padding: 0;
}
.linkbtn:hover { color: var(--accent); border-bottom-color: var(--accent); }

.reception { padding-bottom: 0; }
.receptionhead { padding: 16px 18px 6px; }

.sitepick { margin-top: 26px; }
.sitepick select {
  font: inherit; font-size: 14px; font-weight: 500;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); border-radius: 999px; padding: 7px 14px; cursor: pointer;
}

/* ---- přihlášení ---- */

.authbox {
  max-width: 420px; margin: 8vh auto 0;
  background: var(--surface); border-radius: 10px; box-shadow: var(--shadow);
  padding: 34px 34px 30px;
}
.authbox h1 { font-size: 28px; margin: 22px 0 20px; }
.authsep { border: none; border-top: 1px solid var(--rule-soft); margin: 26px 0 20px; }
.authhint { font-size: 13.5px; color: var(--ink-soft); margin: 0; }
.whoami { font-size: 13px; color: var(--ink-faint); margin-left: 10px; }
.logoutform { display: inline; }

.notice-inline {
  background: var(--surface-sunk); border-left: 3px solid var(--ink-faint);
  padding: 12px 16px; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 13.5px; color: var(--ink-soft);
}
.notice-inline strong { color: var(--ink); }

/* ---- díry v pokrytí ---- */

.gapbox {
  background: var(--surface); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow);
  padding: 14px 18px; margin-bottom: 22px;
}
.gapbox summary { cursor: pointer; font-size: 14px; color: var(--ink-soft); }
.gapbox summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.gapcount { font-weight: 600; color: var(--accent); }
.gaplist { list-style: none; margin: 14px 0 2px; padding: 0; display: flex; flex-direction: column; gap: 7px; }
.gaplist li { font-size: 13.5px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; }
.gaplist strong { color: var(--ink); min-width: 90px; font-variant-numeric: tabular-nums; }
.gapitem {
  background: var(--gap); color: var(--accent); font-weight: 500;
  padding: 2px 9px; border-radius: 999px; font-size: 12.5px;
}

/* ---------- Moje směny ---------- */
/* Karty, ne tabulka — tahle obrazovka je předloha pro telefon. */

.weekblock { margin: 30px 0 0; }
.weekhead {
  font-family: 'Barlow', system-ui, sans-serif; font-weight: 300; font-size: 15px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint);
  margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--rule);
}

.shiftcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.shiftcard {
  display: grid; grid-template-columns: 74px 1fr auto; align-items: center; gap: 16px;
  padding: 14px 18px; background: var(--surface); border: 1px solid var(--rule);
  border-radius: 10px; box-shadow: var(--shadow);
}
.shiftcard.is-weekend { background: var(--weekend); }
.shiftcard.is-absence { border-left: 3px solid var(--accent); }

.sc-when { display: flex; flex-direction: column; line-height: 1.15; }
.sc-day { font-size: 22px; font-weight: 500; }
.sc-wd { font-size: 13px; color: var(--ink-faint); }

.sc-time { font-size: 17px; font-weight: 500; }
.sc-where { font-size: 14px; color: var(--ink-soft); }
.sc-note { font-size: 13px; color: var(--ink-faint); margin-top: 2px; }

.sc-code { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.sc-hours { font-size: 13px; color: var(--ink-faint); }

/* Na telefonu se hodiny schovají pod obsah, aby zbylo místo na názvy. */
@media (max-width: 560px) {
  .shiftcard { grid-template-columns: 56px 1fr; }
  .sc-code { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; }
}

/* ---------- odběr kalendáře ---------- */

.calbox {
  margin: 22px 0 0; padding: 14px 18px; background: var(--surface-sunk);
  border: 1px solid var(--rule); border-radius: 10px;
}
.calbox > summary { cursor: pointer; font-weight: 500; }
.calbox > summary::marker { color: var(--ink-faint); }
.calnote { font-size: 14px; color: var(--ink-soft); margin: 12px 0; max-width: 68ch; }
.calurl {
  width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; padding: 9px 11px; border: 1px solid var(--rule);
  border-radius: 6px; background: var(--surface); color: var(--ink);
}
