/* =========================================================================
   Docházka — vizuální identita Q2 podle Skynet
   oddeleni/identita/system/design-tokens.md (zdroj: Šablona prezentace Q2.potx).

   Arial · text #333333 · azurová #3DD3FC · zelená #33C43A · červená #F92121
   · žlutá #FFE800 jen bodově · odkazy/tlačítka #0b85b4 · pozadí #f5f6f7
   · linky #e3e5e8 · zaoblené rohy · horní lišta gradient zelená → azurová.

   Azurová a zelená z .potx jsou dekor — jako text na bílé nejsou čitelné,
   proto pro text a odkazy slouží ztmavené varianty (*-dark) jako ve
   status-dashboardu. Jiné odstíny se nezavádí; chybí-li, doplňuje se
   design-tokens.md.

   Identitu typu absence nese vždy **kód písmene**, barva je až posila.
   Rozvržení podle vzorů z Mobbinu (Remote, Oyster, Aboard, Employment Hero):
   postranní navigace, dlaždice zůstatků, časová osa lidé × dny.
   ========================================================================= */

:root {
  /* --- tokeny z .potx --- */
  --q2-dark: #333333;
  --q2-cyan: #3DD3FC;
  --q2-green: #33C43A;
  --q2-red: #F92121;
  --q2-yellow: #FFE800;
  --q2-gradient: linear-gradient(105deg, var(--q2-green) 0 30%, var(--q2-cyan) 70% 100%);

  /* --- odvozené (design-tokens.md, status-dashboard) --- */
  --q2-cyan-dark: #0b85b4;
  --q2-cyan-darker: #096d94;
  --q2-green-dark: #1f8a3b;
  --q2-amber: #d97706;
  --q2-grey: #9aa1a9;

  --bg: #f5f6f7;
  --surface: #ffffff;
  --text: #333333;
  --muted: #6b7280;
  --line: #e3e5e8;
  --line-strong: #9aa1a9;

  --accent: var(--q2-cyan-dark);
  --accent-hover: var(--q2-cyan-darker);
  --danger: var(--q2-red);

  --radius: 10px;
  --radius-sm: 6px;
  --side-w: 236px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--q2-cyan-dark);
  outline-offset: 2px;
}

h1, h2, h3 { color: var(--q2-dark); line-height: 1.25; margin: 0 0 0.5rem; }
h1 { font-size: 1.5rem; font-weight: 700; }
h2 { font-size: 1.1rem; font-weight: 700; }
h3 { font-size: 0.95rem; font-weight: 700; }
h1 b, h2 b, h3 b, .eb { font-weight: 700; }
strong, b { font-weight: 700; }
.grad { background: var(--q2-gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error, .warntext { color: var(--danger); }
.rule { border: 0; height: 3px; background: var(--q2-gradient); margin: 1rem 0; border-radius: 2px; }

/* --- rám: postranní navigace + obsah --------------------------------------- */

.shell { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }

.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 1.25rem;
  background: var(--surface);
  border-right: 1px solid var(--line);
  padding: 0 0 1rem;
}
.side::before { content: ""; display: block; height: 4px; background: var(--q2-gradient); }
.brand {
  display: flex; align-items: center; gap: 0.55rem;
  padding: 0.6rem 1.1rem 0; color: var(--q2-dark); font-weight: 700; font-size: 1.05rem;
}
.brand:hover { text-decoration: none; }
.brand .q2 {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border-radius: var(--radius-sm); background: var(--q2-dark); color: #fff;
  font-size: 0.8rem; letter-spacing: 0.02em;
}
.brand.big { font-size: 1.4rem; padding: 0; }
.brand.big .q2 { width: 40px; height: 40px; font-size: 1rem; }

.side-group { display: flex; flex-direction: column; gap: 2px; padding: 0 0.6rem; }
.side-group .label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--muted); padding: 0 0.5rem 0.3rem;
}
.side-group a {
  display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
  padding: 0.45rem 0.6rem; border-radius: var(--radius-sm);
  color: var(--text);
}
.side-group a:hover { background: var(--bg); text-decoration: none; }
.side-group a.on { background: var(--bg); color: var(--q2-dark); font-weight: 700; box-shadow: inset 3px 0 0 var(--q2-cyan); }

.side-user {
  margin-top: auto; padding: 0.9rem 1.1rem 0; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.15rem;
}
.side-user .name { font-weight: 700; }
.side-user .roles { color: var(--muted); font-size: 0.8rem; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; }

.content { min-width: 0; display: flex; flex-direction: column; }
main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 1.4rem 1.8rem 2rem; }
main.narrow { max-width: 460px; }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  flex-wrap: wrap; margin-bottom: 1rem;
}
.page-head h1 { margin: 0; }
.page-head p { margin: 0.2rem 0 0; }

.foot { color: var(--muted); font-size: 0.8rem; padding: 1rem 1.8rem 1.5rem; margin-top: auto; }

/* Stará horní lišta — zůstává pro stránky mimo rám (přihlášení). */
.topbar {
  display: flex; align-items: center; gap: 1.2rem; background: var(--surface);
  padding: 0.55rem 1rem; border-bottom: 3px solid; border-image: var(--q2-gradient) 1;
}
.topbar nav { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.topbar nav a { color: var(--text); }
.topbar nav a:hover { color: var(--accent); }
.userbox { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; color: var(--muted); }

/* --- karty a hlavičky ------------------------------------------------------ */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 0 0 1rem;
}
.card > :last-child { margin-bottom: 0; }
.person-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 0.6rem;
}
.person-head h1, .person-head h2 { margin-bottom: 0.2rem; }
.person-head p { margin: 0; }

.year-switch { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.year-switch a { padding: 0.3rem 0.8rem; color: var(--text); }
.year-switch a + a { border-left: 1px solid var(--line); }
.year-switch a.on { background: var(--q2-dark); color: #fff; }
.year-switch a:hover { text-decoration: none; }

/* --- dlaždice zůstatků (Moje stránka) --------------------------------------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0.9rem; margin-bottom: 1rem; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.95rem 1.1rem; display: flex; flex-direction: column; gap: 0.15rem;
}
.stat .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.stat strong { font-size: 2rem; line-height: 1.1; color: var(--q2-dark); }
.stat strong small { font-size: 0.95rem; font-weight: 400; color: var(--muted); margin-left: 0.2rem; }
.stat .sub { font-size: 0.82rem; color: var(--muted); }
.stat.primary { position: relative; overflow: hidden; }
.stat.primary::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--q2-gradient); }
.stat.alert { border-color: var(--danger); }
.stat.alert strong { color: var(--danger); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }

.headline { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin: 0.4rem 0 0.8rem; }
.big-number { display: flex; align-items: baseline; gap: 0.5rem; }
.big-number strong { font-size: 2.4rem; line-height: 1; }
.big-number span { color: var(--muted); }

.bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--bg); margin: 0.6rem 0; }
.bar .seg { display: block; height: 100%; }
.seg.taken, .sw.taken { background: var(--q2-dark); }
.seg.planned, .sw.planned { background: var(--q2-cyan); }
.seg.free, .sw.free { background: var(--q2-green); }
.legend { list-style: none; display: flex; gap: 1.1rem; flex-wrap: wrap; padding: 0; margin: 0 0 0.8rem; font-size: 0.85rem; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 0.4rem; }
.sw { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

/* --- tabulky --------------------------------------------------------------- */

table { border-collapse: collapse; width: 100%; }
.facts th, .facts td { text-align: left; padding: 0.45rem 0.6rem 0.45rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts th { font-weight: 400; color: var(--muted); white-space: nowrap; width: 1%; padding-right: 1.2rem; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts tr.warn td, .facts tr.warn th { color: var(--danger); }

.grid th, .grid td { text-align: left; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.grid th {
  font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700;
  color: var(--muted); background: var(--bg);
}
.grid thead th:first-child { border-top-left-radius: var(--radius-sm); }
.grid thead th:last-child { border-top-right-radius: var(--radius-sm); }
.grid tbody tr:hover td { background: var(--bg); }
.grid tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
details.row-action summary { font-size: 0.85rem; white-space: nowrap; }
details.row-action[open] summary { margin-bottom: 0.4rem; }

.bars th { font-weight: 400; text-align: left; padding: 0.45rem 1rem 0.45rem 0; white-space: nowrap; width: 1%; }
.bars td { padding: 0.45rem 0 0.45rem 0.8rem; white-space: nowrap; }
.bars td.num { font-weight: 700; width: 4.5rem; }
.barcell { width: 100%; padding-left: 0 !important; }
.barcell { background-image: linear-gradient(var(--bg), var(--bg)); background-size: 100% 10px; background-position: left center; background-repeat: no-repeat; }
.minibar { display: block; height: 10px; border-radius: 999px; background: var(--q2-cyan); min-width: 2px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.8rem; }
.tile { border: 1px solid var(--line); border-radius: var(--radius); padding: 0.8rem 1rem; display: flex; flex-direction: column; gap: 0.1rem; background: var(--surface); }
.tile .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.tile strong { font-size: 1.6rem; }
.tile .sub { font-size: 0.82rem; color: var(--muted); }
.tile.alert { border-color: var(--danger); }

/* --- typy absencí: kód písmene nese identitu, barva posiluje ---------------- */

.tag {
  display: inline-grid; place-items: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.35rem;
  border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  font-size: 0.78rem; font-weight: 700; color: var(--q2-dark); background: var(--surface);
  vertical-align: middle;
}
.t-dov  { background: var(--q2-cyan); border-color: var(--q2-cyan); color: var(--q2-dark); }
.t-pn   { background: var(--q2-red); border-color: var(--q2-red); color: #fff; }
.t-dr   { background: var(--q2-dark); border-color: var(--q2-dark); color: #fff; }
.t-nv   { background: var(--q2-grey); border-color: var(--q2-grey); color: #fff; }
.t-sick { background: var(--q2-green); border-color: var(--q2-green); color: var(--q2-dark); }
.t-ho   { background: var(--surface); border-color: var(--q2-cyan-dark); color: var(--q2-cyan-dark); }
.t-abs  { background: var(--bg); border: 1px dashed var(--line-strong); color: var(--muted); }

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

.stack { display: flex; flex-direction: column; gap: 0.6rem; }
label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.85rem; color: var(--muted); }
input, select, textarea {
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem; min-height: 2.3rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--q2-cyan-dark); outline: none; box-shadow: 0 0 0 3px rgba(61, 211, 252, 0.25); }
input.tiny { width: 5rem; }
input.tiny-wide { width: 9rem; }
.check { flex-direction: row; align-items: center; gap: 0.45rem; color: var(--text); font-size: 0.9rem; }
.check input { min-height: 0; width: 1rem; height: 1rem; accent-color: var(--q2-cyan-dark); }
.filters { display: flex; gap: 0.8rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 0.9rem; }
.filters label { min-width: 150px; }
.inline { display: inline-flex; gap: 0.4rem; align-items: center; margin: 0; }
.admin-form {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 0.8rem 1rem; align-items: end;
}
.admin-form .check { min-height: 2.3rem; }
.admin-form button { justify-self: start; }
.admin-form input:not([type="checkbox"]):not([type="radio"]), .admin-form select { width: 100%; }
.admin-form .check { flex-direction: row; justify-content: flex-start; }
.months td { padding: 0.2rem; }
.person-admin { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  font: inherit; font-weight: 700; cursor: pointer;
  padding: 0.55rem 1.05rem; border-radius: var(--radius-sm);
  border: 1px solid var(--accent); background: var(--accent); color: #fff;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; }
.btn.ghost { background: var(--surface); color: var(--accent); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); background: var(--surface); }
.btn.small { padding: 0.3rem 0.7rem; font-size: 0.85rem; }
.wide-btn { width: 100%; }
.or { text-align: center; color: var(--muted); margin: 0.8rem 0; }

details summary { cursor: pointer; color: var(--accent); }
pre.err { white-space: pre-wrap; background: var(--bg); padding: 0.6rem; border-radius: var(--radius-sm); font-size: 0.8rem; }
code { background: var(--bg); padding: 0 0.3rem; border-radius: 4px; font-size: 0.88em; }

.flash {
  padding: 0.65rem 1rem; margin-bottom: 1rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--q2-green); border-left-width: 4px;
  color: var(--q2-green-dark);
}
.badge {
  display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 0.35rem;
  border-radius: 999px; background: var(--q2-red); color: #fff; font-size: 0.72rem; font-weight: 700;
}

/* --- nová žádost: formulář + souhrn dopadu ---------------------------------- */

.request-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.5rem; margin-top: 1rem; align-items: start; }
.request-form { display: flex; flex-direction: column; gap: 1rem; }
.request-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
fieldset.rozsah { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0.6rem 0.9rem 0.8rem; display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }
fieldset.rozsah legend { font-size: 0.85rem; color: var(--muted); padding: 0 0.3rem; }
.impact {
  position: sticky; top: 1rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}
.impact h2 { margin-top: 0; }
.impact-summary {
  display: flex; flex-direction: column; gap: 0.1rem; margin-bottom: 1rem;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--q2-green);
  border-radius: var(--radius-sm); padding: 0.75rem 0.9rem;
}
.impact-summary .label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.impact-summary strong { font-size: 1.7rem; line-height: 1.15; }
.impact-summary.warn { border-left-color: var(--danger); }
.avatar {
  display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%;
  background: var(--bg); border: 1px solid var(--line); color: var(--q2-dark);
  font-size: 0.75rem; font-weight: 700; vertical-align: middle; margin-right: 0.35rem;
}
.empty { text-align: center; padding: 2rem 1rem; }

/* --- administrace: seznam lidí s rozbalovací úpravou ----------------------- */

.card.flush { padding: 0; overflow: hidden; }
.card.flush .grid th:first-child, .card.flush .grid td:first-child { padding-left: 1.25rem; }
.card.flush .grid th:last-child, .card.flush .grid td:last-child { padding-right: 1.25rem; }
.card.note { border-left: 4px solid var(--q2-cyan); }
.card details + details { margin-top: 0.6rem; }
.people .indent { margin-left: 2.45rem; }
.people td.num, .people td:nth-child(2) { white-space: nowrap; }
.people tr.inactive td { color: var(--muted); }
.people tr.inactive .avatar { opacity: 0.5; }
.edit-row { display: none; }
.edit-row:target { display: table-row; }
.edit-row:target td { background: var(--bg); border-bottom: 2px solid var(--q2-cyan); }
.people tr:has(+ .edit-row:target) td { background: var(--bg); }
.edit-head { display: flex; gap: 0.8rem; align-items: baseline; flex-wrap: wrap; margin-bottom: 0.8rem; }
.edit-head a:last-child { margin-left: auto; }
.edit-row .admin-form { margin-bottom: 0.8rem; }
.collision {
  color: var(--q2-dark); background: var(--surface);
  border: 1px solid var(--q2-amber); border-left-width: 4px; border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
}
.submit-row { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.submit-row .wide { flex: 1; }
.buttons { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* --- ke schválení ---------------------------------------------------------- */

.approval .person-head { margin-bottom: 0; align-items: stretch; }
.approval .person-head > div:first-child { flex: 1 1 420px; }
.approval .person-head p { margin: 0.35rem 0 0; }
.approval .decide {
  min-width: 270px; flex: 0 0 270px;
  border-left: 1px solid var(--line); padding-left: 1.1rem;
  display: flex; flex-direction: column; justify-content: center;
}
.approval.overdue { border-left: 4px solid var(--q2-red); }

/* --- stavy ------------------------------------------------------------------ */

.state {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.12rem 0.6rem; border-radius: 999px; font-size: 0.8rem; white-space: nowrap;
  border: 1px solid var(--line-strong); color: var(--muted); background: var(--surface);
}
.state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-approved, .s-synced, .s-done { border-color: var(--q2-green); color: var(--q2-green-dark); }
.s-pending, .s-cancel_pending, .s-blocked { border-color: var(--q2-amber); color: var(--q2-amber); }
.s-rejected, .s-cancelled, .s-none, .s-k_smazani { border-color: var(--line); color: var(--muted); }
.s-failed { background: var(--q2-red); border-color: var(--q2-red); color: #fff; }

/* --- kalendář: lidé × dny --------------------------------------------------- */

.cal-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cal { border-collapse: separate; border-spacing: 0; font-size: 0.75rem; width: 100%; }
.cal th.who {
  position: sticky; left: 0; z-index: 1; background: var(--surface);
  text-align: left; padding: 0.35rem 0.9rem; min-width: 190px; white-space: nowrap;
  border-right: 1px solid var(--line); font-weight: 400;
}
.cal th.who .small { display: block; color: var(--muted); }
.cal thead th { padding: 0.35rem 0; min-width: 28px; text-align: center; color: var(--muted); font-weight: 400; border-bottom: 1px solid var(--line); }
.cal thead th .wd { display: block; font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em; }
.cal thead th .dm { display: block; font-weight: 700; color: var(--q2-dark); }
.cal td { padding: 2px 1px; text-align: center; border-top: 1px solid var(--line); }
.cal .we, .cal td.we { background: var(--bg); }
.cal .hol, .cal td.hol { background: #fff7e0; }
.cal-cell { display: block; min-width: 24px; padding: 3px 0; border-radius: 4px; font-weight: 700; font-size: 0.7rem; }
.cal-cell sup { font-size: 0.58rem; }
.cal-legend { display: flex; gap: 0.6rem 1.2rem; flex-wrap: wrap; list-style: none; padding: 0; margin: 1rem 0 0; font-size: 0.85rem; }
.cal-legend li { display: flex; align-items: center; gap: 0.4rem; }
.cal-legend .cal-cell { display: inline-block; min-width: 24px; padding: 2px 5px; text-align: center; }
.cal thead th { position: sticky; top: 0; z-index: 2; background: var(--surface); }
.cal thead th.who, .cal tfoot th.who { z-index: 3; }
.cal-months th { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); text-align: left; padding: 0.4rem 0.3rem 0; }
.cal th.wk, .cal td.wk { border-left: 1px solid var(--line-strong); }
.cal th.now, .cal td.now { background: rgba(61, 211, 252, 0.12); }
.cal thead th.now, .cal thead th.now .dm { color: var(--q2-cyan-dark); }
.cal thead th.now .dm { display: inline-grid; place-items: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--q2-cyan); color: var(--q2-dark); }
.cal .sum { color: var(--muted); font-variant-numeric: tabular-nums; padding: 0 0.5rem; }
.cal thead th.sum { font-size: 0.65rem; text-transform: uppercase; }
.cal tfoot th, .cal tfoot td { border-top: 1px solid var(--line-strong); padding: 0.35rem 1px; color: var(--muted); font-weight: 700; background: var(--bg); }
.cal tfoot th.who { font-weight: 400; text-transform: none; background: var(--bg); }

ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 0.35rem 0; border-bottom: 1px solid var(--line); }
ul.plain li:last-child { border-bottom: 0; }

.impersonation-warning {
  background: var(--q2-yellow); color: var(--q2-dark);
  padding: 0.5rem 1.2rem; font-size: 0.85rem; text-align: center;
}
.impersonation-warning b { text-decoration: underline; }

/* --- úzké obrazovky: navigace nahoru -------------------------------------- */

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; gap: 0.4rem; padding-bottom: 0.6rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .side::before { flex-basis: 100%; }
  .side-group { flex-direction: row; flex-wrap: wrap; padding: 0 0.4rem; }
  .side-group .label { display: none; }
  .side-user { margin: 0; border: 0; padding: 0.4rem 1rem; flex-direction: row; gap: 0.6rem; align-items: center; }
  main { padding: 1rem; }
  .two-col, .request-layout { grid-template-columns: 1fr; }
  .approval .decide { border-left: 0; padding-left: 0; flex-basis: 100%; }
}

/* --- náhled e-mailů -------------------------------------------------------- */

.mail-preview { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 1rem; align-items: start; }
.mail-list { padding: 0.4rem; display: flex; flex-direction: column; gap: 2px; }
.mail-list a { display: flex; flex-direction: column; padding: 0.55rem 0.7rem; border-radius: var(--radius-sm); color: var(--text); }
.mail-list a:hover { background: var(--bg); text-decoration: none; }
.mail-list a.on { background: var(--bg); box-shadow: inset 3px 0 0 var(--q2-cyan); }
.mail-meta { display: flex; flex-direction: column; gap: 0.2rem; }
.mail-frame { width: 100%; height: 720px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); margin-bottom: 1rem; }
@media (max-width: 900px) { .mail-preview { grid-template-columns: 1fr; } }
