@font-face { font-family: 'Inter'; font-weight: 400 700; font-display: swap; src: url(inter-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-weight: 400 700; font-display: swap; src: url(inter-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: 'Plus Jakarta Sans'; font-weight: 500 800; font-display: swap; src: url(plus-jakarta-sans-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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Plus Jakarta Sans'; font-weight: 500 800; font-display: swap; src: url(plus-jakarta-sans-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; }

/* Vzhled vychází z prezentačního webu beelectronic.net. Barvy jsou dvojice světlý, tmavý režim (light-dark), režim určuje color-scheme. */
:root {
	color-scheme: light dark;
	--fg: light-dark(#111712, #eef3ea);
	--muted: light-dark(#59615b, #9aa59c);
	--accent: light-dark(#3f6b0e, #a3e635);
	--accent-fill: light-dark(#4a7d10, #a3e635);
	--brand: light-dark(#4a7d10, #a3e635);
	--danger: light-dark(#b4233a, #fb7185);
	--warn: light-dark(#8a5a00, #f0b84a);
	--bg: light-dark(#fff, #0d120e);
	--surface: light-dark(#fff, #161c17);
	--line: light-dark(#e3e6df, #29322a);
	--field: light-dark(#f4f5f1, #1c241d);
	--control-line: light-dark(#858f87, #667268);
	--hover: light-dark(#eef5e3, #1f2b17);
	--row-hover: light-dark(#f9faf6, #1a221b);
	--btn: light-dark(#4a7d10, #a3e635);
	--btn-hover: light-dark(#2c4d09, #c5f06a);
	--on-btn: light-dark(#fff, #111712);
	--btn-shadow: light-dark(rgba(74, 125, 16, 0.2), rgba(163, 230, 53, 0.14));
	--mark: light-dark(#c5f06a, rgba(163, 230, 53, 0.4));
	--mark-hover: light-dark(#c5f06a, rgba(163, 230, 53, 0.28));
	--bar: light-dark(rgba(255, 255, 255, 0.92), rgba(13, 18, 14, 0.9));
	--thead: light-dark(rgba(244, 245, 241, 0.94), rgba(28, 36, 29, 0.94));
	--shadow: light-dark(rgba(17, 23, 18, 0.06), rgba(0, 0, 0, 0.35));
	--shadow-strong: light-dark(rgba(17, 23, 18, 0.14), rgba(0, 0, 0, 0.5));
	--warn-bg: light-dark(#fbf3e2, #261f0e);
	--warn-line: light-dark(#ecd9a8, #4a3b15);
	--danger-bg: light-dark(#fcebee, #2a1418);
	--danger-line: light-dark(#f1c2cb, #572630);
	--ok-bg: var(--hover);
	--sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	--head: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
	--mono: ui-monospace, 'SF Mono', Menlo, monospace;
	--bar-h: 3.9rem;
}
:root[data-theme=light] { color-scheme: light; }
:root[data-theme=dark] { color-scheme: dark; }

* { box-sizing: border-box; }
body { margin: 0; display: flow-root; min-height: 100vh; font: 400 15px/1.6 var(--sans); color: var(--fg); background: var(--bg); -webkit-font-smoothing: antialiased; }
main { max-width: 72rem; margin: 0 auto; padding: 1rem; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--head); font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: 2rem; letter-spacing: -0.035em; line-height: 1.1; margin: 1rem 0 1.4rem; }
h1 small { color: var(--muted); font-weight: 500; font-size: 0.9rem; letter-spacing: 0; font-family: var(--sans); }
h2 { font-size: 1.1rem; margin: 1.5rem 0 0.5rem; }

header, .card, .stats div, .login, .flash, .toast { background: var(--surface); border: 1.5px solid var(--line); box-shadow: 0 12px 30px var(--shadow); }

header { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 0.9rem; margin: 0; padding: 0.7rem max(1.5rem, calc((100% - 72rem) / 2 + 1rem)); border-width: 0 0 1.5px; border-radius: 0; box-shadow: none; background: var(--bar); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
header nav { flex: 1; display: flex; flex-wrap: wrap; gap: 0.15rem; }
header form { margin: 0; }
.brand { display: inline-flex; align-items: center; margin: 0 0.4rem 0 0; text-decoration: none; }
.logo { display: block; height: 2.1rem; width: auto; }
.logo .g { fill: var(--brand); }
.logo .t { fill: var(--fg); }
.zasuvka { display: none; height: 2.3rem; width: auto; }
.zasuvka-telo { fill: var(--brand); }
nav a { padding: 0.35rem 0.75rem; border-radius: 999px; color: var(--fg); font-weight: 500; text-decoration: none; white-space: nowrap; }
nav a:hover { color: var(--accent); background: var(--hover); }
nav a.current { color: var(--accent); background: var(--hover); font-weight: 700; }

.theme { display: inline-flex; gap: 2px; padding: 3px; margin-right: 0.4rem; border-radius: 999px; background: var(--field); }
.theme button { display: grid; place-items: center; width: 2rem; height: 1.8rem; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-weight: normal; box-shadow: none; }
.theme button:hover { color: var(--fg); background: transparent; box-shadow: none; transform: none; }
.theme button[aria-pressed=true] { color: var(--accent); background: var(--surface); box-shadow: 0 2px 6px var(--shadow-strong); }
.theme svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.card { margin-bottom: 1rem; padding: 1.4rem 1.6rem; border-radius: 20px; }
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card > h2:first-child { font-size: 1.05rem; letter-spacing: -0.015em; color: var(--fg); }
.card.flush { padding: 0; overflow: clip; }
.card.flush th:first-child, .card.flush td:first-child { padding-left: 1.6rem; }
.card.flush th:last-child, .card.flush td:last-child { padding-right: 1.6rem; }
.card.flush tr:last-child td { border-bottom: 0; }
.card.flush > h2:first-child { padding: 1rem 1.6rem 0.3rem; margin: 0; }
.card .inline, .card .filter { margin-bottom: 0; }
.card form + table, .card .inline + table { margin-top: 0.8rem; }
.card.narrow { max-width: 40rem; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 1rem 0 1.4rem; }
.page-head h1 { margin: 0; }
.page-head .back { width: 100%; font-size: 0.9rem; text-decoration: none; }
.page-head .back:hover { text-decoration: underline; }
.page-head .actions { margin-left: auto; display: flex; gap: 0.5rem; }

table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 0.5rem 0.7rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.02em; color: var(--muted); }
tbody tr:hover { background: var(--row-hover); }
th a { color: inherit; text-decoration: none; }
th a:hover { color: var(--fg); }
th a::after { content: '↕'; margin-left: 0.35em; opacity: 0; transition: opacity 0.15s; }
th a:hover::after { opacity: 0.5; }
th a.asc::after { content: '↑'; opacity: 1; color: var(--accent); }
th a.desc::after { content: '↓'; opacity: 1; color: var(--accent); }
.card.flush thead th { position: sticky; top: var(--bar-h); z-index: 2; background: var(--thead); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
td a { color: var(--fg); text-decoration: none; background: linear-gradient(var(--mark), var(--mark)) no-repeat 0 92% / 100% 3px; transition: background-size 0.25s; }
td a:hover { color: var(--fg); background-image: linear-gradient(var(--mark-hover), var(--mark-hover)); background-size: 100% 100%; }
td.num, th.num, .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.nw { white-space: nowrap; }
.muted td { color: var(--muted); }
tbody tr { transition: background-color 0.15s; }

input, select, button, textarea { font: inherit; color: inherit; }
input, select, button { height: 2.3rem; line-height: 1.2; padding: 0 0.8rem; }
input:not([type=checkbox], [type=radio], [type=submit], [type=file]), select, textarea { border: 1.5px solid var(--control-line); border-radius: 12px; background: var(--field); }
textarea { padding: 0.5rem 0.8rem; min-height: 6rem; width: 100%; }
input[type=file] { height: auto; padding: 0.35rem 0.6rem; color: var(--muted); }
input[type=checkbox], input[type=radio] { height: auto; accent-color: var(--accent-fill); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
:root :is(input, select, textarea):focus { outline: none; border-color: var(--accent-fill); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent-fill) 22%, transparent); }
input, select, textarea { transition: border-color 0.15s, box-shadow 0.15s; }

button, input[type=submit], .btn { cursor: pointer; border: 0; border-radius: 999px; padding: 0 1.3rem; background: var(--btn); color: var(--on-btn); font-weight: 700; box-shadow: 0 10px 24px var(--btn-shadow); transition: background-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s; }
button:hover, input[type=submit]:hover { background: var(--btn-hover); transform: translateY(-2px); }
.btn { display: inline-flex; align-items: center; height: 2.3rem; text-decoration: none; background: transparent; color: var(--fg); border: 1.5px solid var(--fg); box-shadow: none; }
.btn:hover { background: var(--fg); color: var(--bg); transform: translateY(-2px); }
header form input[type=submit] { background: transparent; color: var(--fg); border: 1.5px solid var(--fg); box-shadow: none; }
header form input[type=submit]:hover { background: var(--fg); color: var(--bg); }
input[type=submit].secondary { background: transparent; color: var(--fg); border: 1.5px solid var(--control-line); box-shadow: none; }
input[type=submit].secondary:hover { background: var(--field); color: var(--fg); border-color: var(--fg); }
input[type=submit].destructive { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); box-shadow: none; }
input[type=submit].destructive:hover { background: var(--danger); color: var(--bg); }
input[type=file]::file-selector-button { margin-right: 0.8rem; padding: 0.45rem 1rem; border: 0; border-radius: 999px; background: var(--btn); color: var(--on-btn); font: inherit; font-weight: 700; cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--btn-hover); }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr)); gap: 1.2rem; margin: 0; }
.stats div { position: relative; padding: 1.2rem 1.4rem; border-radius: 20px; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; }
.stats div:hover { transform: translateY(-2px); box-shadow: 0 2px 4px var(--shadow), 0 30px 70px var(--shadow-strong); }
.stats dt { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.stats dt a { color: inherit; text-decoration: none; }
.stats dt a::after { content: ''; position: absolute; inset: 0; border-radius: inherit; }
.stats dd { margin: 0; font-family: var(--head); font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1.15; }
.stats .attn.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.stats .attn.warn dd { color: var(--warn); }
.stats .attn.danger { background: var(--danger-bg); border-color: var(--danger-line); }
.stats .attn.danger dd { color: var(--danger); }
.stats div:has(a:focus-visible) { outline: 3px solid var(--accent-fill); outline-offset: 3px; }
.todo { display: grid; grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); gap: 1rem; align-items: start; }
.todo .card { margin-bottom: 0; }

.badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.1rem 0.7rem; border-radius: 999px; background: var(--hover); color: var(--accent); font-size: 0.78rem; font-weight: 700; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.work, .badge.partial, .badge.issued, .badge.overpaid { background: var(--warn-bg); color: var(--warn); }
.badge.new, .badge.canceled, .badge.unmatched { background: var(--danger-bg); color: var(--danger); }

.flash, .toast { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1rem; padding: 0.75rem 1.1rem; border-radius: 16px; color: var(--fg); }
.flash::before, .toast::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.flash.success, .flash.ok, .flash.info, .toast.success, .toast.info { background: var(--hover); border-color: color-mix(in srgb, var(--accent-fill) 35%, var(--line)); }
.flash.success::before, .flash.ok::before, .flash.info::before, .toast.success::before, .toast.info::before { background: var(--accent-fill); }
.flash.warning, .toast.warning { background: var(--warn-bg); border-color: var(--warn-line); }
.flash.warning::before, .toast.warning::before { background: var(--warn); }
.flash.error, p.flash.error, .toast.error { background: var(--danger-bg); border-color: var(--danger-line); color: var(--fg); }
.flash.error::before, .toast.error::before { background: var(--danger); }
.error { color: var(--danger); margin: 0.3rem 0; }
div.error { font-size: 0.85rem; padding: 0.3rem 0.8rem; border-radius: 10px; background: var(--danger-bg); }
.danger { color: var(--danger); }
.pager { color: var(--muted); }

.login { max-width: 22rem; margin: 4rem auto; padding: 1.8rem; display: grid; gap: 0.8rem; border-radius: 20px; }
.login .logo { height: 3rem; margin: 0 auto 0.5rem; }
.login label { display: grid; gap: 0.3rem; color: var(--muted); font-size: 0.85rem; }

.filter { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
.inline { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 0.8rem; }
.grid { display: grid; align-items: start; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 0.8rem 1.2rem; }
.grid > div { display: grid; gap: 0.2rem; }
.grid label { color: var(--muted); font-size: 0.85rem; }
.grid input[type=submit] { justify-self: start; }
.stack { display: grid; gap: 1rem; max-width: 40rem; margin-top: 1rem; }
.card.stack { margin-top: 0; }
.stack > div { display: grid; gap: 0.3rem; }
.stack label { color: var(--muted); font-size: 0.85rem; }
.stack label:has(input[type=checkbox]) { display: flex; align-items: center; gap: 0.6rem; color: var(--fg); font-size: 1rem; }
.stack textarea { min-height: 8rem; }
.stack input[type=submit] { justify-self: start; margin-top: 0.3rem; }

.copy { display: inline-grid; place-items: center; vertical-align: middle; width: 1.5rem; height: 1.5rem; margin-left: 0.3rem; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--muted); box-shadow: none; font-weight: normal; }
.copy:hover { color: var(--accent); background: var(--hover); transform: none; }
.copy.copied { color: var(--accent); }
.copy svg { width: 0.95rem; height: 0.95rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.key { font-family: var(--mono); color: var(--muted); }
.facts { display: grid; gap: 0; }
.facts div { display: grid; grid-template-columns: 12rem 1fr; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; }
.facts dd.key { font-family: var(--mono); }
.text { margin: 0; padding: 0.7rem 0.9rem; border-radius: 12px; background: var(--field); font: inherit; white-space: pre-wrap; word-break: break-word; }
.cur { margin-left: 0.15em; font-size: 0.78em; color: var(--muted); letter-spacing: 0.04em; }

.empty { display: grid; justify-items: center; gap: 0.5rem; padding: 2.5rem 1.5rem; text-align: center; }
.empty svg { width: 2.6rem; height: 2.6rem; fill: none; stroke: var(--accent-fill); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; opacity: 0.8; }
.empty strong { font-family: var(--head); font-size: 1.05rem; font-weight: 800; }
.empty p { margin: 0; max-width: 32rem; color: var(--muted); }
.empty .btn { margin-top: 0.6rem; }

.chip-rows { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin-bottom: 1rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chips a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.28rem 0.8rem; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--fg); font-size: 0.85rem; font-weight: 500; text-decoration: none; transition: background-color 0.15s, color 0.15s, border-color 0.15s; }
.chips a:hover { border-color: var(--fg); }
.chips a.active { background: var(--hover); border-color: var(--accent-fill); color: var(--accent); font-weight: 700; }
.chips small { font-size: 0.75rem; opacity: 0.8; }

.toasts { position: fixed; top: 5rem; right: 1rem; z-index: 40; display: flex; flex-direction: column; gap: 0.6rem; width: min(24rem, calc(100% - 2rem)); pointer-events: none; }
.toast { margin: 0; max-height: 12rem; overflow: hidden; pointer-events: auto; box-shadow: 0 14px 34px -14px var(--shadow-strong); animation: toast-in 0.25s ease-out; }
.toast span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.toast:not(.sticky) { animation: toast-in 0.25s ease-out, toast-out 0.4s ease-in 6s forwards; }
.toast:hover { animation-play-state: paused; }
.toast-close { flex: none; width: 1.6rem; height: 1.6rem; padding: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 1.2rem; line-height: 1; font-weight: normal; box-shadow: none; }
.toast-close:hover { color: var(--accent); background: var(--hover); transform: none; }
.toast.leaving { opacity: 0; transform: translateX(1rem); transition: opacity 0.2s, transform 0.2s; }
@keyframes toast-in { from { opacity: 0; transform: translateX(1rem); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(1rem); max-height: 0; padding-top: 0; padding-bottom: 0; visibility: hidden; } }

:is(nav a, .btn, button, input[type=submit], .theme button, .back, td a, th a, .copy):focus-visible { outline: 3px solid var(--accent-fill); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } nav a:hover, button:hover, input[type=submit]:hover, .btn:hover, .stats div:hover { transform: none; } .toast, .toast:not(.sticky) { animation: toast-out 0.01s linear 8s forwards; } .toast.sticky { animation: none; } }

@media (max-width: 40rem) {
	:root { --bar-h: 6.6rem; }
	main { padding: 0.8rem; }
	h1 { font-size: 1.6rem; }
	header { flex-wrap: wrap; gap: 0.4rem 0.6rem; padding: 0.6rem 1rem; }
	header nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; -webkit-mask-image: linear-gradient(90deg, transparent, #000 1rem, #000 calc(100% - 1.5rem), transparent); mask-image: linear-gradient(90deg, transparent, #000 1rem, #000 calc(100% - 1.5rem), transparent); }
	header nav::-webkit-scrollbar { display: none; }
	header nav a { flex: none; }
	header .logo { display: none; }
	header .zasuvka { display: block; }
	.card { padding: 1.1rem 1.2rem; }
	.card.flush th:first-child, .card.flush td:first-child { padding-left: 1.2rem; }
	.card.flush th:last-child, .card.flush td:last-child { padding-right: 1.2rem; }
	.facts div { grid-template-columns: 1fr; gap: 0.1rem; }
	.card:has(table) { overflow-x: auto; overscroll-behavior-x: contain; }
	.card.more { box-shadow: 0 12px 30px var(--shadow), inset -1.6rem 0 1.2rem -1.2rem var(--shadow-strong); }
	th, td { white-space: nowrap; }
	td.wrap { white-space: normal; min-width: 14rem; }
	.toasts { top: auto; bottom: 1rem; }
}
