/* =====================================================================
   Intranet - dizajnovy system "dashboard"
   Tokeny -> zaklad -> layout (tmavy bocny panel, horna lista, mobil) -> komponenty
   ===================================================================== */
:root {
  --brand: #1f3a5f;
  --brand-2: #2c5282;
  --brand-3: #3b82f6;
  --brand-soft: #e8eef7;
  --accent: #f0792b;
  --accent-2: #fbbf24;
  --link-dark: #8cb4ec;
  --ok: #15803d;
  --ok-soft: #e4f6ea;
  --err: #c0392b;
  --err-soft: #fdecea;
  --warn: #b7791f;
  --warn-soft: #fdf3e1;
  --violet: #7c3aed;
  --teal: #0d9488;
  --pink: #db2777;
  --bg: #f4f6f9;
  --card: #ffffff;
  --card-2: #f4f7fb;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e3e8ef;
  --input: #cbd5e1;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 8px 24px -16px rgba(15, 23, 42, .18);
  --shadow-md: 0 10px 30px -12px rgba(15, 23, 42, .25), 0 2px 6px -2px rgba(15, 23, 42, .08);
  --shadow-lg: 0 30px 60px -20px rgba(15, 23, 42, .35), 0 8px 16px -8px rgba(15, 23, 42, .1);
  --side: 264px;
  --top: 64px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --side-bg: linear-gradient(180deg, var(--brand) 0%, color-mix(in srgb, var(--brand) 78%, #05070c) 100%);
  --side-text: rgba(255, 255, 255, .72);
  --side-line: rgba(255, 255, 255, .1);
  --grad-brand: var(--brand-2);
  --grad-accent: var(--accent);
  --grad-ok: var(--ok);
  --grad-blue: var(--brand-2);
  --grad-violet: var(--brand-2);
  --grad-teal: var(--brand-2);
  --grad-pink: var(--brand-2);
  --grad-amber: var(--warn);
  color-scheme: light;
}
:root[data-theme=dark] {
    --brand-soft: color-mix(in srgb, var(--brand-2) 24%, #131a23);
    --ok-soft: #10301d;
    --err-soft: #3a1a17;
    --warn-soft: #3a2c12;
    --bg: #0b0f15;
    --card: #141b25;
    --card-2: #1a2230;
    --text: #e8edf4;
    --muted: #94a3b8;
    --line: #253041;
    --input: #35435a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -16px rgba(0, 0, 0, .6);
    --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, .7);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .8);
    --side-bg: linear-gradient(180deg, color-mix(in srgb, var(--brand) 70%, #0b0f15) 0%, #0b0f15 100%);
    color-scheme: dark;
}
:root[data-theme=dark] a { color: var(--link-dark); }
:root[data-theme=dark] a:where([class]) { color: inherit; }
:root[data-theme=dark] :is(.tabs a.active, .card-head a:hover, .btn-ghost, .crumbs a, .bell-all, .person-card .info a.small:hover, .post-item:hover strong, .ev.bday, .conv-list .sect button, .lunch-more summary, .dish-price) { color: var(--link-dark); }
:root[data-theme=dark] :is(.quick, .links, .person-card strong, .appr-when, .tr-card, .org-node) a, :root[data-theme=dark] a:is(.folder-tile, .album-tile, .task-card, .conv, .tr-card, .org-node, .kpi, .cal-agenda-row, .stat) { color: var(--text); }
:root[data-theme=dark] .hello .btn-primary { color: var(--brand-2); }
:root[data-theme=dark] a.btn-danger { color: var(--err); }
:root[data-theme=dark] :is(nav.primary > a.active, .side-nav a.active, .tabbar a.active, .mega-col a.active, .featured-cta) { color: var(--link-dark); }
:root[data-theme=dark] .featured:hover .featured-cta { color: var(--brand); }
:root[data-theme=dark] :is(.agenda-date, .actions-grid a .ico, .tr-date) { color: var(--link-dark); }
@media (prefers-color-scheme: dark) {
  :root[data-theme=auto] {
    --brand-soft: color-mix(in srgb, var(--brand-2) 24%, #131a23);
    --ok-soft: #10301d;
    --err-soft: #3a1a17;
    --warn-soft: #3a2c12;
    --bg: #0b0f15;
    --card: #141b25;
    --card-2: #1a2230;
    --text: #e8edf4;
    --muted: #94a3b8;
    --line: #253041;
    --input: #35435a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -16px rgba(0, 0, 0, .6);
    --shadow-md: 0 10px 30px -12px rgba(0, 0, 0, .7);
    --shadow-lg: 0 30px 60px -20px rgba(0, 0, 0, .8);
    --side-bg: linear-gradient(180deg, color-mix(in srgb, var(--brand) 70%, #0b0f15) 0%, #0b0f15 100%);
    color-scheme: dark;
  }
  :root[data-theme=auto] a { color: var(--link-dark); }
  :root[data-theme=auto] a:where([class]) { color: inherit; }
  :root[data-theme=auto] :is(.tabs a.active, .card-head a:hover, .btn-ghost, .crumbs a, .bell-all, .person-card .info a.small:hover, .post-item:hover strong, .ev.bday, .conv-list .sect button, .lunch-more summary, .dish-price) { color: var(--link-dark); }
  :root[data-theme=auto] :is(.quick, .links, .person-card strong, .appr-when, .tr-card, .org-node) a, :root[data-theme=auto] a:is(.folder-tile, .album-tile, .task-card, .conv, .tr-card, .org-node, .kpi, .cal-agenda-row, .stat) { color: var(--text); }
  :root[data-theme=auto] .hello .btn-primary { color: var(--brand-2); }
  :root[data-theme=auto] a.btn-danger { color: var(--err); }
  :root[data-theme=auto] :is(nav.primary > a.active, .side-nav a.active, .tabbar a.active, .mega-col a.active, .featured-cta) { color: var(--link-dark); }
  :root[data-theme=auto] .featured:hover .featured-cta { color: var(--brand); }
  :root[data-theme=auto] :is(.agenda-date, .actions-grid a .ico, .tr-date) { color: var(--link-dark); }
}

/* farebne temy (users.accent) - svetla aj tmava verzia sa dopocita */
:root[data-accent=fialova] { --brand: #3b1f5f; --brand-2: #6b3fa0; --link-dark: #c4a6ec; --accent: #f59e0b; --brand-soft: color-mix(in srgb, var(--brand-2) 12%, var(--card)); }
:root[data-accent=cervena] { --brand: #5f1f24; --brand-2: #b42b36; --link-dark: #f0a3a9; --accent: #f0792b; --brand-soft: color-mix(in srgb, var(--brand-2) 12%, var(--card)); }
:root[data-accent=zelena] { --brand: #1d4a32; --brand-2: #23794a; --link-dark: #8fd6ab; --accent: #f0792b; --brand-soft: color-mix(in srgb, var(--brand-2) 12%, var(--card)); }
:root[data-accent=tyrkysova] { --brand: #12454d; --brand-2: #0f7b86; --link-dark: #7fd3db; --accent: #f0792b; --brand-soft: color-mix(in srgb, var(--brand-2) 12%, var(--card)); }
:root[data-accent=oranzova] { --brand: #5c2e12; --brand-2: #c25a12; --link-dark: #f5b37f; --accent: #2c5282; --brand-soft: color-mix(in srgb, var(--brand-2) 12%, var(--card)); }
:root[data-accent=ruzova] { --brand: #5c1d45; --brand-2: #b8327e; --link-dark: #f0a1cc; --accent: #f0792b; --brand-soft: color-mix(in srgb, var(--brand-2) 12%, var(--card)); }
:root[data-accent=grafitova] { --brand: #262b33; --brand-2: #4a5568; --link-dark: #b4bfce; --accent: #f0792b; --brand-soft: color-mix(in srgb, var(--brand-2) 12%, var(--card)); }
input[type=checkbox], input[type=radio], progress { accent-color: var(--brand-2); }
.accent-pick { display: flex; flex-wrap: wrap; gap: .5rem; }
.accent-pick button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--card); box-shadow: 0 0 0 1px var(--line); background: var(--sw); cursor: pointer; padding: 0; transition: transform .15s var(--ease); }
.accent-pick button:hover { transform: scale(1.08); }
.accent-pick button.on { box-shadow: 0 0 0 3px var(--text); }

/* ---------------- zaklad ---------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 15px/1.55 "Inter", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss01", "tnum";
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-2); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .75rem; letter-spacing: -.015em; }
h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: 1.08rem; font-weight: 750; }
h3 { font-size: .95rem; font-weight: 700; }
p { margin: 0 0 .75rem; }
[hidden] { display: none !important; }
svg { flex: none; }
.ico { width: 20px; height: 20px; }
.ico-pdf { color: #c0392b; } .ico-sheet { color: #1e8e4e; } .ico-doc { color: #2b6cb0; }
.ico-video { color: #6b46c1; } .ico-zip { color: #b7791f; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.tiny { font-size: .75rem; }
.error { color: var(--err); font-weight: 600; }
.pad { padding: .75rem 1rem; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.stack > * + * { margin-top: .9rem; }
.hr { border: 0; border-top: 1px solid var(--line); margin: 1.1rem 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mention { background: var(--brand-soft); color: var(--brand-2); border-radius: 5px; padding: 0 .25em; font-weight: 600; cursor: pointer; }
.msg > .avatar.clickable, .msg .who strong { cursor: pointer; }
.msg .who strong:hover { text-decoration: underline; }
.person-pop { position: fixed; z-index: 60; width: min(320px, calc(100vw - 16px)); background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: .8rem .9rem; display: grid; gap: .6rem; }
.person-pop .pp-head { display: flex; align-items: center; gap: .7rem; }
.person-pop .pp-head strong { display: block; font-size: 1rem; }
.person-pop .pp-on { color: var(--ok); font-weight: 600; }
.person-pop .pp-away { color: var(--warn); font-weight: 600; }
.person-pop .pp-contacts { display: grid; gap: .25rem; font-size: .85rem; }
.person-pop .pp-contacts a { display: inline-flex; align-items: center; gap: .35rem; color: var(--text); text-decoration: none; }
.person-pop .pp-contacts .ico { width: 15px; height: 15px; color: var(--muted); }
.person-pop .pp-actions { display: flex; gap: .4rem; }
.person-pop .pp-actions .btn { flex: 1; justify-content: center; }
::selection { background: color-mix(in srgb, var(--brand-2) 22%, transparent); }
:focus-visible { outline: 2px solid var(--brand-3); outline-offset: 2px; }

/* ---------------- layout: horna navigacia (pocitac) ---------------- */
.topnav {
  position: sticky; top: 0; z-index: 40;
  background: var(--card);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15, 23, 42, .02), 0 8px 24px -20px rgba(15, 23, 42, .25);
  padding-top: env(safe-area-inset-top, 0px);
}
.topnav-in { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; gap: .35rem; min-height: var(--top); padding: 0 1.25rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; min-width: 0; margin-right: .5rem; flex: none; }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.brand .wordmark { width: auto; height: 13px; display: block; margin: 0 0 3px; }
.logo-dark, .brand .wordmark.logo-dark { display: none; }
:root[data-theme=dark] .logo-dark { display: inline-block; }
:root[data-theme=dark] .brand .wordmark.logo-dark { display: block; }
:root[data-theme=dark] .logo-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root[data-theme=auto] .logo-dark { display: inline-block; }
  :root[data-theme=auto] .brand .wordmark.logo-dark { display: block; }
  :root[data-theme=auto] .logo-light { display: none; }
}
.brand span { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand strong { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
.brand small { color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
nav.primary { display: flex; align-items: center; gap: .1rem; flex: 1; min-width: 0; }
nav.primary > a, nav.primary > details > summary {
  position: relative; display: flex; align-items: center; gap: .4rem; padding: .5rem .65rem; border-radius: var(--radius-sm);
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .875rem; white-space: nowrap; cursor: pointer; list-style: none;
  transition: background .15s var(--ease), color .15s var(--ease);
}
nav.primary > details > summary::-webkit-details-marker { display: none; }
nav.primary > a .ico, nav.primary > details > summary .ico { width: 18px; height: 18px; }
nav.primary > a:hover, nav.primary > details > summary:hover, nav.primary > details[open] > summary { background: var(--card-2); color: var(--text); }
nav.primary > a.active, nav.primary > details > summary.active { color: var(--brand-2); background: var(--brand-soft); }
nav.primary > a .badge { margin-left: .1rem; }
nav.primary .badge-muted { background: var(--line); color: var(--muted); }
nav.primary > details > summary .ico:last-child { width: 14px; height: 14px; opacity: .6; transition: transform .15s var(--ease); }
nav.primary > details[open] > summary .ico:last-child { transform: rotate(180deg); }
.mega { position: relative; }
.mega-menu { left: auto; right: 0; width: auto; min-width: 560px; display: grid; grid-template-columns: repeat(3, minmax(170px, 1fr)); gap: .25rem 1.25rem; padding: 1rem 1.1rem 1.1rem; }
.mega-col { display: flex; flex-direction: column; gap: 2px; }
.mega-title { font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; padding: .25rem .6rem .45rem; }
.mega-col a { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 500; font-size: .9rem; }
.mega-col a .ico { width: 18px; height: 18px; color: var(--brand-2); }
.mega-col a span { flex: 1; }
.mega-col a:hover { background: var(--card-2); }
.mega-col a.active { background: var(--brand-soft); color: var(--brand-2); }
.topsearch { width: 200px; flex: none; display: flex; align-items: center; gap: .5rem; background: var(--card-2); border: 1px solid transparent; border-radius: 999px; padding: 0 .5rem 0 .85rem; color: var(--muted); transition: width .2s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease), background .15s var(--ease); }
.topsearch:focus-within { width: 280px; background: var(--card); border-color: var(--brand-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-2) 14%, transparent); }
.topsearch .ico { width: 17px; height: 17px; }
.topsearch input { border: 0 !important; outline: none !important; background: transparent !important; padding: .5rem 0 !important; box-shadow: none !important; font-size: .9rem; }
.bell-wrap { position: relative; }
.bell { position: relative; }
.topnav .iconbtn { color: var(--text); border-radius: 50%; }
.bell-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(400px, calc(100vw - 24px));
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
  animation: pop-in .18s var(--ease);
}
@keyframes pop-in { from { opacity: 0; transform: translateY(-6px) scale(.98); } }
.bell-head { display: flex; align-items: center; justify-content: space-between; padding: .8rem 1rem; border-bottom: 1px solid var(--line); }
.bell-menu ul { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.bell-menu li a { display: block; padding: .7rem 1rem; text-decoration: none; color: var(--text); border-bottom: 1px solid var(--line); }
.bell-menu li a:hover { background: var(--card-2); }
.bell-menu li a.unread { background: var(--brand-soft); }
.bell-menu li a strong { display: block; font-size: .9rem; font-weight: 600; }
.bell-all { display: block; text-align: center; padding: .7rem; font-weight: 600; text-decoration: none; }
.user-dd > summary { list-style: none; cursor: pointer; display: inline-flex; border-radius: 50%; padding: 2px; }
.user-dd > summary::-webkit-details-marker { display: none; }
.user-dd > summary:hover, .user-dd[open] > summary { box-shadow: 0 0 0 3px var(--brand-soft); }
.user-menu { width: 260px; padding: .5rem; }
.user-menu-head { display: flex; align-items: center; gap: .7rem; padding: .6rem .6rem .8rem; border-bottom: 1px solid var(--line); margin-bottom: .4rem; }
.user-menu-head strong { display: block; font-size: .92rem; }
.user-menu a, .user-menu form button { display: flex; align-items: center; gap: .6rem; width: 100%; padding: .55rem .6rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font: inherit; font-weight: 500; font-size: .9rem; background: none; border: 0; cursor: pointer; text-align: left; }
.user-menu a:hover, .user-menu form button:hover { background: var(--card-2); }
.user-menu .ico { width: 18px; height: 18px; color: var(--muted); }
.user-menu form { margin: .3rem 0 0; padding-top: .3rem; border-top: 1px solid var(--line); }
.user-menu form button { color: var(--err); }

/* ---------------- layout: bocny panel (len mobil) ---------------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 60;
  display: flex; flex-direction: column;
  background: var(--card); color: var(--text);
  padding-top: env(safe-area-inset-top, 0px);
  transform: translateX(-100%); transition: transform .25s var(--ease); visibility: hidden;
  border-radius: 0 22px 22px 0;
}
body.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-lg); visibility: visible; }
.scrim { display: none; }
body.sidebar-open .scrim { display: block; position: fixed; inset: 0; background: rgba(2, 6, 23, .55); z-index: 55; backdrop-filter: blur(2px); }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1rem .6rem; }
.side-head .brand { margin: 0; }
.side-nav { flex: 1; overflow-y: auto; padding: .15rem .7rem .5rem; display: flex; flex-direction: column; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: .7rem; padding: .55rem .75rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem; }
.side-nav a .ico { width: 20px; height: 20px; color: var(--muted); }
.side-nav a span { flex: 1; line-height: 1.25; }
.side-nav a:hover { background: var(--card-2); }
.side-nav a.active { background: var(--brand-soft); color: var(--brand-2); font-weight: 650; }
.side-nav a.active .ico { color: var(--brand-2); }
.side-sect { font-size: .66rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 700; padding: .95rem .75rem .3rem; }
.side-foot { display: flex; align-items: center; gap: .3rem; padding: .6rem .7rem calc(.6rem + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); }
.side-foot form { margin: 0; }
.side-foot .iconbtn { color: var(--muted); width: 36px; height: 36px; }
.side-foot .me { flex: 1; min-width: 0; display: flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; padding: .35rem .45rem; border-radius: var(--radius-sm); }
.side-foot .me:hover, .side-foot .me.active { background: var(--card-2); }
.side-foot .me span { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.side-foot .me strong { font-size: .88rem; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-foot .me small { font-size: .74rem; color: var(--muted); }

main.page, main.wide, main.narrow, main.full { padding: 1.75rem 1.5rem 3rem; }
main.page > *, main.narrow > * { max-width: 1320px; margin-left: auto; margin-right: auto; }
main.narrow > * { max-width: 640px; }
main.full { padding: 0; }

.only-mobile { display: none !important; }

@media (max-width: 1380px) {
  .topsearch { width: 150px; }
  .topsearch:focus-within { width: 220px; }
  nav.primary > a, nav.primary > details > summary { padding: .5rem .5rem; }
}
@media (max-width: 1180px) {
  nav.primary > a span, nav.primary > details > summary span { display: none; }
  nav.primary > a, nav.primary > details > summary { padding: .55rem .6rem; }
}
@media (max-width: 960px) {
  .only-mobile { display: inline-flex !important; }
  nav.primary, .topsearch, .user-dd { display: none; }
  .topnav-in { padding: 0 .5rem 0 .4rem; min-height: 58px; gap: .2rem; }
  .brand { margin-right: auto; }
  .brand small { display: none; }
  .brand .wordmark { margin: 0; height: 14px; }
  main.page, main.wide, main.narrow, main.full { padding: 1rem 1rem calc(90px + env(safe-area-inset-bottom, 0px)); }
  main.full { padding: 0 0 calc(64px + env(safe-area-inset-bottom, 0px)); }
}

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: none; justify-content: space-around;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-top: 1px solid var(--line);
  padding: .4rem .35rem calc(.4rem + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 960px) { .tabbar { display: flex !important; } }
.tabbar a { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: .25rem 0; color: var(--muted); text-decoration: none; font-size: .66rem; font-weight: 650; }
.tabbar a .ico { width: 24px; height: 24px; padding: 3px; border-radius: 10px; box-sizing: content-box; transition: background .15s var(--ease), color .15s var(--ease); }
.tabbar a.active { color: var(--brand-2); }
.tabbar a.active .ico { background: var(--brand-soft); color: var(--brand-2); }
.tabbar .badge { position: absolute; top: 0; left: calc(50% + 8px); }

/* ---------------- komponenty ---------------- */
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem 1.4rem; margin-bottom: 1.1rem; }
.card > h2:first-child, .card-head { margin-bottom: .9rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.card-head h2 { margin: 0; display: flex; align-items: center; gap: .6rem; }
.card-head a { font-size: .84rem; font-weight: 600; text-decoration: none; color: var(--muted); white-space: nowrap; transition: color .15s var(--ease); }
.card-head a:hover { color: var(--brand-2); }
.card.flush { padding: 0; overflow: hidden; }
.card[data-tone] { --tone: var(--grad-brand); }
.card[data-tone=orange] { --tone: var(--grad-accent); }
.card[data-tone=green] { --tone: var(--grad-ok); }
.card[data-tone=blue] { --tone: var(--grad-blue); }
.card[data-tone=violet] { --tone: var(--grad-violet); }
.card[data-tone=teal] { --tone: var(--grad-teal); }
.card[data-tone=pink] { --tone: var(--grad-pink); }
.card[data-tone=amber] { --tone: var(--grad-amber); }

.card[data-tone] > h2:first-child { display: flex; align-items: center; gap: .6rem; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1.35rem; }
.page-head h1 { margin: 0; }
.grid { display: grid; gap: 1.1rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.home-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.home-grid > div { min-width: 0; }
@media (max-width: 1100px) { .home-grid { grid-template-columns: minmax(0, 1fr); } }

.flash { padding: .85rem 1.1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; font-weight: 600; border: 1px solid transparent; animation: pop-in .2s var(--ease); box-shadow: var(--shadow); }
.flash-ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.flash-error { background: var(--err-soft); color: var(--err); border-color: color-mix(in srgb, var(--err) 25%, transparent); }
.note { padding: .85rem 1.1rem; border-radius: var(--radius-sm); background: var(--brand-soft); margin-bottom: 1rem; border-left: 3px solid var(--brand-2); }
.note-warn { background: var(--warn-soft); border-left-color: var(--warn); }

.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .7rem; font-weight: 700; font-style: normal; }
.badge-warn { background: #d69e2e; }
.badge-muted { background: var(--line); color: var(--muted); }
.badge-dot { position: absolute; top: 0; right: 0; min-width: 18px; height: 18px; font-size: .66rem; box-shadow: 0 0 0 2px var(--card); }
.pill { display: inline-flex; align-items: center; gap: .3rem; padding: .16rem .62rem; border-radius: 999px; font-size: .74rem; font-weight: 650; background: var(--card-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.pill-ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.pill-warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill-err { background: var(--err-soft); color: var(--err); border-color: transparent; }
.pill-brand { background: var(--brand-soft); color: var(--brand-2); border-color: transparent; }

.avatar { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--av, #2c5282); color: #fff; font-weight: 700; overflow: visible; box-shadow: 0 0 0 2px var(--card); }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.avatar-xs { width: 24px; height: 24px; font-size: .62rem; box-shadow: none; }
.avatar-sm { width: 34px; height: 34px; font-size: .78rem; }
.avatar-md { width: 42px; height: 42px; font-size: .9rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.avatar-xl { width: 112px; height: 112px; font-size: 2rem; }
.avatar .dot { position: absolute; right: -1px; bottom: -1px; width: 30%; height: 30%; min-width: 11px; min-height: 11px; border-radius: 50%; background: #94a3b8; border: 2px solid var(--card); }
.avatar .dot.on { background: #22c55e; box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 28%, transparent); }
/* Specialny status "Som tu pre vas neustale" - gulicka blika vsetkymi farbami */
.avatar .dot.rainbow { background: #ef4444; animation: dot-rainbow 2.4s linear infinite, dot-blink 0.8s ease-in-out infinite alternate; }
@keyframes dot-rainbow {
  0%   { background: #ef4444; box-shadow: 0 0 0 3px color-mix(in srgb, #ef4444 35%, transparent), 0 0 8px #ef4444; }
  16%  { background: #f97316; box-shadow: 0 0 0 3px color-mix(in srgb, #f97316 35%, transparent), 0 0 8px #f97316; }
  33%  { background: #eab308; box-shadow: 0 0 0 3px color-mix(in srgb, #eab308 35%, transparent), 0 0 8px #eab308; }
  50%  { background: #22c55e; box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 35%, transparent), 0 0 8px #22c55e; }
  66%  { background: #3b82f6; box-shadow: 0 0 0 3px color-mix(in srgb, #3b82f6 35%, transparent), 0 0 8px #3b82f6; }
  83%  { background: #a855f7; box-shadow: 0 0 0 3px color-mix(in srgb, #a855f7 35%, transparent), 0 0 8px #a855f7; }
  100% { background: #ec4899; box-shadow: 0 0 0 3px color-mix(in srgb, #ec4899 35%, transparent), 0 0 8px #ec4899; }
}
@keyframes dot-blink { from { opacity: 1; } to { opacity: .35; } }
@media (prefers-reduced-motion: reduce) {
  .avatar .dot.rainbow { animation: none; background: conic-gradient(#ef4444, #f97316, #eab308, #22c55e, #3b82f6, #a855f7, #ec4899, #ef4444); }
}
.status-special-box { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; margin-bottom: .75rem; border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, #a855f7 35%, var(--line));
  background: linear-gradient(90deg, color-mix(in srgb, #ef4444 8%, transparent), color-mix(in srgb, #3b82f6 8%, transparent), color-mix(in srgb, #a855f7 8%, transparent)); }

/* ---------------- formulare ---------------- */
label.field { display: block; font-weight: 650; margin: 0 0 .35rem; font-size: .86rem; }
.hint { font-size: .8rem; color: var(--muted); margin-top: .3rem; }
input[type=text], input[type=password], input[type=search], input[type=date], input[type=time], input[type=email],
input[type=tel], input[type=number], input[type=url], input:not([type]), select, textarea {
  width: 100%; font: inherit; padding: .66rem .85rem;
  border: 1px solid var(--input); border-radius: var(--radius-sm);
  background: var(--card); color: var(--text);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
textarea { resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand-3); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-3) 18%, transparent); }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .9rem; }
.form-actions { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; margin-top: 1rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  font: inherit; font-weight: 650; font-size: .9rem;
  padding: .6rem 1.05rem; border-radius: var(--radius-sm); cursor: pointer;
  text-decoration: none; background: var(--card); color: var(--text); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
  transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .12s var(--ease);
}
.btn:hover { background: var(--card-2); border-color: var(--input); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn-primary { background: var(--brand-2); color: #fff; border-color: var(--brand-2); box-shadow: 0 1px 2px rgba(15, 23, 42, .15); }
.btn-primary:hover { background: color-mix(in srgb, var(--brand-2) 86%, #000); border-color: color-mix(in srgb, var(--brand-2) 86%, #000); }
.btn-ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.btn-ok:hover { background: color-mix(in srgb, var(--ok) 86%, #000); border-color: color-mix(in srgb, var(--ok) 86%, #000); }
.btn-danger { background: var(--card); color: var(--err); border: 1px solid color-mix(in srgb, var(--err) 35%, transparent); box-shadow: none; }
.btn-danger:hover { background: var(--err-soft); border-color: var(--err); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--brand-2); box-shadow: none; }
.btn-ghost:hover { background: var(--brand-soft); border-color: transparent; box-shadow: none; }
.btn-sm { padding: .38rem .75rem; font-size: .82rem; }
.btn-block { width: 100%; }
.btn.is-busy, .btn:disabled { opacity: .6; pointer-events: none; }
.btn .ico { width: 18px; height: 18px; }
.iconbtn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: var(--radius-sm); border: 0; background: transparent; color: inherit; cursor: pointer; text-decoration: none; flex: none; transition: background .15s var(--ease), color .15s var(--ease); }
.iconbtn:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.topbar .iconbtn { color: var(--text); }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand-2); font: inherit; font-size: .85rem; font-weight: 650; cursor: pointer; }
.inline-form { display: inline; margin: 0; }
details.more > summary { cursor: pointer; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }

/* ---------------- tabulky a zoznamy ---------------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .92rem; }
.table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; padding: .65rem .75rem; border-bottom: 1px solid var(--line); background: var(--card-2); }
.table th:first-child { border-top-left-radius: var(--radius-sm); border-bottom-left-radius: 0; }
.table th:last-child { border-top-right-radius: var(--radius-sm); }
.table td { padding: .7rem .75rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--card-2) 60%, transparent); }
.table tr:last-child td { border-bottom: 0; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; align-items: center; gap: .75rem; padding: .72rem 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list a.item { display: flex; align-items: center; gap: .75rem; flex: 1; min-width: 0; flex-wrap: wrap; color: var(--text); text-decoration: none; margin: -.4rem -.6rem; padding: .4rem .6rem; border-radius: var(--radius-sm); transition: background .12s var(--ease); }
.list a.item:hover { background: var(--card-2); }
.list a.item > .ico { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 2.2rem 1rem; }
.empty .ico { width: 48px; height: 48px; opacity: .35; display: block; margin: 0 auto .6rem; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 1rem; }

/* ---------------- login ---------------- */
body.bare { background: linear-gradient(150deg, #0b1220 0%, var(--brand) 60%, var(--brand-2) 100%); }
.login-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { width: 100%; max-width: 420px; padding: 2.2rem 2rem 1.7rem; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, .08); border: 0; animation: rise .4s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.login-logo { display: flex; flex-direction: column; align-items: center; gap: .35rem; margin-bottom: 1.6rem; text-align: center; }
.login-logo img { height: auto; margin-bottom: .4rem; }
.login-logo strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; }
.login-card .btn-primary { padding: .78rem 1rem; font-size: .97rem; }

/* ---------------- domov: portal ---------------- */
.portal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.portal-head h1 { margin: 0; font-size: 2rem; }
.eyebrow { font-size: .82rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .3rem; }
.clock-inline { gap: .4rem; }
.clock-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.clock-pill small { font-weight: 600; color: var(--muted); font-size: .8rem; }
.clock-pill i { width: 9px; height: 9px; border-radius: 50%; background: #94a3b8; }
.clock-pill.on i { background: #22c55e; box-shadow: 0 0 0 3px color-mix(in srgb, #22c55e 25%, transparent); }

.portal { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 1.5rem; align-items: start; }
.portal-main, .portal-side { min-width: 0; }
@media (max-width: 1100px) { .portal { grid-template-columns: minmax(0, 1fr); } }

.featured { position: relative; display: block; overflow: hidden; isolation: isolate; border-radius: var(--radius); margin-bottom: 1.1rem; color: #fff; text-decoration: none; background: linear-gradient(120deg, var(--brand) 0%, var(--brand-2) 100%); box-shadow: 0 24px 48px -28px color-mix(in srgb, var(--brand) 90%, transparent); }
.featured::before { content: ""; position: absolute; right: -120px; top: -160px; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .14), transparent); z-index: -1; }
.featured::after { content: ""; position: absolute; left: -80px; bottom: -220px; width: 360px; height: 360px; border-radius: 50%; background: radial-gradient(closest-side, rgba(0, 0, 0, .18), transparent); z-index: -1; }
.featured-body { padding: 1.9rem 2rem 1.6rem; max-width: 720px; }
.featured-foot { padding-right: 9rem; }
.featured-tags { display: flex; align-items: center; gap: .4rem; margin-bottom: .9rem; }
.featured-when { font-size: .8rem; color: rgba(255, 255, 255, .7); margin-left: .2rem; }
.featured h2 { color: #fff; font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 .6rem; }
.featured p { color: rgba(255, 255, 255, .82); font-size: 1rem; line-height: 1.6; margin: 0 0 1.2rem; }
.featured-foot { display: flex; align-items: center; gap: .6rem; font-size: .9rem; font-weight: 600; }
.featured-foot .avatar { box-shadow: 0 0 0 2px rgba(255, 255, 255, .6); }
.featured-cta { position: absolute; right: 1.1rem; bottom: 1rem; display: inline-flex; align-items: center; gap: .3rem; padding: .45rem .9rem; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); font-size: .85rem; transition: background .15s var(--ease); }
.featured-cta .ico { width: 16px; height: 16px; }
.featured:hover .featured-cta { background: #fff; color: var(--brand-2); }
.tag { display: inline-flex; align-items: center; padding: .18rem .6rem; border-radius: 999px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: rgba(255, 255, 255, .16); color: #fff; }
.tag-hot { background: var(--accent); }
.tag-new { background: #22c55e; }
.feed-item .tag, .feed-item .tag-hot, .feed-item .tag-new { font-size: .62rem; padding: .1rem .5rem; }
.feed-item .tag { background: var(--brand-soft); color: var(--brand-2); }
.feed-item .tag-hot { background: var(--err-soft); color: var(--err); }

.feed { margin-bottom: 1.1rem; }
.feed-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin: 0 .2rem .7rem; }
.feed-head h2 { margin: 0; font-size: 1.15rem; }
.feed-head a { font-size: .85rem; font-weight: 600; text-decoration: none; color: var(--muted); }
.feed-head a:hover { color: var(--brand-2); }
.feed-item { display: flex; gap: 1rem; padding: 1.1rem 1.25rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: .7rem; color: var(--text); text-decoration: none; transition: border-color .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease); }
.feed-item:hover { border-color: color-mix(in srgb, var(--brand-2) 30%, var(--line)); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.feed-item.unread { border-left: 3px solid var(--accent); }
.feed-body { flex: 1; min-width: 0; }
.feed-meta { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .82rem; color: var(--muted); margin-bottom: .25rem; }
.feed-meta strong { color: var(--text); font-weight: 650; }
.feed-item h3 { font-size: 1.05rem; font-weight: 700; margin: 0 0 .3rem; letter-spacing: -.01em; }
.feed-item p { margin: 0; color: var(--muted); font-size: .92rem; line-height: 1.55; }

.actions-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .4rem; }
.actions-grid a { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .7rem .2rem .6rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); font-size: .72rem; font-weight: 600; transition: background .15s var(--ease); }
.actions-grid a:hover { background: var(--card-2); }
.actions-grid a .ico { width: 42px; height: 42px; padding: 11px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-2); }
.agenda-list, .people-list { list-style: none; margin: 0; padding: 0; }
.agenda-list > li, .people-list > li { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.agenda-list > li:last-child, .people-list > li:last-child { border-bottom: 0; }
.agenda-list > li > a, .people-list > li > a { display: flex; align-items: center; gap: .75rem; flex: 1; min-width: 0; color: var(--text); text-decoration: none; }
.agenda-date { flex: none; width: 44px; display: flex; flex-direction: column; align-items: center; line-height: 1; padding: .4rem 0; border-radius: 10px; background: var(--brand-soft); color: var(--brand-2); }
.agenda-date strong { font-size: 1.05rem; font-weight: 800; }
.agenda-date small { font-size: .62rem; font-weight: 700; opacity: .8; }
.agenda-time { flex: none; width: 44px; text-align: center; }
.checkring { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--input); }
.list a.item:hover .checkring { border-color: var(--brand-2); }
.portal-side .card h2 { font-size: .98rem; }
.links a { padding: .5rem .55rem; }

.post-item { display: block; padding: .85rem 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.post-item:last-child { border-bottom: 0; }
.post-item strong { display: block; font-weight: 650; }
.post-item.unread strong::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: .45rem; vertical-align: middle; }
.links { display: grid; gap: .2rem; }
.links a { display: flex; align-items: center; gap: .7rem; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); transition: background .12s var(--ease); }
.links a:hover { background: var(--card-2); }
.links a .ico { color: var(--brand-2); }
.links small { display: block; color: var(--muted); font-size: .78rem; }
.hello, .quick, .stats { display: none; }
@media (max-width: 640px) {
  .portal-head h1 { font-size: 1.5rem; }
  .featured-body { padding: 1.3rem 1.25rem 1.2rem; }
  .featured-foot { padding-right: 7.5rem; }
  .featured-cta { right: .8rem; bottom: .8rem; padding: .35rem .7rem; font-size: .8rem; }
  .featured h2 { font-size: 1.3rem; }
  .feed-item { padding: .9rem 1rem; gap: .75rem; }
  .actions-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ---------------- nastenka ---------------- */
.post { position: relative; }
.post.pinned { border-left: 4px solid var(--brand-2); }
.post.important { border-left: 4px solid var(--err); }
.post-meta { display: flex; align-items: center; gap: .6rem; color: var(--muted); font-size: .85rem; margin-bottom: .6rem; flex-wrap: wrap; }
.post-body { font-size: 1rem; overflow-wrap: anywhere; }
.post-title { color: var(--text); text-decoration: none; }
.post-title h2 { font-size: 1.2rem; margin-bottom: .4rem; }
.comment { display: flex; gap: .7rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.comment-body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.readers { display: flex; flex-wrap: wrap; gap: .35rem; }

/* ---------------- subory ---------------- */
.crumbs { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-bottom: .75rem; font-size: .92rem; }
.crumbs a { text-decoration: none; font-weight: 600; }
.crumbs span.sep { color: var(--muted); }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.folder-tile { display: flex; align-items: center; gap: .7rem; padding: .85rem .95rem; background: var(--card); border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow); transition: transform .15s var(--ease), box-shadow .15s var(--ease); text-decoration: none; color: var(--text); min-width: 0; }
.folder-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.folder-tile .ico { width: 30px; height: 30px; color: #d69e2e; }
.folder-tile.mine .ico { color: var(--brand-2); }
.folder-tile.dept { border-color: color-mix(in srgb, var(--err) 45%, var(--line)); border-left: 3px solid var(--err); }
.folder-tile.dept .ico, .dept-ico .ico { color: var(--err); }
.dept-note { display: block; color: var(--err); font-weight: 600; }
.note-dept { background: var(--err-soft); border-left-color: var(--err); }
.note-dept .ico { width: 16px; height: 16px; vertical-align: -3px; color: var(--err); }
.folder-tile strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist { list-style: none; margin: 0; padding: 0; }
.filelist > li { display: flex; align-items: center; gap: .5rem; padding: .5rem .25rem; border-bottom: 1px solid var(--line); }
.filelist > li:last-child { border-bottom: 0; }
.filelist .file-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: .7rem; color: var(--text); text-decoration: none; }
.filelist .file-main img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.filelist .file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.filelist .file-meta { color: var(--muted); font-size: .8rem; white-space: nowrap; }
.filelist.compact > li { padding: .35rem 0; }
.filelist .iconbtn { width: 34px; height: 34px; color: var(--muted); }
@media (max-width: 640px) { .filelist .file-meta.hide-sm { display: none; } }
.dropzone { border: 2px dashed var(--input); border-radius: var(--radius); padding: 1.4rem; text-align: center; color: var(--muted); transition: background .15s, border-color .15s; }
.dropzone.over, body.dragging .dropzone { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand-2); }
.upload-list { list-style: none; margin: .5rem 0 0; padding: 0; }
.upload-list li { display: flex; align-items: center; gap: .6rem; font-size: .86rem; padding: .3rem 0; }
.upload-list .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-list progress { width: 110px; height: 8px; }
.upload-list .ok { color: var(--ok); font-weight: 700; }
.upload-list .fail { color: var(--err); font-weight: 700; }
.upload-list button { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; }
.uploader .btn-ghost { padding-left: 0; }

/* ---------------- galeria ---------------- */
.albums { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.album-tile { display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); transition: transform .15s var(--ease), box-shadow .15s var(--ease); overflow: hidden; text-decoration: none; color: var(--text); }
.album-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.album-tile .cover { aspect-ratio: 4 / 3; background: var(--card-2); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.album-tile .cover img { width: 100%; height: 100%; object-fit: cover; }
.album-tile .cover .ico { width: 42px; height: 42px; opacity: .5; }
.album-tile .meta { padding: .7rem .85rem; }
.album-tile strong { display: block; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .4rem; }
.thumbs .thumb { position: relative; display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--card-2); }
.thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.thumbs .thumb:hover img { transform: scale(1.04); }
.thumbs .thumb .vid { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--muted); }
.thumbs .thumb .vid .ico { width: 40px; height: 40px; }
.thumbs .thumb form { position: absolute; top: 4px; right: 4px; opacity: 0; transition: opacity .15s; }
.thumbs .thumb:hover form, .thumbs .thumb:focus-within form { opacity: 1; }
.thumbs .thumb form button { background: rgba(0, 0, 0, .55); color: #fff; border: 0; border-radius: 8px; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.thumbs.small { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(5, 8, 12, .94); display: flex; align-items: center; justify-content: center; }
.lightbox figure { margin: 0; max-width: 94vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; }
.lightbox img, .lightbox video { max-width: 94vw; max-height: 82vh; object-fit: contain; border-radius: 6px; }
.lightbox figcaption { color: #cbd5e1; font-size: .85rem; margin-top: .5rem; text-align: center; }
.lightbox .iconbtn { position: absolute; color: #fff; background: rgba(255, 255, 255, .1); width: 48px; height: 48px; border-radius: 50%; }
.lb-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lb-download { position: absolute; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); right: 14px; }

/* ---------------- kalendar ---------------- */
.cal-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.cal-head h1 { margin: 0 .5rem 0 0; min-width: 190px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--line); gap: 1px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.cal .dow { background: var(--card-2); padding: .45rem; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); text-align: center; }
.cal .day { background: var(--card); min-height: 112px; padding: .35rem; display: flex; flex-direction: column; gap: 3px; min-width: 0; position: relative; }
.cal .day.out { background: var(--card-2); }
.cal .day.out .num { opacity: .45; }
.cal .day.weekend { background: color-mix(in srgb, var(--card-2) 70%, var(--card)); }
.cal .day.holiday { background: var(--warn-soft); }
.cal .day .num { font-weight: 700; font-size: .85rem; display: flex; justify-content: space-between; align-items: center; }
.cal .day .num a { color: var(--muted); text-decoration: none; font-weight: 400; opacity: 0; font-size: 1.1rem; line-height: 1; }
.cal .day:hover .num a { opacity: 1; }
.cal .day .num .nd { flex: 1; min-width: 0; margin-left: .4rem; font-size: .7rem; font-weight: 400; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal .day.today .num span { background: var(--brand-2); color: #fff; border-radius: 999px; padding: 0 .45rem; }
.cal .hol { font-size: .7rem; color: var(--warn); font-weight: 600; }
.ev { --c: var(--brand-2); display: block; font-size: .74rem; font-weight: 600; padding: .14rem .4rem; border-radius: 6px; border-left: 3px solid var(--c); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--card)); }
.ev:hover { background: color-mix(in srgb, var(--c) 24%, var(--card)); }
.ev.k-dovolenka { --c: #2f855a; }
.ev.k-pn { --c: #c53030; }
.ev.k-lekar { --c: #dd6b20; }
.ev.k-sluzobka { --c: #6b46c1; }
.ev.k-homeoffice { --c: #2b6cb0; }
.ev.k-ine { --c: #718096; }
.ev.pending { opacity: .7; border-left-style: dashed; background-image: repeating-linear-gradient(45deg, transparent 0 6px, color-mix(in srgb, var(--c) 10%, transparent) 6px 12px); }
.ev.bday { background: transparent; border-left: 0; color: var(--accent); font-weight: 600; padding-left: 0; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin-top: .75rem; font-size: .8rem; color: var(--muted); }
.legend i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: .3rem; vertical-align: -1px; }
@media (max-width: 760px) {
  .cal .day { min-height: 64px; padding: .2rem; }
  .ev { font-size: 0; height: 6px; padding: 0; border-radius: 3px; border-left: 0; background: var(--c); }
  .ev.bday { font-size: .65rem; height: auto; }
  .cal .day .num .nd { display: none; }
  .cal .hol { font-size: 0; }
  .cal .hol::before { content: "★"; font-size: .7rem; }
}
.agenda .day-label { font-weight: 700; margin: .9rem 0 .35rem; font-size: .9rem; color: var(--muted); }
.balance { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: .75rem; }
.balance div { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: .75rem .9rem; }
.balance strong { display: block; font-size: 1.5rem; }
.balance span { font-size: .8rem; color: var(--muted); }

/* ---------------- ulohy ---------------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: .9rem; overflow-x: auto; padding-bottom: .5rem; align-items: start; }
@media (max-width: 960px) { .board { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; } .board > .col { scroll-snap-align: start; } }
.col { background: var(--card-2); border: 1px solid var(--line); border-radius: var(--radius); padding: .6rem; min-height: 120px; }
.col.over { outline: 2px dashed var(--brand-2); }
.col-head { display: flex; align-items: center; justify-content: space-between; font-weight: 750; padding: .2rem .35rem .6rem; font-size: .9rem; }
.task-card { display: block; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); transition: box-shadow .15s var(--ease); padding: .65rem .75rem; margin-bottom: .5rem; text-decoration: none; color: var(--text); cursor: grab; border-left: 3px solid transparent; }
.task-card.p-vysoka { border-left-color: var(--err); }
.task-card.p-nizka { border-left-color: #a0aec0; }
.task-card.dragging { opacity: .5; }
.task-card strong { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .3rem; overflow-wrap: anywhere; }
.task-card .row { gap: .4rem; font-size: .78rem; color: var(--muted); }
.overdue { color: var(--err) !important; font-weight: 700; }
.tabs { display: flex; gap: .25rem; flex-wrap: wrap; background: var(--card-2); border: 1px solid var(--line); padding: .25rem; border-radius: 12px; }
.tabs a { padding: .42rem .8rem; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .88rem; }
.tabs a.active { background: var(--card); color: var(--brand-2); box-shadow: var(--shadow-md); }

/* ---------------- nastenka oddelenia (kanban) ---------------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: .9rem; overflow-x: auto; padding-bottom: .5rem; align-items: start; }
@media (max-width: 960px) { .kanban { grid-auto-columns: 82vw; scroll-snap-type: x mandatory; } .kanban > .col { scroll-snap-align: start; } }
.kb-cards { min-height: 40px; }
.kb-done .kb-card { opacity: .72; }
.kb-card { display: block; position: relative; background: color-mix(in srgb, var(--c) 9%, var(--card)); border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); border-left: 5px solid var(--c); border-radius: 12px; box-shadow: var(--shadow); padding: .6rem .7rem; margin-bottom: .5rem; text-decoration: none; color: var(--text); cursor: grab; transition: box-shadow .15s var(--ease), transform .15s var(--ease); }
.kb-card[hidden] { display: none; }
.kb-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kb-card.dragging { opacity: .45; }
.kb-card strong { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; overflow-wrap: anywhere; }
.kb-card .row { gap: .4rem; font-size: .76rem; color: var(--muted); }
.kb-card .kb-who { font-weight: 650; color: color-mix(in srgb, var(--c) 70%, var(--text)); }
.kb-add summary { list-style: none; cursor: pointer; color: var(--muted); font-size: .85rem; font-weight: 600; padding: .35rem .4rem; border-radius: 8px; display: flex; align-items: center; gap: .3rem; }
.kb-add summary::-webkit-details-marker { display: none; }
.kb-add summary:hover { background: var(--card); color: var(--brand-2); }
.kb-add form { padding: .4rem .1rem .2rem; }
.kb-add .stack > * + * { margin-top: .45rem; }
.kb-legend { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .9rem; }
.kb-chip { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .65rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--text); font: inherit; font-size: .8rem; cursor: pointer; }
.kb-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.kb-chip b { font-size: .72rem; color: var(--muted); }
.kb-chip:hover { border-color: var(--c, var(--brand-2)); }
.kb-chip.active { background: color-mix(in srgb, var(--c, var(--brand-2)) 16%, var(--card)); border-color: var(--c, var(--brand-2)); font-weight: 650; }
.kb-detail { border-top: 5px solid var(--c); }
.kb-cols-admin li { padding: .45rem 0; border-top: 1px solid var(--line); }
.kb-cols-admin li:first-child { border-top: 0; }
.kb-swatches { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; max-width: 260px; }
.kb-swatches button { width: 18px; height: 18px; border-radius: 50%; border: 2px solid transparent; background: var(--c); cursor: pointer; padding: 0; }
.kb-swatches button.active { border-color: var(--text); box-shadow: 0 0 0 2px var(--card) inset; }
.kb-swatches input[type=color] { width: 26px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.kb-overview { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .9rem; }
.kb-ov { display: block; text-decoration: none; color: var(--text); margin: 0; transition: box-shadow .15s var(--ease), transform .15s var(--ease); }
.kb-ov:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.kb-ov-cols { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0; }
.kb-ov-cols span { background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: .3rem .55rem; font-size: .76rem; color: var(--muted); }
.kb-ov-cols span b { display: block; font-size: 1.15rem; color: var(--text); }
.kb-ov-cols span.done b { color: var(--ok); }
.kb-ov-people { list-style: none; margin: 0; padding: 0; display: grid; gap: .25rem; font-size: .84rem; }
.kb-ov-people i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--c); margin-right: .4rem; }

/* ---------------- ludia ---------------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: .9rem; }
.person-card { display: flex; gap: .8rem; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: .9rem 1rem; min-width: 0; transition: transform .15s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease); }
.person-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: color-mix(in srgb, var(--brand-2) 25%, var(--line)); }
.person-card .info { flex: 1; min-width: 0; }
.person-card strong a { color: var(--text); text-decoration: none; }
.person-card .info > * { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.person-card .info a.small { color: var(--muted); text-decoration: none; }
.person-card .info a.small:hover { color: var(--brand-2); }
.person-card .actions { display: flex; flex-direction: column; gap: .2rem; }
.person-card .actions .iconbtn { width: 36px; height: 36px; border-radius: 50%; color: var(--brand-2); background: var(--brand-soft); }
.person-card .actions .iconbtn:hover { background: var(--brand-2); color: #fff; }
.dep-title { display: flex; align-items: center; gap: .6rem; margin: 1.4rem 0 .7rem; font-size: .74rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }

.dep-title::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.profile-head { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .45rem 1rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---------------- chat ---------------- */
body.chat-page { overflow: hidden; }
.chat { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - var(--top) - env(safe-area-inset-top, 0px)); height: calc(100dvh - var(--top) - env(safe-area-inset-top, 0px)); background: var(--card); }
.chat-side { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-side-head { display: flex; align-items: center; gap: .4rem; padding: .7rem .8rem; border-bottom: 1px solid var(--line); }
.chat-side-head input { padding: .45rem .65rem; }
.conv-list { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: .3rem; }
.conv-list .sect { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: .7rem .6rem .3rem; display: flex; justify-content: space-between; align-items: center; }
.conv-list .sect button { background: none; border: 0; color: var(--brand-2); cursor: pointer; font-size: 1.2rem; line-height: 1; padding: 0 .2rem; }
.conv { display: flex; align-items: center; gap: .6rem; padding: .5rem .55rem; border-radius: 10px; cursor: pointer; color: var(--text); text-decoration: none; }
.conv:hover { background: var(--card-2); }
.conv.active { background: var(--brand-soft); }
.conv .ch { width: 34px; height: 34px; border-radius: 9px; background: var(--card-2); display: flex; align-items: center; justify-content: center; color: var(--muted); flex: none; border: 1px solid var(--line); }
.conv .ch .ico { width: 17px; height: 17px; }
.conv .txt { flex: 1; min-width: 0; }
.conv .txt strong { display: block; font-weight: 600; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv .txt small { display: block; color: var(--muted); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv.unread .txt strong { font-weight: 800; }
.conv.muted-conv { opacity: .6; }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; position: relative; }
.chat-head { display: flex; align-items: center; gap: .6rem; padding: .55rem .9rem; border-bottom: 1px solid var(--line); min-height: 58px; }
.chat-head .txt { flex: 1; min-width: 0; }
.chat-head strong { display: block; font-size: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head small { display: block; color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.messages { flex: 1; overflow-y: auto; padding: .8rem 1rem; display: flex; flex-direction: column; overscroll-behavior: contain; }
.messages .day-sep { align-self: center; font-size: .75rem; font-weight: 700; color: var(--muted); background: var(--card-2); border: 1px solid var(--line); border-radius: 999px; padding: .15rem .7rem; margin: .8rem 0 .4rem; }
.messages .unread-sep { display: flex; align-items: center; gap: .5rem; color: var(--accent); font-size: .75rem; font-weight: 700; margin: .5rem 0; }
.messages .unread-sep::before, .messages .unread-sep::after { content: ""; flex: 1; border-top: 1px solid var(--accent); }
.msg { display: flex; gap: .6rem; padding: .2rem .4rem; border-radius: 8px; position: relative; }
.msg:hover { background: var(--card-2); }
.msg.flash-hl { background: var(--warn-soft); transition: background 1.5s; }
.msg .avatar { margin-top: .15rem; }
.msg .gutter { width: 34px; flex: none; font-size: .68rem; color: var(--muted); text-align: right; padding-top: .2rem; opacity: 0; }
.msg:hover .gutter { opacity: 1; }
.msg.cont { padding-top: 0; }
.msg .bubble { flex: 1; min-width: 0; }
.msg .who { display: flex; align-items: baseline; gap: .5rem; }
.msg .who strong { font-size: .9rem; }
.msg .who time { font-size: .72rem; color: var(--muted); }
.msg .text { overflow-wrap: anywhere; white-space: pre-wrap; }
.msg .text.deleted { color: var(--muted); font-style: italic; }
.msg .edited { font-size: .7rem; color: var(--muted); margin-left: .3rem; }
.msg .quote { border-left: 3px solid var(--input); padding: .1rem .55rem; margin: .15rem 0 .3rem; font-size: .84rem; color: var(--muted); cursor: pointer; }
.msg .quote b { color: var(--text); font-weight: 600; }
.msg .tools { position: absolute; right: .5rem; top: -14px; display: none; background: var(--card); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); padding: 2px; }
.msg:hover .tools, .msg.show-tools .tools { display: flex; }
.msg .tools button { background: none; border: 0; width: 30px; height: 30px; border-radius: 7px; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.msg .tools button:hover { background: var(--card-2); color: var(--text); }
.msg .tools .ico { width: 16px; height: 16px; }
.msg .att-images { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .35rem; }
.msg .att-images a { display: block; border-radius: 8px; overflow: hidden; background: var(--card-2); }
.msg .att-images img { display: block; max-width: min(320px, 70vw); max-height: 260px; object-fit: cover; }
.msg .att-images.multi img { width: 140px; height: 140px; }
.msg .att-file { display: flex; align-items: center; gap: .6rem; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px; margin-top: .35rem; max-width: 360px; text-decoration: none; color: var(--text); background: var(--card); }
.msg .att-file .grow strong { display: block; font-size: .88rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg .att-file small { color: var(--muted); }
.composer { position: relative; border-top: 1px solid var(--line); padding: .6rem .8rem calc(.6rem + env(safe-area-inset-bottom, 0px)); background: var(--card); }
.composer .replying { display: flex; align-items: center; gap: .5rem; font-size: .82rem; color: var(--muted); background: var(--card-2); border-radius: 8px; padding: .35rem .6rem; margin-bottom: .45rem; }
.composer .replying span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer .replying button { background: none; border: 0; color: var(--muted); cursor: pointer; }
.composer-row { display: flex; align-items: flex-end; gap: .4rem; }
.emoji-toggle { font-size: 1.15rem; line-height: 1; }
.emoji-bar { display: flex; justify-content: flex-end; margin-top: .2rem; }
.emoji-btn { background: none; border: 0; font-size: 1.15rem; line-height: 1; padding: .15rem .35rem; border-radius: 7px; cursor: pointer; color: var(--muted); }
.emoji-btn:hover, .emoji-toggle:hover { background: var(--brand-soft); }
.emoji-panel { position: fixed; z-index: 70; width: min(340px, calc(100vw - 16px)); max-height: min(340px, 60vh); overflow-y: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: .45rem .55rem .55rem; }
.emoji-panel h4 { margin: .45rem .25rem .15rem; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); }
.emoji-grid button { background: none; border: 0; font-size: 1.35rem; line-height: 1.25; padding: .2rem 0; border-radius: 8px; cursor: pointer; }
.emoji-grid button:hover { background: var(--brand-soft); transform: scale(1.15); }
.composer textarea { min-height: 42px; max-height: 180px; resize: none; padding: .55rem .75rem; border-radius: 12px; line-height: 1.4; }
.composer .iconbtn { color: var(--muted); }
.composer .send { background: var(--brand-2); color: #fff; }
.composer .send:hover { background: var(--brand); }
.composer .pending-files { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .45rem; }
.composer .pending-files .pf { display: flex; align-items: center; gap: .4rem; background: var(--card-2); border: 1px solid var(--line); border-radius: 9px; padding: .25rem .5rem; font-size: .8rem; max-width: 240px; }
.composer .pending-files .pf img { width: 32px; height: 32px; object-fit: cover; border-radius: 5px; }
.composer .pending-files .pf span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer .pending-files .pf progress { width: 50px; height: 6px; }
.composer .pending-files .pf button { background: none; border: 0; cursor: pointer; color: var(--muted); }
.mention-pop { position: absolute; z-index: 30; bottom: 100%; left: .8rem; right: .8rem; max-width: 360px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); list-style: none; margin: 0 0 .3rem; padding: .3rem; max-height: 240px; overflow-y: auto; }
.mention-pop li { display: flex; align-items: center; gap: .5rem; padding: .4rem .5rem; border-radius: 8px; cursor: pointer; font-size: .88rem; }
.mention-pop .mp-name { font-weight: 600; }
.mention-wrap { position: relative; }
.mention-wrap textarea { width: 100%; display: block; }
.mention-pop.below { bottom: auto; top: 100%; left: 0; right: auto; min-width: min(300px, 100%); margin: .25rem 0 0; }
.mention-pop li.sel, .mention-pop li:hover { background: var(--brand-soft); }
.chat-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; padding: 2rem; gap: .5rem; }
.chat-empty .ico { width: 54px; height: 54px; opacity: .4; }
.drop-overlay { position: absolute; inset: 0; background: color-mix(in srgb, var(--brand-2) 15%, transparent); border: 3px dashed var(--brand-2); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--brand-2); font-size: 1.1rem; z-index: 5; pointer-events: none; }
.chat-info { position: absolute; top: 0; right: 0; bottom: 0; width: min(340px, 100%); background: var(--card); border-left: 1px solid var(--line); box-shadow: var(--shadow-lg); z-index: 6; display: flex; flex-direction: column; }
.chat-info-body { flex: 1; overflow-y: auto; padding: 1rem; }
.load-more { align-self: center; margin: .3rem 0 .6rem; }
.typing-space { height: .3rem; }
@media (max-width: 960px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - var(--top) - 64px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); height: calc(100dvh - var(--top) - 64px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  .chat.has-conv .chat-side { display: none; }
  .chat:not(.has-conv) .chat-main { display: none; }
  body.chat-open .tabbar { display: none !important; }
  body.chat-open main.full { padding-bottom: 0; }
  body.chat-open .chat { height: calc(100vh - var(--top) - env(safe-area-inset-top, 0px)); height: calc(100dvh - var(--top) - env(safe-area-inset-top, 0px)); }
  .msg .tools { top: auto; bottom: 100%; }
}

/* ---------------- modal ---------------- */
dialog.modal { border: 0; border-radius: var(--radius); padding: 0; width: min(520px, calc(100vw - 24px)); background: var(--card); color: var(--text); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(15, 23, 42, .5); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: .9rem 1.1rem; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; }
.modal-body { padding: 1.1rem; max-height: 70vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .8rem 1.1rem; border-top: 1px solid var(--line); }
.pick-list { list-style: none; margin: .5rem 0 0; padding: 0; max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 10px; }
.pick-list li label { display: flex; align-items: center; gap: .6rem; padding: .45rem .7rem; cursor: pointer; }
.pick-list li + li { border-top: 1px solid var(--line); }
.pick-list li label:hover { background: var(--card-2); }
.pick-list input { width: 18px; height: 18px; }

/* ---------------- toasty ---------------- */
.toasts { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 90; display: flex; flex-direction: column; gap: .5rem; max-width: min(360px, calc(100vw - 32px)); }
@media (max-width: 960px) { .toasts { bottom: calc(80px + env(safe-area-inset-bottom, 0px)); left: 16px; right: 16px; max-width: none; } }
.toast { background: var(--text); color: var(--card); border-radius: 14px; padding: .75rem 1rem; box-shadow: var(--shadow-lg); font-size: .9rem; cursor: pointer; animation: toast-in .2s ease; }
.toast strong { display: block; }
.toast.err { background: var(--err); }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } }
.filelist > li { position: relative; }
.filelist details.more[open] > summary { background: var(--card-2); }
.perm-matrix th.role-col, .perm-matrix td.role-col { text-align: center; min-width: 120px; }
.perm-matrix td.role-col input[type=checkbox] { width: 20px; height: 20px; }
.perm-matrix .role-name { text-align: center; font-weight: 700; padding: .3rem .4rem; }
.table .group-row td { background: var(--card-2); font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.ok { color: var(--ok); font-weight: 700; }
.sticky-actions { position: sticky; bottom: 0; background: color-mix(in srgb, var(--bg) 92%, transparent); padding: .6rem 0; }
@media (max-width: 960px) { .sticky-actions { bottom: calc(64px + env(safe-area-inset-bottom, 0px)); } }
.tr-list { display: grid; gap: .75rem; }
.tr-card { display: flex; gap: 1rem; align-items: flex-start; text-decoration: none; color: var(--text); margin: 0; }
.tr-card.cancelled { opacity: .55; }
.tr-date { flex: none; width: 92px; text-align: center; background: var(--brand-soft); border-radius: 12px; padding: .55rem .3rem; color: var(--brand-2); }
.tr-date strong { display: block; font-size: .95rem; }
.tr-date span { font-size: .78rem; }
.cal .ev.k-training { --c: #b7791f; }
.cal .ev.k-training.mine { --c: #975a16; }
body.doc-page { overflow: hidden; }
.doc-bar { display: flex; align-items: center; gap: .5rem; padding: .4rem .8rem; background: var(--card); border-bottom: 1px solid var(--line); min-height: 50px; }
.doc-frame { display: block; width: 100%; border: 0; height: calc(100vh - var(--top) - 50px); height: calc(100dvh - var(--top) - 50px - env(safe-area-inset-top, 0px)); background: var(--card-2); }
@media (max-width: 960px) {
  .doc-frame { height: calc(100dvh - var(--top) - 50px - 64px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
  body.doc-page .tabbar { display: none !important; }
  body.doc-page .doc-frame { height: calc(100dvh - var(--top) - 50px - env(safe-area-inset-top, 0px)); }
  .hide-sm { display: none; }
}
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5rem; }
@media (max-width: 960px) { .week { grid-template-columns: 1fr; } }
.week-day { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: .6rem; min-height: 120px; }
.week-day.today { outline: 2px solid var(--brand-2); }
.week-head { font-size: .85rem; margin-bottom: .4rem; color: var(--muted); }
.res-item { background: var(--brand-soft); border-left: 3px solid var(--brand-2); border-radius: 8px; padding: .35rem .5rem; margin-bottom: .35rem; font-size: .85rem; }
.res-item.pending { border-left-color: #d69e2e; background: var(--warn-soft); }
.res-item form { margin: 0; }
.poll-opt { display: flex; gap: .6rem; align-items: flex-start; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; }
.poll-opt.mine { border-color: var(--brand-2); background: var(--brand-soft); }
.poll-opt input { margin-top: .2rem; width: 18px; height: 18px; }
.bar { display: block; height: 7px; background: var(--card-2); border-radius: 99px; overflow: hidden; margin: .3rem 0 .15rem; }
.bar i { display: block; height: 100%; background: var(--brand-2); border-radius: 99px; }
.prose { font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; }
.prose h2, .prose h3, .prose h4, .prose h5 { margin: 1.3rem 0 .5rem; }
.prose pre { background: var(--card-2); border: 1px solid var(--line); border-radius: 10px; padding: .8rem; overflow-x: auto; }
.prose code { background: var(--card-2); border-radius: 5px; padding: .05rem .3rem; font-size: .9em; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { border-left: 4px solid var(--brand-2); margin: .8rem 0; padding: .3rem .9rem; color: var(--muted); }
.prose ul, .prose ol { padding-left: 1.4rem; }
textarea.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
.clock { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.clock-hours { font-size: 3rem; font-weight: 800; color: var(--brand-2); line-height: 1.1; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.clock-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0; }
.btn-big { font-size: 1.1rem; padding: .85rem 1.4rem; }
.att-table tr.off td { background: var(--card-2); }
.att-table tr.today-row td { background: var(--brand-soft); }
.att-table tr.today-row td:first-child { box-shadow: inset 3px 0 0 var(--brand-2); }
.att-rec summary { cursor: pointer; list-style: none; padding: .1rem 0; }
.att-rec summary::-webkit-details-marker { display: none; }
.comment.internal { background: var(--warn-soft); border-radius: 10px; padding-left: .5rem; padding-right: .5rem; }
.code-input { font-size: 1.8rem !important; letter-spacing: .3em; text-align: center; font-weight: 700; }
.qr { background: #fff; padding: .5rem; border-radius: 12px; width: 220px; height: 220px; }
.backup-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: .4rem; margin-top: .6rem; }
.backup-codes code { background: var(--card); padding: .35rem .5rem; border-radius: 6px; font-size: 1rem; text-align: center; }
ol.steps { padding-left: 1.2rem; } ol.steps li { margin-bottom: 1rem; }
.reactions { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .3rem; }
.react { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: .05rem .5rem; font-size: .85rem; cursor: pointer; color: var(--text); }
.react.mine { border-color: var(--brand-2); background: var(--brand-soft); }
.react-picker { position: absolute; right: .5rem; top: -48px; z-index: 8; display: flex; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-lg); padding: .2rem .35rem; }
.react-picker button { border: 0; background: none; font-size: 1.25rem; cursor: pointer; border-radius: 50%; width: 36px; height: 36px; }
.react-picker button:hover { background: var(--card-2); transform: scale(1.15); }
.pinned-flag { font-size: .72rem; color: var(--accent); font-weight: 700; display: flex; align-items: center; gap: .2rem; }
.pinned-flag .ico { width: 12px; height: 12px; }
.msg.is-pinned { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.seen { font-size: .72rem; color: var(--muted); text-align: right; margin-top: .15rem; }
.typing { font-size: .78rem; color: var(--muted); font-style: italic; padding: 0 .2rem .3rem; }
.label-page { background: #fff; color: #000; padding: 1rem; }
.label { display: inline-flex; gap: .6rem; align-items: center; border: 1px dashed #999; padding: .5rem .8rem; border-radius: 8px; font-size: 12px; }
.label img { width: 110px; height: 110px; }
.label strong { font-size: 18px; display: block; }
@media print { .no-print { display: none; } .label { border: 0; } }
.checklist li.done strong { text-decoration: line-through; color: var(--muted); }
.checklist input[type=checkbox] { width: 22px; height: 22px; flex: none; }
.idea { display: flex; gap: 1rem; align-items: flex-start; }
.vote button { display: flex; flex-direction: column; align-items: center; width: 54px; padding: .4rem 0; border: 1px solid var(--line); border-radius: 10px; background: var(--card-2); color: var(--muted); cursor: pointer; font-size: .85rem; }
.vote button strong { font-size: 1.1rem; color: var(--text); }
.vote button.voted { border-color: var(--brand-2); background: var(--brand-soft); color: var(--brand-2); }
.kudo { display: flex; gap: .9rem; align-items: flex-start; }
.kudo-badge { font-size: 2rem; line-height: 1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .7rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem 1.1rem; text-decoration: none; color: var(--text); border-top: 4px solid var(--brand-2); }
.kpi.warn { border-top-color: #d69e2e; }
.kpi strong { display: block; font-size: 1.9rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.kpi span { font-size: .8rem; color: var(--muted); }
.dep-row { display: flex; align-items: center; gap: .7rem; padding: .4rem 0; border-bottom: 1px solid var(--line); }
.spark { display: flex; align-items: flex-end; gap: 4px; height: 140px; }
.spark div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.spark i { display: block; width: 100%; background: var(--brand-2); border-radius: 4px 4px 0 0; min-height: 2px; }
.spark span { font-size: .65rem; color: var(--muted); margin-top: 2px; }
.org ul { list-style: none; padding-left: 1.6rem; margin: 0; border-left: 2px solid var(--line); }
.org > ul { border-left: 0; padding-left: 0; }
.org li { margin: .45rem 0; position: relative; }
.org ul ul li::before { content: ""; position: absolute; left: -1.6rem; top: 1.2rem; width: 1.3rem; border-top: 2px solid var(--line); }
.org-node { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .7rem; background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--text); }
.org-node span { display: flex; flex-direction: column; line-height: 1.2; }
.org-node small { color: var(--muted); font-size: .75rem; }
.att-audio { display: flex; flex-direction: column; gap: .15rem; margin-top: .35rem; }
.att-audio audio { max-width: min(320px, 70vw); height: 40px; }
.composer .iconbtn.recording { color: #fff; background: var(--err); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
.status-line { font-size: .9rem; margin: .2rem 0; }

/* ---------------- obedy ---------------- */
.lunch-list { display: flex; flex-direction: column; gap: .9rem; }
.lunch { margin: 0; padding: 0; overflow: hidden; }
.lunch > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.3rem; }
.lunch > summary::-webkit-details-marker { display: none; }
.lunch > summary:hover { background: var(--card-2); }
.lunch-logo { width: 52px; height: 52px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 1rem; flex: none; letter-spacing: .02em; box-shadow: var(--shadow); }
.lunch-title { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .15rem; }
.lunch-title h2 { margin: 0; font-size: 1.12rem; }
.lunch-title .addr { font-size: .82rem; color: var(--muted); }
.lunch-sum { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; margin-top: .25rem; font-size: .9rem; }
.lunch-sum strong { color: var(--ok); font-weight: 700; white-space: nowrap; }
.lunch-sum strong.muted { color: var(--muted); }
.lunch-sum span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
.lunch-chev { flex: none; color: var(--muted); transition: transform .2s; }
.lunch[open] .lunch-chev { transform: rotate(180deg); }
.lunch[open] > summary { border-bottom: 1px solid var(--line); background: var(--card-2); }
.lunch-body { padding: 1.4rem 1.3rem 1.2rem; display: flex; flex-direction: column; gap: 1.6rem; }
.lunch-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.lunch-meta { font-size: .82rem; color: var(--muted); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.lunch-sect { display: flex; align-items: center; gap: .6rem; margin: 0 0 .5rem; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.lunch-sect::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.lunch-sect.today { color: var(--ok); }
.lunch-sect .pill { text-transform: none; letter-spacing: 0; }
.lunch-today { background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 1rem 1.1rem .5rem; }
.lunch-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.4rem 2rem; }
.dishes { list-style: none; margin: 0; padding: 0; }
.dishes li { display: flex; align-items: flex-start; gap: .8rem; padding: .7rem 0; border-bottom: 1px dashed var(--line); }
.dishes li:last-child { border-bottom: 0; }
.dishes .pill { margin-top: .2rem; }
.dish-name { font-weight: 600; line-height: 1.35; }
.dish-desc { font-size: .85rem; color: var(--muted); margin-top: .15rem; line-height: 1.4; }
.dish-price { white-space: nowrap; font-weight: 700; color: var(--brand-2); font-variant-numeric: tabular-nums; padding-top: .15rem; }
.lunch-more summary { cursor: pointer; font-weight: 600; color: var(--brand-2); font-size: .9rem; padding: .3rem 0; }
.lunch-more[open] summary { margin-bottom: .6rem; }
.lunch-empty { padding: 1.2rem 1rem; text-align: center; color: var(--muted); background: var(--card-2); border-radius: 12px; }
.lunch-empty .ico { width: 32px; height: 32px; opacity: .5; display: block; margin: 0 auto .4rem; }
.lunch-doc { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--card-2); }
.lunch-pdf { display: block; width: 100%; border: 0; height: min(1100px, calc(100vh - 220px)); min-height: 480px; }
.lunch-img { display: block; width: 100%; height: auto; }
@media (max-width: 640px) {
  .lunch > summary { padding: .9rem 1rem; gap: .75rem; }
  .lunch-logo { width: 44px; height: 44px; border-radius: 12px; }
  .lunch-sum span { white-space: normal; }
  .lunch-body { padding: 1rem; gap: 1.2rem; }
  .lunch-pdf { height: 70vh; }
}
.dishes li.soup { background: var(--warn-soft); border-radius: 8px; }
.lunch-days { margin-bottom: 1rem; }
.lunch-sum .pill { white-space: nowrap; }

/* ---------------- revizie ---------------- */
.kpi.danger { border-top-color: var(--err); }
.rev-table tr.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.rev-month { margin-bottom: 1rem; }
.rev-month-head { display: flex; align-items: baseline; justify-content: space-between; padding: .8rem 1.1rem; border-bottom: 1px solid var(--line); background: var(--card-2); }
.rev-month-head h2 { margin: 0; font-size: 1rem; }
.rev-month.is-overdue .rev-month-head { background: var(--err-soft); color: var(--err); }
.rev-finding.is-late { border-left: 4px solid var(--err); }
.rev-findings-text { background: var(--card-2); border-radius: 10px; padding: .6rem .8rem; line-height: 1.45; }
.rev-group { margin: 1.4rem 0 .6rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.rev-types { display: flex; flex-direction: column; gap: .6rem; }
.rev-type { margin: 0; padding: 0; }
.rev-type > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 1rem; padding: .85rem 1.1rem; }
.rev-type > summary::-webkit-details-marker { display: none; }
.rev-type.inactive > summary { opacity: .6; }
.rev-type-meta { display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; flex: none; }
.rev-type-body { padding: 0 1.1rem 1rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.rev-pick { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rev-pick-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .55rem .8rem; border-bottom: 1px solid var(--line); }
.rev-pick-row:last-child { border-bottom: 0; }
.rev-pick-row:has(.rev-pick-main input:checked) { background: var(--brand-soft); }
.rev-pick-row:not(:has(.rev-pick-main input:checked)) .rev-pick-fields { display: none; }
.rev-pick-main { display: flex; align-items: center; gap: .7rem; flex: 1; min-width: 0; cursor: pointer; }
.rev-pick-main .block { display: block; }
.rev-pick-main .pill { vertical-align: middle; }
.rev-pick-row input[type=checkbox] { width: 18px; height: 18px; flex: none; }
.rev-pick-fields { display: flex; align-items: center; gap: .6rem; flex: none; flex-wrap: wrap; }
.rev-pick-fields input { padding: .3rem .45rem; font-size: .85rem; width: auto; }
.rev-pick-f { display: flex; align-items: center; gap: .35rem; font-size: .75rem; color: var(--muted); white-space: nowrap; }
.rev-pick-f input[type=number] { width: 5.5rem; }
.rev-pick-f input[inputmode=decimal] { width: 6.5rem; }
.no-meter .is-meter, .no-meter [data-meter-field] { display: none; }
.rev-log-date .tiny { display: block; }
.rev-results { display: flex; gap: .5rem; flex-wrap: wrap; }
.rev-result { display: flex; align-items: center; gap: .45rem; padding: .55rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 600; }
.rev-result:has(input:checked) { border-color: currentColor; }
.rev-result.vyhovuje:has(input:checked) { color: var(--ok); background: var(--ok-soft); }
.rev-result.vyhrady:has(input:checked) { color: var(--warn); background: var(--warn-soft); }
.rev-result.nevyhovuje:has(input:checked) { color: var(--err); background: var(--err-soft); }
.rev-log { display: flex; gap: 1rem; padding: .8rem 0; border-bottom: 1px dashed var(--line); }
.rev-log:last-child { border-bottom: 0; }
.rev-log-date { flex: none; width: 110px; display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }
.rev-inline { display: inline-block; position: relative; }
.rev-inline > summary { list-style: none; display: inline-flex; }
.rev-inline > summary::-webkit-details-marker { display: none; }
.rev-inline-form { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .8rem; text-align: left; }
.rev-inline-form input { width: 100%; margin-bottom: .4rem; }
.rev-inline-title { display: none; }
.rev-inline-actions { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .5rem; }
.rev-inline > summary > span { display: none; }
.rev-duties tr.row-overdue td:first-child, .rev-plan tr.row-overdue td:first-child { box-shadow: inset 3px 0 0 var(--err); }
.table-wrap:has(.rev-inline[open]) { overflow: visible; }
@media (max-width: 640px) {
  .rev-pick-row { padding: .7rem .8rem; }
  .rev-pick-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; width: 100%; padding-left: 0; }
  .rev-pick-row:not(:has(.rev-pick-main input:checked)) .rev-pick-fields { display: none; }
  .rev-pick-f { flex-direction: column; align-items: stretch; gap: .2rem; }
  .rev-pick-f:nth-child(3) { grid-column: 1 / -1; }
  .rev-pick-fields input, .rev-pick-f input[type=number] { width: 100%; min-height: 42px; font-size: 16px; }
  .rev-pick-row input[type=checkbox] { width: 22px; height: 22px; }

  /* Zoznam zariadeni: riadky ako karty */
  .rev-table, .rev-table tbody, .rev-table tr, .rev-table td { display: block; }
  .rev-table thead { display: none; }
  .rev-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .6rem; padding: .8rem .9rem; border-bottom: 1px solid var(--line); }
  .rev-table tr.row-overdue { background: var(--err-soft); }
  .rev-table tr.row-overdue td:first-child { box-shadow: none; }
  .rev-table tr:last-child { border-bottom: 0; }
  .rev-table tbody tr:hover td { background: transparent; }
  .rev-table td { padding: 0; border: 0; white-space: normal; }
  .rev-table td.rt-no { grid-column: 1; grid-row: 1; }
  .rev-table td.rt-state { grid-column: 2; grid-row: 1; justify-self: end; display: flex; flex-wrap: wrap; gap: .25rem; justify-content: flex-end; }
  .rev-table td.rt-name { grid-column: 1 / -1; font-size: 1rem; }
  .rev-table td.rt-cell { grid-column: auto; }
  .rev-table td.rt-due { grid-column: 1 / -1; }
  .rev-table td.rt-cell::before { content: attr(data-label); display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
  .rev-table tr.rt-empty { display: block; }

  /* Plan revizii na karte zariadenia: tabulka sa na mobile rozlozi na karty, uprava sa otvori priamo v karte */
  .rev-duties, .rev-duties tbody, .rev-duties tr, .rev-duties td { display: block; }
  .rev-duties thead { display: none; }
  .rev-duties tr { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: .5rem .6rem; padding: .8rem .85rem; margin-bottom: .6rem; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
  .rev-duties tr.row-overdue { border-color: var(--err); background: var(--err-soft); }
  .rev-duties tr.row-overdue td:first-child { box-shadow: none; }
  .rev-duties tr:last-child { margin-bottom: 0; }
  .rev-duties tbody tr:hover td { background: transparent; }
  .rev-duties td { padding: 0; border: 0; white-space: normal; }
  .rev-duties td.rd-type { grid-column: 1 / -1; font-size: 1rem; }
  .rev-duties td.rd-cell { font-size: .95rem; white-space: nowrap; }
  .rev-duties td.rd-cell::before { content: attr(data-label); display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: .1rem; }
  .rev-duties td.rd-state { grid-column: 1 / -1; display: flex; }
  .rev-duties td.rd-state::before { display: none; }
  .rev-duties td.rd-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem; text-align: left; margin-top: .25rem; }
  .rev-duties td.rd-actions > .btn { flex: 1 1 40%; justify-content: center; min-height: 42px; }
  .rev-duties .rev-inline { display: contents; }
  .rev-duties .rev-inline > summary { flex: 1 1 40%; justify-content: center; min-height: 42px; }
  .rev-duties .rev-inline > summary > span { display: inline; }
  .rev-duties .rev-inline[open] > summary { background: var(--brand-soft); border-color: var(--brand-2); color: var(--brand-2); }
  .rev-duties .rev-inline-form { position: static; width: 100%; flex: 1 1 100%; margin-top: .3rem; padding: .9rem .85rem; background: var(--card-2); box-shadow: none; }
  .rev-duties .rev-inline-form .rev-inline-title { display: block; font-weight: 700; margin-bottom: .5rem; }
  .rev-duties .rev-inline-form input { min-height: 42px; margin-bottom: .6rem; }
  .rev-duties .rev-inline-actions { flex-direction: column; }
  .rev-duties .rev-inline-actions .btn { width: 100%; justify-content: center; min-height: 42px; }
  .rev-add > summary { display: block; padding: .6rem 0; font-size: .95rem; }
  .rev-add-form .rev-add-submit .btn { width: 100%; justify-content: center; min-height: 44px; }
  .rev-add-form input, .rev-add-form select { min-height: 42px; }

  /* Harmonogram: riadky ako karty */
  .rev-plan, .rev-plan tbody, .rev-plan tr, .rev-plan td { display: block; }
  .rev-plan thead { display: none; }
  .rev-plan tr { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem .6rem; padding: .8rem .9rem; border-bottom: 1px solid var(--line); }
  .rev-plan tr.row-overdue { background: var(--err-soft); }
  .rev-plan tr.row-overdue td:first-child { box-shadow: none; }
  .rev-plan tr:last-child { border-bottom: 0; }
  .rev-plan tbody tr:hover td { background: transparent; }
  .rev-plan td { padding: 0; border: 0; white-space: normal; }
  .rev-plan td.rp-due { font-size: 1.05rem; }
  .rev-plan td.rp-equip { grid-column: 1 / -1; font-size: 1rem; }
  .rev-plan td.rp-type { grid-column: 1 / -1; }
  .rev-plan td.rp-cell::before { content: attr(data-label); display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
  .rev-plan td.rp-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: .5rem; text-align: left; margin-top: .2rem; }
  .rev-plan td.rp-actions .btn { flex: 1 1 auto; justify-content: center; min-height: 42px; }
  .rev-month-head { padding: .7rem .9rem; }
  .rev-log { flex-direction: column; gap: .3rem; }
  .rev-log-date { width: auto; flex-direction: row; align-items: center; }
}

/* ---------------- vlastny kalendar: vyber kolegov ---------------- */
.dd { position: relative; }
.dd > summary { list-style: none; display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; }
.dd > summary::-webkit-details-marker { display: none; }
.dd[open] > summary { background: var(--brand-soft); }
.dd-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: min(320px, 92vw); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .5rem 0; }
.dd-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .35rem .9rem .5rem; border-bottom: 1px solid var(--line); }
.dd-list { max-height: min(50vh, 380px); overflow-y: auto; padding: .3rem 0; }
.dd-group { padding: .5rem .9rem .2rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.dd-item { display: flex; align-items: center; gap: .55rem; padding: .4rem .9rem; cursor: pointer; font-size: .92rem; }
.dd-item:hover { background: var(--card-2); }
.dd-item input { width: 17px; height: 17px; margin: 0; }
.dd-foot { padding: .5rem .9rem .3rem; border-top: 1px solid var(--line); }
.ev.me { box-shadow: inset 0 0 0 1.5px var(--c); }
.only-mobile-block { display: none; }
.cal-agenda-row { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.cal-agenda-row:last-child { border-bottom: 0; }
.cal-agenda-row i.ev { width: 10px; height: 10px; padding: 0; border-radius: 3px; border-left: 0; background: var(--c); flex: none; font-size: 0; }

/* ---------------- schvalovanie ---------------- */
.appr-item { display: grid; grid-template-columns: minmax(180px, 1.3fr) minmax(150px, 1fr) minmax(160px, 1.4fr) auto; gap: .75rem 1rem; align-items: center; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.appr-item:last-child { border-bottom: 0; }
.appr-who { display: flex; align-items: center; gap: .6rem; }
.appr-when a { text-decoration: none; color: var(--text); }
.appr-overlap .pill { white-space: normal; }
.appr-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.appr-actions form { margin: 0; }
.appr-reject { position: relative; }
.appr-reject > summary { list-style: none; display: inline-flex; cursor: pointer; }
.appr-reject > summary::-webkit-details-marker { display: none; }
.appr-reject-form { position: absolute; right: 0; top: calc(100% + 4px); z-index: 10; display: flex; gap: .4rem; width: min(340px, 90vw); background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .6rem; }
.appr-reject-form input { flex: 1; min-width: 0; }
.appr-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.appr-grid { display: grid; grid-template-columns: 210px repeat(var(--days), minmax(26px, 1fr)); min-width: calc(210px + var(--days) * 26px); }
.appr-name { position: sticky; left: 0; z-index: 2; background: var(--card); padding: .45rem .8rem; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); font-size: .88rem; display: flex; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.appr-name a { color: var(--text); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.appr-h { background: var(--card-2); font-weight: 700; }
.appr-day { text-align: center; font-size: .72rem; padding: .3rem 0; border-bottom: 1px solid var(--line); border-left: 1px solid color-mix(in srgb, var(--line) 60%, transparent); display: flex; flex-direction: column; align-items: center; line-height: 1.15; }
.appr-day small { font-size: .6rem; color: var(--muted); font-weight: 500; text-transform: lowercase; }
.appr-day.weekend, .appr-cell.weekend { background: color-mix(in srgb, var(--card-2) 80%, var(--line)); }
.appr-day.holiday, .appr-cell.holiday { background: var(--warn-soft); }
.appr-day.today span { background: var(--brand-2); color: #fff; border-radius: 999px; padding: 0 .35rem; }
.appr-load { font-size: .72rem; font-weight: 700; color: var(--muted); }
.appr-load.l1 { background: color-mix(in srgb, var(--brand-2) 14%, transparent); }
.appr-load.l2 { background: color-mix(in srgb, var(--brand-2) 30%, transparent); color: var(--text); }
.appr-load.l3 { background: color-mix(in srgb, var(--warn) 45%, transparent); color: var(--text); }
.appr-load.l4 { background: color-mix(in srgb, var(--err) 55%, transparent); color: #fff; }
.appr-row { grid-column: 2 / -1; display: grid; grid-template-columns: repeat(var(--days), minmax(26px, 1fr)); grid-template-rows: 34px; border-bottom: 1px solid var(--line); }
.appr-cell { grid-row: 1; border-left: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.appr-cell.today { box-shadow: inset 0 0 0 1px var(--brand-2); }
.appr-seg { grid-row: 1; margin: 5px 2px; min-width: 0; display: flex; align-items: center; justify-content: center; font-size: .7rem; font-weight: 600; border-radius: 6px; white-space: nowrap; overflow: hidden; }
.appr-empty { grid-column: 1 / -1; padding: 1.2rem; }
.appr-swipe-hint { display: none; }
@media (max-width: 760px) {
  .appr-item { grid-template-columns: 1fr; gap: .4rem; }
  .appr-actions { justify-content: flex-start; }
  /* .card.flush ma overflow: hidden a prebijalo posuvanie - na mobile sa mesiac musi dat potiahnut do boku */
  .card.flush.appr-wrap { overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
  .appr-grid { grid-template-columns: 110px repeat(var(--days), minmax(30px, 1fr)); min-width: calc(110px + var(--days) * 30px); }
  .appr-name { padding: .4rem .5rem; font-size: .8rem; }
  .appr-swipe-hint { display: block; margin: 0 0 .4rem; }
  .only-mobile-block { display: block; margin-top: 1rem; }
  .cal-head { gap: .4rem; }
  .cal-head h1 { min-width: 0; width: 100%; }
  .cal-head .grow { display: none; }
  .dd-menu { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); width: auto; }
  .appr-reject-form { position: fixed; left: 12px; right: 12px; top: auto; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); width: auto; }
}
/* ---------------- mobil: vseobecne opravy ---------------- */
@media (max-width: 640px) {
  input, select, textarea { font-size: 16px; }
  .kv { grid-template-columns: 1fr; gap: .1rem .5rem; }
  .kv dt { margin-top: .4rem; font-size: .78rem; }
  .page-head h1 { font-size: 1.3rem; }
  .page-head > .row { width: 100%; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tabs a { white-space: nowrap; flex: none; }
  .card { padding: .95rem 1rem; }
  .table th, .table td { padding: .5rem .45rem; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid > div[style*="span 2"] { grid-column: 1 / -1 !important; }
  .balance { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .legend { gap: .3rem .6rem; font-size: .72rem; }
  .lunch > summary, .rev-type > summary { flex-wrap: wrap; }
}
.ev .ev-note { opacity: .85; font-weight: 400; }

/* ---------------- obedy: mobil ---------------- */
@media (max-width: 640px) {
  .lunch-days { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .lunch-days::-webkit-scrollbar { display: none; }
  .lunch-days a { flex: none; white-space: nowrap; }
  .lunch > summary { flex-wrap: nowrap; align-items: flex-start; padding: .85rem .9rem; gap: .65rem; }
  .lunch-logo { width: 40px; height: 40px; border-radius: 11px; font-size: .85rem; margin-top: .1rem; }
  .lunch-title h2 { font-size: 1.02rem; line-height: 1.25; }
  .lunch-title .addr { font-size: .78rem; }
  .lunch-sum { display: block; font-size: .84rem; margin-top: .3rem; }
  .lunch-sum strong { display: block; white-space: normal; }
  .lunch-sum .pill, .lunch-sum .mine-tag { display: inline-block; margin-top: .25rem; }
  .lunch-sum span:not(.pill):not(.mine-tag) { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; white-space: normal; margin-top: .2rem; }
  .lunch-chev { margin-top: .45rem; }
  .lunch-body { padding: .9rem .8rem 1rem; gap: 1.1rem; }
  .lunch-today { padding: .8rem .8rem .35rem; }
  .lunch-cols { grid-template-columns: 1fr; gap: 1rem; }
  .dishes li { gap: .55rem; padding: .6rem 0; flex-wrap: wrap; }
  .dishes li .grow { flex: 1 1 55%; min-width: 0; }
  .dishes li .pill { flex: none; }
  .dish-price { margin-left: auto; }
  .dish-name { font-size: .95rem; }
  .lunch-bar { flex-direction: column; align-items: stretch; gap: .5rem; }
  .lunch-bar .row { flex-wrap: wrap; }
  .lunch-bar .btn { flex: 1 1 auto; justify-content: center; }
  .lunch-empty { padding: 1rem .8rem; font-size: .9rem; }
}

/* ---------------- ankety v spravach ---------------- */
.plus-wrap { position: relative; }
.plus-menu { position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 30; min-width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .3rem; display: flex; flex-direction: column; }
.plus-menu button { display: flex; align-items: center; gap: .6rem; width: 100%; text-align: left; background: none; border: 0; border-radius: 9px; padding: .5rem .6rem; color: var(--text); cursor: pointer; font: inherit; font-size: 1.1rem; }
.plus-menu button:hover { background: var(--card-2); }
.plus-menu button span { display: flex; flex-direction: column; line-height: 1.2; }
.plus-menu button strong { font-size: .9rem; }
.plus-menu button small { font-size: .74rem; color: var(--muted); }
.poll-msg { margin-top: .3rem; max-width: 460px; border: 1px solid var(--line); border-radius: 12px; padding: .7rem .8rem .55rem; background: var(--card); display: flex; flex-direction: column; gap: .35rem; }
.poll-q { font-size: .95rem; margin-bottom: .2rem; overflow-wrap: anywhere; }
.poll-o { display: block; width: 100%; text-align: left; background: var(--card-2); border: 1px solid transparent; border-radius: 9px; padding: .45rem .6rem; color: var(--text); font: inherit; cursor: pointer; }
.poll-o:hover:not(:disabled) { border-color: var(--brand-2); }
.poll-o.mine { border-color: var(--brand-2); background: var(--brand-soft); }
.poll-o:disabled { cursor: default; opacity: .85; }
.poll-o-row { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; }
.poll-o-label { font-size: .9rem; font-weight: 600; overflow-wrap: anywhere; }
.poll-o-n { font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; flex: none; }
.poll-o .bar { margin: .3rem 0 .1rem; height: 5px; }
.poll-o-names { display: block; font-size: .72rem; color: var(--muted); }
.poll-foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; font-size: .74rem; color: var(--muted); margin-top: .2rem; }
.poll-msg.closed .poll-o.mine { border-color: var(--line); }
.lunch-prev { margin: .4rem 0 0; padding-left: 1.2rem; font-size: .9rem; display: flex; flex-direction: column; gap: .2rem; }
.lunch-prev li:first-child { font-weight: 600; }

/* ---------------- schvalovanie rezervacii ---------------- */
.approvals-card { border-left: 4px solid #d69e2e; margin-bottom: 1rem; }
.approvals-card .card-head { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .3rem; }
.approvals-card .card-head h2 { margin: 0; }
.approvals-card .hint { margin: 0 0 .6rem; }
.approvals-list li { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.approvals-actions { flex-wrap: nowrap; gap: .4rem; margin: 0; }
.approvals-history { margin-top: .6rem; }
.approvals-history summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--muted); padding: .3rem 0; }
.approvals-history[open] summary { color: var(--text); margin-bottom: .3rem; }
@media (max-width: 640px) {
  .approvals-actions { width: 100%; }
  .approvals-actions .btn { flex: 1; }
}

.audience-list { max-height: 220px; margin-top: .4rem; }

.register-card { max-width: 520px; }
.register-link { margin-top: 1.2rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.register-link h3 { margin: 0 0 .3rem; font-size: 1rem; }

/* Sprava vozidiel: platnost STK / dialnicnej znamky ako farebna bublina s bielym textom */
.due { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .6rem; border-radius: 999px; color: #fff; font-weight: 700; font-size: .8rem; white-space: nowrap; line-height: 1.2; }
.due small { font-weight: 600; opacity: .85; }
.due-ok { background: var(--ok); }
.due-soon { background: #d97706; }
.due-overdue { background: var(--err); }
.due-none { background: var(--muted); }
.due-list { display: flex; flex-direction: column; gap: .3rem; align-items: flex-start; }

/* ---- Striedanie do 16:00 (tabulky z Excelu) ---- */
.rota-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card); }
table.rota { border-collapse: separate; border-spacing: 0; font-size: .82rem; width: 100%; min-width: 760px; }
.rota th, .rota td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; height: 30px; text-align: center; white-space: nowrap; }
.rota th.name, .rota td.name { position: sticky; left: 0; z-index: 2; background: var(--card); text-align: left; padding: 0 .6rem; min-width: 150px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.rota thead th { background: var(--card-2); font-weight: 700; font-size: .75rem; color: var(--muted); }
.rota thead th.name { background: color-mix(in srgb, #c98a4b 35%, var(--card)); color: var(--text); font-style: italic; }
.rota .off { background: #c0392b !important; color: #fff !important; }
.rota thead th.off { color: #f7c7c0 !important; }
.rota td.cell { width: 30px; min-width: 30px; cursor: default; user-select: none; font-weight: 800; font-size: .95rem; }
.rota td.cell.on::after { content: "X"; }
.rota td.today-col, .rota th.today-col { box-shadow: inset 0 0 0 2px var(--brand-2); }
.rota td.cell.on.today-col { background: color-mix(in srgb, var(--brand-2) 15%, var(--card)); }
.rota tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--card-2) 55%, var(--card)); }
.rota tbody tr:hover td:not(.off) { background: color-mix(in srgb, var(--brand-2) 8%, var(--card)); }
.rota-edit .rota td.cell:not(.off) { cursor: pointer; }
.rota-edit .rota td.cell:not(.off):hover { outline: 2px solid var(--brand-2); outline-offset: -2px; }
.rota-edit .rota td.cell.off { cursor: pointer; opacity: .9; }
.rota-head { display: flex; align-items: baseline; gap: .4rem 1rem; flex-wrap: wrap; margin: 1.4rem 0 .6rem; }
.rota-head h2 { margin: 0; }
.rota-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .3rem .8rem; }
.rota-person { display: flex; align-items: center; gap: .25rem; padding: .2rem .4rem; border-radius: 8px; background: var(--card-2); font-size: .85rem; }
.rota-person form { display: inline; }
.rota-person .ib { background: none; border: 0; cursor: pointer; color: var(--muted); padding: .1rem .3rem; border-radius: 6px; line-height: 1; }
.rota-person .ib:hover { background: var(--card); color: var(--text); }
.rota-person .ib.del:hover { color: var(--err); }
@media (max-width: 760px) {
  table.rota { min-width: 0; font-size: .76rem; }
  .rota th.name, .rota td.name { min-width: 118px; max-width: 130px; padding: 0 .4rem; font-size: .76rem; }
  .rota td.cell { width: 26px; min-width: 26px; font-size: .85rem; }
  .rota th, .rota td { height: 28px; }
}

/* viac firiem: prepinac v hlavicke a stitok firmy pri polozkach */
.tenant-switch select { border-radius: 999px; padding: .3rem 1.8rem .3rem .8rem; font-size: .84rem; background-color: var(--card-2); border: 1px solid transparent; }
.tenant-switch select:focus { border-color: var(--brand-2); }
/* prepinanie firiem v menu pod fotkou (pocitac); na mobile je vyber v bocnom paneli */
.user-menu .tenant-menu { margin: 0 0 .3rem; padding: 0 0 .3rem; border-top: 0; border-bottom: 1px solid var(--line); }
.user-menu .tenant-menu .dd-group { padding: .35rem .6rem .25rem; }
.user-menu .tenant-menu button { color: var(--text); }
.user-menu .tenant-menu button .ico { width: 16px; height: 16px; color: var(--brand-2); visibility: hidden; }
.user-menu .tenant-menu button.active .ico { visibility: visible; }
.user-menu .tenant-menu button.active { font-weight: 650; }
.user-menu .tenant-menu button span { flex: 1; }
.user-menu .tenant-menu button small { color: var(--muted); font-size: .7rem; font-weight: 700; letter-spacing: .04em; }
.pill-tenant { background: var(--brand-soft); color: var(--brand-2); border-color: transparent; text-transform: uppercase; letter-spacing: .03em; font-size: .66rem; vertical-align: middle; }
@media (max-width: 960px) { .only-desktop { display: none !important; } }
