/* stuNET.sk Intranet – vizuál podľa dizajn manuálu stuNET.sk 1.1 (žltá #FFC000, čierna #111111, biela, písmo Inter) */
:root {
  /* farby a rozmery z manuálu (5.6 Farby v kóde) */
  --zlta: #FFC000; --zlta-hover: #FFD24D; --zlta-stlacena: #E0A800; --cierna: #111111; --biela: #FFFFFF;
  --pozadie: #FFFFFF; --plocha: #F5F4F0; --linka: #D9D7D0; --okraj: #8C8A84; --text-tlmeny: #5F5F5F;
  --jemna-zlta: #FFF3CC; --tmava-zlta: #7A5900;
  --spravne: #17723A; --spravne-jemna: #E6F2EA; --nespravne: #B3261E; --info: #1F5FBF;
  --roh-maly: 4px; --roh-stredny: 8px; --roh-velky: 16px;
  --pismo: Inter, Arial, sans-serif; --pismo-kod: Consolas, "Courier New", monospace;
  --lista: 56px; --lista-linka: 3px;
  /* prerušovaná čiara (1.6): dielik 4h, medzera 2,5h, sklon 45° doprava; h = 6 px */
  --carka-zlta: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='39' height='6'%3E%3Cpolygon points='6,0 30,0 24,6 0,6' fill='%23FFC000'/%3E%3C/svg%3E");
  /* pôvodné názvy premenných, na ktoré sa odkazujú ostatné štýly */
  --blue: var(--cierna); --blue-dark: #333333; --blue-soft: var(--jemna-zlta); --text: var(--cierna); --muted: var(--text-tlmeny);
  --grey: var(--plocha); --bg: var(--pozadie); --line: var(--linka); --white: var(--biela); --red: var(--nespravne); --red-soft: #FBEAE8;
  --green: var(--zlta); --green-soft: var(--jemna-zlta); --accent: var(--zlta);
  --font: var(--pismo);
  --radius: var(--roh-stredny); --shadow-sm: none; --shadow: 0 8px 24px rgb(17 17 17 / .12);
  --side: 240px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
a { color: var(--tmava-zlta); text-decoration: none; font-weight: 600; }
a:hover { color: var(--cierna); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
h1, h2, h3 { color: var(--text); margin: 0; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.01em; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 700; margin-top: .5rem; }
p { margin: 0; }
img, video { max-width: 100%; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted, .meta { color: var(--muted); }
.meta { font-size: .8125rem; }
.small { font-size: .88rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--pismo-kod); }
.inline { display: inline; }
.stack { display: grid; gap: 1rem; align-content: start; }

/* ---------- Ikony ---------- */
.ic { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.ic.xs { width: 16px; height: 16px; vertical-align: -3px; }
.ic.big { width: 56px; height: 56px; color: var(--okraj); }
.kind-folder { color: var(--cierna); fill: var(--zlta); }
.kind-image { color: var(--tmava-zlta); }
.kind-video { color: var(--cierna); }
.kind-pdf { color: #B3261E; }

/* ---------- Hlavička ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: var(--cierna); color: var(--biela); }
.topbar::after { content: ""; display: block; height: var(--lista-linka); background: var(--zlta); }
.topbar-in { display: flex; align-items: center; gap: 1rem; min-height: var(--lista); padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left)); }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none !important; }
.brand img { height: 32px; width: auto; display: block; }
.brand-tag { color: var(--biela); font-size: 1rem; font-weight: 700; padding-left: .75rem; border-left: 1px solid #3D3D3D; line-height: 24px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.userchip { display: flex; align-items: center; gap: .5rem; color: var(--biela); font-weight: 600; font-size: .9375rem; padding: .25rem .6rem .25rem .25rem; border-radius: 999px; text-decoration: none !important; }
.userchip:hover { background: rgb(255 255 255 / .1); }
.avatar { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--cierna); color: var(--biela); font-weight: 700; font-size: .95rem; flex: none; }
.avatar.sm { width: 28px; height: 28px; font-size: .8rem; vertical-align: middle; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: var(--roh-stredny); background: none; color: var(--blue); cursor: pointer; padding: 0; list-style: none; }
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { background: rgb(17 17 17 / .08); }
.nav-toggle { display: none; }

/* ---------- Rozloženie ---------- */
.shell { flex: 1; display: flex; width: 100%; max-width: 1500px; margin: 0 auto; }
.sidenav { width: var(--side); flex: none; padding: 1.25rem .75rem; display: flex; flex-direction: column; gap: .2rem; position: sticky; top: calc(var(--lista) + var(--lista-linka)); align-self: flex-start; max-height: calc(100vh - calc(var(--lista) + var(--lista-linka))); overflow: auto; }
.sidenav a { display: flex; align-items: center; gap: .7rem; min-height: 44px; padding: .5rem .85rem; border-radius: var(--roh-stredny); color: var(--cierna); font-size: 1rem; font-weight: 600; text-decoration: none; }
.sidenav a:hover { background: var(--biela); color: var(--cierna); }
.sidenav a[aria-current="page"] { background: var(--cierna); color: var(--biela); font-weight: 700; box-shadow: inset 4px 0 0 var(--zlta); }
.sidenav a[aria-current="page"] .ic { color: var(--zlta); }
.content { flex: 1; min-width: 0; padding: 1.5rem max(16px, env(safe-area-inset-right)) 2.5rem 1.5rem; display: flex; flex-direction: column; gap: 1.1rem; }
body.guest .content { padding: 1.5rem 16px; }
.footer { color: var(--text-tlmeny); font-size: .8125rem; border-top: 1px solid var(--line); background: var(--biela); }
.footer-in { max-width: 1500px; margin: 0 auto; padding: .9rem 16px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; }
.footer a { color: var(--text-tlmeny); font-weight: 400; }

@media (max-width: 860px) {
  .nav-toggle { display: inline-grid; }
  .brand img { height: 28px; }
  .brand-tag { font-size: .9375rem; padding-left: .5rem; }
  .uname { display: none; }
  .sidenav { position: fixed; top: calc(var(--lista) + var(--lista-linka)); left: 0; bottom: 0; z-index: 40; background: var(--grey); box-shadow: var(--shadow); transform: translateX(-105%); transition: transform .2s; max-height: none; width: 260px; }
  .sidenav.open { transform: none; }
  .content { padding: 1rem 16px 2rem; }
}
@media (max-width: 420px) { .brand-tag { display: none; } }

/* ---------- Prvky ---------- */
.page-title { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .75rem 1rem; }
.page-title h1 { word-break: break-word; }
.page-title h1::after { content: ""; display: block; width: 102px; height: 6px; margin-top: .6rem; background: var(--carka-zlta) 0 0 / 39px 6px repeat-x; }
.page-title .muted { margin-top: .25rem; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.card { background: var(--plocha); border-radius: var(--radius); border: 1px solid var(--line); padding: 1.25rem; min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .75rem; }
.card-head h2 { display: flex; align-items: center; gap: .5rem; }
.narrow-card { max-width: 560px; margin: 2rem auto; display: grid; gap: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 1.1rem; align-items: start; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 1.3fr; gap: .75rem; }
.grid-2.tight { gap: .75rem; }
@media (max-width: 560px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-3 label:nth-child(3n+1) { grid-column: 1 / -1; } }
.row-end { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; }

/* Tlačidlá (manuál 5.2): žlté = hlavná akcia, čierne = druhá, obrysové = ostatné */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 44px; padding: .45rem 1.25rem; border: 2px solid var(--cierna); border-radius: var(--roh-stredny); background: var(--zlta); color: var(--cierna); font: 700 1rem var(--font); cursor: pointer; text-decoration: none !important; box-shadow: 0 2px 0 var(--cierna); transition: background .12s, box-shadow .12s, transform .12s; white-space: nowrap; }
.btn:hover { background: var(--zlta-hover); color: var(--cierna); }
.btn:active { background: var(--zlta-stlacena); box-shadow: 0 0 0 var(--cierna); transform: translateY(2px); }
.btn:focus-visible { outline: 3px solid var(--info); outline-offset: 2px; }
.btn:disabled, .btn[aria-disabled="true"] { background: var(--plocha); color: #A8A69F; border-color: var(--linka); box-shadow: none; cursor: not-allowed; transform: none; }
.btn-dark { background: var(--cierna); color: var(--biela); box-shadow: 0 2px 0 var(--zlta); }
.btn-dark:hover { background: #333333; color: var(--biela); }
.btn-ghost { background: var(--biela); color: var(--cierna); border-color: var(--okraj); box-shadow: 0 2px 0 var(--okraj); }
.btn-ghost:hover { background: var(--plocha); color: var(--cierna); }
.btn-ghost:active { background: var(--linka); box-shadow: 0 0 0 var(--okraj); }
.btn-sm { min-height: 36px; padding: .2rem .8rem; font-size: .875rem; border-radius: var(--roh-stredny); }
.btn-block { width: 100%; }
.danger, .btn.danger { color: var(--red) !important; }
.btn-ghost.danger:hover { background: var(--red-soft); }
.linklike { background: none; border: 0; padding: 0; color: var(--tmava-zlta); font-weight: 600; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem; }
.linklike:hover { text-decoration: underline; }

label { display: grid; gap: .3rem; font-weight: 600; font-size: .875rem; }
label small { font-weight: 400; }
input, select, textarea { width: 100%; min-height: 44px; font: 400 1rem var(--font); color: var(--text); padding: .5rem .75rem; border: 2px solid var(--linka); border-radius: var(--roh-maly); background: var(--biela); min-width: 0; }
textarea { min-height: 0; }
input::placeholder, textarea::placeholder { color: #8C8A84; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--cierna); box-shadow: 0 0 0 3px var(--info); }
input[aria-invalid="true"], input:user-invalid { border-color: var(--nespravne); }
input:disabled { background: var(--grey); color: var(--muted); }
textarea { resize: vertical; line-height: 1.45; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 0; accent-color: var(--zlta); }
input[type="file"] { padding: .4rem; min-height: 0; }
label.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
/* Hlášky (5.4): stav vždy so znakom, nie len farbou */
.flash { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem 1rem; border-radius: var(--roh-stredny); border: 2px solid; font-size: 1rem; font-weight: 600; }
.flash::before { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--biela); font-weight: 800; font-size: .8rem; margin-top: 1px; }
.flash-ok { background: var(--spravne-jemna); border-color: var(--spravne); color: var(--spravne); }
.flash-ok::before { content: "✓"; background: var(--spravne); }
.flash-err { background: var(--red-soft); border-color: var(--nespravne); color: var(--nespravne); }
.flash-err::before { content: "!"; background: var(--nespravne); }
.notice { background: var(--jemna-zlta); border: 1px solid #E6C766; border-radius: var(--roh-stredny); padding: .5rem .75rem; margin-bottom: .75rem; }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--zlta); color: var(--cierna); font-size: .75rem; font-weight: 700; margin-left: auto; font-variant-numeric: tabular-nums; }
.pill { display: inline-flex; align-items: center; gap: .25rem; font-size: .75rem; font-weight: 700; padding: .05rem .5rem; border-radius: var(--roh-maly); border: 1px solid var(--okraj); background: var(--biela); color: var(--cierna); vertical-align: middle; white-space: nowrap; }
.pill-edit { background: var(--jemna-zlta); border-color: var(--zlta); color: var(--cierna); }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); display: grid; justify-items: center; gap: .5rem; background: var(--white); border: 1px dashed var(--line); border-radius: var(--radius); }

.tabs { display: flex; gap: .35rem; flex-wrap: wrap; border-bottom: 2px solid var(--line); }
.tabs a { display: inline-flex; align-items: center; gap: .45rem; padding: .55rem .9rem; color: var(--text-tlmeny); font-weight: 600; border-radius: var(--roh-maly) var(--roh-maly) 0 0; margin-bottom: -2px; border-bottom: 3px solid transparent; text-decoration: none; }
.tabs a:hover { color: var(--cierna); background: var(--plocha); }
.tabs a[aria-current="page"] { color: var(--cierna); font-weight: 700; border-bottom-color: var(--zlta); }
.tabs .badge { margin-left: .2rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: .75rem; flex-wrap: wrap; }
.seg button { border: 0; background: #fff; padding: .4rem .8rem; font: inherit; color: var(--text); cursor: pointer; }
.seg button.on { background: var(--zlta); color: var(--cierna); font-weight: 700; }

.crumbs { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .98rem; }
.crumbs span { color: #B5B3AC; }

/* ---------- Prihlásenie ---------- */
.login-wrap { flex: 1; display: grid; place-items: center; padding: 2rem 0; }
.login-card { width: min(100%, 420px); display: grid; gap: 1rem; padding: 2rem; box-shadow: var(--shadow); }
.login-card h1 { font-size: 1.5rem; }
.login-symbol { width: 72px; height: 72px; justify-self: center; }
.login-card h1, .login-card > .muted { text-align: center; }

/* ---------- Prehľad ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 1rem; }
.tile { position: relative; display: grid; gap: .2rem; padding: 1.15rem 1.2rem 1.35rem; border-radius: var(--radius); background: var(--cierna); color: var(--biela) !important; text-decoration: none !important; border: 1px solid var(--cierna); overflow: hidden; transition: transform .15s, box-shadow .15s; }
.tile::after { content: ""; position: absolute; left: 1.2rem; bottom: .75rem; width: 102px; height: 6px; background: var(--carka-zlta) 0 0 / 39px 6px repeat-x; }
.tile:hover { transform: translateY(-2px); box-shadow: 0 2px 0 var(--zlta); background: #1C1C1C; }
.tile-ic { width: 30px; height: 30px; margin-bottom: .35rem; color: var(--zlta); }
.tile strong { font-size: 1.125rem; font-weight: 700; }
.tile span { color: #C9C7C0; font-size: .875rem; }
.widgets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 1rem; align-items: start; }

.plain-list { list-style: none; margin: 0; padding: 0; display: grid; }
.plain-list li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .45rem 0; border-bottom: 1px solid #ECEAE4; min-width: 0; }
.plain-list li:last-child { border-bottom: 0; }
.plain-list li > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.usage { display: inline-flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.usage-bar { display: inline-block; width: 140px; height: 8px; border-radius: 4px; background: #ECEAE4; overflow: hidden; }
.usage-bar span { display: block; height: 100%; background: var(--zlta); }

/* ---------- Súbory ---------- */
.table-wrap { background: var(--white); border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
table.files { width: 100%; border-collapse: collapse; }
.files th { text-align: left; font-size: .85rem; color: var(--muted); font-weight: 700; padding: .65rem .9rem; border-bottom: 1px solid var(--line); }
.files th a { color: inherit; }
.files th a.on { color: var(--blue); }
.files td { padding: .55rem .9rem; border-bottom: 1px solid #ECEAE4; vertical-align: middle; }
.files tr:last-child td { border-bottom: 0; }
.files tbody tr:hover { background: #FAF9F6; }
.files tr.dim { opacity: .55; }
.fname { word-break: break-word; }
.fname > a, .fname > span:first-child { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 700; }
td.fname { display: table-cell; }
.fname a:hover span { color: var(--blue); }
.row-actions { width: 1%; text-align: right; }
.show-sm { display: none; }
@media (max-width: 700px) { .hide-sm { display: none; } .show-sm { display: block; } .files td { padding: .55rem .6rem; } }

.menu-pop { position: relative; display: inline-block; }
.menu-pop > summary { list-style: none; }
.menu-pop .pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: .35rem; display: grid; }
.pop a, .pop button { display: flex; align-items: center; gap: .55rem; padding: .5rem .65rem; border: 0; background: none; border-radius: 7px; color: var(--text); font: inherit; font-size: .98rem; text-align: left; cursor: pointer; width: 100%; text-decoration: none; }
.pop a:hover, .pop button:hover { background: var(--blue-soft); }
.pop form { display: block; }

.dropzone { border: 2px dashed #B5B3AC; border-radius: var(--radius); padding: .8rem 1rem; color: var(--muted); background: rgb(255 255 255 / .6); display: grid; gap: .5rem; transition: background .15s, border-color .15s; }
.dropzone p { display: flex; align-items: center; gap: .5rem; font-size: .95rem; }
.dropzone.over { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.upload-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.upload-list:empty { display: none; }
.upload-list li { display: grid; grid-template-columns: 1fr auto; gap: .2rem .75rem; font-size: .92rem; color: var(--text); }
.upload-list progress { grid-column: 1 / -1; width: 100%; height: 6px; accent-color: var(--green); }
.upload-list .err { color: var(--red); grid-column: 1 / -1; }

.preview { display: grid; place-items: center; padding: 1rem; }
.preview-img { max-height: 75vh; border-radius: 8px; }
.preview-pdf { width: 100%; height: 78vh; border: 0; border-radius: 8px; }
.preview-text { width: 100%; max-height: 75vh; overflow: auto; white-space: pre-wrap; word-break: break-word; font: .92rem/1.5 ui-monospace, Consolas, monospace; margin: 0; background: #F5F4F0; padding: 1rem; border-radius: 8px; }
.editor { font: .95rem/1.5 ui-monospace, Consolas, monospace; min-height: 50vh; }

/* ---------- Modálne okno ---------- */
dialog.modal { border: 0; border-radius: 16px; padding: 1.5rem; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; box-shadow: 0 20px 60px rgb(17 17 17 / .35); color: var(--text); }
dialog.modal::backdrop { background: rgb(17 17 17 / .45); }
dialog.modal h2 { margin-right: 2.5rem; margin-bottom: .75rem; word-break: break-word; }
dialog.modal h3 { margin: 1.1rem 0 .5rem; }
.modal-x { position: absolute; top: .75rem; right: .75rem; }
.share-form { display: flex; flex-wrap: wrap; gap: .5rem; }
.share-form select { flex: 1 1 160px; width: auto; }
.share-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.share-list li { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 10px; }
.share-list li > div { min-width: 0; flex: 1; }
.link-box { display: inline-flex; gap: .35rem; width: 100%; max-width: 100%; }
.link-box input { font-size: .82rem; padding: .3rem .5rem; }
.pick-list { list-style: none; margin: 0 0 1rem; padding: 0; max-height: 50vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.pick-list li { padding: .45rem .75rem; border-bottom: 1px solid #ECEAE4; }
.pick-list li:last-child { border-bottom: 0; }

/* ---------- Nastavenia ---------- */
.device-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; margin-top: .75rem; }
.device-list li { display: flex; align-items: center; gap: .9rem; padding: .7rem .9rem; border: 1px solid var(--line); border-radius: 10px; }
.device-list li > div { flex: 1; min-width: 0; }
.dev-ic { width: 32px; height: 32px; color: var(--blue); }
.check-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .5rem; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; }
.check-list li.ok .ic { color: #17723A; }
.check-list li.bad .ic { color: var(--red); }

/* ---------- Pošta ---------- */
.mail { display: grid; grid-template-columns: 210px 1fr; gap: 1.1rem; align-items: start; }
.mail-side { display: grid; gap: .75rem; position: sticky; top: 90px; }
.mail-folders { display: grid; gap: .1rem; }
.mail-folders a { display: flex; align-items: center; gap: .55rem; padding: .45rem .7rem; border-radius: 9px; color: #4A4843; text-decoration: none; }
.mail-folders a span:first-of-type { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-folders a:hover { background: #fff; color: var(--blue); }
.mail-folders a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.mail-main { min-width: 0; display: grid; gap: .6rem; }
.mail-bar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.mail-bar h1 { margin-right: auto; }
.search { display: flex; align-items: center; gap: .25rem; background: #fff; border: 1px solid #8C8A84; border-radius: 10px; padding-left: .25rem; }
.search input { border: 0; box-shadow: none !important; width: 220px; }
.msg-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.msg-list li { border-bottom: 1px solid #ECEAE4; }
.msg-list li:last-child { border-bottom: 0; }
.msg-list a { display: grid; grid-template-columns: minmax(120px, 220px) 1fr auto; gap: 1rem; padding: .6rem 1rem; color: var(--text); text-decoration: none; align-items: baseline; }
.msg-list a:hover { background: #FAF9F6; }
.msg-list .unread a { font-weight: 700; box-shadow: inset 4px 0 0 var(--green); }
.msg-from, .msg-subj { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-subj .ic { margin-right: .3rem; color: var(--muted); }
.msg-date { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.pager { display: flex; gap: .75rem; align-items: center; justify-content: center; }
.msg-tools { display: flex; flex-wrap: wrap; gap: .4rem; }
.msg { display: grid; gap: 1rem; }
.msg-title { font-size: 1.5rem; word-break: break-word; }
.msg-head { display: flex; gap: .75rem; align-items: flex-start; }
.msg-head > div { flex: 1; min-width: 0; word-break: break-word; }
.msg-frame { width: 100%; min-height: 300px; border: 0; }
.msg-text { white-space: normal; word-break: break-word; }
.msg-atts ul { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .4rem; }
.msg-atts li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 9px; }
.attach-box { display: grid; gap: .6rem; padding: .8rem; border: 1px dashed #B5B3AC; border-radius: 10px; }
.attach-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.file-btn { display: inline-flex; font-weight: 700; }
.att-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.att-list:empty { display: none; }
.att-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .35rem .6rem; background: var(--blue-soft); border-radius: 9px; }
.att-name { flex: 1 1 180px; min-width: 0; word-break: break-word; }
.att-mode { width: auto; flex: 0 1 230px; padding: .3rem .5rem; font-size: .92rem; }
.link-opts { display: grid; gap: .3rem; }
.link-opts label { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.link-opts select { width: auto; }
body.wide .content { padding-left: 1.25rem; }
@media (max-width: 860px) {
  .mail { grid-template-columns: 1fr; }
  .mail-side { position: static; grid-template-columns: 1fr; }
  .mail-folders { display: flex; overflow-x: auto; gap: .25rem; padding-bottom: .25rem; }
  .mail-folders a { white-space: nowrap; background: #fff; border: 1px solid var(--line); }
  .msg-list a { grid-template-columns: 1fr auto; gap: .1rem .75rem; }
  .msg-subj { grid-column: 1 / -1; grid-row: 2; font-weight: 400; color: #4A4843; }
  .search { flex: 1; } .search input { width: 100%; }
}
.link-page { display: grid; gap: 1rem; max-width: 1100px; width: 100%; margin: 0 auto; }

/* Pošta: bočné menu je skryté, otvorí sa tlačidlom ☰ (viac miesta na správy) */
body.app .nav-toggle { display: inline-grid; }
body.app .sidenav { position: fixed; top: calc(var(--lista) + var(--lista-linka)); left: 0; bottom: 0; z-index: 40; background: var(--grey); box-shadow: var(--shadow); transform: translateX(-105%); transition: transform .2s; max-height: none; width: 260px; }
body.app .sidenav.open { transform: none; }
body.app .shell { max-width: none; }
body.app .content { padding-left: max(16px, env(safe-area-inset-left)); }

/* Aplikácia v mobile (nainštalovaná na plochu) */
@media (display-mode: standalone) { .footer { padding-bottom: env(safe-area-inset-bottom); } }
.push-box { display: grid; gap: .75rem; }
.push-state { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.push-state .dot { width: 10px; height: 10px; border-radius: 50%; background: #B5B3AC; }
.push-state.on .dot { background: var(--green); }
.steps { margin: 0; padding-left: 1.3rem; display: grid; gap: .35rem; }
.install-banner { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius); padding: .7rem 1rem; box-shadow: var(--shadow-sm); }
.install-banner p { flex: 1 1 220px; }

/* Menu účtu (odhlásenie je schované v ňom, nie hneď na okraji) */
.usermenu > summary { list-style: none; cursor: pointer; }
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu .pop { min-width: 240px; }
.pop-head { display: grid; padding: .4rem .65rem .6rem; border-bottom: 1px solid var(--line); margin-bottom: .3rem; word-break: break-all; }
.pop form button.danger { border-top: 1px solid var(--line); border-radius: 0 0 7px 7px; margin-top: .3rem; }
@media (max-width: 860px) { .topbar-right { margin-right: 4px; } }
.this-device { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; padding: .9rem 1rem; border-radius: 10px; background: var(--blue-soft); margin: .25rem 0 1rem; }
.this-device > div { flex: 1 1 220px; }
.this-device.on { background: var(--green-soft); }
.nav-logout { margin-top: auto; padding-top: 1rem; }
.nav-logout button { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .6rem .85rem; border: 0; border-radius: 10px; background: none; color: #5F5F5F; font: inherit; font-size: 1rem; cursor: pointer; }
.nav-logout button:hover { background: var(--red-soft); color: var(--red); }

/* Editor e-mailu a podpisy */
.field { display: grid; gap: .3rem; }
.field > .label { font-weight: 700; font-size: .95rem; }
.mail-editor { background: #fff; min-height: 260px; font: 1rem/1.5 var(--font); }
.mail-editor.small-editor { min-height: 140px; }
.ql-toolbar.ql-snow { border-radius: 9px 9px 0 0; border-color: #8C8A84; background: #F5F4F0; font-family: var(--font); }
.ql-container.ql-snow { border-radius: 0 0 9px 9px; border-color: #8C8A84; font: 1rem/1.5 var(--font); }
.ql-editor { min-height: inherit; color: var(--text); }
.ql-editor p { margin: 0 0 .6em; }
.sig-preview { border: 1px dashed var(--line); border-radius: 9px; padding: .75rem 1rem; background: #F5F4F0; font-size: .9rem; display: grid; gap: .25rem; }
.sig-preview p { margin: 0; }
.sig-preview img { max-width: 160px; height: auto; }
.orig-preview summary { cursor: pointer; }
.orig-body { margin-top: .5rem; padding: .75rem 1rem; border: 1px solid var(--line); border-radius: 9px; max-height: 260px; overflow: auto; font-size: .92rem; background: #F5F4F0; }
.inline-check { display: inline-flex; }
.sig-tags { display: flex; flex-wrap: wrap; gap: .35rem; }
.sig-tags .pill { border: 0; cursor: pointer; font: .85rem var(--font); padding: .2rem .6rem; }
.sig-tags .pill:hover { background: var(--blue); color: #fff; }
.sig-admin { grid-column: 1 / -1; }
.att-list li progress { flex: 1 1 120px; height: 6px; accent-color: var(--green); }
.att-list .err { color: var(--red); flex-basis: 100%; }

.grid-titles { display: grid; grid-template-columns: 1fr 2fr 2fr 1fr; gap: .75rem; }
@media (max-width: 560px) { .grid-titles { grid-template-columns: 1fr 1fr; } }
.sig-wrap { display: grid; gap: .3rem; }
.sig-wrap > table { margin-top: 0 !important; }
.sig-wrap img { max-width: 160px; height: auto; }

/* ---------- 1.4: písanie správy na jednu obrazovku ---------- */
.compose-wrap, .compose, .cf { min-width: 0; }
.compose-wrap { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); height: calc(100dvh - 104px); min-height: 540px; }
.compose-wrap.has-orig { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
.compose { display: flex; flex-direction: column; gap: .55rem; min-height: 0; padding: 1rem 1.1rem; }
.compose-head { display: flex; align-items: baseline; gap: .75rem; flex-wrap: wrap; }
.compose-head h1 { font-size: 1.3rem; margin: 0; }
.cf { display: grid; border: 1px solid #8C8A84; border-radius: 10px; background: #fff; }
.cf-row { display: flex; align-items: center; gap: .5rem; padding: .2rem .6rem; min-height: 44px; border-bottom: 1px solid var(--line); position: relative; }
.cf-row:last-child { border-bottom: 0; }
.cf-row[hidden] { display: none; }
.cf-lab { flex: 0 0 4.2rem; font-size: .9rem; font-weight: 700; color: var(--muted, #5F5F5F); }
.cf-in { flex: 1; border: 0 !important; box-shadow: none !important; padding: .35rem 0 !important; background: transparent; font: inherit; min-width: 0; }
.cf-in:focus { outline: none; }
.cf-tools { display: flex; align-items: center; gap: .35rem; flex: 0 0 auto; }
.group-bcc { padding: .35rem .7rem; background: #FFF3CC; border-bottom: 1px solid var(--line); }
.group-bcc[hidden] { display: none; }
.rcpt { flex: 1; min-width: 0; position: relative; }
.rcpt-box { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; cursor: text; padding: .2rem 0; }
.rcpt-in { flex: 1 1 140px; min-width: 120px; border: 0 !important; box-shadow: none !important; padding: .3rem 0 !important; background: transparent; font: inherit; }
.rcpt-in:focus { outline: none; }
.chip { display: inline-flex; align-items: center; gap: .35rem; max-width: 100%; padding: .15rem .3rem .15rem .2rem; border-radius: 999px; background: var(--blue-soft, #FFF3CC); color: var(--blue, #111111); font-size: .9rem; line-height: 1.3; }
.chip-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; }
.chip-av { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; background: var(--blue, #111111); color: #fff; font-size: .72rem; font-weight: 700; }
.chip small { color: #7A5900; font-size: .78rem; white-space: nowrap; }
.chip button { border: 0; background: none; color: inherit; cursor: pointer; font-size: 1.05rem; line-height: 1; padding: 0 .2rem; opacity: .6; }
.chip button:hover { opacity: 1; }
.chip-group { background: #FFF3CC; color: #7A5900; padding-left: .55rem; }
.chip.bad { background: #FBEAE8; color: var(--red, #B3261E); }
.chip.bad .chip-av { background: var(--red, #B3261E); }
.rcpt-sug { position: absolute; left: -4.7rem; right: 0; top: calc(100% + .3rem); z-index: 40; list-style: none; margin: 0; padding: .3rem; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 28px rgb(17 17 17 / .18); max-height: 320px; overflow: auto; }
.rcpt-sug li { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; border-radius: 8px; cursor: pointer; }
.rcpt-sug li.act, .rcpt-sug li:hover { background: var(--blue-soft, #FFF3CC); }
.rcpt-sug .sug-h { cursor: default; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #5F5F5F); padding: .25rem .5rem; }
.rcpt-sug .sug-h:hover { background: none; }
.sug-av { flex: 0 0 auto; display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--blue, #111111); color: #fff; font-weight: 700; font-size: .85rem; }
.sug-group { background: linear-gradient(135deg, #FFC000, #FFC000); }
.sug-colleague { background: #111111; }
.sug-recent { background: #8C8A84; }
.sug-t { display: grid; min-width: 0; }
.sug-t strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sug-t small { color: var(--muted, #5F5F5F); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compose-editor { flex: 1 1 auto; min-height: 180px; display: flex; flex-direction: column; }
.compose-editor .ql-toolbar { flex: 0 0 auto; }
.compose-editor .ql-container { flex: 1 1 auto; min-height: 0; overflow: auto; }
.compose-editor .mail-editor { min-height: 0; }
.compose .att-list { max-height: 112px; overflow: auto; }
.compose .link-opts { display: flex; }
.compose-foot { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.compose-foot .foot-end { margin-left: auto; }
.sig-mini { position: relative; }
.sig-mini summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .3rem; color: #7A5900; padding: .3rem .5rem; border-radius: 8px; }
.sig-mini summary::-webkit-details-marker { display: none; }
.sig-mini summary:hover { background: #FFF3CC; }
.sig-pop { position: absolute; bottom: calc(100% + .4rem); left: 0; z-index: 30; width: min(560px, 80vw); background: #fff; padding: .6rem; border-radius: 12px; border: 1px solid var(--line); box-shadow: 0 12px 28px rgb(17 17 17 / .18); }
.sig-pop > table { margin-top: 0 !important; }
.sig-pop img { max-width: 160px; height: auto; }
.orig-pane { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; border-left: 4px solid #FFC000; }
.orig-head { display: grid; gap: .2rem; padding: .9rem 1.1rem; background: linear-gradient(120deg, #FFF3CC 0%, #F5F4F0 60%, #FFF3CC 100%); border-bottom: 1px solid var(--line); }
.orig-kicker { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #7A5900; }
.orig-head strong { color: var(--blue, #111111); font-size: 1.05rem; }
.orig-pane .orig-body { flex: 1; min-height: 0; overflow: auto; margin: 0; border: 0; border-radius: 0; max-height: none; padding: 1rem 1.1rem; background: #fff; font-size: .92rem; overflow-wrap: anywhere; }
.orig-pane .orig-body img { max-width: 100%; height: auto; }
.orig-pane .orig-body table { max-width: 100%; }
@media (max-width: 1100px) {
  .compose-wrap.has-orig { grid-template-columns: minmax(0, 1fr); height: auto; }
  .compose-wrap.has-orig .compose { height: calc(100dvh - 104px); min-height: 540px; }
  .orig-pane .orig-body { max-height: 420px; }
}
@media (max-width: 700px) {
  .compose-wrap, .compose-wrap.has-orig .compose { height: auto; min-height: 0; }
  .compose-editor { min-height: 260px; }
  .compose-editor .ql-container { min-height: 220px; }
  .cf-lab { flex-basis: 3.4rem; font-size: .82rem; }
  .cf-row { flex-wrap: wrap; }
  .rcpt { flex-basis: calc(100% - 4.2rem); }
  .cf-tools { width: 100%; justify-content: flex-end; }
  .chip-t { max-width: 16ch; }
  .rcpt-sug { left: -3.9rem; }
  .compose-foot .btn { padding-inline: .7rem; }
}
.book-modal { width: min(620px, 94vw); }
.book-q { width: 100%; margin: .3rem 0 .6rem; }
.book-sec h3 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted, #5F5F5F); margin: .6rem 0 .35rem; }
.book-groups { display: flex; flex-wrap: wrap; gap: .4rem; }
.pill-check { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border: 1px solid #8C8A84; border-radius: 999px; cursor: pointer; font-size: .92rem; }
.pill-check:has(input:checked) { background: #FFF3CC; border-color: #FFC000; }
.pill-check small { color: var(--muted, #5F5F5F); }
.pill-check[hidden] { display: none; }
.book-list { list-style: none; margin: 0; padding: 0; max-height: 46vh; overflow: auto; display: grid; gap: .15rem; }
.book-list label { display: flex; align-items: center; gap: .6rem; padding: .35rem .4rem; border-radius: 8px; cursor: pointer; }
.book-list label:hover { background: var(--blue-soft, #FFF3CC); }
.book-list li[hidden] { display: none; }
.book-foot { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-top: .8rem; }
.book-foot label { display: flex; align-items: center; gap: .4rem; margin-left: auto; }
.book-foot select { width: auto; }

/* ---------- Kontakty ---------- */
.contacts, .notes { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 1.1rem; align-items: start; }
.contacts-side, .notes-side { display: grid; gap: .5rem; position: sticky; top: 90px; min-width: 0; }
.notes-side .search { display: flex; min-width: 0; }
.notes-side .search input { flex: 1; min-width: 0; width: 100%; }
.side-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #5F5F5F); margin: .6rem 0 0; }
.mail-folders .cnt { margin-left: auto; font-size: .8rem; color: var(--muted, #5F5F5F); }
.contacts-bar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.contacts-bar h2 { margin: 0; margin-right: auto; }
.contacts-bar .actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.bulk-bar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .5rem .6rem; background: #F5F4F0; border: 1px solid var(--line); border-radius: 10px; }
.bulk-bar select { width: auto; }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; }
.contact-list li { display: flex; align-items: center; gap: .7rem; padding: .55rem .3rem; border-bottom: 1px solid var(--line); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list .c-main { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.contact-list .c-main .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-groups { display: flex; gap: .3rem; flex-wrap: wrap; }
.c-groups .pill { font-size: .75rem; padding: .05rem .5rem; background: #FFF3CC; color: #7A5900; }
.avatar.sm { width: 2.1rem; height: 2.1rem; font-size: .8rem; flex: 0 0 auto; }
.group-checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.group-checks legend { font-weight: 700; margin-bottom: .35rem; }
.btn.danger, .btn-ghost.danger { color: var(--red, #B3261E); }
@media (max-width: 800px) {
  .contacts, .notes { grid-template-columns: minmax(0, 1fr); }
  .contacts-side, .notes-side { position: static; }
}

/* ---------- Poznámky ---------- */
.note-list { display: grid; gap: .2rem; max-height: calc(100dvh - 260px); overflow: auto; }
.note-list a { display: grid; gap: .1rem; padding: .55rem .65rem; border-radius: 9px; color: inherit; text-decoration: none; }
.note-list a:hover { background: var(--blue-soft, #FFF3CC); }
.note-list a[aria-current] { background: var(--blue-soft, #FFF3CC); box-shadow: inset 3px 0 0 #FFC000; }
.note-list strong { color: var(--blue, #111111); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-list .meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.note-title { flex: 1; font-size: 1.2rem !important; font-weight: 700; color: var(--blue, #111111); }
.note-body { min-height: 52vh; font: .95rem/1.55 ui-monospace, "Cascadia Mono", Consolas, monospace; resize: vertical; }
.note-actions { flex-wrap: wrap; }
.note-actions .meta { margin-right: auto; }

/* ---------- 1.5: spoločné schránky ---------- */
.mbox-switch { display: grid; gap: .25rem; padding: .35rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.mbox-switch a { display: flex; align-items: center; gap: .55rem; padding: .45rem .55rem; border-radius: 9px; color: inherit; text-decoration: none; min-width: 0; }
.mbox-switch a:hover { background: var(--blue-soft, #FFF3CC); }
.mbox-switch a[aria-current] { background: linear-gradient(120deg, #FFF3CC 0%, #F5F4F0 60%, #FFF3CC 100%); box-shadow: inset 3px 0 0 #FFC000; }
.mb-ic { flex: 0 0 auto; display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--blue, #111111); color: #fff; }
.mb-ic-shared { background: linear-gradient(135deg, #FFC000, #FFC000); }
.mb-t { display: grid; min-width: 0; line-height: 1.25; }
.mb-t strong, .mb-t > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--blue, #111111); }
.mb-t small { color: var(--muted, #5F5F5F); font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop-boxes { display: grid; padding: .3rem 0; border-bottom: 1px solid var(--line); }
.pop-label { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted, #5F5F5F); padding: .3rem 1rem .1rem; }
.pop-boxes a[aria-current] { background: #FFF3CC; box-shadow: inset 3px 0 0 #FFC000; }
.pop-boxes .mb-t > span { color: inherit; }
.from-pick { display: inline-flex; align-items: center; gap: .4rem; }
.from-pick select { width: auto; max-width: 100%; padding: .2rem .5rem; font-size: .9rem; }
.from-shared { color: #7A5900; font-weight: 600; }
.mb-av { background: linear-gradient(135deg, #FFC000, #FFC000); }
.member-list { display: grid; gap: .3rem; max-height: 420px; overflow: auto; }
.member-list .member { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; border-radius: 9px; }
.member-list .member:has(input:checked) { background: #FFF3CC; }
.mailbox-form { align-items: start; }
.err-text { color: var(--red, #B3261E); }
.ok-text { color: #7A5900; }
.mb-line { display: flex; align-items: center; gap: .4rem; margin: .3rem 0 0; }

/* ---------- 1.6: hromadné akcie v pošte, počet nových na dlaždici ---------- */
.bulk-mail { position: sticky; top: calc(var(--lista) + var(--lista-linka) + 3px); z-index: 20; display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; padding: .4rem .6rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.bulk-all { padding: 0 .35rem; }
.bulk-count { font-size: .9rem; color: var(--muted, #5F5F5F); margin-right: .25rem; }
.bulk-acts { display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.bulk-mail:not(.on) .bulk-acts { opacity: .45; pointer-events: none; }
.bulk-mail.on { border-color: #FFC000; box-shadow: 0 0 0 3px rgb(255 192 0 / .15); }
.bulk-mail.on .bulk-count { color: var(--blue, #111111); font-weight: 700; }
.bulk-move { display: inline-flex; align-items: center; gap: .25rem; }
.bulk-move select { width: auto; padding: .3rem .5rem; font-size: .88rem; }
.msg-list li { display: flex; align-items: stretch; }
.msg-list li > a { flex: 1; min-width: 0; }
.msg-check { display: flex; align-items: center; padding: 0 .1rem 0 .85rem; cursor: pointer; }
.msg-check input { width: 1.1rem; height: 1.1rem; }
.msg-list li.sel { background: #FFF3CC; }
.msg-list li.sel a:hover { background: transparent; }
.msg-list .unread .msg-check { box-shadow: inset 4px 0 0 var(--green); }
.msg-list .unread a { box-shadow: none; }
.msg-star { color: #E0A800; margin-right: .3rem; }
@media (max-width: 700px) {
  .bulk-mail { top: calc(var(--lista) + var(--lista-linka) + 1px); }
  .bulk-acts .btn span { display: none; }
  .bulk-acts .btn { padding: .35rem .5rem; }
  .msg-check { padding-left: .6rem; }
}
.tile { position: relative; }
.tile-badge { position: absolute; top: .9rem; right: .9rem; padding: .2rem .65rem; border-radius: 999px; background: #fff; color: var(--blue, #111111); font-weight: 800; font-size: .9rem; box-shadow: 0 4px 12px rgb(0 0 0 / .18); }
.tile-badge.zero { background: rgb(255 255 255 / .2); color: #fff; font-weight: 600; box-shadow: none; }
.tile-badge.loading { background: rgb(255 255 255 / .2); color: #fff; }

/* ---------- 1.6.1: priečinky, log ---------- */
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; }
.log-view { max-height: 420px; overflow: auto; background: #111111; color: #FFE699; padding: .8rem 1rem; border-radius: 10px; font: .8rem/1.45 ui-monospace, Consolas, monospace; white-space: pre-wrap; word-break: break-word; margin: 0; }
.mail-side > a.small { display: flex; align-items: center; gap: .35rem; }

/* ---------- 1.6.3: písanie v paneli pošty ---------- */
.mail-compose .compose-wrap { height: calc(100dvh - 104px); }
@media (max-width: 1350px) {
  .mail-compose .compose-wrap.has-orig { grid-template-columns: minmax(0, 1fr); height: auto; }
  .mail-compose .compose-wrap.has-orig .compose { height: calc(100dvh - 104px); min-height: 540px; }
  .mail-compose .orig-pane .orig-body { max-height: 420px; }
}
@media (max-width: 900px) { .mail-compose .mail-side { display: none; } }
@media (max-width: 700px) { .mail-compose .compose-wrap, .mail-compose .compose-wrap.has-orig .compose { height: auto; min-height: 0; } }

/* ---------- 1.7: hosting pošty (API) ---------- */
.mailapi { display: grid; gap: 1.1rem; }
.api-list { list-style: none; margin: 0; padding: 0; display: grid; }
.api-list li { display: flex; align-items: center; gap: .7rem; padding: .6rem .3rem; border-bottom: 1px solid var(--line); }
.api-list .c-main { flex: 1; min-width: 0; display: grid; gap: .15rem; }
.pill-none { background: #F5F4F0; color: var(--muted, #5F5F5F); }
.api-menu .pop { min-width: 260px; right: 0; left: auto; }
.api-menu .pop form { display: grid; }
.api-menu .pop-form { gap: .4rem; padding: .5rem 1rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.api-new { display: grid; gap: .6rem; padding-top: .6rem; border-top: 1px dashed var(--line); }
.api-new h3 { margin: 0; }
.api-new-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .75rem; }
.addr-in { display: flex; align-items: center; gap: .3rem; }
.addr-in input { flex: 1; min-width: 0; }
.addr-in span { color: var(--muted, #5F5F5F); white-space: nowrap; }
.api-adv summary { cursor: pointer; font-weight: 600; }
.api-adv h4 { margin: .8rem 0 .3rem; }

/* 1.7.1 – schránka používateľa */
.api-auto { display: flex; gap: .45rem; align-items: flex-start; background: var(--green-soft); border-left: 3px solid var(--green); padding: .55rem .7rem; border-radius: 6px; margin: 0; }
.mb-card h2 { display: flex; align-items: center; gap: .45rem; }
.mb-card p { margin: 0; }
.pw-box { display: flex; flex-direction: column; gap: .35rem; }
.pw-show { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.pw-show input { font-family: ui-monospace, Menlo, Consolas, monospace; flex: 1 1 12rem; min-width: 0; }
.row-wrap { display: flex; gap: .5rem; flex-wrap: wrap; }

/* 1.7.2 – ďalšie schránky v rozbaľovacom zozname */
.mb-more > summary { display: flex; align-items: center; gap: .55rem; padding: .45rem .55rem; border-radius: 9px; cursor: pointer; list-style: none; color: var(--muted, #5F5F5F); font-size: .9rem; }
.mb-more > summary::-webkit-details-marker { display: none; }
.mb-more > summary::after { content: ""; flex: none; box-sizing: border-box; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-2px) rotate(45deg); margin-right: 4px; transition: transform .15s; }
.mb-more[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.mb-more > summary:hover { background: var(--blue-soft, #FFF3CC); color: var(--blue, #111111); }
.mb-more > summary > span:first-of-type { flex: 1; }
.mb-more-n { font-size: .75rem; font-weight: 700; background: #F5F4F0; color: var(--muted, #5F5F5F); border-radius: 10px; padding: .05rem .45rem; }
.mbox-switch .mb-more-list { display: grid; gap: .25rem; margin-top: .25rem; }
.pop-more > summary { padding: .5rem 1rem; border-radius: 0; }
.pop-more .mb-more-list { display: grid; }

/* 1.7.3 – polia podpisu, ručné nastavenie schránky */
.sig-fields { display: flex; flex-wrap: wrap; gap: .3rem 1rem; align-items: center; margin-bottom: .5rem; }
.sig-fields .check { margin: 0; }
.mb-manual > summary { cursor: pointer; color: var(--muted, #5F5F5F); }
.mb-manual[open] > summary { margin-bottom: .5rem; }

/* 1.7.4 – výber členov skupiny */
.picker { display: grid; gap: .5rem; }
.pk-head { display: flex; justify-content: space-between; align-items: baseline; }
.pk-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.pk-chip { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: .2rem .7rem; font: inherit; font-size: .85rem; cursor: pointer; color: inherit; }
.pk-chip span { color: var(--muted, #5F5F5F); font-size: .78rem; }
.pk-chip[aria-pressed="true"] { background: var(--blue, #111111); border-color: var(--blue, #111111); color: #fff; }
.pk-chip[aria-pressed="true"] span { color: #FFE699; }
.pk-list { max-height: min(46vh, 380px); overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: .25rem; }
.pk-item { display: flex; align-items: center; gap: .55rem; padding: .4rem .5rem; border-radius: 8px; cursor: pointer; margin: 0; font-weight: 400; }
.pk-item:hover { background: #F5F4F0; }
.pk-item:has(input:checked) { background: var(--green-soft); }
.pk-item[hidden] { display: none; }
.pk-item input[type=checkbox] { flex: none; width: 1.1rem; height: 1.1rem; margin: 0; }
.pk-t { display: grid; min-width: 0; flex: 1; line-height: 1.25; }
.pk-t strong, .pk-t small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-t small { color: var(--muted, #5F5F5F); font-size: .78rem; }
.pk-tags { display: flex; gap: .25rem; flex: none; }
.pk-tag { font-size: .7rem; border-radius: 6px; padding: .05rem .4rem; background: #F5F4F0; color: #3D3D3D; }
.pk-colleague { background: #FFF3CC; color: #111111; }
.pk-shared { background: var(--green-soft); color: #17723A; }
.pk-empty { padding: .6rem; margin: 0; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--blue, #111111); cursor: pointer; text-decoration: underline; }
.paste-more > summary { cursor: pointer; color: var(--muted, #5F5F5F); margin-bottom: .4rem; }
@media (max-width: 560px) { .pk-tags { display: none; } }

/* 1.7.5 – vlastné okná a percentá pri nahrávaní */
dialog.ui-dialog { width: min(420px, calc(100vw - 24px)); text-align: center; padding: 1.6rem 1.5rem 1.3rem; animation: ui-pop .16s ease-out; }
dialog.ui-dialog::backdrop { background: rgb(17 17 17 / .45); backdrop-filter: blur(2px); }
@keyframes ui-pop { from { transform: translateY(8px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.ui-ic { width: 3rem; height: 3rem; margin: 0 auto .8rem; border-radius: 50%; display: grid; place-items: center; font-size: 1.35rem; font-weight: 800; color: #fff; background: var(--accent); }
dialog.ui-dialog h2 { margin: 0 0 .4rem; font-size: 1.2rem; }
.ui-text { margin: 0 0 1.2rem; color: var(--text); line-height: 1.5; white-space: pre-line; }
.ui-input { width: 100%; margin: -.4rem 0 1.1rem; }
.ui-btns { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.ui-btns .btn { min-width: 8rem; justify-content: center; }
.btn-danger { background: #B3261E; border-color: #B3261E; color: #fff; }
.btn-danger:hover { background: #8F1E18; }
@media (max-width: 480px) { .ui-btns { flex-direction: column-reverse; } .ui-btns .btn { width: 100%; } }
.pct { font-variant-numeric: tabular-nums; font-size: .82rem; font-weight: 700; color: #17723A; min-width: 3.2rem; text-align: right; }
.att-up { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.att-up progress { flex: 1 1 120px; height: 8px; }
.att-up .att-cancel { width: 1.8rem; height: 1.8rem; font-size: 1.1rem; }
.att-failed .pct { display: none; }

/* ---------- 1.8: pošta v mobile ako Gmail (len zariadenia „Toto je môj mobil“) ---------- */
.gm-top, .gm-label, .gm-fab, .gm-nav, .gm-backdrop, .gm-replybar, .gm-drawer-head, .msg-snip, .msg-attchip, .msg-av, .msg-starbtn, .ic.gm-only { display: none; }
.msg-title-row { display: flex; align-items: flex-start; gap: .5rem; }
.msg-title-row .msg-title { flex: 1; }
.msg-starbtn { background: none; border: 0; padding: .4rem; border-radius: 50%; color: #5F5F5F; cursor: pointer; line-height: 0; }
.msg-starbtn.on { color: #E0A800; }
.msg-starbtn.on svg { fill: currentColor; }
dialog.gm-sheet { display: none; }
dialog.gm-sheet[open] { display: block; }

@media (max-width: 760px) {
  body.gm.mailp { background: #fff; }
  body.gm.mailp .topbar, body.gm.mailp .footer, body.gm.mailp .sidenav, body.gm.mailp .mail-bar, body.gm.mailp .mail-main > .meta { display: none; }
  body.gm.mailp .content { padding: 0 0 calc(150px + env(safe-area-inset-bottom)); gap: 0; }
  body.gm.mailp .content > .flash { margin: .5rem 12px; }
  body.gm.mailp .mail { display: block; }
  body.gm.mailp .mail-main { gap: 0; }
  body.gm .ic.gm-only { display: inline-block; }

  /* vysúvacie menu s priečinkami */
  body.gm.mailp .mail-side { display: flex; flex-direction: column; gap: .4rem; position: fixed; top: 0; left: 0; bottom: 0; width: min(310px, 84vw); z-index: 60; background: #fff;
    padding: calc(env(safe-area-inset-top) + .8rem) .6rem 1rem; overflow-y: auto; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 0 30px rgb(17 17 17 / .25); border-radius: 0 18px 18px 0; }
  body.gm-drawer-open .mail-side { transform: none !important; }
  body.gm.mailp .mail-side .mbox-switch, body.gm.mailp .mail-side > .btn-block { display: none; }
  body.gm .gm-drawer-head { display: flex; align-items: center; gap: .6rem; padding: .2rem .7rem .9rem; border-bottom: 1px solid #ECEAE4; margin-bottom: .3rem; }
  body.gm .gm-drawer-head span { font-size: 1.2rem; color: var(--blue); font-weight: 700; border-left: 1px solid var(--line); padding-left: .6rem; }
  body.gm.mailp .mail-folders { display: grid; overflow: visible; gap: 0; }
  body.gm.mailp .mail-folders a { background: none; border: 0; border-radius: 0 999px 999px 0; margin-left: -.6rem; padding: .7rem 1rem .7rem 1.3rem; font-size: 1.02rem; white-space: nowrap; }
  body.gm.mailp .mail-folders a[aria-current="page"] { background: var(--blue-soft); }
  body.gm .gm-backdrop { display: block; position: fixed; inset: 0; z-index: 55; background: rgb(17 17 17 / .4); opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.gm-drawer-open .gm-backdrop { opacity: 1; pointer-events: auto; }

  /* hľadanie */
  body.gm .gm-top { display: block; position: sticky; top: 0; z-index: 30; padding: calc(env(safe-area-inset-top) + .6rem) 12px .5rem; background: #fff; }
  .gm-search { display: flex; align-items: center; gap: .3rem; background: #F5F4F0; border-radius: 999px; padding: .3rem .35rem .3rem .4rem; min-height: 54px; }
  .gm-search input { flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; font-size: 1.08rem; padding: .4rem .2rem; box-shadow: none; outline: none; }
  .gm-ib { border: 0; background: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #3D3D3D; cursor: pointer; }
  .gm-me, .gm-av { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--av, var(--blue)); color: #fff; font: 700 1.05rem var(--font); cursor: pointer; }
  body.gm .gm-label { display: block; padding: .7rem 18px .35rem; font-size: .88rem; color: var(--muted); letter-spacing: .06em; }

  /* zoznam správ */
  body.gm.mailp .msg-list { border: 0; border-radius: 0; box-shadow: none; background: #fff; }
  body.gm.mailp .msg-list li { position: relative; display: flex; align-items: flex-start; border-bottom: 0; padding: .55rem 0; }
  body.gm.mailp .msg-list li.sel { background: var(--blue-soft); }
  body.gm.mailp .msg-check { padding: .15rem .1rem 0 14px; box-shadow: none !important; align-self: flex-start; }
  body.gm.mailp .msg-check input { position: absolute; opacity: 0; pointer-events: none; }
  body.gm .msg-av { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--av, var(--blue)); color: #fff; font-size: 1.2rem; transition: transform .15s; }
  body.gm .msg-av b { font-weight: 700; }
  body.gm .msg-list li.sel .msg-av { background: var(--blue); transform: rotateY(180deg); }
  body.gm .msg-list li.sel .msg-av b { display: none; }
  body.gm .msg-list li.sel .msg-av::after { content: ""; width: 14px; height: 8px; border: solid #fff; border-width: 0 0 3px 3px; transform: rotateY(180deg) rotate(-45deg) translate(1px, -2px); }
  body.gm.mailp .msg-list a { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .05rem .6rem; padding: 0 2.6rem 0 .8rem; font-weight: 400; box-shadow: none; align-items: baseline; background: none !important; }
  body.gm.mailp .msg-from { grid-column: 1; font-size: 1.08rem; color: #2B2B2B; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.gm.mailp .msg-date { grid-column: 2; grid-row: 1; font-size: .85rem; color: var(--muted); }
  body.gm.mailp .msg-subj { grid-column: 1 / -1; grid-row: 2; color: #2B2B2B; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.gm.mailp .msg-subj .ic, body.gm.mailp .msg-subj .msg-star { display: none; }
  body.gm .msg-snip { display: block; grid-column: 1 / -1; color: var(--muted); font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.gm .msg-attchip { display: inline-flex; grid-column: 1 / -1; justify-self: start; align-items: center; gap: .35rem; margin-top: .4rem; padding: .25rem .8rem; border: 1px solid var(--line); border-radius: 999px; font-size: .9rem; color: #3D3D3D; }
  body.gm.mailp .msg-list .unread .msg-from, body.gm.mailp .msg-list .unread .msg-subj, body.gm.mailp .msg-list .unread .msg-date { font-weight: 700; color: #111111; }
  body.gm.mailp .msg-list .unread .msg-date { color: var(--blue); }
  body.gm .msg-list .msg-starbtn { display: block; position: absolute; right: 8px; top: 2.35rem; }
  body.gm .msg-title-row .msg-starbtn { display: block; }

  /* označovanie: lišta hore namiesto hľadania */
  body.gm.mailp .bulk-mail { display: none; }
  body.gm.mailp .bulk-mail.on { display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 35; margin: 0; border-radius: 0; border: 0; padding: calc(env(safe-area-inset-top) + .7rem) 10px .7rem; background: #fff; box-shadow: 0 2px 10px rgb(17 17 17 / .12); flex-wrap: nowrap; gap: .3rem; align-items: center; }
  body.gm.mailp .bulk-mail.on .bulk-all { display: none; }
  body.gm.mailp .bulk-mail.on .bulk-count { font-weight: 700; color: var(--blue); margin-right: auto; white-space: nowrap; }
  body.gm.mailp .bulk-acts { display: flex; gap: .15rem; overflow-x: auto; }
  body.gm.mailp .bulk-acts .btn { border: 0; padding: .5rem; }
  body.gm.mailp .bulk-move select { max-width: 7.5rem; }

  /* Napísať a spodná lišta */
  body.gm .gm-fab { display: inline-flex; align-items: center; gap: .7rem; position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 32; background: var(--blue); color: #fff; border-radius: 18px; padding: 1.05rem 1.4rem; font-size: 1.1rem; font-weight: 700; box-shadow: 0 6px 18px rgb(17 17 17 / .35); text-decoration: none; transition: padding .2s; }
  body.gm .gm-fab .ic { width: 1.4rem; height: 1.4rem; }
  body.gm .gm-fab.mini span { display: none; }
  body.gm .gm-fab.mini { padding: 1.05rem; }
  body.gm .gm-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 31; background: #F5F4F0; border-top: 1px solid var(--line); padding: .45rem 6px calc(.45rem + env(safe-area-inset-bottom)); justify-content: space-around; }
  .gm-nav a { display: grid; justify-items: center; gap: .15rem; color: #4A4843; font-size: .78rem; text-decoration: none; min-width: 64px; }
  .gm-nav-ic { position: relative; display: grid; place-items: center; width: 60px; height: 32px; border-radius: 999px; }
  .gm-nav a[aria-current] { color: var(--blue); font-weight: 700; }
  .gm-nav a[aria-current] .gm-nav-ic { background: #FFE699; }
  .gm-badge { position: absolute; top: -6px; left: 34px; background: var(--green); color: #fff; font-size: .7rem; font-weight: 800; border-radius: 999px; padding: .05rem .4rem; line-height: 1.35; }

  /* výber schránky (ako účty v Gmaile) */
  dialog.gm-sheet[open] { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none; max-height: 92dvh; border: 0; border-radius: 22px 22px 0 0; padding: 1rem 14px calc(1.2rem + env(safe-area-inset-bottom)); background: #F5F4F0; overflow-y: auto; animation: gm-up .2s ease-out; }
  dialog.gm-sheet::backdrop { background: rgb(17 17 17 / .45); }
  @keyframes gm-up { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
  .gm-sheet-top { display: flex; justify-content: space-between; align-items: center; padding: .2rem .4rem .8rem; font-weight: 700; color: var(--blue); }
  .gm-done { border: 0; background: none; color: var(--blue); font: 700 1.05rem var(--font); cursor: pointer; padding: .3rem .4rem; }
  .gm-sheet-card { background: #fff; border-radius: 20px; padding: .35rem; margin-bottom: .6rem; display: grid; }
  .gm-sheet-label { font-size: .8rem; color: var(--muted); letter-spacing: .05em; padding: .5rem .8rem .2rem; }
  .gm-sheet-card a, .gm-sheet-card button { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border-radius: 14px; color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; text-align: left; width: 100%; cursor: pointer; }
  .gm-sheet-card a[aria-current] { background: var(--blue-soft); }
  .gm-sheet-card a > .ic:last-child { margin-left: auto; color: var(--green); }
  .gm-sheet-card button { color: var(--red); }
  .gm-acc-t { display: grid; min-width: 0; line-height: 1.25; }
  .gm-acc-t strong { color: var(--blue); }
  .gm-acc-t small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* čítanie správy */
  body.gm.mailp .msg-tools { position: sticky; top: 0; z-index: 30; background: #fff; padding: calc(env(safe-area-inset-top) + .45rem) 8px .45rem; gap: .1rem; flex-wrap: nowrap; justify-content: flex-end; border-bottom: 1px solid #ECEAE4; }
  body.gm.mailp .msg-tools .t-close { margin-right: auto; }
  body.gm.mailp .msg-tools .t-close .ic.xs, body.gm.mailp .msg-tools .t-reply, body.gm.mailp .msg-tools .lbl { display: none; }
  body.gm.mailp .msg-tools .btn { border: 0; padding: .55rem; border-radius: 50%; background: none; }
  body.gm.mailp .msg-tools .btn .ic { width: 1.35rem; height: 1.35rem; }
  body.gm.mailp .msg-tools form { margin: 0; }
  body.gm.mailp article.msg { border: 0; box-shadow: none; border-radius: 0; padding: .9rem 16px; }
  body.gm.mailp .msg-title { font-size: 1.45rem; color: #111111; }
  body.gm.mailp .msg-head .avatar { width: 42px; height: 42px; color: #fff; }
  body.gm .gm-replybar { display: flex; gap: .5rem; padding: .5rem 16px 1.5rem; flex-wrap: wrap; }
  .gm-replybar a { flex: 1 1 auto; display: inline-flex; justify-content: center; align-items: center; gap: .45rem; padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 999px; color: #2B2B2B; text-decoration: none; font-weight: 700; }

  /* písanie správy */
  body.gm.mailc .compose { border: 0; box-shadow: none; border-radius: 0; padding: calc(env(safe-area-inset-top) + .6rem) 14px 0; }
  body.gm.mailc .compose-foot { position: sticky; bottom: 0; z-index: 20; background: #fff; margin: 0 -14px; padding: .6rem 14px calc(.6rem + env(safe-area-inset-bottom)); border-top: 1px solid #ECEAE4; }
  body.gm.mailc .content { padding-bottom: 0; }

  /* ostatné stránky pošty (Priečinky) */
  body.gm.mailp .mail-main > .card, body.gm.mailp .mail-main > form.card { margin: .6rem 12px; }
}

.gm-cbar, .gm-selx { display: none; }
.msg-from-mail { font-weight: 400; }
@media (max-width: 760px) {
  body.gm.mailp .bulk-acts { flex-wrap: nowrap; }
  body.gm.mailp .bulk-move { display: inline-flex; flex-wrap: nowrap; }
  body.gm.mailp .bulk-move select { max-width: 6.5rem; padding: .3rem; font-size: .9rem; }
  body.gm.mailp .bulk-mail.on .gm-selx { display: grid; flex: none; }
  body.gm.mailp .msg-head > div { line-height: 1.35; }
  body.gm.mailp .msg-from-mail { display: block; font-size: .85rem; }
  body.gm.mailc .gm-cbar { display: flex; align-items: center; gap: .2rem; position: sticky; top: 0; z-index: 25; background: #fff; margin: calc(-1 * (env(safe-area-inset-top) + .6rem)) -14px .3rem; padding: calc(env(safe-area-inset-top) + .4rem) 6px .4rem; border-bottom: 1px solid #ECEAE4; }
  .gm-cbar strong { flex: 1; font-size: 1.15rem; color: var(--blue); }
  .gm-cbar .gm-send { color: var(--blue); }
  .gm-cbar .ic { width: 1.4rem; height: 1.4rem; }
  body.gm.mailc .compose-head h1, body.gm.mailc .compose-foot [data-send], body.gm.mailc .compose-foot .file-btn, body.gm.mailc .compose-foot .foot-end { display: none; }
  body.gm.mailc .compose-foot { position: static; border-top: 0; }
}

/* ---------- 1.8.1: spodná lišta všade, Cloud a Kontakty v štýle Gmail ---------- */
.tile-usage { font-size: .85rem; }
.tile-usage.full { background: #FBEAE8; color: var(--red, #B3261E); }
.tile-bar { position: absolute; left: 1.1rem; right: 1.1rem; bottom: .8rem; height: 5px; border-radius: 99px; background: rgb(255 255 255 / .28); overflow: hidden; }
.tile-bar > span { display: block; height: 100%; background: #fff; border-radius: inherit; }
.gm-chips, .gm-usage, .gm-fab-menu, .gm-selcount { display: none; }

@media (max-width: 760px) {
  /* spodná lišta na každej stránke */
  body.gm .content { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  body.gm .footer { padding-bottom: calc(86px + env(safe-area-inset-bottom)); }
  body.gm.mailc .gm-nav { display: none; }
  body.gm.mailc .content { padding-bottom: 1rem; }

  /* aplikačné obrazovky (Cloud, Kontakty) */
  body.gm.gmapp { background: #fff; }
  body.gm.gmapp:not(.mailp) .topbar, body.gm.gmapp:not(.mailp) .footer, body.gm.gmapp:not(.mailp) .page-title { display: none; }
  body.gm.gmapp:not(.mailp) .content { padding: 0 0 calc(150px + env(safe-area-inset-bottom)); gap: 0; }
  body.gm.gmapp:not(.mailp) .content > .flash { margin: .5rem 12px; }
  body.gm.gmapp:not(.mailp) .sidenav { display: flex; position: fixed; top: 0; left: 0; bottom: 0; height: 100dvh; width: min(300px, 84vw); z-index: 60; background: #fff; max-height: none;
    padding: calc(env(safe-area-inset-top) + 1rem) .6rem 1rem; transform: translateX(-102%); transition: transform .22s ease; box-shadow: 0 0 30px rgb(17 17 17 / .25); border-radius: 0 18px 18px 0; }
  body.gm.gmapp:not(.mailp) .sidenav a { border-radius: 0 999px 999px 0; margin-left: -.6rem; padding: .75rem 1rem .75rem 1.3rem; box-shadow: none; }
  body.gm.gmapp:not(.mailp) .sidenav a[aria-current="page"] { background: var(--blue-soft); color: var(--blue); }
  body.gm.gm-drawer-open.gmapp:not(.mailp) .sidenav { transform: none; }

  /* filtre ako „čipy“ */
  body.gm .gm-chips { display: flex; gap: .5rem; overflow-x: auto; padding: .35rem 12px .5rem; scrollbar-width: none; }
  .gm-chips::-webkit-scrollbar { display: none; }
  .gm-chips a, .gm-chips button { flex: none; display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .9rem; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #3D3D3D; font: inherit; font-size: .95rem; text-decoration: none; white-space: nowrap; cursor: pointer; }
  .gm-chips a span { color: var(--muted); font-size: .85rem; }
  .gm-chips a[aria-current] { background: #FFE699; border-color: #FFE699; color: var(--blue); font-weight: 700; }
  .gm-chips a[aria-current] span { color: var(--blue); }
  .gm-chips button { color: var(--blue); border-style: dashed; }

  /* využitie miesta */
  body.gm .gm-usage { display: flex; align-items: center; gap: .9rem; margin: .3rem 12px .2rem; padding: .9rem 1rem; border-radius: 18px; background: #F5F4F0; }
  .gm-usage > .ic { width: 1.6rem; height: 1.6rem; color: var(--blue); flex: none; }
  .gm-usage > div { flex: 1; display: grid; gap: .35rem; }
  .gm-usage strong { color: #111111; }
  .gm-usage-bar { display: block; height: 6px; border-radius: 99px; background: #D9D7D0; overflow: hidden; }
  .gm-usage-bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--blue), var(--green)); border-radius: inherit; }

  /* zoznam súborov */
  body.gm.gmfiles .dropzone { border: 0; padding: 0 12px; margin: 0; background: none; min-height: 0; }
  body.gm.gmfiles .dropzone > p { display: none; }
  body.gm.gmfiles .table-wrap { border: 0; box-shadow: none; border-radius: 0; background: #fff; overflow: visible; }
  body.gm.gmfiles table.files thead { display: none; }
  body.gm.gmfiles table.files td { border: 0; padding: .45rem 12px; }
  body.gm.gmfiles table.files td.row-actions { width: 44px; padding-left: 0; }
  body.gm.gmfiles table.files td.fname { position: relative; padding: .55rem 4px .55rem calc(12px + 3.5rem); min-height: 3.3rem; }
  body.gm.gmfiles .fname > a { display: inline; font-weight: 400; font-size: 1.05rem; color: #111111; }
  body.gm.gmfiles .fname > a > .ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); box-sizing: content-box; width: 1.4rem; height: 1.4rem; padding: .55rem; border-radius: 12px; background: #F5F4F0; }
  body.gm.gmfiles .fname > a > .kind-folder { background: #FFF3CC; }
  body.gm.gmfiles .fname .meta.show-sm { display: block; margin-top: .1rem; font-size: .85rem; }
  body.gm.gmfiles .fname .pill { font-size: .75rem; padding: .05rem .45rem; vertical-align: middle; }
  body.gm.gmfiles .menu-pop .pop { right: 4px; min-width: 220px; }
  body.gm.gmfiles .crumbs, body.gm.gmfiles .tabs { padding: 0 12px; }
  body.gm.gmfiles .tabs { display: none; }
  body.gm.gmfiles .empty { margin: 1rem 12px; }
  body.gm.gmfiles .content > .card { margin: .5rem 12px; }

  /* tlačidlo Nový s ponukou */
  body.gm .gm-fab-menu { display: block; }
  .gm-fab-menu > summary { list-style: none; cursor: pointer; }
  .gm-fab-menu > summary::-webkit-details-marker { display: none; }
  .gm-fab-menu[open]::before { content: ""; position: fixed; inset: 0; z-index: 31; background: rgb(17 17 17 / .25); }
  .gm-fab-pop { position: fixed; right: 16px; bottom: calc(160px + env(safe-area-inset-bottom)); z-index: 33; display: grid; gap: .25rem; padding: .4rem; border-radius: 18px; background: #fff; box-shadow: 0 10px 30px rgb(17 17 17 / .25); min-width: 220px; animation: gm-up .15s ease-out; }
  .gm-fab-pop button { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 1.02rem; color: #111111; text-align: left; cursor: pointer; }
  .gm-fab-pop button .ic { color: var(--blue); }

  /* kontakty */
  body.gm.gmcontacts .contacts { display: block; }
  body.gm.gmcontacts .contacts-side { display: none; }
  body.gm.gmcontacts .contacts-main { border: 0; box-shadow: none; border-radius: 0; padding: 0 0 1rem; background: #fff; gap: .3rem; }
  body.gm.gmcontacts .contacts-bar { padding: .2rem 18px; }
  body.gm.gmcontacts .contacts-bar h2 { font-size: .88rem; font-weight: 400; color: var(--muted); letter-spacing: .06em; }
  body.gm.gmcontacts .contacts-bar form.search { display: none; }
  body.gm.gmcontacts .contacts-main > p { padding: 0 18px; }
  body.gm.gmcontacts .contact-list li { border: 0; padding: .5rem 8px .5rem 14px; gap: .9rem; }
  body.gm.gmcontacts .contact-list li.sel { background: var(--blue-soft); }
  body.gm.gmcontacts .contact-list .avatar.sm, body.gm.gmcontacts .contact-list > li > .avatar { width: 42px; height: 42px; font-size: 1.1rem; background: var(--av, var(--blue)); }
  body.gm.gmcontacts .contact-list strong { font-weight: 400; font-size: 1.05rem; color: #111111; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.gm.gmcontacts .c-pick { padding: 0; margin: 0; }
  body.gm.gmcontacts .c-pick input { position: absolute; opacity: 0; pointer-events: none; }
  body.gm.gmcontacts .c-pick .avatar { position: relative; }
  body.gm.gmcontacts li.sel .c-pick .avatar { background: var(--blue); }
  body.gm.gmcontacts li.sel .c-pick .avatar b { visibility: hidden; }
  body.gm.gmcontacts li.sel .c-pick .avatar::after { content: ""; position: absolute; width: 14px; height: 7px; border: solid #fff; border-width: 0 0 3px 3px; transform: translateY(-2px) rotate(-45deg); }
  body.gm.gmcontacts .contact-list .icon-btn { border: 0; background: none; }
  body.gm.gmcontacts .c-bulk .bulk-bar { display: none; }
  body.gm.gmcontacts .c-bulk.on .bulk-bar { display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 35; margin: 0; border: 0; border-radius: 0; padding: calc(env(safe-area-inset-top) + .6rem) 8px .6rem; background: #fff; box-shadow: 0 2px 10px rgb(17 17 17 / .12); flex-wrap: nowrap; overflow-x: auto; gap: .3rem; }
  body.gm.gmcontacts .c-bulk.on .bulk-bar > * { flex: none; }
  body.gm.gmcontacts .c-bulk.on .gm-selx { display: grid; }
  body.gm.gmcontacts .c-bulk.on .gm-selcount { display: inline; font-weight: 700; color: var(--blue); margin-right: .3rem; white-space: nowrap; }
  body.gm.gmcontacts .bulk-bar .check { display: none; }
  body.gm.gmcontacts .bulk-bar select { max-width: 8rem; padding: .35rem; font-size: .9rem; }
  body.gm.gmcontacts .bulk-bar .btn { border: 0; padding: .45rem .55rem; white-space: nowrap; }
  body.gm.gmcontacts .empty { margin: 1rem 12px; }

  /* Prehľad v mobile */
  .gm-head { gap: .5rem; }
  .gm-head .gm-logo { height: 26px; width: auto; }
  .gm-head strong { flex: 1; font-size: 1.1rem; color: var(--blue); border-left: 1px solid var(--line); padding-left: .6rem; }
  body.gm .gm-hello { padding: .6rem 18px .2rem; }
  body.gm .gm-hello h1 { margin: 0; font-size: 1.45rem; color: #111111; }
  body.gm.gmdash .install-banner { margin: .6rem 12px; }
  body.gm.gmdash .tiles { padding: .6rem 12px; grid-template-columns: 1fr 1fr; gap: .7rem; }
  body.gm.gmdash .tile { padding: 1rem; min-height: 0; }
  body.gm.gmdash .tile strong { font-size: 1.05rem; }
  body.gm.gmdash .tile > span:not(.tile-badge):not(.tile-bar) { font-size: .85rem; }
  body.gm.gmdash .tile-badge { position: static; justify-self: start; margin-bottom: .2rem; font-size: .8rem; order: 3; }
  body.gm.gmdash .tile-bar { position: static; display: block; order: 4; }
  /* účet v spodnom okne */
  .gm-sheet-me { display: flex; align-items: center; gap: .8rem; min-width: 0; }
  .gm-sheet-me .gm-av { width: 44px; height: 44px; font-size: 1.2rem; cursor: default; }
}

/* ======================================================================
   stuNET.sk – doplnky podľa dizajn manuálu (lišta, karty, hlášky, mobil)
   ====================================================================== */
/* horná lišta je čierna: ikony a avatar svetlé */
.topbar .icon-btn { color: var(--biela); }
.topbar .icon-btn:hover { background: rgb(255 255 255 / .1); }
.topbar .avatar { background: var(--zlta); color: var(--cierna); }
.topbar .usermenu .pop { color: var(--text); }
body.app .sidenav, .sidenav { background: var(--plocha); }
body.app .sidenav { border-right: 1px solid var(--linka); box-shadow: 8px 0 24px rgb(17 17 17 / .08); }
.nav-logout button { color: var(--text-tlmeny); font-weight: 600; }

/* menu a vyskakovacie okná */
.menu-pop .pop { border-radius: var(--roh-stredny); border-color: var(--linka); }
.pop a, .pop button { color: var(--text); font-weight: 400; border-radius: var(--roh-maly); }
.pop a:hover, .pop button:hover { background: var(--plocha); }
dialog.modal { border-radius: var(--roh-velky); border-top: 6px solid var(--zlta); }
.ui-ic { color: var(--cierna); background: var(--zlta); }

/* dlaždice Prehľadu */
.tile { padding-bottom: 2.1rem; }
.tile:has(.tile-bar)::after { display: none; }
.tile-badge { background: var(--zlta); color: var(--cierna); box-shadow: none; font-weight: 700; font-size: .8125rem; border-radius: var(--roh-maly); font-variant-numeric: tabular-nums; }
.tile-badge.zero, .tile-badge.loading { background: #2B2B2B; color: #C9C7C0; }
.tile-usage { background: #2B2B2B; color: var(--biela); }
.tile-usage.full { background: #FBEAE8; color: var(--nespravne); }
.tile-bar { background: #3D3D3D; border-radius: 0; height: 6px; }
.tile-bar > span { background: var(--zlta); border-radius: 0; }

/* tabuľky a zoznamy */
.table-wrap { box-shadow: none; }
.files th { color: var(--text-tlmeny); font-weight: 600; background: var(--plocha); }
.files th:first-child { border-top-left-radius: var(--roh-stredny); }
.files th:last-child { border-top-right-radius: var(--roh-stredny); }
.files th a.on { color: var(--cierna); text-decoration: underline; text-decoration-color: var(--zlta); text-decoration-thickness: 3px; }
.fname > a, .fname > span:first-child { font-weight: 600; }
.fname a:hover span { color: var(--cierna); text-decoration: underline; text-decoration-color: var(--zlta); text-decoration-thickness: 2px; }
.files tbody tr:hover, .msg-list a:hover { background: var(--plocha); }
.empty { background: var(--biela); border: 2px dashed var(--linka); }
.dropzone { border-color: var(--okraj); background: var(--biela); }
.dropzone.over { border-color: var(--cierna); background: var(--jemna-zlta); color: var(--cierna); }
.preview-text, .editor, .note-body { font-family: var(--pismo-kod); }

/* pošta, kontakty, poznámky: vybraná položka = jemná žltá + žltý pás */
.mail-folders a { color: var(--cierna); }
.mail-folders a:hover { background: var(--plocha); color: var(--cierna); }
.mail-folders a[aria-current="page"] { background: var(--jemna-zlta); color: var(--cierna); box-shadow: inset 3px 0 0 var(--zlta); }
.mbox-switch { border-radius: var(--roh-stredny); }
.mbox-switch a[aria-current] { background: var(--jemna-zlta); }
.mb-ic { background: var(--cierna); color: var(--zlta); }
.mb-ic-shared, .mb-av, .sug-group { background: var(--zlta); color: var(--cierna); }
.mb-t strong, .mb-t > span, .note-list strong, .note-title, .orig-head strong { color: var(--cierna); }
.orig-head { background: var(--plocha); }
.msg-list { box-shadow: none; }
.msg-list li.sel { background: var(--jemna-zlta); }
.msg-star { color: var(--zlta-stlacena); }
.chip { background: var(--plocha); color: var(--cierna); border: 1px solid var(--linka); }
.chip-av, .sug-av { background: var(--cierna); color: var(--zlta); }
.chip-group { background: var(--jemna-zlta); color: var(--cierna); border-color: #E6C766; }
.chip.bad { border-color: #E8B4AE; }
.c-groups .pill { background: var(--jemna-zlta); color: var(--cierna); border-color: #E6C766; }
.sig-tags .pill:hover { background: var(--zlta); color: var(--cierna); }
.bulk-mail.on { border-color: var(--cierna); box-shadow: 0 0 0 3px var(--zlta); }
.bulk-mail.on .bulk-count { color: var(--cierna); }
.install-banner { border-left-color: var(--zlta); box-shadow: none; }
.api-auto { background: var(--jemna-zlta); border-left-color: var(--zlta); }
.this-device.on { background: var(--spravne-jemna); }
.push-state.on .dot { background: var(--spravne); }
.push-state.on .dot::after { content: ""; }
.ql-toolbar.ql-snow, .ql-container.ql-snow { border-color: var(--linka) !important; border-width: 2px !important; }
.ql-toolbar.ql-snow { border-radius: var(--roh-maly) var(--roh-maly) 0 0; background: var(--plocha); }
.ql-container.ql-snow { border-radius: 0 0 var(--roh-maly) var(--roh-maly); }
.cf { border: 2px solid var(--linka); border-radius: var(--roh-maly); }
.cf-in, .rcpt-in { min-height: 0; }
.pill-check { border: 2px solid var(--linka); }
.pill-check:has(input:checked) { background: var(--zlta); border-color: var(--cierna); color: var(--cierna); font-weight: 600; }
.search { border: 2px solid var(--linka); border-radius: var(--roh-maly); }
.search:focus-within { border-color: var(--cierna); box-shadow: 0 0 0 3px var(--info); }
.search input { min-height: 40px; box-shadow: none !important; }
.cf-in:focus, .rcpt-in:focus, .search input:focus, .gm-search input:focus { box-shadow: none; }

/* mobil („Toto je môj mobil“) */
@media (max-width: 860px) {
  body.gm .gm-top { background: var(--biela); }
  .gm-search { background: var(--plocha); border: 1px solid var(--linka); border-radius: var(--roh-stredny); }
  .gm-search input { min-height: 40px; border: 0; background: transparent; }
  .gm-me, .gm-av { color: var(--biela); }
  body.gm .gm-fab { background: var(--zlta); color: var(--cierna); border: 2px solid var(--cierna); border-radius: var(--roh-stredny); box-shadow: 0 2px 0 var(--cierna); }
  body.gm .gm-nav { background: var(--cierna); border-top: 3px solid var(--zlta); }
  .gm-nav a { color: #C9C7C0; font-weight: 600; }
  .gm-nav a[aria-current] { color: var(--biela); }
  .gm-nav a[aria-current] .gm-nav-ic { background: var(--zlta); color: var(--cierna); }
  .gm-badge { background: var(--zlta); color: var(--cierna); border: 2px solid var(--cierna); }
  .gm-sheet-card a > .ic:last-child { color: var(--cierna); }
  .gm-acc-t strong, .gm-sheet-top, .gm-done, .gm-cbar strong, .gm-cbar .gm-send, .gm-fab-pop button .ic, .gm-usage > .ic { color: var(--cierna); }
  .gm-done { text-decoration: underline; text-decoration-color: var(--zlta); text-decoration-thickness: 3px; }
  .gm-usage-bar > span { background: var(--zlta); border-radius: 0; }
  .gm-chips a[aria-current] { background: var(--zlta); border-color: var(--cierna); color: var(--cierna); }
  .gm-chips a[aria-current] span, .gm-chips button { color: var(--cierna); }
  body.gm.mailp .msg-list .unread .msg-date, body.gm.mailp .bulk-mail.on .bulk-count, body.gm.gmcontacts .c-bulk.on .gm-selcount { color: var(--cierna); }
  body.gm .msg-list li.sel .msg-av, body.gm.gmcontacts li.sel .c-pick .avatar { background: var(--zlta); color: var(--cierna); }
  body.gm.gmapp:not(.mailp) .sidenav a[aria-current="page"] { background: var(--cierna); color: var(--biela); }
  .gm-head strong, body.gm .gm-drawer-head span { color: var(--cierna); }
  body.gm .gm-hello h1 { font-weight: 800; }
  dialog.gm-sheet[open] { border-top: 6px solid var(--zlta); }
}

/* tlač: bez lišty a menu */
@media print { .topbar, .sidenav, .footer, .gm-nav, .gm-fab { display: none !important; } body { background: #fff; } }
/* animácie len krátke a len ako odozva; rešpektujeme zníženie pohybu */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
