/* BauHausEurope – firemná aplikácia
   Vizuál podľa bauhauseurope.sk: čierna, biela, oranžový akcent #FF4000,
   písma Barlow (text) a Montserrat (nadpisy), ostré rohy, logo BHE. */

/* Písma sú uložené priamo v aplikácii (assets/fonts) – nenačítava sa nič z cudzích serverov. */
@font-face { font-family: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/barlow-400-latin-ext.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: "Barlow"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/barlow-400-latin.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: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/barlow-500-latin-ext.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: "Barlow"; font-style: normal; font-weight: 500; font-display: swap; src: url(fonts/barlow-500-latin.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: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/barlow-600-latin-ext.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: "Barlow"; font-style: normal; font-weight: 600; font-display: swap; src: url(fonts/barlow-600-latin.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: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/barlow-700-latin-ext.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: "Barlow"; font-style: normal; font-weight: 700; font-display: swap; src: url(fonts/barlow-700-latin.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: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/montserrat-var-latin-ext.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: "Montserrat"; font-style: normal; font-weight: 100 900; font-display: swap; src: url(fonts/montserrat-var-latin.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 {
  --bg: #F4F4F4; --surface: #FFFFFF; --surface-2: #FAFAFA; --line: #E6E6E6; --line-2: #CFCFCF;
  --text: #111111; --muted: #60627F; --faint: #9A9CAB;
  --ink: #000000; --ink-2: #181818; --ink-3: #2B2B2B;
  --accent: #FF4000; --accent-hover: #E03800; --accent-ink: #FFFFFF; --accent-soft: #FFE8DF;
  --blue: #1D4ED8; --green: #0E7A55; --red: #C4122F; --amber: #9A5200; --violet: #5B3CC4; --gray: #55565F;
  --blue-bg: #E4ECFF; --green-bg: #DFF4EA; --red-bg: #FCE4E8; --amber-bg: #FFEFD6; --violet-bg: #EEE8FC; --gray-bg: #EDEDED;
  --radius: 0px; --radius-sm: 0px;
  --shadow: 0 1px 2px rgba(0,0,0,.04);
  --font: "Barlow", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Montserrat", "Barlow", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0A0A0A; --surface: #151515; --surface-2: #1B1B1B; --line: #2A2A2A; --line-2: #3D3D3D;
  --text: #F2F2F2; --muted: #A3A5B5; --faint: #70727F;
  --accent-soft: #3B1505;
  --blue: #8FB0FF; --green: #4FD8A2; --red: #FF8A9B; --amber: #F6BD60; --violet: #BBA4FF; --gray: #B8B9C2;
  --blue-bg: #17233F; --green-bg: #102E24; --red-bg: #3A141C; --amber-bg: #3A2A0E; --violet-bg: #261D45; --gray-bg: #242424;
  --shadow: 0 1px 2px rgba(0,0,0,.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15.5px/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; letter-spacing: -.02em; }
h1 { font-size: 28px; font-weight: 700; line-height: 1.15; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
p { margin: 0 0 12px; }
small { font-size: 13px; }
button, input, select, textarea { font: inherit; color: inherit; }
.ic { width: 18px; height: 18px; flex: none; }
.muted { color: var(--muted); }
.up { text-transform: uppercase; font-weight: 600; font-size: 12px; letter-spacing: .04em; }
.grow { flex: 1; min-width: 0; }
.block { display: block; }
.pad { padding: 10px 20px 14px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pos { color: var(--green); } .neg { color: var(--red); }
.late { color: var(--red) !important; font-weight: 600; }
.yes { color: var(--green); display: inline-flex; }

/* ------------------------------ Rozloženie ------------------------------ */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--ink); color: #C5C8CF; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; z-index: 40; }
.side-logo { display: block; padding: 22px 22px 18px; }
.logo { display: block; height: 40px; width: auto; }
.hl { color: var(--accent); }
.nav { flex: 1; overflow-y: auto; padding: 2px 12px 16px; scrollbar-width: thin; scrollbar-color: #333843 transparent; }
.nav-link, .nav-group > summary { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--radius); color: #C5C8CF; font-size: 13px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; cursor: pointer; list-style: none; user-select: none; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-link:hover, .nav-group > summary:hover { background: var(--ink-2); color: #fff; }
.nav-link .ic, .nav-group > summary .ic { opacity: .75; }
.nav-group .chev { margin-left: auto; width: 14px; height: 14px; transition: transform .15s; opacity: .5; }
.nav-group[open] > summary .chev { transform: rotate(180deg); }
.nav-group[open] > summary { color: #fff; }
.nav-group { margin-bottom: 1px; }
.nav-sub { display: flex; align-items: center; gap: 10px; position: relative; margin: 1px 0 1px 8px; padding: 8px 12px 8px 18px; border-radius: var(--radius); color: #A4A8B1; font-size: 14px; }
.nav-sub .ic { width: 16px; height: 16px; opacity: .7; }
.nav-sub:hover { color: #fff; background: var(--ink-2); }
.nav-sub.on, .nav-link.on { color: #fff; background: rgba(255,64,0,.2); }
.nav-sub.on::before { content: ""; position: absolute; left: 6px; top: 9px; bottom: 9px; width: 3px; border-radius: var(--radius); background: var(--accent); }
.nav-link.on .ic, .nav-sub.on .ic { opacity: 1; color: var(--accent); }
.side-foot { display: flex; align-items: center; gap: 11px; padding: 14px 18px; border-top: 1px solid var(--ink-3); }
.side-foot strong { display: block; color: #fff; font-size: 14px; line-height: 1.25; }
.side-foot small { color: #8A8F99; }
.side-backdrop { display: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 28px; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top-search { flex: 1; min-width: 0; max-width: 520px; display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.top-search:focus-within { border-color: var(--text); }
.top-search input { flex: 1; border: 0; outline: 0; background: transparent; min-width: 0; }
.top-spacer { flex: 1; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 38px; min-width: 38px; padding: 0 9px; border: 0; border-radius: var(--radius); background: transparent; color: var(--muted); cursor: pointer; list-style: none; }
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { background: var(--gray-bg); color: var(--text); }
.i-sun { display: none; }
[data-theme="dark"] .i-sun { display: block; } [data-theme="dark"] .i-moon { display: none; }
.user-btn { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: var(--radius); cursor: pointer; list-style: none; border: 1px solid var(--line); background: var(--surface); }
.user-btn::-webkit-details-marker { display: none; }
.user-btn .ic { width: 14px; height: 14px; color: var(--muted); }
.user-name { font-weight: 600; font-size: 14px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font: 700 13px/1 var(--font-head); flex: none; letter-spacing: 0; }
.avatar.sm { width: 26px; height: 26px; font-size: 11px; } .avatar.lg { width: 56px; height: 56px; font-size: 19px; }
.drop { position: relative; }
.drop-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 190px; padding: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); z-index: 50; }
.drop-menu.right { left: auto; right: 0; }
.drop-menu a, .drop-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 11px; border: 0; border-radius: var(--radius); background: none; text-align: left; cursor: pointer; font-size: 14px; }
.drop-menu a:hover, .drop-menu button:hover, .drop-menu a.on { background: var(--gray-bg); }
.drop-menu form { margin: 0; }
.content { padding: 26px 28px 72px; width: 100%; max-width: 1520px; margin: 0 auto; }
.only-mobile { display: none; }
.imp-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 9px 28px; background: var(--accent); color: var(--accent-ink); font-weight: 600; font-size: 14px; }
.imp-bar form { margin: 0 0 0 auto; }

/* ------------------------------ Hlavička stránky ------------------------------ */
.page-head, .hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.sub { color: var(--muted); margin: 6px 0 0; max-width: 72ch; }
.crumb { display: inline-flex; align-items: center; gap: 4px; margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.crumb:hover { color: var(--text); } .crumb .ic { width: 14px; height: 14px; }
.ph-actions, .row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hero h1 { font-size: 32px; }

/* ------------------------------ Tlačidlá ------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 15px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-weight: 600; font-size: .8125rem; text-transform: uppercase; letter-spacing: .05em; cursor: pointer; white-space: nowrap; transition: background .12s, border-color .12s, color .12s, transform .05s; }
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-accent:hover, .btn-primary:hover { color: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn span:empty { display: none; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-primary { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--gray-bg); border-color: transparent; color: var(--text); }
.btn-danger { color: var(--red); border-color: var(--line-2); }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn-sm { height: 32px; padding: 0 10px; font-size: .75rem; border-radius: var(--radius); } .btn-sm .ic { width: 15px; height: 15px; }
.btn-block { width: 100%; height: 46px; font-size: 15px; }
form.inline { display: inline-flex; margin: 0; align-items: center; gap: 6px; }

/* ------------------------------ Karty a štatistiky ------------------------------ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 18px; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--line); }
.card-head h3 .ic { color: var(--accent); }
.card-body { padding: 20px; }
.narrow { max-width: 760px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 16px 18px 16px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line-2); }
a.stat:hover { border-color: var(--text); }
.stat-label { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.stat-value { font: 700 26px/1.15 var(--font-head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-hint { font-size: 13px; color: var(--muted); }
.tone-accent::before { background: var(--accent); } .tone-green::before { background: var(--green); } .tone-red::before { background: var(--red); }
.tone-amber::before { background: var(--amber); } .tone-blue::before { background: var(--blue); } .tone-violet::before { background: var(--violet); }
.grid-2 { columns: 2 430px; column-gap: 18px; }
.grid-2 > .card, .grid-2 > form.card { break-inside: avoid; margin-bottom: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 18px; align-items: start; }

/* ------------------------------ Odznaky ------------------------------ */
.badge { display: inline-flex; align-items: center; height: 23px; padding: 0 9px; border-radius: var(--radius); font-size: 12px; font-weight: 600; white-space: nowrap; }
.b-green { background: var(--green-bg); color: var(--green); } .b-blue { background: var(--blue-bg); color: var(--blue); }
.b-amber { background: var(--amber-bg); color: var(--amber); } .b-red { background: var(--red-bg); color: var(--red); }
.b-violet { background: var(--violet-bg); color: var(--violet); } .b-gray { background: var(--gray-bg); color: var(--gray); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: currentColor !important; }

/* ------------------------------ Panel nástrojov, záložky ------------------------------ */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: var(--radius); color: var(--muted); font-weight: 600; font-size: 14px; }
.tab b { font-size: 12px; padding: 1px 7px; border-radius: var(--radius); background: var(--gray-bg); color: var(--muted); }
.tab:hover { background: var(--gray-bg); color: var(--text); }
.tab.on { background: var(--text); color: var(--bg); } .tab.on b { background: var(--accent); color: var(--accent-ink); }
.search { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; min-width: min(100%, 280px); border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); background: var(--surface-2); }
.search:focus-within { border-color: var(--text); }
.search input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; }
.chips { display: flex; gap: 8px; padding: 10px 16px; border-bottom: 1px solid var(--line); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius); background: var(--accent-soft); font-size: 13px; font-weight: 600; }
.chip .ic { width: 13px; height: 13px; }
.week-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.week-nav strong { font: 600 15px var(--font-head); min-width: 120px; text-align: center; }
.notice { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--amber-bg); color: var(--amber); font-weight: 600; font-size: 14px; }
.card > .notice { margin: 14px 16px 0; }
.notice a { text-decoration: underline; }
.notice.ok { background: var(--green-bg); color: var(--green); }
.notice.soft { background: var(--gray-bg); color: var(--text); font-weight: 500; margin-top: 16px; }

/* ------------------------------ Tabuľky ------------------------------ */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { padding: 11px 16px; text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th.num { text-align: right; } .tbl th.c, .tbl td.c { text-align: center; }
.tbl th a:hover { color: var(--text); }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; white-space: nowrap; max-width: 360px; overflow: hidden; text-overflow: ellipsis; }
.matrix td, .items-tbl td { overflow: visible; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr[data-href] { cursor: pointer; }
.tbl tbody tr[data-href]:hover { background: var(--surface-2); }
.row-link { font-weight: 600; }
.row-link:hover { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.tbl .chk { width: 40px; }
.file-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.pager-nav { display: flex; align-items: center; gap: 10px; }
.totals { display: flex; justify-content: flex-end; gap: 26px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.totals b { color: var(--text); margin-left: 6px; font-variant-numeric: tabular-nums; }
.totals .grand b { font: 700 18px var(--font-head); }
.meta-line { color: var(--faint); font-size: 13px; margin: 4px 4px 0; white-space: pre-wrap; }

/* ------------------------------ Prázdny stav, hlásenia ------------------------------ */
.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 52px 20px; text-align: center; color: var(--muted); }
.empty h2, .empty h3 { color: var(--text); font-size: 17px; }
.empty p { max-width: 46ch; margin: 0 0 8px; }
.empty-ic { display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); margin-bottom: 6px; }
.empty-ic .ic { width: 24px; height: 24px; }
.empty-code { font: 800 72px/1 var(--font-head); color: var(--accent); letter-spacing: -.04em; }
.flash { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; }
.flash-ok { background: var(--green-bg); color: var(--green); } .flash-err { background: var(--red-bg); color: var(--red); }

/* ------------------------------ Detail ------------------------------ */
.dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px 24px; margin: 0; }
.dl dt, .longtext dt { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.dl dd, .longtext dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.dl dd a { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.longtext { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); }
.longtext dd { font-weight: 400; max-width: 90ch; }
.card-body > .longtext:first-child { margin-top: 0; padding-top: 0; border-top: 0; }

/* ------------------------------ Formuláre ------------------------------ */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid.one { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label, .brush label, .chat-new label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field label i { color: var(--red); font-style: normal; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=time], input[type=search], select, textarea {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface); outline: 0; transition: border-color .12s, box-shadow .12s; }
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input[type=search], .top-search input[type=search] { height: auto; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
input[type=file] { padding: 8px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); width: 100%; background: var(--surface-2); }
input.num { text-align: right; }
.hint { font-size: 13px; color: var(--muted); }
.err { font-size: 13px; color: var(--red); font-weight: 600; }
.has-err input, .has-err select, .has-err textarea { border-color: var(--red); }
.field-check { justify-content: flex-end; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600 !important; color: var(--text) !important; font-size: 14px !important; min-height: 42px; }
.check input { position: absolute; opacity: 0; }
.check span { width: 20px; height: 20px; border: 1.5px solid var(--line-2); border-radius: var(--radius); background: var(--surface); flex: none; display: inline-block; position: relative; }
.check input:checked + span { background: var(--accent); border-color: var(--accent); }
.check input:checked + span::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid var(--accent-ink); border-width: 0 2.2px 2.2px 0; transform: rotate(45deg); }
.check input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--text); }
.form-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); }
.inline-field { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; color: var(--muted); }
.inline-field input { width: auto; min-width: 160px; }
.section-h { margin: 26px 0 12px; font-size: 13px; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); font-family: var(--font); }
.card-body > .section-h:first-child { margin-top: 0; }
.profile-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.profile-head strong { display: block; font: 700 18px var(--font-head); }
.profile-head small { color: var(--muted); }
[hidden] { display: none !important; }

/* položky dokladov */
.items { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.items h3 { margin-bottom: 12px; }
.items .tbl-wrap { border: 1px solid var(--line); border-radius: var(--radius-sm); }
.items-tbl td { padding: 6px 8px; }
.items-tbl input, .items-tbl select { height: 38px; min-width: 70px; }
.items-tbl td:first-child { min-width: 260px; width: 42%; }
.items-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.items-foot .totals { border: 0; padding: 0; }

/* ------------------------------ Nástenka (kanban) ------------------------------ */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 14px; padding: 16px; overflow-x: auto; align-items: start; }
.board-col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); min-height: 140px; }
.board-col > header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; font-weight: 600; font-size: 13px; }
.board-col > header b { margin-left: auto; color: var(--muted); font-size: 12px; }
.board-cards { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 12px; min-height: 60px; }
.kcard { display: block; padding: 11px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(20,22,27,.05); cursor: grab; }
.kcard:hover { border-color: var(--text); }
.kcard strong { display: block; font-size: 14px; line-height: 1.35; }
.kcard-high { border-left: 3px solid var(--red); }
.kmeta { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 6px; color: var(--muted); font-size: 13px; }
.kcard.dragging { opacity: .45; }
.drop-over { outline: 2px dashed var(--accent); outline-offset: -3px; background: var(--accent-soft) !important; }

/* ------------------------------ Plán týždňa ------------------------------ */
.wp { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 1080px; }
.wp th, .wp td { border: 1px solid var(--line); vertical-align: top; }
.wp thead th { padding: 10px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); }
.wp thead th small { display: block; font-weight: 500; letter-spacing: 0; }
.wp thead th.today { color: var(--text); box-shadow: inset 0 -3px 0 var(--accent); }
.wp tbody th { width: 170px; padding: 10px 12px; text-align: left; background: var(--surface-2); }
.wp tbody th strong { display: block; font-size: 14px; } .wp tbody th small { color: var(--muted); font-weight: 400; }
.wp td { padding: 6px; height: 74px; } .wp td.weekend { background: var(--surface-2); } .wp td.today { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.wp .dnd-list { display: flex; flex-direction: column; gap: 6px; min-height: 60px; }
.wp .kcard { padding: 7px 9px; } .wp .kmeta { margin-top: 2px; font-size: 12px; }
.wp tr > :first-child { border-left: 0; } .wp tr > :last-child { border-right: 0; } .wp thead th { border-top: 0; } .wp tbody tr:last-child > * { border-bottom: 0; }

/* ------------------------------ Kalendár ------------------------------ */
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head span { padding: 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 112px; padding: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell b { font: 600 13px var(--font-head); color: var(--muted); }
.cal-cell.today b { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); }
.cal-cell.out, .cal-cell.weekend { background: var(--surface-2); }
.cal-ev { display: block; padding: 2px 7px; border-radius: var(--radius); font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border-radius: var(--radius); display: inline-block; font-style: normal; }

/* ------------------------------ Dochádzka ------------------------------ */
.brush { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.brush .field { min-width: 120px; } .brush .field input, .brush .field select { height: 40px; }
.brush-label { font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); align-self: center; }
.brush[data-brush] { align-items: center; gap: 8px; }
.pill input { position: absolute; opacity: 0; }
.pill span { display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: var(--radius); font-size: 13px; font-weight: 600; cursor: pointer; border: 2px solid transparent; }
.pill input:checked + span { border-color: var(--text); }
.pill input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent); }
.brush-hours { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--muted); }
.brush-hours input { width: 64px; height: 36px; }
.k-present { background: var(--green-bg); color: var(--green); } .k-absence { background: var(--red-bg); color: var(--red); }
.k-sick { background: var(--amber-bg); color: var(--amber); } .k-vacation { background: var(--violet-bg); color: var(--violet); }
.k-family_care { background: var(--blue-bg); color: var(--blue); } .k-comp_leave { background: var(--gray-bg); color: var(--gray); }
.k-erase { background: var(--surface); color: var(--muted); border: 1px solid var(--line-2) !important; }
.attg { border-collapse: separate; border-spacing: 0; width: 100%; font-variant-numeric: tabular-nums; }
.attg th, .attg td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; }
.attg thead th { padding: 7px 0; min-width: 34px; font-size: 13px; font-weight: 600; background: var(--surface-2); }
.attg thead th small { display: block; font-size: 10px; font-weight: 500; color: var(--muted); text-transform: uppercase; }
.attg thead th.today { box-shadow: inset 0 -3px 0 var(--accent); }
.attg .who { position: sticky; left: 0; z-index: 2; min-width: 190px; padding: 7px 14px; text-align: left; background: var(--surface); }
.attg thead .who { background: var(--surface-2); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.attg .who strong { display: block; font-size: 14px; white-space: nowrap; } .attg .who small { color: var(--muted); font-weight: 400; }
.attg td { height: 38px; font-size: 13px; font-weight: 600; }
.attg[data-att] td[data-w] { cursor: pointer; }
.attg[data-att] td[data-w]:hover { box-shadow: inset 0 0 0 2px var(--text); }
.attg td.weekend:not([class*="k-"]), .attg th.weekend { background: var(--gray-bg); }
.attg .sum { min-width: 64px; padding: 0 10px; font-weight: 700; background: var(--surface-2); text-align: right; }
.attg td.busy { opacity: .4; }
.att-legend { padding: 12px 16px; } .att-legend i { width: auto; min-width: 26px; height: 20px; padding: 0 5px; font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.daystrip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.daystrip a { padding: 12px 6px; text-align: center; border-right: 1px solid var(--line); }
.daystrip a:last-child { border-right: 0; } .daystrip a:hover { background: var(--surface-2); }
.daystrip small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.daystrip b { font: 700 16px var(--font-head); }
.daystrip a.on { background: var(--text); color: var(--bg); } .daystrip a.on small { color: var(--accent); }
.quick { display: flex; gap: 6px; flex-wrap: wrap; }
.qbtn { height: 36px; min-width: 44px; padding: 0 10px; border: 0; border-radius: var(--radius); font-weight: 700; font-size: 13px; cursor: pointer; }
.qbtn:hover { box-shadow: inset 0 0 0 2px var(--text); }
.coord-state { min-width: 96px; text-align: right; }

/* ------------------------------ Zoznamy osôb, mini zoznamy ------------------------------ */
.plist { display: flex; flex-direction: column; }
.prow { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.plist > .prow:last-child { border-bottom: 0; }
a.prow:hover { background: var(--surface-2); }
.prow strong { display: block; } .prow small { color: var(--muted); }
.prow .rate { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--muted); }
.pgroup h4 { display: flex; align-items: center; gap: 8px; padding: 12px 20px; font-size: 14px; background: var(--surface-2); border-bottom: 1px solid var(--line); border-top: 1px solid var(--line); }
.pgroup:first-of-type h4 { border-top: 0; }
.pgroup h4 b { margin-left: auto; color: var(--muted); }
.mini { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.mini:last-child { border-bottom: 0; } a.mini:hover { background: var(--surface-2); }
.mini strong { display: block; font-size: 14px; } .mini small { color: var(--muted); }
.mini > div { min-width: 0; } .mini > span { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.todo-list { display: flex; flex-direction: column; }
.todo { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); font-weight: 500; }
.todo:last-child { border-bottom: 0; } .todo:hover { background: var(--surface-2); }
.todo > span:nth-child(2) { flex: 1; } .todo > .ic:last-child { color: var(--faint); width: 15px; height: 15px; }
.todo-ic { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: var(--radius); flex: none; }
.t-amber .todo-ic { background: var(--amber-bg); color: var(--amber); } .t-red .todo-ic { background: var(--red-bg); color: var(--red); }
.t-blue .todo-ic { background: var(--blue-bg); color: var(--blue); } .t-green .todo-ic { background: var(--green-bg); color: var(--green); }
.ranks { display: flex; flex-direction: column; gap: 16px; }
.rank { display: flex; align-items: center; gap: 16px; } .rank > div { flex: 1; min-width: 0; } .rank strong { display: block; } .rank small { color: var(--muted); }
.rank > b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.rank-bar { display: block; height: 6px; margin-top: 7px; border-radius: var(--radius); background: var(--gray-bg); overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: var(--radius); background: var(--accent); }

/* ------------------------------ Grafy ------------------------------ */
.chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.chart-y { display: flex; flex-direction: column; justify-content: space-between; text-align: right; padding-bottom: 26px; margin-top: -8px; }
.chart-plot { display: flex; gap: 4px; background: linear-gradient(var(--line), var(--line)) 0 0 / 100% 1px no-repeat, repeating-linear-gradient(to bottom, var(--line) 0, var(--line) 1px, transparent 1px, transparent 25%) 0 0 / 100% calc(100% - 26px) no-repeat; }
.chart-col { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.chart-bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; border-bottom: 1px solid var(--line-2); }
.chart .bar { display: block; width: min(30px, 38%); border-radius: var(--radius); }
.chart .bar.s1 { background: var(--accent); } .chart .bar.s2 { background: var(--text); opacity: .85; }
.chart .bar:hover { filter: brightness(.9); }
.chart-x { height: 26px; line-height: 26px; white-space: nowrap; }
.card-body > .legend { margin-top: 10px; justify-content: center; }
.legend i.s1 { background: var(--accent); } .legend i.s2 { background: var(--text); }

/* ------------------------------ Dlaždice, moduly, matica ------------------------------ */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 18px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.tile:hover { border-color: var(--text); }
.tile-ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 8px; border-radius: var(--radius); background: var(--accent-soft); color: var(--accent); }
.tile strong { font: 600 15px var(--font-head); } .tile small { color: var(--muted); }
.tile-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; }
.mod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.mod { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; background: var(--surface-2); }
.mod.on { background: var(--surface); border-color: var(--line-2); }
.mod strong { display: block; } .mod small { color: var(--muted); display: block; line-height: 1.4; margin-top: 2px; }
.switch { position: relative; flex: none; }
.switch input { position: absolute; opacity: 0; }
.switch i { display: block; width: 42px; height: 24px; border-radius: 999px; background: var(--line-2); position: relative; transition: background .15s; }
.switch i::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--accent); } .switch input:checked + i::after { transform: translateX(18px); background: var(--accent-ink); }
.switch input:disabled + i { opacity: .55; }
.switch input:focus-visible + i { box-shadow: 0 0 0 3px var(--accent-soft), 0 0 0 4px var(--text); }
.matrix input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.matrix .group-row td { background: var(--surface-2); font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); padding: 8px 16px; }
.matrix td { padding: 9px 16px; }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin: 14px 0 20px; }
.pick input { position: absolute; opacity: 0; }
.pick span { display: flex; flex-direction: column; gap: 3px; padding: 16px; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.pick small { color: var(--muted); }
.pick input:checked + span { border-color: var(--text); background: var(--accent-soft); }
.pick input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent); }
.upload-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .upload-row input { flex: 1; min-width: 220px; }
.pair select { height: 32px; max-width: 250px; font-size: 13px; }
.seg { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: var(--radius); font-weight: 600; font-size: 14px; cursor: pointer; }
.seg input:checked + span { border-color: var(--text); background: var(--accent-soft); }

/* ------------------------------ Chat ------------------------------ */
.chat { display: grid; grid-template-columns: 290px minmax(0, 1fr); height: calc(100vh - 150px); min-height: 440px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.chat-side { display: flex; flex-direction: column; border-right: 1px solid var(--line); background: var(--surface-2); min-height: 0; }
.chat-side-head { padding: 16px 18px; font: 600 15px var(--font-head); border-bottom: 1px solid var(--line); }
.chat-list { flex: 1; overflow-y: auto; padding: 8px; }
.chat-group { display: block; padding: 10px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.chat-item { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius); font-weight: 500; }
.chat-item:hover { background: var(--gray-bg); } .chat-item.on { background: var(--text); color: var(--bg); }
.hash { width: 26px; text-align: center; font-weight: 700; color: var(--muted); } .chat-item.on .hash { color: var(--accent); }
.unread { min-width: 20px; padding: 1px 6px; border-radius: var(--radius); background: var(--accent); color: var(--accent-ink); font-size: 12px; text-align: center; }
.chat-new { padding: 10px; border-top: 1px solid var(--line); }
.chat-new summary { list-style: none; } .chat-new summary::-webkit-details-marker { display: none; }
.chat-new form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.chat-new label { display: flex; flex-direction: column; gap: 5px; }
.chat-main { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); font: 600 15px var(--font-head); }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: min(640px, 86%); }
.msg small { color: var(--muted); font-size: 12px; }
.msg p { margin: 3px 0 0; padding: 9px 13px; background: var(--gray-bg); border-radius: var(--radius); overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; text-align: right; }
.msg.mine p { background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); text-align: left; }
.chat-empty { margin: auto; }
.chat-form { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line); }
.chat-form textarea { height: 42px; min-height: 42px; max-height: 140px; resize: none; }
.chat-main > .empty { margin: auto; }

/* ------------------------------ Prihlásenie a inštalácia ------------------------------ */
.auth-body { background: var(--surface); }
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }
.auth-art { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 52px; background: var(--ink); color: #fff; overflow: hidden; }
.auth-art { background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 56px 56px; }
.auth-art .logo { height: 58px; position: relative; z-index: 2; }
.auth-art-mid { position: relative; z-index: 2; max-width: 560px; padding-left: 22px; border-left: 4px solid var(--accent); }
.auth-art h2 { font-size: clamp(28px, 3.2vw, 46px); line-height: 1.12; font-weight: 700; letter-spacing: -.02em; }
.auth-art p { margin-top: 18px; color: #B9BBC6; font-size: 17px; max-width: 44ch; }
.auth-art-foot { position: relative; z-index: 2; color: #8B8D99; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.auth-deco i { position: absolute; display: block; }
.auth-deco i:nth-child(1) { right: -90px; bottom: -90px; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.22); }
.auth-deco i:nth-child(2) { right: 60px; bottom: 60px; width: 210px; height: 210px; border: 1px solid rgba(255,255,255,.22); }
.auth-deco i:nth-child(3) { right: 0; bottom: 0; width: 60px; height: 60px; background: var(--accent); }
.auth-deco i:nth-child(4) { right: 0; top: 0; width: 6px; height: 38%; background: var(--accent); }
.auth-form { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 24px; position: relative; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box h1 { font-size: 30px; } .auth-box .sub { margin: 8px 0 24px; }
.auth-box .field { margin-bottom: 16px; } .auth-box input:not([type=checkbox]):not([type=radio]) { height: 46px; }
.auth-box .form-grid { margin-bottom: 6px; } .auth-box .form-grid .field { margin-bottom: 0; }
.auth-langs { position: absolute; top: 26px; right: 28px; display: flex; gap: 4px; }
.auth-langs a { padding: 6px 10px; border-radius: var(--radius); font-size: 13px; font-weight: 700; color: var(--muted); }
.auth-langs a:hover { background: var(--gray-bg); } .auth-langs a.on { background: var(--text); color: var(--bg); }
.auth-help { margin-top: 18px; color: var(--muted); font-size: 13px; text-align: center; }
.auth-note { position: absolute; bottom: 24px; display: inline-flex; align-items: center; gap: 7px; color: var(--faint); }
.auth-note .ic { width: 14px; height: 14px; }
.checks { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px 8px; }
.checks li { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: var(--radius); font-size: 12px; font-weight: 600; }
.checks .ic { width: 13px; height: 13px; } .checks .ok { background: var(--green-bg); color: var(--green); } .checks .bad { background: var(--red-bg); color: var(--red); }
.demo-check { margin: 14px 0 16px; align-items: flex-start; line-height: 1.4; }

/* ------------------------------ Tlačové doklady ------------------------------ */
.print-body { background: #E4E4E4; color: #111; }
.print-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 12px 24px; background: #000; }
.print-bar .btn { background: #1C1C1C; border-color: #3A3A3A; color: #fff; }
.print-bar .btn-accent { background: #FF4000; border-color: #FF4000; color: #fff; } .print-bar .btn-primary { background: #fff; color: #000; }
.print-langs { margin: 0 auto; display: flex; gap: 6px; }
.sheet { width: 210mm; min-height: 297mm; margin: 24px auto; padding: 18mm 17mm; background: #fff; box-shadow: 0 10px 40px -10px rgba(0,0,0,.3); display: flex; flex-direction: column; font-size: 13px; }
.sheet .logo { height: 46px; }
.p-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding-bottom: 14px; border-bottom: 3px solid #000; }
.p-title { text-align: right; } .p-title h1 { font-size: 22px; justify-content: flex-end; } .p-title span { color: #666; }
.p-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 22px 0; }
.p-party { display: flex; flex-direction: column; gap: 1px; } .p-party strong { font-size: 15px; margin-bottom: 3px; }
.p-party small, .p-meta small, .p-bank small { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #777; margin-bottom: 4px; display: block; }
.p-small { font-size: 11px; color: #666; }
.p-meta, .p-bank { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 12px 14px; background: #F2F2F2; border-radius: var(--radius); margin-bottom: 18px; }
.p-bank { margin-top: 18px; background: #fff; border: 1px solid #111; border-left: 5px solid #FF4000; }
.p-table { width: 100%; border-collapse: collapse; }
.p-table th { padding: 8px 8px; text-align: left; font-size: 10px; letter-spacing: .07em; text-transform: uppercase; color: #666; border-bottom: 1.5px solid #000; }
.p-table td { padding: 8px; border-bottom: 1px solid #E2E0D8; } .p-table th.num { text-align: right; }
.p-totals { margin: 14px 0 0 auto; width: 270px; }
.p-totals div { display: flex; justify-content: space-between; padding: 5px 8px; }
.p-totals .grand { margin-top: 6px; padding: 10px 8px; background: #000; color: #fff; border-radius: var(--radius); font-size: 16px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.p-note { margin-top: 16px; color: #444; } .p-body { margin-top: 22px; line-height: 1.65; font-size: 14px; }
.p-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 70px; text-align: center; color: #555; }
.p-sign span { display: block; border-top: 1px solid #000; margin-bottom: 6px; }
.p-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid #E2E0D8; color: #888; font-size: 11px; text-align: center; }

/* ------------------------------ Menšie obrazovky ------------------------------ */
@media (max-width: 1080px) { .split { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; }
  body.side-open .side { transform: none; }
  body.side-open .side-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 35; }
  .only-mobile { display: inline-flex; }
  .top, .content { padding-left: 16px; padding-right: 16px; } .imp-bar { padding: 9px 16px; }
  .user-name, .user-btn > .ic, .top-right .up { display: none; }
  .user-btn { padding: 3px; border: 0; background: none; } .top { gap: 8px; } .top-right { gap: 2px; }
  .daystrip a { padding: 9px 2px; } .daystrip b { font-size: 13px; } .daystrip small { font-size: 10px; letter-spacing: 0; }
  .prow { padding: 12px 14px; } .toolbar .search { min-width: 100%; }
  h1 { font-size: 23px; } .hero h1 { font-size: 25px; }
  .form-grid { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; } .auth-art { display: none; } .auth-form { min-height: 100vh; }
  .chat { grid-template-columns: 1fr; height: calc(100vh - 120px); }
  .chat:has(.chat-msgs) .chat-side { display: none; } .chat:not(:has(.chat-msgs)) .chat-main { display: none; }
  .cal-cell { min-height: 78px; padding: 4px; } .cal-ev { font-size: 11px; padding: 1px 4px; }
  .stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } .stat-value { font-size: 21px; }
  .quick { width: 100%; } .qbtn { flex: 1; height: 42px; }
  .coord-state { min-width: 0; }
}

/* ------------------------------ Tlač ------------------------------ */
@media print {
  .side, .top, .ph-actions, .print-bar, .brush, .toolbar form, .imp-bar, .flash, .pager-nav, .side-backdrop { display: none !important; }
  .app { display: block; } .content { padding: 0; max-width: none; }
  body { background: #fff; font-size: 11px; } .card, .stat { box-shadow: none; break-inside: avoid; }
  .print-body { background: #fff; } .sheet { margin: 0; box-shadow: none; width: auto; min-height: 0; padding: 0; }
  .attg .who { position: static; min-width: 120px; } .attg thead th { min-width: 0; } .tbl-wrap { overflow: visible; }
  @page { margin: 14mm; }
}

/* ------------------------------ Prihlásenie cez Google a odkaz, Realtime ------------------------------ */
.btn-google { background: var(--surface); border-color: var(--line-2); color: var(--text); text-transform: none; letter-spacing: 0; font-size: 15px; }
.btn-google:hover { border-color: var(--text); color: var(--text); }
.btn-google .ic { width: 20px; height: 20px; }
.auth-or { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-link { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; }
.auth-link summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; text-align: center; list-style: none; }
.auth-link summary::-webkit-details-marker { display: none; }
.auth-link summary:hover, .auth-link[open] summary { color: var(--accent); }
.auth-link .hint { display: block; margin: 12px 0; }
/* ---- Zvonček a upozornenia ---- */
.bell { position: relative; }
.bell-n { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: #fff; font: 700 10px/17px var(--font); text-align: center; }
.bell-menu { min-width: 320px; max-width: 92vw; padding: 0; }
.bell-menu .pad { padding: 16px; margin: 0; }
.notif { display: flex; flex-direction: column; gap: 3px; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--text); text-decoration: none; }
.notif:last-child { border-bottom: 0; }
.notif span { font-size: 14px; line-height: 1.35; }
.notif small { color: var(--muted); font-size: 12px; }
.notif.unread { background: var(--amber-bg); border-left: 3px solid var(--accent); }
.notif.unread span { font-weight: 600; }
.bell-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--line); font-size: 13px; }
.bell-foot .link { background: none; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; width: auto; font-size: 13px; }
.notif-list .notif { flex-direction: row; align-items: center; gap: 12px; padding: 14px 18px; }
.notif-list .notif > .ic { flex: none; color: var(--muted); }
.notif-list .notif span { flex: 1; text-align: left; }

/* ---- Prílohy a fotky ---- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; padding: 16px; }
.att { margin: 0; border: 1px solid var(--line); background: var(--surface); display: flex; flex-direction: column; }
.att img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.att-file { display: flex; align-items: center; gap: 8px; padding: 22px 12px; min-height: 96px; color: var(--text); font-weight: 600; font-size: 13px; word-break: break-all; }
.att figcaption { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; padding: 8px 10px; font-size: 13px; }
.att figcaption span { flex: 1 1 100%; }
.att figcaption small { color: var(--muted); font-size: 11px; flex: 1; }
.att figcaption form { margin: 0; }
.att-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); }
.att-form input[type=file] { flex: 1 1 220px; }
.att-form input[type=text] { flex: 1 1 160px; }
.btn.cam { cursor: pointer; }
@media (max-width: 720px) { .att-form input[type=file] { display: none; } .att-form .cam { flex: 1; } }

/* ---- Dvojfaktor ---- */
.code-input { font: 700 22px/1 var(--font-head); letter-spacing: .18em; text-align: center; max-width: 220px; }
.inline-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-row form { margin: 0; }
.steps { padding-left: 22px; line-height: 1.6; }
.steps li { margin-bottom: 12px; }
.secret { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.secret code, .codes code { display: inline-block; padding: 8px 12px; background: var(--gray-bg); border: 1px solid var(--line); font: 600 16px/1.2 ui-monospace, Consolas, monospace; letter-spacing: .08em; }
.codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }

/* ---- Projekty: priebeh etáp, Google Disk ---- */
.progress { position: relative; display: inline-block; width: 110px; height: 16px; background: var(--gray-bg); border: 1px solid var(--line); vertical-align: middle; overflow: hidden; }
.progress i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--accent); }
.progress b { position: relative; display: block; font: 700 10px/14px var(--font); text-align: center; color: var(--text); mix-blend-mode: difference; color: #fff; }
.tbl.stages tr.st-done td { color: var(--muted); }
.tbl.stages tr.st-done .row-link strong { text-decoration: line-through; text-decoration-color: var(--line); }
.tbl.stages tfoot td { border-top: 2px solid var(--line); background: var(--gray-bg); }
small.block { display: block; }
.gd-folders { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 16px 0; }
.gd-folder { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); background: var(--gray-bg); color: var(--text); font-weight: 600; font-size: 13px; text-decoration: none; }
.gd-folder:hover { border-color: var(--text); }
.drive-embed iframe { display: block; width: 100%; height: 420px; border: 0; border-top: 1px solid var(--line); background: #fff; }

/* ---- AI asistent ---- */
.ai-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.ai-wrap > * { min-width: 0; }
.ai-recent-item { min-width: 0; overflow: hidden; }
.ai-main { display: flex; flex-direction: column; min-height: 62vh; }
.ai-msgs { flex: 1; overflow-y: auto; max-height: 62vh; padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.ai-msg { display: flex; gap: 10px; max-width: 100%; }
.ai-msg.user { justify-content: flex-end; }
.ai-msg.user > div { background: var(--ink); color: #fff; padding: 10px 14px; max-width: 80%; }
.ai-msg.bot > .ai-text { background: var(--gray-bg); padding: 12px 16px; max-width: 92%; min-width: 0; overflow-wrap: anywhere; border-left: 3px solid var(--accent); }
.ai-msg.wait > .ai-text { color: var(--muted); font-style: italic; }
.ai-msg.err > .ai-text { background: var(--red-bg); color: var(--red); border-left-color: var(--red); font-style: normal; }
.ai-text p { margin: 0 0 8px; } .ai-text p:last-child { margin-bottom: 0; }
.ai-text ul, .ai-text ol { margin: 0 0 8px; padding-left: 20px; }
.ai-text a { color: var(--accent); font-weight: 600; }
.ai-text code { padding: 1px 5px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.ai-text .tbl-wrap { margin: 6px 0 10px; background: var(--surface); }
.ai-av { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; background: var(--accent); color: #fff; }
.ai-av.lg { width: 56px; height: 56px; } .ai-av.lg .ic { width: 28px; height: 28px; }
.ai-hello { margin: auto; text-align: center; max-width: 560px; padding: 20px 0; }
.ai-hello h2 { margin: 14px 0 6px; }
.ai-hello p { color: var(--muted); }
.ai-chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.ai-chip { padding: 8px 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; text-align: left; }
.ai-chip:hover { border-color: var(--accent); color: var(--accent); }
.ai-form { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }
.ai-form textarea { flex: 1; min-height: 44px; max-height: 160px; resize: vertical; }
.ai-form.busy { opacity: .6; pointer-events: none; }
.ai-note { padding: 0 16px 12px; margin: 0; }
.ai-recent { padding: 12px; display: grid; gap: 6px; }
.ai-recent-item { display: flex; align-items: center; gap: 4px; border: 1px solid var(--line); }
.ai-recent-item.on { border-color: var(--accent); }
.ai-recent-item a { flex: 1; min-width: 0; padding: 8px 10px; color: var(--text); text-decoration: none; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-recent-item small { display: block; color: var(--muted); font-size: 11px; }
.ai-recent-item form { margin: 0; }
.ai-fab { position: fixed; right: 20px; bottom: 20px; z-index: 55; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; background: var(--accent); color: #fff; font: 700 13px/1 var(--font-head); text-transform: uppercase; letter-spacing: .04em; text-decoration: none; box-shadow: 0 10px 28px -10px rgba(0,0,0,.55); }
.ai-fab:hover { background: var(--accent-hover); color: #fff; }
.ai-fab ~ .live-toast { bottom: 78px; } /* hlásenie o zmene neprekryje tlačidlo asistenta */
.ai-promo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); }
.ai-promo strong { display: block; font-family: var(--font-head); }
.ai-promo small { color: var(--muted); }
.ai-promo input { flex: 1 1 260px; min-width: 0; }
@media (max-width: 1100px) { .ai-wrap { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) { .ai-fab span { display: none; } .ai-fab { padding: 14px; right: 14px; bottom: 14px; } .ai-msg.user > div, .ai-msg.bot > .ai-text { max-width: 100%; } }
@media print { .ai-fab { display: none; } }

/* ---- Vozový park: náklady podľa druhu ---- */
.cost-bars { display: grid; gap: 8px; }
.cost-bar { display: grid; grid-template-columns: minmax(110px, 180px) 1fr minmax(90px, auto); align-items: center; gap: 12px; font-size: 14px; }
.cost-bar i { display: block; height: 14px; background: var(--gray-bg); }
.cost-bar b { display: block; height: 100%; background: var(--accent); }
.cost-bar strong { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Správa prístupov ---- */
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line-2); vertical-align: middle; }
.dot.full { background: var(--green); border-color: var(--green); }
.dot.part { background: linear-gradient(90deg, var(--amber) 50%, transparent 50%); border-color: var(--amber); }
.tbl.access td.c small { display: block; color: var(--muted); font-size: 11px; }
.tbl.access tr.dim td { opacity: .55; }
.matrix tr.group-row td { background: var(--gray-bg); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .05em; }

/* ---- Úlohy: poznámky, fázy prípadu ---- */
.timeline { padding: 0 16px 8px; }
.tl-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.tl-item small { color: var(--muted); font-size: 12px; }
.tl-item p { margin: 2px 0 0; }
.att-form textarea { flex: 1 1 100%; min-height: 54px; }
.num-sm { width: 76px; }
.form-foot.wrap { flex-wrap: wrap; row-gap: 10px; }
.steps-bar { display: flex; flex-wrap: wrap; }
.steps-bar span { flex: 1 1 110px; padding: 10px 12px; text-align: center; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 3px solid var(--line); }
.steps-bar span.past { color: var(--text); border-bottom-color: var(--green); }
.steps-bar span.now { color: var(--accent); border-bottom-color: var(--accent); background: var(--accent-soft); }

/* ---- Stavba: príchod/odchod, podpis, fotky v chate ---- */
.checkin-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.btn-lg { min-height: 64px; font-size: 15px; flex-direction: column; gap: 2px; justify-content: center; }
.btn-lg small { font: 700 13px/1 var(--font-head); opacity: .85; min-height: 13px; }
.sign-pad { position: relative; border: 1px dashed var(--line-2); background: #fff; touch-action: none; }
.sign-pad canvas { display: block; width: 100%; height: 180px; cursor: crosshair; touch-action: none; }
.sign-pad .btn { position: absolute; top: 6px; right: 6px; }
.sign-pad.signed { border-style: solid; border-color: var(--green); }
.sign-view img { max-width: 320px; width: 100%; background: #fff; border: 1px solid var(--line); }
.p-sig { display: block; max-height: 70px; margin: 0 auto -6px; }
.p-sign small { display: block; font-size: 10px; color: #555; }
.msg-img { display: block; margin-top: 4px; }
.msg-img img { display: block; max-width: min(320px, 70vw); max-height: 260px; border: 1px solid var(--line); }
.chat-form .cam { flex: none; align-self: stretch; display: inline-flex; align-items: center; }
.chat-form.busy { opacity: .6; pointer-events: none; }
.members { min-width: 280px; padding: 6px; }
.member { display: flex; align-items: center; gap: 8px; padding: 6px 8px; }
.member small { display: block; color: var(--muted); font-size: 11px; }
.member form { margin: 0; }
.member-add { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
.member-add select { flex: 1; min-width: 0; }

/* ---- PWA: stav siete a čakajúce zápisy ---- */
.net-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; padding: 10px 16px; text-align: center; font-weight: 600; font-size: 14px; color: #fff; background: var(--ink); border-top: 3px solid var(--accent); }
.net-bar.warn { background: #7a3300; }
.net-bar.ok { background: var(--green); }
.k-queued { background: var(--gray-bg); color: var(--muted); font-style: italic; }
.notice.err { background: var(--red-bg); color: var(--red); }

.live-toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; background: var(--ink); color: #fff; border-left: 4px solid var(--accent); box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); font-weight: 600; font-size: 14px; }
textarea.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; white-space: pre; }
input[readonly], textarea[readonly] { background: var(--surface-2); }
.show-pass { min-height: 0; margin: -4px 0 16px; font-size: 13px !important; font-weight: 500 !important; color: var(--muted) !important; }
.show-pass span { width: 18px; height: 18px; }
.show-pass input:checked + span::after { left: 5px; top: 1px; }
@media (max-width: 900px) { .auth-form { justify-content: flex-start; padding-top: 76px; } .auth-note { position: static; margin-top: 26px; } .auth-box h1 { font-size: 26px; } }

/* ---- v1.5: réžia, ekonomika vozidiel, AI agenti ---- */
.tbl tr.row-on td { background: var(--gray-bg); font-weight: 600; }
.tbl tfoot th { border-top: 2px solid var(--line); background: var(--gray-bg); text-align: left; padding: 12px 16px; }
.tbl tfoot th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cost-bar strong small { font-weight: 500; margin-left: 6px; }
.chips { flex-wrap: wrap; }
a.chip.on { background: var(--text); color: var(--bg); }
.agent-item { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.agent-item:last-child { border-bottom: 0; }
.agent-item > header { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.agent-item > header .ic { width: 14px; height: 14px; vertical-align: -2px; }
.agent-summary { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.agent-last { margin-bottom: 12px; font-size: 14px; }
.agent-last summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.agent-thread { display: flex; flex-direction: column; gap: 12px; }
.agent-bubble { max-width: 86%; padding: 12px 16px; background: var(--gray-bg); border-left: 3px solid var(--line); font-size: 14px; overflow-wrap: anywhere; }
.agent-bubble.out { align-self: flex-end; border-left: 0; border-right: 3px solid var(--accent); }
.agent-bubble small { display: block; margin-bottom: 4px; color: var(--muted); font-weight: 600; font-size: 12px; }
.agent-last .agent-bubble { margin-top: 8px; max-width: 100%; }
.agent-draft { border: 1px solid var(--line); padding: 14px 16px; background: var(--surface-2); }
.agent-draft + .agent-draft { margin-top: 14px; }
.agent-draft-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.agent-draft-head .ic { width: 16px; height: 16px; }
.agent-draft .field { margin-bottom: 10px; }
.agent-draft textarea { width: 100%; font: inherit; line-height: 1.5; }
.agent-draft .form-foot { padding: 0; border: 0; background: none; }
.agent-draft .notice { margin: 0 0 10px; }
.agent-cell { max-width: 380px; color: var(--muted); font-size: 13px; }
form.busy button[type="submit"], button.busy { opacity: .6; pointer-events: none; }
@media print { .agent-draft, [data-agent-run] { display: none; } }
/* ---- v1.6: registre, databáza firiem, doklady v prílohe ---- */
.reg-bar { margin: 0 0 18px; }
.reg-bar .grow { flex: 1; min-width: 180px; }
input.filled, textarea.filled { box-shadow: inset 3px 0 0 var(--green); }
.ev-form { display: grid; grid-template-columns: minmax(120px, 170px) 1fr auto; gap: 10px; align-items: start; border-bottom: 1px solid var(--line); }
.ev-form textarea { width: 100%; font: inherit; }
.ev-body { margin-top: 4px; font-size: 14px; overflow-wrap: anywhere; }
.doc-checks { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin: 0 0 12px; font-size: 14px; }
.doc-checks > small { flex-basis: 100%; color: var(--muted); font-weight: 600; }
.doc-checks > small .ic { width: 14px; height: 14px; vertical-align: -2px; }
.doc-checks em { font-style: normal; font-size: 12px; }
@media (max-width: 640px) { .ev-form { grid-template-columns: 1fr; } }
/* ciele: farba priebehu podľa tempa */
.progress i.tone-green { background: var(--green); } .progress i.tone-amber { background: var(--amber); } .progress i.tone-accent { background: var(--accent); }

/* ------------------------------ Odmeny (provízny systém): karty s pohybom ------------------------------ */
.rw-dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; margin-bottom: 18px; }
.rw-link { display: block; color: inherit; }
.rw-link .rw-card { margin-bottom: 0; height: 100%; transition: transform .25s cubic-bezier(.22, 1, .36, 1), border-color .2s; }
.rw-link:hover .rw-card { transform: translateY(-2px); border-color: var(--accent); }
.rw-card { position: relative; overflow: hidden; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); animation: rw-in .6s cubic-bezier(.22, 1, .36, 1) both; }
.rw-card::before { content: ""; position: absolute; left: 0; top: 0; width: 100%; height: 4px; background: linear-gradient(90deg, var(--accent), var(--amber), var(--accent)); background-size: 200% 100%; animation: rw-flow 6s linear infinite; }
.rw-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 22px 22px 10px; }
.rw-kicker { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.rw-kicker .ic { width: 15px; height: 15px; color: var(--accent); }
.rw-amount { display: block; margin-top: 6px; font: 800 40px/1.05 var(--font-head); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.rw-sub { display: block; margin-top: 6px; color: var(--muted); font-size: 14px; }
.rw-ring { position: relative; width: 120px; height: 120px; flex: none; }
.rw-ring svg { display: block; transform: rotate(-90deg); }
.rw-ring-bg { fill: none; stroke: var(--gray-bg); stroke-width: 10; }
.rw-ring-fg { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.4s cubic-bezier(.22, 1, .36, 1); }
.rw-ring-txt { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; font: 700 22px/1 var(--font-head); font-variant-numeric: tabular-nums; }
.rw-ring-txt small { margin-top: 4px; font: 600 10px/1.2 var(--font); letter-spacing: .05em; text-transform: uppercase; color: var(--muted); max-width: 84px; }
.rw-meter { padding: 6px 22px 20px; }
.rw-meter-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.rw-meter-top b { font: 700 16px/1 var(--font-head); color: var(--text); font-variant-numeric: tabular-nums; }
.rw-meter-top small { color: var(--muted); font-weight: 500; }
.rw-bar { position: relative; display: block; width: 100%; height: 12px; background: var(--gray-bg); border-radius: 999px; overflow: hidden; }
.rw-bar i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: var(--accent); transition: width 1.3s cubic-bezier(.22, 1, .36, 1); }
.rw-bar i.tone-green { background: var(--green); }
.rw-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent); transform: translateX(-100%); animation: rw-shine 2.6s ease-in-out 1.2s infinite; }
.rw-meter-foot { margin-top: 8px; font-size: 13px; color: var(--muted); }
.tbl.rw-ladder .rw-bar { display: inline-block; width: 120px; height: 10px; vertical-align: middle; }
.rw-lv { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px; background: var(--gray-bg); font: 700 13px/1 var(--font-head); }
.rw-ok .rw-lv { background: var(--green-bg); color: var(--green); }
.rw-part .rw-lv { background: var(--amber-bg); color: var(--amber); }
.tbl tr.rw-ok td { background: color-mix(in srgb, var(--green-bg) 35%, transparent); }
.ic-ok { color: var(--green); width: 15px; height: 15px; vertical-align: middle; }
.rw-card .rw-rule { margin: 0; padding: 12px 22px 18px; color: var(--muted); font-size: 13px; }
.rw-grps { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border-top: 1px solid var(--line); }
.rw-grp { display: flex; flex-direction: column; gap: 2px; padding: 14px 22px; border-right: 1px solid var(--line); }
.rw-grp:last-child { border-right: 0; }
.rw-grp small { display: block; font-size: 12px; }
.rw-grp b { font: 700 18px/1.2 var(--font-head); font-variant-numeric: tabular-nums; }
.rw-grp-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.rw-grp-sum strong { display: block; font: 700 20px/1.2 var(--font-head); font-variant-numeric: tabular-nums; }
.rw-grp-sum span { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.rw-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.rw-nav { gap: 10px; } .rw-nav strong { font-family: var(--font-head); font-size: 18px; }
.rw-nav input[type="month"] { height: 36px; }
.rw-rates input { max-width: 120px; } .num-md { width: 120px; }
.rw-new td { background: var(--surface-2); }
/* vyskakovacie okno (natívny <dialog>): pridelenie investičných projektov */
dialog.dlg { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; }
dialog.dlg::backdrop { background: rgba(0, 0, 0, .5); backdrop-filter: blur(2px); }
.dlg-box { width: min(760px, 94vw); max-height: 88vh; overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); animation: rw-in .25s cubic-bezier(.22, 1, .36, 1) both; }
.dlg-box .card-head { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.dlg-box .form-foot { position: sticky; bottom: 0; background: var(--surface); }
.dlg-quick { margin-top: 10px; }
.tbl.matrix input[type="radio"] { width: 18px; height: 18px; accent-color: var(--accent); }
/* hodiny živnostníkov po týždňoch: farba bunky = stav faktúry */
:root { --ch-green: #16A34A; --ch-amber: #F5B400; --ch-red: #DC2626; }
.tbl.ch th small { display: block; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--faint); }
.tbl.ch th.ch-gh { border-bottom: 1px solid var(--line-2); }
.tbl.ch .ch-gs { border-left: 3px solid var(--line-2); }
.tbl.ch td.ch { font-variant-numeric: tabular-nums; padding: 8px 10px; }
.tbl.ch td.ch a { display: block; color: inherit; }
.tbl.ch td.ch-empty { color: var(--faint); }
.ch-paid { background: var(--ch-green); color: #fff; font-weight: 700; }
.ch-due { background: var(--ch-amber); color: #1A1A1A; font-weight: 700; }
.ch-over { background: var(--ch-red); color: #fff; font-weight: 800; }
.ch-none { color: var(--text); background: var(--gray-bg); }
.ch-t-paid { color: var(--ch-green); font-weight: 700; } .ch-t-over { color: var(--ch-red); font-weight: 700; }
.ch-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); }
.ch-legend i { display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; border: 1px solid rgba(0, 0, 0, .15); }
.rw-nav input[type="week"] { height: 36px; }
@keyframes rw-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes rw-flow { to { background-position: -200% 0; } }
@keyframes rw-shine { 0% { transform: translateX(-100%); } 60%, 100% { transform: translateX(100%); } }
@media (max-width: 640px) { .rw-head { flex-direction: column; align-items: flex-start; } .rw-ring { align-self: center; } .rw-amount { font-size: 34px; } .rw-grp-sum { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .rw-card, .rw-card::before, .rw-bar i::after { animation: none; } .rw-bar i, .rw-ring-fg, .rw-link .rw-card { transition: none; } }
