/* vfaktura.sk – štýly portálu (bez build kroku). */

@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("/assets/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --paper: #f6f7f9;
  --surface: #ffffff;
  --ink: #18233a;
  --muted: #5a6478;
  --line: #dde1e9;
  --line-strong: #c4cad6;
  --stamp: #3b3ea6;
  --stamp-soft: #ecedf9;
  --ok: #1d7a4c;
  --ok-soft: #e6f3ec;
  --wait: #9a5b00;
  --wait-soft: #fbf1e1;
  --bad: #b3261e;
  --bad-soft: #fbe9e7;
  --row-hover: #f1f3f8;
  --radius: 8px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
a { color: var(--stamp); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--stamp) 45%, transparent); outline-offset: 2px; border-radius: 4px; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Rozloženie: horná lišta, ľavé menu, obsah */
.skip { position: absolute; left: 12px; top: -60px; z-index: 60; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 6px; text-decoration: none; }
.skip:focus { top: 10px; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 0 24px 0 20px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; color: var(--ink); text-decoration: none; letter-spacing: -0.01em; }
.brand__mark {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px;
  background: var(--stamp); color: #fff; font-size: 15px; font-weight: 600; line-height: 1; padding-bottom: 2px;
}
.brand__tag { color: var(--muted); font-size: 14px; padding-left: 14px; border-left: 1px solid var(--line); white-space: nowrap; }
.menu-toggle {
  display: none; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: -8px; padding: 0;
  border: 0; border-radius: 8px; background: none; color: var(--ink); cursor: pointer;
}
.menu-toggle:hover { background: var(--row-hover); }
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 18px; min-width: 0; }
.user { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; }
.user__name { color: var(--muted); text-decoration: none; white-space: nowrap; }
.user__name:hover { color: var(--ink); text-decoration: underline; }
.user .role { font-size: 12px; font-weight: 500; color: var(--stamp); background: var(--stamp-soft); border-radius: 999px; padding: 1px 8px; }
.user form { margin: 0 0 0 4px; }
.context { display: flex; align-items: center; gap: 8px; margin: 0; min-width: 0; }
.context label { font-size: 13px; color: var(--muted); }
.context select {
  height: 34px; max-width: 260px; padding: 0 28px 0 10px; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line-strong); border-radius: 6px; text-overflow: ellipsis;
}
.context select:focus { outline: none; border-color: var(--stamp); box-shadow: 0 0 0 3px var(--stamp-soft); }
.context--single { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.linkbutton {
  background: none; border: 0; padding: 0; font: inherit; color: var(--stamp); cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}

.shell { flex: 1; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 60px; align-self: start; height: calc(100vh - 60px); overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px; padding: 18px 14px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.side-nav { list-style: none; margin: 0; padding: 0 0 10px; display: grid; gap: 2px; border-bottom: 1px solid var(--line); }
.side-nav:last-of-type { border-bottom: 0; padding-bottom: 0; }
.side-nav__link {
  display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border-radius: 8px;
  color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 500;
}
.side-nav__link:hover { background: var(--row-hover); color: var(--ink); }
.side-nav__link[aria-current="page"] { background: var(--stamp-soft); color: var(--stamp); }
.side-nav__icon { flex: none; }
.side-nav__label { flex: 1; min-width: 0; }
.side-nav__link--action { color: var(--ink); }
.side-nav__link--action .side-nav__icon { width: 22px; height: 22px; padding: 2px; margin: -1px; border-radius: 6px; background: var(--stamp); color: #fff; }
.side-nav__badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; background: var(--wait); color: #fff; font-size: 12px; font-weight: 600;
}
.side-help { margin-top: auto; padding: 12px 14px; border-radius: 8px; background: var(--paper); font-size: 13.5px; display: grid; gap: 2px; }
.side-help__title { margin: 0 0 2px; font-weight: 600; color: var(--ink); }
.side-help a { color: var(--ink); overflow-wrap: anywhere; }
.main-col { min-width: 0; display: flex; flex-direction: column; }
.sidebar__head { display: none; }
.sidebar__head .brand { font-size: 16px; }
/* Biely pás ľavého menu až po pätu stránky. */
.shell { background: linear-gradient(to right, var(--surface) 239px, var(--line) 239px, var(--line) 240px, transparent 240px); }

/* Obsah */
.page { flex: 1; width: 100%; max-width: 1240px; padding: 28px 32px 48px; }
h1 { font-size: 24px; line-height: 1.25; font-weight: 600; margin: 0 0 18px; letter-spacing: -0.01em; }
h2 { font-size: 17px; font-weight: 600; margin: 0 0 12px; }

/* Vyhľadávanie – hlavný prvok schránky */
.search { margin-bottom: 14px; }
.search__field { position: relative; }
.search__field svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search__input {
  width: 100%; height: 56px; padding: 0 56px 0 50px;
  font: inherit; font-size: 18px; color: var(--ink);
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 12px;
}
.search__input::placeholder { color: #8a93a5; }
.search__input:focus { outline: none; border-color: var(--stamp); box-shadow: 0 0 0 4px var(--stamp-soft); }
.search__key {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 5px; padding: 1px 7px; background: var(--paper);
}
.search__input:focus ~ .search__key { display: none; }

.filters-box > summary { display: none; }
.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; margin-bottom: 18px; }
.periods { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; height: 34px; padding: 0 13px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface);
  color: var(--ink); text-decoration: none; font-size: 14px;
}
.chip:hover { border-color: var(--stamp); }
.chip[aria-current="true"] { background: var(--stamp-soft); border-color: var(--stamp); color: var(--stamp); font-weight: 500; }
.field { display: flex; flex-direction: column; gap: 3px; }
.field label { font-size: 13px; color: var(--muted); }
.field input, .field select {
  height: 34px; padding: 0 9px; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px;
}
.field select { padding-right: 26px; max-width: 260px; }
.field input:focus, .field select:focus { outline: none; border-color: var(--stamp); box-shadow: 0 0 0 3px var(--stamp-soft); }
.filters__clear { font-size: 14px; align-self: center; margin-top: 18px; }

.summary { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 10px; color: var(--muted); }
.summary strong { color: var(--ink); font-weight: 600; }
.button {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px;
  font: inherit; font-size: 14px; font-weight: 500; text-decoration: none; cursor: pointer;
  border-radius: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
}
.button:hover { border-color: var(--stamp); color: var(--stamp); }
.button--primary { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.button--primary:hover { background: #2f3290; color: #fff; }

/* Tabuľka dokladov */
.table-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.docs { width: 100%; border-collapse: collapse; }
.docs th {
  text-align: left; font-size: 13px; font-weight: 500; color: var(--muted);
  padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfc; white-space: nowrap;
}
.docs th a { color: inherit; text-decoration: none; }
.docs th a:hover { color: var(--ink); }
.docs th a[aria-sort] { color: var(--ink); }
.docs td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.docs tbody tr:last-child td { border-bottom: 0; }
.docs tbody tr[data-href] { cursor: pointer; }
.docs tbody tr:hover { background: var(--row-hover); }
.docs .amount, .docs th.amount { text-align: right; }
.docs .party { font-weight: 500; }
.docs .party small, .docs .sub { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.docs a.docnum { color: var(--ink); text-decoration: none; font-weight: 500; }
.docs a.docnum:hover { color: var(--stamp); text-decoration: underline; }

.status { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.status--ok { color: var(--ok); }
.status--wait { color: var(--wait); }
.status--bad { color: var(--bad); }
.status--neutral { color: var(--muted); }
.fs { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }

mark { background: #fff2b3; color: inherit; border-radius: 2px; padding: 0 1px; }

.empty { padding: 44px 24px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; color: var(--muted); font-size: 14px; }
.pager a, .pager span.off { min-width: 110px; }
.pager span.off { color: #a3aab8; }
.pager .next { text-align: right; }

/* Detail dokladu */
.back { display: inline-block; margin-bottom: 14px; font-size: 14px; }
.doc-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px 24px; margin-bottom: 20px; }
.doc-head h1 { margin-bottom: 4px; }
.doc-head .total { font-size: 26px; font-weight: 600; letter-spacing: -0.01em; text-align: right; }
.doc-head .lead { margin: 0; }
.doc-head__status { text-align: right; }
.doc-grid { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 24px; align-items: start; }
.doc-grid--single { grid-template-columns: minmax(300px, 560px); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.panel + .panel { margin-top: 16px; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 0; font-size: 14px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }
.files { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.timeline li { position: relative; padding: 0 0 14px 22px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--stamp); }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li:last-child::after { display: none; }
.timeline time { display: block; color: var(--muted); font-size: 13px; }
.preview { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.preview iframe { display: block; width: 100%; height: 78vh; min-height: 560px; border: 0; }
.preview .empty { padding: 80px 24px; }

/* Prihlásenie */
.login { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 20px; }
.login__box { width: 100%; max-width: 380px; }
.login__brand { font-size: 22px; font-weight: 600; margin: 0 0 28px; letter-spacing: -0.01em; }
.login h1 { font-size: 20px; margin-bottom: 18px; }
.login .field { margin-bottom: 14px; }
.login .field label { font-size: 14px; color: var(--ink); font-weight: 500; }
.login .field input { height: 44px; font-size: 16px; padding: 0 12px; border-radius: 8px; }
.login .check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 4px 0 20px; }
.login .button--primary { width: 100%; height: 44px; justify-content: center; font-size: 15px; }
.error { color: var(--bad); font-size: 14px; margin: 4px 0 0; }
.alert { border: 1px solid #efc2bd; background: var(--bad-soft); color: var(--bad); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 16px; }

/* Pätička */
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.footer p { max-width: 1240px; margin: 0 auto; padding: 14px 20px; }
.main-col .footer p { margin: 0; padding: 14px 32px; }

/* Mobil */
@media (max-width: 900px) {
  .doc-grid { grid-template-columns: 1fr; }
  .preview iframe { height: 70vh; min-height: 420px; }
}
@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; }
  .brand__tag { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); background: none; }
  .sidebar {
    position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; height: auto; width: min(300px, 86vw); align-self: stretch;
    padding-top: 20px; border-right: 0; box-shadow: 0 0 40px rgba(24, 35, 58, .25);
    transform: translateX(-104%); visibility: hidden; transition: transform .2s ease, visibility 0s linear .2s;
  }
  .nav-open .sidebar { transform: none; visibility: visible; transition: transform .2s ease; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 35; background: rgba(24, 35, 58, .35); }
  .sidebar__head { display: flex; align-items: center; justify-content: space-between; padding: 0 2px 8px 12px; }
  .page { padding: 24px 24px 40px; }
  .main-col .footer p { padding: 14px 24px; }
}
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 4px 10px; padding: 8px 14px; }
  .topbar__right { display: contents; }
  .user { margin-left: auto; }
  .user .role, .user__name { display: none; }
  .context { order: 5; flex: 1 1 100%; padding: 2px 0 4px; }
  .context label { display: none; }
  .context select { flex: 1; max-width: none; }
  .context--single { order: 5; flex: 1 1 100%; padding-bottom: 4px; max-width: none; }
  .page { padding: 20px 16px 40px; }
  .main-col .footer p { padding: 14px 16px; }
  .search__input { font-size: 16px; height: 50px; }
  .search__key { display: none; }
  .docs thead { display: none; }
  .docs, .docs tbody, .docs tr, .docs td { display: block; width: 100%; }
  .docs tbody tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .docs tbody tr:last-child { border-bottom: 0; }
  .docs td { padding: 0; border: 0; }
  .docs td.c-party { grid-column: 1; grid-row: 1; }
  .docs td.amount { grid-column: 2; grid-row: 1; }
  .docs td.c-num { grid-column: 1; grid-row: 2; color: var(--muted); font-size: 14px; }
  .docs td.c-date { grid-column: 2; grid-row: 2; text-align: right; color: var(--muted); font-size: 14px; }
  .docs td.c-status { grid-column: 1 / -1; grid-row: 3; margin-top: 4px; }
  .docs td.c-org { grid-column: 1 / -1; font-size: 13px; color: var(--muted); }
  .docs td.c-due { display: none; }
  .docs td.c-status .fs { display: inline; margin: 0 0 0 10px; }
  .doc-head .total, .doc-head__status { text-align: left; }
  .filters-box { margin-bottom: 16px; }
  .filters-box > summary {
    display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; cursor: pointer;
    border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); font-size: 14px; font-weight: 500; list-style: none;
  }
  .filters-box > summary::-webkit-details-marker { display: none; }
  .filters-box > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
  .filters-box[open] > summary { margin-bottom: 14px; }
  .filters-box[open] > summary::after { transform: rotate(-135deg) translateY(-1px); }
  .filters { margin-bottom: 0; }
  .filters .field { flex: 1 1 140px; }
  .filters .field select, .filters .field input { width: 100%; max-width: none; }
}
/* Hlásenia */
.notice { border: 1px solid #b9dcc8; background: var(--ok-soft); color: #145c39; border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 16px; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.lead-note { color: var(--muted); margin: -6px 0 18px; max-width: 70ch; }

/* Tlačidlá */
.button--wide { width: 100%; justify-content: center; height: 42px; font-size: 15px; }
.button--danger:hover { border-color: var(--bad); color: var(--bad); }
.button:disabled { opacity: .5; cursor: not-allowed; }
.button--primary:disabled:hover { background: var(--stamp); }
.iconbutton {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
  border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer;
}
.iconbutton:hover { background: var(--bad-soft); color: var(--bad); }
.chip--small { height: 28px; padding: 0 10px; font-size: 13px; cursor: pointer; font: inherit; font-size: 13px; }

/* Detail: koncept pred odoslaním */
.panel--send { border-color: var(--line-strong); }
.checks { list-style: none; margin: 0 0 16px; padding: 0; font-size: 14px; display: grid; gap: 8px; }
.checks > li { position: relative; padding-left: 24px; }
.checks > li::before { content: ""; position: absolute; left: 2px; top: 4px; width: 14px; height: 14px; border-radius: 50%; }
.checks__ok::before { background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3.5 7.2l2.2 2.2 4.8-4.8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.checks__bad::before { background: var(--bad) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4.5 4.5l5 5M9.5 4.5l-5 5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E") center/14px no-repeat; }
.checks__wait::before { background: var(--wait-soft); border: 2px solid var(--wait); }
.checks__bad { color: var(--bad); }
.checks__errors { margin: 4px 0 0; padding-left: 16px; color: var(--ink); font-size: 13px; }
.send { margin: 0; }
.send__hint { font-size: 13px; margin: 8px 0 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions form { margin: 0; }
.files--more { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Doklad vykreslený z XML */
.sheet-wrap { min-width: 0; }
.sheet-wrap__label { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.sheet {
  background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 3px;
  box-shadow: 0 1px 2px rgba(24, 35, 58, .06), 0 8px 24px -12px rgba(24, 35, 58, .18);
  padding: 36px 40px 40px; font-size: 13.5px; line-height: 1.45;
}
.sheet__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid var(--ink); }
.sheet__title { font-size: 24px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.sheet__number { margin: 0; font-size: 15px; }
.sheet__number span { color: var(--muted); }
.sheet__number strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.sheet__parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.sheet__party h3 { margin: 0 0 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.sheet__party p { margin: 0; }
.sheet__name { font-weight: 600; font-size: 15px; margin-bottom: 2px !important; }
.sheet__ids { display: grid; grid-template-columns: max-content 1fr; gap: 0 10px; margin: 8px 0 0; }
.sheet__ids dt { color: var(--muted); }
.sheet__ids dd { margin: 0; font-variant-numeric: tabular-nums; }
.sheet__register { margin-top: 8px !important; font-size: 12px; color: var(--muted); }
.sheet__dates { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 0; padding: 14px 0; border-bottom: 1px solid var(--line); }
.sheet__dates dt { font-size: 12px; color: var(--muted); }
.sheet__dates dd { margin: 0; font-weight: 500; }
.sheet__lines { width: 100%; border-collapse: collapse; margin-top: 14px; }
.sheet__lines th { font-size: 12px; font-weight: 500; color: var(--muted); text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line-strong); }
.sheet__lines td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sheet__lines td small { display: block; color: var(--muted); }
.sheet__lines td.r { white-space: nowrap; }
.sheet__lines .c-no { width: 28px; color: var(--muted); padding-left: 0; }
.sheet .r { text-align: right; }
.sheet__foot { display: grid; grid-template-columns: 1fr minmax(220px, 280px); gap: 28px; margin-top: 18px; align-items: start; }
.sheet__vat table { border-collapse: collapse; width: 100%; max-width: 360px; font-size: 12.5px; }
.sheet__vat th { font-weight: 500; color: var(--muted); text-align: left; padding: 3px 8px 3px 0; border-bottom: 1px solid var(--line); }
.sheet__vat td { padding: 3px 8px 3px 0; }
.sheet__reason { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.sheet__totals { margin: 0; }
.sheet__totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.sheet__totals dt { color: var(--muted); }
.sheet__totals dd { margin: 0; }
.sheet__payable { margin-top: 6px; padding-top: 10px !important; border-top: 2px solid var(--ink); }
.sheet__payable dt { color: var(--ink) !important; font-weight: 600; }
.sheet__payable dd { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.sheet__notes { margin-top: 22px; padding-top: 12px; border-top: 1px solid var(--line); }
.sheet__notes p { margin: 0 0 4px; }
.sheet__attach { margin: 14px 0 0; font-size: 12px; }

.print-page { background: var(--paper); }
.print-bar { width: calc(100% - 32px); max-width: 860px; margin: 20px auto 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; font-weight: 500; }
.print-page .sheet { width: calc(100% - 32px); max-width: 860px; margin: 0 auto 40px; }
.print-page .footer { display: none; }

/* Formulár faktúry */
.form-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 18px; }
.form-head h1 { margin: 0; }
.segmented { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); padding: 3px; }
.segmented a { padding: 5px 14px; border-radius: 6px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.segmented a[aria-current="page"] { background: var(--stamp-soft); color: var(--stamp); }
.supplier-bar {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 20px;
  padding: 10px 14px; margin-bottom: 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); font-size: 14px;
}
.supplier-bar__who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.supplier-bar__who select { font: inherit; font-weight: 600; border: 1px solid var(--line-strong); border-radius: 6px; padding: 3px 6px; background: var(--surface); max-width: 320px; }
.supplier-bar__ids { color: var(--muted); font-variant-numeric: tabular-nums; }
.invoice__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }
.invoice .panel + .panel, .invoice__grid + .panel, .invoice .lines-panel + .invoice__bottom { margin-top: 16px; }
.invoice__grid .panel + .panel { margin-top: 0; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.fields .field--wide { grid-column: 1 / -1; }
.fields--pay { grid-template-columns: minmax(150px, 1fr) minmax(220px, 1.7fr) minmax(110px, .8fr); }
.fields .field input, .fields .field select, .settings .field input {
  height: 38px; font-size: 15px; width: 100%; max-width: none;
}
.field textarea {
  font: inherit; font-size: 15px; color: var(--ink); padding: 8px 10px; resize: vertical; min-height: 64px;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px; width: 100%;
}
.field textarea:focus { outline: none; border-color: var(--stamp); box-shadow: 0 0 0 3px var(--stamp-soft); }
.field label .req { color: var(--bad); margin-left: 2px; }
.field--error input, .field input[aria-invalid="true"], .lines input[aria-invalid="true"] { border-color: var(--bad); background: #fffafa; }
.field .error, .field .hint { margin: 2px 0 0; font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; }
.field { position: relative; }
.field__action {
  position: absolute; right: 4px; top: 22px; height: 30px; padding: 0 10px; border: 0; border-radius: 5px;
  background: var(--stamp-soft); color: var(--stamp); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
.field__action:hover { background: #dfe0f6; }
.field__action:disabled { opacity: .6; cursor: progress; }
.field__static { margin: 0; height: 38px; display: flex; align-items: center; color: var(--muted); }
.quick { display: flex; gap: 6px; margin-top: 6px; }
.num-field input { font-variant-numeric: tabular-nums; font-weight: 600; }

.lookup { position: relative; margin-bottom: 14px; }
.lookup__input {
  width: 100%; height: 42px; padding: 0 12px 0 38px; font: inherit; font-size: 15px; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 8px; background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235a6478' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E") 12px center no-repeat;
}
.lookup__input:focus { outline: none; border-color: var(--stamp); box-shadow: 0 0 0 3px var(--stamp-soft); background-color: var(--surface); }
.lookup__list {
  position: absolute; z-index: 10; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none;
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 8px; box-shadow: 0 10px 30px -10px rgba(24, 35, 58, .3);
  max-height: 320px; overflow: auto;
}
.lookup__item { padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.lookup__item strong { display: block; font-weight: 500; }
.lookup__item small { color: var(--muted); font-size: 13px; }
.lookup__item.is-active, .lookup__item:hover { background: var(--stamp-soft); }
.lookup__empty { padding: 10px; color: var(--muted); font-size: 14px; }
.peppol { margin: 12px 0 0; font-size: 14px; min-height: 1.5em; }
.peppol:empty { display: none; }
.peppol--ok { color: var(--ok); }
.peppol--bad { color: var(--bad); }
.peppol--wait { color: var(--wait); }

.lines { width: 100%; border-collapse: collapse; }
.lines th { font-size: 13px; font-weight: 500; color: var(--muted); text-align: left; padding: 0 6px 6px; white-space: nowrap; }
.lines th.r { text-align: right; }
.lines td { padding: 4px 6px; vertical-align: middle; }
.lines input, .lines select {
  width: 100%; height: 38px; padding: 0 9px; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 6px;
}
.lines input:focus, .lines select:focus { outline: none; border-color: var(--stamp); box-shadow: 0 0 0 3px var(--stamp-soft); }
.line__qty, .line__price { width: 116px; }
.line__qty input, .line__price input { text-align: right; font-variant-numeric: tabular-nums; }
.line__unit { width: 104px; }
.line__vat { width: 138px; }
.line__total { width: 130px; text-align: right; font-weight: 500; }
.line__remove { width: 40px; text-align: center; }
.lines--no-vat [data-vat-cell] { display: none; }
.line-errors td { padding-top: 0; }
.line-errors .error { margin: 0; }
.lines__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 10px; }
.vat-options { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 16px; height: 16px; accent-color: var(--stamp); }

.invoice__bottom { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
.totals { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 18px 20px; position: sticky; top: 16px; }
.totals dl { margin: 0; }
.totals dl > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; font-size: 14px; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; }
.totals [data-breakdown] { padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); }
.totals__payable { margin: 8px 0 16px; padding-top: 10px !important; border-top: 2px solid var(--ink); }
.totals__payable dt { color: var(--ink) !important; font-weight: 600; }
.totals__payable dd { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.totals__cancel { display: block; text-align: center; margin-top: 10px; font-size: 14px; }
.totals .hint { margin: 10px 0 0; text-align: center; }

/* Údaje firmy */
.settings { max-width: 760px; }
.settings .panel + .panel { margin-top: 16px; }
.choice { border: 0; padding: 0; margin: 0 0 12px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.choice__item { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.choice__item input { width: 16px; height: 16px; accent-color: var(--stamp); }
.settings__actions { display: flex; align-items: center; gap: 18px; margin-top: 18px; }

@media (max-width: 1000px) {
  .invoice__grid, .invoice__bottom { grid-template-columns: 1fr; }
  .totals { position: static; }
}
@media (max-width: 720px) {
  .fields { grid-template-columns: 1fr 1fr; }
  .fields--pay { grid-template-columns: 1fr; }
  .fields .field--lookup { grid-column: 1 / -1; }
  .sheet { padding: 20px 16px 24px; font-size: 13px; }
  .sheet__parties, .sheet__foot { grid-template-columns: 1fr; gap: 16px; }
  .sheet__lines thead { display: none; }
  .sheet__lines, .sheet__lines tbody, .sheet__lines tr, .sheet__lines td { display: block; }
  .sheet__lines tr { display: grid; grid-template-columns: auto auto 1fr auto; gap: 2px 10px; padding: 8px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
  .sheet__lines td { padding: 0; border: 0; text-align: left !important; }
  .sheet__lines td.c-no { display: none; }
  .sheet__lines td:nth-child(2) { grid-column: 1 / -1; font-weight: 500; }
  .sheet__lines td:nth-child(3), .sheet__lines td:nth-child(4), .sheet__lines td:nth-child(5) { color: var(--muted); font-size: 12.5px; }
  .sheet__lines td:nth-child(4)::before { content: "× "; }
  .sheet__lines td:last-child { grid-column: 4; text-align: right !important; font-weight: 500; }
  .lines thead { display: none; }
  .lines, .lines tbody { display: block; }
  .lines tr.line { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .lines td { padding: 0; width: auto !important; }
  .lines td.line__name { grid-column: 1 / 4; grid-row: 1; }
  .lines td.line__remove { grid-column: 4; grid-row: 1; justify-self: end; }
  .lines td.line__qty { grid-column: 1; grid-row: 2; }
  .lines td.line__unit { grid-column: 2; grid-row: 2; }
  .lines td.line__price { grid-column: 3; grid-row: 2; }
  .lines td.line__vat { grid-column: 4; grid-row: 2; }
  .lines td.line__total { grid-column: 1 / -1; grid-row: 3; text-align: left; padding-left: 2px; color: var(--muted); }
  .lines select { padding: 0 4px; }
  .line-errors { display: block; }
}

@media print {
  @page { size: A4; margin: 14mm 12mm; }
  body, .print-page { background: #fff; display: block; }
  .print-bar, .topbar, .sidebar, .footer { display: none !important; }
  .shell { display: block; }
  .print-page .sheet, .sheet { width: auto; max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; font-size: 11pt; }
  .sheet__lines tr { break-inside: avoid; }
}

/* Správa používateľov a prístupy */
.org-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 8px 24px; margin-bottom: 16px; }
.org-head h1 { margin-bottom: 4px; }
.org-head .lead { margin: 0; }
.grant > .button { justify-self: start; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.page-head h1 { margin: 0; }
.toolbar { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; margin-bottom: 16px; }
.toolbar__q { flex: 1 1 280px; }
.toolbar__q input { width: 100%; }
.access { display: inline-flex; align-items: baseline; gap: 6px; margin: 0 10px 4px 0; font-size: 14px; white-space: nowrap; }
.access__org { font-weight: 500; }
.access__role { font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); color: var(--muted); }
.access__role--owner { background: var(--stamp-soft); border-color: transparent; color: var(--stamp); }
.access__role--admin { background: var(--ink); border-color: transparent; color: #fff; }
.access--pending .access__role { background: var(--wait-soft); border-color: transparent; color: var(--wait); }
.users tr.is-disabled td { opacity: .6; }
.users td.c-access { white-space: normal; }
.user-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.user-grid .panel + .panel { margin-top: 16px; }
.user-grid > .panel + .panel { margin-top: 0; }
.fields--single { grid-template-columns: 1fr; }
.perm-list { list-style: none; margin: 0; padding: 0; }
.perm-list > li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--line); }
.perm-list > li:first-child { border-top: 0; padding-top: 2px; }
.perm-list__main { display: flex; flex-direction: column; min-width: 0; }
.perm-list__main .muted { font-size: 14px; }
.perm-list--plain { margin-top: 12px; }
.row-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-actions form { margin: 0; }
.inline-form { display: flex; align-items: center; gap: 10px; }
.button--small { height: 30px; padding: 0 10px; font-size: 13px; }
.check--small { font-size: 13px; }
.check--top { margin-top: 14px; }
.check + .check { margin-top: 8px; }
.panel--attention { border-color: #e7c891; background: #fffaf0; margin-bottom: 16px; }
.h2-sub { font-size: 14px; font-weight: 400; margin-left: 6px; }
.grant { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.grant__title { margin: 0; font-size: 15px; font-weight: 600; }
.grant .field select { max-width: none; width: 100%; height: 38px; font-size: 15px; }
.grant--inline { grid-template-columns: minmax(220px, 1fr) auto auto; align-items: end; }
.roles { border: 0; padding: 0; margin: 4px 0 0; display: grid; gap: 8px; }
.roles__legend { font-size: 13px; color: var(--muted); margin-bottom: 6px; padding: 0; }
.role-option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; }
.role-option input { margin-top: 3px; accent-color: var(--stamp); }
.role-option > span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.role-option:has(input:checked) { border-color: var(--stamp); background: var(--stamp-soft); }
.roles__more { padding: 4px 2px 0; }
.notice--wait { border-color: #e7c891; background: #fffaf0; color: #6b4300; }
.field--password input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .03em; padding-right: 110px; }
@media (max-width: 900px) {
  .user-grid { grid-template-columns: 1fr; }
  .grant--inline { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .users td.c-access { margin-top: 4px; }
  .perm-list > li { align-items: flex-start; }
}

/* Druhy dokladov vo formulári */
.form-title { margin-bottom: 14px; }
.doctabs { display: flex; gap: 2px; margin: 0 0 10px; border-bottom: 1px solid var(--line-strong); overflow-x: auto; scrollbar-width: thin; }
.doctabs a {
  flex: none; padding: 9px 14px 10px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 14.5px; white-space: nowrap;
  border-bottom: 3px solid transparent; margin-bottom: -1px; border-radius: 6px 6px 0 0;
}
.doctabs a:hover { color: var(--ink); background: var(--row-hover); }
.doctabs a[aria-current="page"] { color: var(--stamp); border-bottom-color: var(--stamp); }
.doctabs__hint { margin: 0 0 18px; color: var(--muted); font-size: 14px; max-width: 80ch; }
.field--spacer { visibility: hidden; }
.gross { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; }
.gross label { color: var(--muted); }
.gross input {
  width: 130px; height: 36px; padding: 0 9px; font: inherit; font-size: 15px; text-align: right; font-variant-numeric: tabular-nums;
  border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink);
}
.gross input:focus { outline: none; border-color: var(--stamp); box-shadow: 0 0 0 3px var(--stamp-soft); }
.gross .hint { flex-basis: 100%; }
.gross .hint:empty { display: none; }
.totals__note { margin: -6px 0 14px !important; text-align: left !important; }

/* Prehľad */
.page-head__sub { margin: 4px 0 0; }
.tally {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.tally__cell { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px 18px; color: var(--ink); text-decoration: none; border-left: 1px solid var(--line); }
.tally__cell:first-child { border-left: 0; }
.tally__cell:hover { background: var(--row-hover); }
.tally__label { font-size: 13.5px; color: var(--muted); }
.tally__value { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; margin-top: 4px; }
.tally__sub { font-size: 14px; color: var(--muted); }
.tally__cell--bad .tally__value, .tally__cell--bad .tally__sub { color: var(--bad); }
.recent { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.recent .panel + .panel { margin-top: 0; }
.recent__panel { padding-bottom: 8px; }
.recent__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.recent__head h2 { margin: 0; }
.recent__head a { font-size: 14px; }
.recent__empty { margin: 8px 0 12px; font-size: 14px; }
.recent__list { list-style: none; margin: 0 -12px; padding: 0; }
.recent__item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1px 16px; padding: 10px 12px; border-radius: 8px;
  color: var(--ink); text-decoration: none; border-top: 1px solid var(--line);
}
.recent__list li:first-child .recent__item { border-top-color: transparent; }
.recent__item:hover { background: var(--row-hover); }
.recent__party { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent__amount { text-align: right; font-weight: 500; }
.recent__meta { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent__status { text-align: right; font-size: 13.5px; }
.recent__status .status { font-size: 13.5px; }
.panel--attention + .recent { margin-top: 0; }
.tally + .panel--attention { margin-bottom: 20px; }

/* Moje firmy */
.firms td { vertical-align: middle; }
.firms .party { display: block; }
.firms tr.is-current td:first-child { box-shadow: inset 3px 0 0 var(--stamp); }
.firms .c-count a { color: var(--ink); text-decoration: none; }
.firms .c-count a:hover { color: var(--stamp); text-decoration: underline; }
.firms .c-actions .row-actions { justify-content: flex-end; flex-wrap: nowrap; }
.current-tag { font-size: 13px; color: var(--stamp); background: var(--stamp-soft); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.list-note { margin: 12px 0 0; }

/* Exporty */
.export { max-width: 820px; }
.export .panel + .panel { margin-top: 16px; }
.cards { border: 0; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.cards__item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 8px; cursor: pointer; }
.cards__item input { margin-top: 3px; accent-color: var(--stamp); }
.cards__item > span { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.cards__item strong { font-size: 15px; font-weight: 600; }
.cards__item:has(input:checked) { border-color: var(--stamp); background: var(--stamp-soft); }
.cards__item:has(input:focus-visible) { box-shadow: 0 0 0 3px color-mix(in srgb, var(--stamp) 35%, transparent); }
.export__fields .field select { max-width: none; }
.settings-firms { margin-top: 16px; }
.settings-firms__lead { margin: -4px 0 8px; font-size: 14px; }

@media (max-width: 1100px) {
  .tally { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tally__cell:nth-child(3) { border-left: 0; }
  .tally__cell:nth-child(n+3) { border-top: 1px solid var(--line); }
  .recent { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; }
  .tally__cell { padding: 12px 14px 14px; }
  .tally__value { font-size: 19px; }
  .firms tbody tr { grid-template-columns: 1fr auto; }
  .firms td.c-party { grid-column: 1 / -1; grid-row: 1; }
  .firms td.c-in { grid-column: 1; grid-row: 2; margin-top: 6px; }
  .firms td.c-out { grid-column: 1; grid-row: 3; }
  .firms td.c-role { grid-column: 1; grid-row: 4; color: var(--muted); font-size: 14px; }
  .firms td.c-count { grid-column: 2; grid-row: 2 / 5; text-align: right; align-self: center; }
  .firms td.c-actions { grid-column: 1 / -1; grid-row: 5; margin-top: 8px; }
  .firms .c-actions .row-actions { justify-content: flex-start; flex-wrap: wrap; }
  .doctabs a { padding: 8px 11px 9px; font-size: 14px; }
}

/* Nový užívateľ (majiteľ) */
.fields--nested { grid-column: 1 / -1; }
.firm-checks { border: 0; padding: 0; margin: 0 0 14px; display: grid; gap: 8px; }
.firm-checks .muted { font-size: 13.5px; }
.firm-single { margin: 0 0 14px; }
.org-panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 16px; margin-bottom: 12px; }
.org-panel-head h2 { margin: 0; }
.grant--role { grid-template-columns: minmax(220px, 1fr) 150px auto auto; }
.perm-list > li > .hint { text-align: right; }
@media (max-width: 900px) {
  .grant--role { grid-template-columns: 1fr; }
}

/* Odoslanie zo súboru */
.sendmode { display: inline-flex; gap: 4px; padding: 4px; margin: 0 0 16px; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; max-width: 100%; }
.sendmode a {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 7px;
  color: var(--muted); text-decoration: none; font-size: 14.5px; font-weight: 500; white-space: nowrap;
}
.sendmode a:hover { color: var(--ink); background: var(--row-hover); }
.sendmode a[aria-current="page"] { background: var(--stamp); color: #fff; }
.steps { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 28px; margin: 4px 0 20px; padding: 0; counter-reset: none; }
.steps__item { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14.5px; font-weight: 500; position: relative; }
.steps__item + .steps__item::before { content: ""; position: absolute; left: -22px; top: 50%; width: 16px; height: 1px; background: var(--line-strong); }
.steps__num {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line-strong); background: var(--surface); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.steps__item.is-done { color: var(--ink); }
.steps__item.is-done .steps__num { background: var(--ok); border-color: var(--ok); color: #fff; }
.steps__item.is-current { color: var(--stamp); }
.steps__item.is-current .steps__num { background: var(--stamp); border-color: var(--stamp); color: #fff; }
.upload { max-width: 820px; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 24px; text-align: center; cursor: pointer;
  background: var(--surface); border: 2px dashed var(--line-strong); border-radius: 12px; color: var(--muted);
  transition: border-color .15s ease, background-color .15s ease;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--stamp); background: var(--stamp-soft); color: var(--stamp); }
.dropzone:focus-within { border-color: var(--stamp); box-shadow: 0 0 0 4px var(--stamp-soft); }
.dropzone__title { color: var(--ink); font-size: 16px; font-weight: 600; }
.dropzone__sub { font-size: 14px; }
.dropzone__input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone__files { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.dropzone__files li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }
.dropzone__files .muted { white-space: nowrap; }
.upload__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; }
.upload-help { max-width: 820px; margin-top: 28px; color: var(--muted); font-size: 14px; }
.upload-help h2 { font-size: 15px; color: var(--ink); margin-bottom: 6px; }
.upload-help ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.upload-errors { margin-bottom: 18px; }
.upload-errors__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.upload-errors__list strong { font-weight: 600; overflow-wrap: anywhere; }
.upload-errors__list span { display: block; color: var(--muted); }
.batch__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 20px; margin-bottom: 10px; }
.batch__summary { margin: 0; font-size: 17px; }
.batch__counts { margin: 0; font-size: 14px; }
.batch__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.batch__actions form { margin: 0; }
.batch__delete { margin-left: auto !important; }
.batch__hint { margin: 0 0 14px; }
.batch__progress { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; background: var(--stamp-soft); color: var(--stamp); font-size: 14px; font-weight: 500; }
.batch-table td { vertical-align: middle; }
.batch-table .c-actions { text-align: right; }
.batch-table tr.is-busy td { opacity: .55; }
.row-issues { margin-top: 4px; font-size: 13px; }
.row-issues summary { cursor: pointer; color: var(--bad); }
.row-issues ul { margin: 6px 0 0; padding-left: 16px; max-width: 46ch; color: var(--ink); }
@media (max-width: 720px) {
  .sendmode { display: flex; }
  .sendmode a { flex: 1; justify-content: center; padding: 7px 8px; font-size: 13.5px; white-space: normal; text-align: center; }
  .sendmode svg { display: none; }
  .steps { gap: 6px 20px; }
  .steps__item + .steps__item::before { display: none; }
  .batch__delete { margin-left: 0 !important; }
  .batch-table td.c-actions { grid-column: 1 / -1; grid-row: 4; text-align: left; margin-top: 6px; }
}

/* Údaje firmy: porovnanie s Verteco */
.sync { max-width: 760px; }
.sync__lead { margin: -4px 0 10px; font-size: 14px; }
.sync__diff { margin: 0 0 14px; display: grid; gap: 6px; font-size: 14.5px; }
.sync__diff > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; }
.sync__diff dt { color: var(--muted); }
.sync__diff dd { margin: 0; overflow-wrap: anywhere; }
.sync__old { color: var(--muted); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.sync__same { margin: -6px 0 16px; font-size: 14px; color: var(--ok); }
.sync__same.muted { color: var(--muted); }
@media (max-width: 720px) {
  .sync__diff > div { grid-template-columns: 1fr; gap: 0; }
}

/* Údaje firmy: pole len pre správcu */
.fields .admin-note { grid-column: 1 / -1; margin: -4px 0 2px; padding: 8px 12px; border-radius: 8px; background: var(--stamp-soft); font-size: 13.5px; color: var(--ink); }
.admin-note .role { font-size: 12px; font-weight: 500; color: #fff; background: var(--stamp); border-radius: 999px; padding: 1px 8px; margin-right: 6px; }
.field--admin input { border-color: color-mix(in srgb, var(--stamp) 55%, var(--line-strong)); }

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