/* Korporátní vzhled — paleta a tvarosloví podle helpdesk.bmrc.cz (navy + modrá).
   Světlý i tmavý režim: tokeny níže, tmavé hodnoty přepisuje html[data-theme=dark]
   (explicitní volba, cookie bmrc_theme) nebo systémová preference. */

:root {
	--navy: #0a2c54;
	--navy2: #103a6b;
	--blue: #1565c0;
	--blue-hover: #0d51a0;
	--ink: #1f2733;
	--muted: #6b7480;
	--line: #e6e9ef;
	--bg: #f4f6fa;
	--panel: #fff;
	--hover: #eef2f8;
	--active: #e8f1fd;
	--hover2: #f8fafd;
	--heading: var(--navy);
	--input-bg: #f4f6fa;
	--shadow: rgba(10, 44, 84, .05);
	--ok-bg: #e7f7ee;  --ok-fg: #11633f;  --ok-line: #bfe8d2;
	--err-bg: #fdecec; --err-fg: #8a1f1f; --err-line: #f5c6c6;
	--info-bg: #e8f1fd; --info-fg: #134a8e; --info-line: #c5dbf6;
	--radius: 14px;
	color-scheme: light;
}

html[data-theme=dark] {
	--blue: #4c9aff;
	--blue-hover: #71b0ff;
	--ink: #e6ebf2;
	--muted: #8b98a8;
	--line: #2a3644;
	--bg: #0f1720;
	--panel: #18222e;
	--hover: #1f2b3a;
	--active: #173252;
	--hover2: #1c2836;
	--heading: #dfe8f5;
	--input-bg: #101a24;
	--shadow: rgba(0, 0, 0, .35);
	--ok-bg: #10301f;  --ok-fg: #7fd7a5;  --ok-line: #1d4d33;
	--err-bg: #3a1a1a; --err-fg: #f1a0a0; --err-line: #5a2727;
	--info-bg: #14283f; --info-fg: #9ec8f5; --info-line: #1f4066;
	color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
	html:not([data-theme=light]) {
		--blue: #4c9aff;
		--blue-hover: #71b0ff;
		--ink: #e6ebf2;
		--muted: #8b98a8;
		--line: #2a3644;
		--bg: #0f1720;
		--panel: #18222e;
		--hover: #1f2b3a;
		--active: #173252;
		--hover2: #1c2836;
		--heading: #dfe8f5;
		--input-bg: #101a24;
		--shadow: rgba(0, 0, 0, .35);
		--ok-bg: #10301f;  --ok-fg: #7fd7a5;  --ok-line: #1d4d33;
		--err-bg: #3a1a1a; --err-fg: #f1a0a0; --err-line: #5a2727;
		--info-bg: #14283f; --info-fg: #9ec8f5; --info-line: #1f4066;
		color-scheme: dark;
	}
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ink);
	background: var(--bg);
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { color: var(--heading); }

h1 {
	margin: 0 0 1rem;
	font-size: 1.45rem;
	font-weight: 650;
}

.muted { color: var(--muted); }

/* ---------- Levá lišta s ikonami (firemní shell) ---------- */
body.app { padding-left: 56px; }

.rail {
	position: fixed;
	left: 0;
	top: 0;
	bottom: 0;
	width: 56px;
	background: var(--panel);
	border-right: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	padding: 10px 0;
	z-index: 40;
}

.rail__logo {
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 8px;
	border-radius: 11px;
	background: linear-gradient(160deg, var(--navy), #1565c0);
	color: #fff;
}

.rail__nav {
	display: flex;
	flex-direction: column;
	gap: 4px;
	align-items: center;
}

.rail__nav a {
	position: relative;
	width: 42px;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 11px;
	color: var(--muted);
}

.rail__nav a:hover { background: var(--hover); color: var(--blue); text-decoration: none; }

.rail__nav a.active { background: var(--active); color: var(--blue); }

.rail__nav a.active::before {
	content: "";
	position: absolute;
	left: -7px;
	top: 8px;
	bottom: 8px;
	width: 3px;
	border-radius: 0 3px 3px 0;
	background: var(--blue);
}

.rail__bottom { margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line); width: 42px; }

/* Zaškrtávátka dnů v týdnu */
.checks { display: flex; flex-wrap: wrap; gap: .35rem 1.25rem; padding: .45rem 0; }
.checks br { display: none; }
.checks label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; color: var(--ink); }

h2.sekce {
	font-size: 1.1rem;
	margin: 1.75rem 0 .75rem;
}

.pagetitle {
	color: var(--heading);
	font-weight: 700;
	font-size: 1.02rem;
}

.avatar {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: linear-gradient(160deg, var(--navy), #1565c0);
	color: #fff;
	font-weight: 700;
	font-size: 13px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
}

/* ---------- Topbar ---------- */
.topbar {
	display: flex;
	align-items: center;
	gap: 18px;
	height: 60px;
	padding: 0 22px;
	background: var(--panel);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 30;
}

.brand {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--heading);
	font-weight: 700;
	font-size: 1.02rem;
	white-space: nowrap;
}

.brand:hover { text-decoration: none; }

.brand__mark {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 9px;
	background: linear-gradient(160deg, var(--navy), #1565c0);
	color: #fff;
}

.topbar__right {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-left: auto;
}

.userbox {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: .9rem;
}

.userbox .user-email { color: var(--muted); }

/* Přepínač tmavého režimu — měsíček ve světlém, sluníčko v tmavém */
.theme-toggle {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: none;
	border: 1px solid transparent;
	border-radius: 9px;
	color: var(--muted);
	cursor: pointer;
	padding: 0;
}

.theme-toggle:hover { background: var(--hover); color: var(--blue); }

.theme-toggle .icon-sun { display: none; }

html[data-theme=dark] .theme-toggle .icon-sun { display: block; }
html[data-theme=dark] .theme-toggle .icon-moon { display: none; }

@media (prefers-color-scheme: dark) {
	html:not([data-theme=light]) .theme-toggle .icon-sun { display: block; }
	html:not([data-theme=light]) .theme-toggle .icon-moon { display: none; }
}

.langs {
	display: flex;
	gap: .4rem;
}

/* Vlaječka: neaktivní jazyk je zesvětlený, aktivní má rámeček. */
.lang {
	display: inline-flex;
	padding: 2px;
	border: 2px solid transparent;
	border-radius: 4px;
	line-height: 0;
	opacity: .55;
	transition: opacity .15s;
}

.lang:hover { opacity: 1; }

.lang.is-active {
	opacity: 1;
	border-color: var(--blue);
}

/* ---------- Obsah ---------- */
.content {
	max-width: 68rem;
	margin: 0 auto;
	padding: 1.75rem 1.25rem;
}

/* ---------- Flash ---------- */
.flash {
	padding: 12px 16px;
	border-radius: 10px;
	margin-bottom: 12px;
	font-size: 14px;
}

.flash.success { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-line); }
.flash.error   { background: var(--err-bg); color: var(--err-fg); border: 1px solid var(--err-line); }
.flash.info    { background: var(--info-bg); color: var(--info-fg); border: 1px solid var(--info-line); }

/* ---------- Karty ---------- */
.card {
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1.25rem 1.4rem;
	box-shadow: 0 2px 10px var(--shadow);
}

.card--table { padding: .4rem .4rem; overflow-x: auto; }

.empty {
	color: var(--muted);
	text-align: center;
	padding: 2.5rem 1.4rem;
}

.empty p { margin: 0; }

/* ---------- Tabulky ---------- */
.table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.table th {
	text-align: left;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--muted);
	padding: 10px 14px;
	border-bottom: 1px solid var(--line);
	white-space: nowrap;
}

.table td {
	padding: 10px 14px;
	border-bottom: 1px solid var(--line);
	vertical-align: top;
}

.table tbody tr:last-child td { border-bottom: 0; }

.table tbody tr:hover { background: var(--hover2); }

/* ---------- Tlačítka ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid transparent;
	border-radius: 10px;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: .15s;
}

.btn:hover { text-decoration: none; }

.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-hover); }

html[data-theme=dark] .btn--primary { color: #0f1720; }

@media (prefers-color-scheme: dark) {
	html:not([data-theme=light]) .btn--primary { color: #0f1720; }
}

.btn--ghost { background: var(--panel); border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); }

.btn--sm { padding: 6px 12px; font-size: 13px; }

/* ---------- Stránky agend ---------- */
.page-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1rem;
}

.page-head h1 { margin: 0; }

.page-actions { display: flex; gap: .6rem; }

/* Měsíční stavy tachometru */
.month-nav {
	display: flex;
	align-items: center;
	gap: .75rem;
	margin-bottom: 1rem;
	color: var(--heading);
}

.km-input { max-width: 9rem; }

.vaha-input { max-width: 4.5rem; }

.firma-select { min-width: 10rem; }

.firmy-card { max-width: 32rem; }

/* Kniha jízd */
.auta-prepinac { display: flex; gap: .4rem; margin-left: auto; }

.gen-form { display: flex; align-items: center; gap: .75rem; margin: 0 0 1rem; flex-wrap: wrap; }

.gen-form .hint { margin: 0; }

.km-ok { color: var(--ok-fg); }

.km-spatne { color: var(--err-fg); }

.th-km, .td-km { text-align: right; }
.td-check { text-align: center; }

.pozn-tank {
	display: inline-block;
	font-size: .8rem;
	color: var(--blue);
	margin-top: .15rem;
}

/* Nepřiřazené tankování zvýrazněné */
.table tr.radek-nepr td { background: var(--err-bg); }
.table tr.radek-nepr:hover td { background: var(--err-bg); }

.table input[type=text] {
	padding: .35rem .5rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	font: inherit;
	font-size: .85rem;
	color: var(--ink);
	background: var(--input-bg);
	width: 100%;
}

.table select,
.table input[type=number] {
	padding: .35rem .5rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	font: inherit;
	font-size: .85rem;
	color: var(--ink);
	background: var(--input-bg);
}

.foto-cell input[type=file] {
	max-width: 15rem;
	font-size: .85rem;
	color: var(--muted);
	display: block;
	margin-bottom: .25rem;
}

.table-actions {
	display: flex;
	align-items: center;
	gap: .75rem;
	padding: .75rem .9rem;
	border-top: 1px solid var(--line);
}

.table a strong { color: var(--blue); }

/* Široký formulář (auto) */
form.form--wide { max-width: 46rem; }

form.form--wide h2 {
	font-size: .82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--muted);
	margin: 1.5rem 0 .75rem;
	padding-bottom: .35rem;
	border-bottom: 1px solid var(--line);
}

form.form--wide h2:first-of-type { margin-top: .25rem; }

.fgrid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 1.25rem;
}

@media (max-width: 640px) {
	.fgrid { grid-template-columns: 1fr; }
}

/* ---------- Formuláře ---------- */
.frow { margin-bottom: 1rem; }

.frow label {
	display: block;
	font-size: .88rem;
	font-weight: 600;
	color: var(--heading);
	margin-bottom: .3rem;
}

.frow input[type=email],
.frow input[type=text],
.frow input[type=date],
.frow input[type=number],
.frow select,
.frow textarea {
	width: 100%;
	padding: .6rem .75rem;
	border: 1px solid var(--line);
	border-radius: 10px;
	font: inherit;
	color: var(--ink);
	background: var(--input-bg);
}

.frow input:focus,
.frow select:focus,
.frow textarea:focus {
	outline: none;
	border-color: var(--blue);
	background: var(--panel);
}

.frow textarea { resize: vertical; }

.radios { display: flex; gap: 1.25rem; padding: .45rem 0; }

.radios label { display: inline-flex; align-items: center; gap: .4rem; font-weight: 400; color: var(--ink); }

.hint {
	display: block;
	color: var(--muted);
	font-size: .82rem;
	margin-top: .3rem;
}

.factions {
	display: flex;
	gap: .75rem;
	margin-top: 1.25rem;
}

.btn--danger { background: var(--panel); border-color: var(--err-line); color: var(--err-fg); }
.btn--danger:hover { background: var(--err-bg); border-color: var(--err-fg); }

.danger-zone { margin-top: 1rem; }

.form-errors {
	color: var(--err-fg);
	margin: 0 0 1rem;
	padding-left: 1.1rem;
}

.input-error {
	display: block;
	color: var(--err-fg);
	font-size: .85rem;
	margin-top: .3rem;
}

/* Načtení techničáku */
form.tp-card { max-width: 46rem; margin-bottom: 1.25rem; }

.tp-card h2 {
	font-size: .82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .06em;
	color: var(--muted);
	margin: 0 0 .5rem;
}

.tp-card p { margin: 0 0 .9rem; }

.tp-row {
	display: flex;
	align-items: center;
	gap: .75rem;
	flex-wrap: wrap;
}

.tp-row input[type=file] {
	flex: 1;
	min-width: 14rem;
	font-size: .9rem;
	color: var(--muted);
}

.spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 3px solid rgba(76, 154, 255, .3);
	border-top-color: var(--blue);
	border-radius: 50%;
	animation: spin .8s linear infinite;
	flex: none;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

form.tp-card.is-loading .btn {
	opacity: .7;
	cursor: progress;
}

/* ==========================================================================
   Nová domácnost — nákupní seznam
   ========================================================================== */

/* ---------- Přihlášení ---------- */
.signin { max-width: 26rem; margin: 3rem auto; }
.signin p { margin-bottom: 1.25rem; }

/* ---------- Souhrnné dlaždice na přehledu ---------- */
.stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
	gap: .9rem;
	margin-bottom: 1.5rem;
}

.stat {
	display: flex;
	flex-direction: column;
	gap: .15rem;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1rem 1.15rem;
	box-shadow: 0 2px 10px var(--shadow);
}

.stat__label {
	font-size: .74rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--muted);
}

.stat__value {
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--heading);
	line-height: 1.2;
}

.stat__note { font-size: .82rem; color: var(--muted); }

/* ---------- Sekce jako karty ---------- */
.sekce-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
	gap: .9rem;
}

.sekce-karta {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: .25rem;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 1rem 1.15rem 1.15rem;
	color: var(--ink);
	overflow: hidden;
	box-shadow: 0 2px 10px var(--shadow);
}

.sekce-karta:hover { border-color: var(--blue); text-decoration: none; }

/* Barvu nese jen proužek nahoře, karta zůstává neutrální. */
.sekce-karta__pruh { position: absolute; inset: 0 0 auto 0; height: 4px; }
.sekce-karta__nazev { font-weight: 650; color: var(--heading); }
.sekce-karta__cisla { font-size: .85rem; color: var(--muted); }

.progress {
	display: block;
	height: 6px;
	margin-top: .5rem;
	background: var(--hover);
	border-radius: 3px;
	overflow: hidden;
}

.progress__bar { display: block; height: 100%; background: var(--blue); }

/* ---------- Nadpis sekce s barevným proužkem ---------- */
.sekce--barevna { display: flex; align-items: center; gap: .6rem; }

.sekce__pruh { width: 4px; height: 1.1em; border-radius: 2px; flex: none; }

.sekce__tecka {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
}

.pill-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.5rem;
	height: 1.4rem;
	padding: 0 .45rem;
	border-radius: 999px;
	background: var(--hover);
	color: var(--muted);
	font-size: .76rem;
	font-weight: 700;
}

/* ---------- Zúžení výběru ---------- */
.filtr { padding: .85rem 1rem; margin-bottom: 1rem; }

.filtr__radek {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
}

.filtr input[type=search],
.filtr select {
	padding: .45rem .6rem;
	border: 1px solid var(--line);
	border-radius: 9px;
	font: inherit;
	font-size: .88rem;
	color: var(--ink);
	background: var(--input-bg);
}

.filtr__hledat { flex: 1; min-width: 12rem; }

.filtr input:focus, .filtr select:focus { outline: none; border-color: var(--blue); background: var(--panel); }

/* ---------- Pruh se souhrnem nad výpisem ---------- */
.souhrn-pruh {
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
	padding: .6rem 1rem;
	margin-bottom: 1.25rem;
	border-radius: 10px;
	background: var(--active);
	color: var(--ink);
	font-size: .9rem;
}

.souhrn-pruh__cena { margin-left: auto; }

/* ---------- Řádky seznamu ---------- */
.tbl-polozky td { vertical-align: middle; }

.radek-pod { display: block; font-size: .82rem; color: var(--muted); margin-top: .1rem; }

.td-nazev { width: 44%; }
.td-pocet { white-space: nowrap; color: var(--muted); font-size: .88rem; }
.td-cena, .th-cena { text-align: right; white-space: nowrap; }
.td-kde { font-size: .88rem; }
.td-akce { text-align: right; white-space: nowrap; }
.td-check { width: 40px; }

/* Zaškrtávátko — prázdné kolečko, po škrtnutí zelené s fajfkou */
.check {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border: 2px solid var(--line);
	border-radius: 8px;
	color: transparent;
}

.check:hover { border-color: var(--blue); color: var(--blue); text-decoration: none; }

.radek-hotovy .check {
	background: var(--ok-bg);
	border-color: var(--ok-line);
	color: var(--ok-fg);
}

/* Škrtnutá položka ustoupí do pozadí, ale zůstane čitelná */
.radek-hotovy .td-nazev strong { text-decoration: line-through; color: var(--muted); }
.radek-hotovy td { opacity: .72; }

.tag {
	display: inline-block;
	margin-left: .4rem;
	padding: .05rem .4rem;
	border-radius: 999px;
	font-size: .7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: .04em;
	vertical-align: middle;
}

.tag--nutne { background: var(--err-bg); color: var(--err-fg); border: 1px solid var(--err-line); }

/* ---------- Cenové rozpětí ---------- */
.rozpeti { display: inline-block; min-width: 7.5rem; }
.rozpeti__cisla { display: block; font-size: .82rem; white-space: nowrap; }

.rozpeti__pas {
	position: relative;
	display: block;
	height: 4px;
	margin: .25rem 0 .1rem;
	border-radius: 2px;
	background: linear-gradient(90deg, var(--ok-line), var(--line), var(--err-line));
}

/* Značka ukazuje, kde v rozpětí leží naše počítaná cena */
.rozpeti__znacka {
	position: absolute;
	top: -3px;
	width: 2px;
	height: 10px;
	margin-left: -1px;
	border-radius: 1px;
	background: var(--heading);
}

.rozpeti__obdobi { display: block; font-size: .72rem; }

/* ---------- Nabídka stavů (bez JavaScriptu) ---------- */
.stavmenu { position: relative; }
.stavmenu summary { list-style: none; cursor: pointer; }
.stavmenu summary::-webkit-details-marker { display: none; }

.stav {
	display: inline-block;
	padding: .15rem .55rem;
	border-radius: 999px;
	font-size: .76rem;
	font-weight: 600;
	white-space: nowrap;
	border: 1px solid var(--line);
	background: var(--hover);
	color: var(--muted);
}

/* „Chybí“ nechává neutrální vzhled .stav — proto tu vlastní pravidlo nemá */
.stav--vybrano { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-line); }
.stav--koupeno { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-line); }
.stav--mame { background: var(--ok-bg); color: var(--ok-fg); border-color: var(--ok-line); }
.stav--neresime { opacity: .65; text-decoration: line-through; }

.stavmenu__list {
	position: absolute;
	right: 0;
	z-index: 20;
	min-width: 9rem;
	margin-top: .3rem;
	padding: .3rem;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: 10px;
	box-shadow: 0 6px 20px var(--shadow);
	display: flex;
	flex-direction: column;
}

.stavmenu__list a {
	padding: .35rem .55rem;
	border-radius: 7px;
	color: var(--ink);
	font-size: .86rem;
}

.stavmenu__list a:hover { background: var(--hover); text-decoration: none; }
.stavmenu__list a.is-active { color: var(--blue); font-weight: 600; }

/* ---------- Rychlé formuláře na jeden řádek ---------- */
.rychle {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: .5rem;
	padding: .85rem 1rem;
	margin-bottom: 1.25rem;
}

.rychle input[type=text],
.rychle input[type=url],
.rychle input[type=date],
.rychle input[type=number],
.rychle input[type=file],
.rychle select {
	padding: .5rem .65rem;
	border: 1px solid var(--line);
	border-radius: 9px;
	font: inherit;
	font-size: .9rem;
	color: var(--ink);
	background: var(--input-bg);
}

.rychle input[type=text]:first-of-type { flex: 1; min-width: 14rem; }
.rychle input:focus, .rychle select:focus { outline: none; border-color: var(--blue); background: var(--panel); }
.rychle .form-errors { flex-basis: 100%; margin: 0; }

.check-inline { display: inline-flex; align-items: center; gap: .45rem; font-weight: 400; }

.odkaz-smazat { color: var(--err-fg); font-size: .85rem; }

/* ---------- Přílohy ---------- */
.prilohy {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
	gap: .9rem;
	margin-bottom: 1.25rem;
}

.priloha {
	display: flex;
	flex-direction: column;
	gap: .3rem;
	padding: .75rem;
	background: var(--panel);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	text-align: center;
}

.priloha > a { display: block; color: var(--ink); }
.priloha > a:hover { text-decoration: none; color: var(--blue); }

.priloha img {
	width: 100%;
	height: 8rem;
	object-fit: cover;
	border-radius: 9px;
	background: var(--hover);
}

.priloha__pdf {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 8rem;
	border-radius: 9px;
	background: var(--hover);
	color: var(--muted);
	font-weight: 700;
	letter-spacing: .08em;
}

.priloha__nazev { display: block; font-size: .85rem; margin-top: .35rem; word-break: break-word; }
.priloha__meta { font-size: .75rem; }

/* ---------- Užší displeje ---------- */
@media (max-width: 720px) {
	.souhrn-pruh__cena { margin-left: 0; }
	.td-kde, .td-rozpeti { display: none; }
}

/* ---------- Editace přímo v řádku seznamu ---------- */
.tbl-polozky input[type=number],
.tbl-polozky input[type=text] {
	padding: .3rem .45rem;
	border: 1px solid transparent;
	border-radius: 7px;
	font: inherit;
	font-size: .88rem;
	color: var(--ink);
	background: transparent;
}

/* Rámeček se ukáže, až když je kam psát — jinak by tabulka byla plná krabiček */
.tbl-polozky input:hover { border-color: var(--line); background: var(--input-bg); }
.tbl-polozky input:focus { outline: none; border-color: var(--blue); background: var(--panel); }

.in-pocet { width: 4.2rem; text-align: right; }
.in-cena { width: 6.5rem; text-align: right; font-weight: 600; }
.in-odkaz { width: 100%; min-width: 5.5rem; max-width: 9rem; font-size: .82rem; }

.td-pocet .jednotka { font-size: .82rem; margin-left: .2rem; }

.radek-hotovy input { opacity: .8; }

.odkaz-doklad { color: var(--blue); }

/* Ukládací pruh pod výpisem */
.ulozit-pruh {
	position: sticky;
	bottom: 0;
	display: flex;
	align-items: center;
	gap: .9rem;
	padding: .75rem 1rem;
	margin: 1rem 0 1.5rem;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--panel);
	box-shadow: 0 -2px 14px var(--shadow);
	z-index: 10;
	font-size: .88rem;
}

/* ---------- Náhled načteného dokladu ---------- */
.in-nazev { min-width: 12rem; }
.in-typ { min-width: 10rem; }

.stav--objednano { background: var(--info-bg); color: var(--info-fg); border-color: var(--info-line); font-weight: 700; }

.td-cena .mena { font-size: .78rem; margin-left: .15rem; }

/* Sleva rozpuštěná do cen — v pruhu nad náhledem dokladu */
.sleva-znacka { color: var(--ok-fg); font-weight: 600; }

/* Řádek pod názvem: odkud, kdy a doklad — na jedné řádce, oddělené tečkou */
.radek-pod.meta { font-size: .8rem; }
.radek-pod.meta > * + *::before { content: "·"; margin: 0 .35rem; color: var(--muted); }
.meta__obchod { color: var(--ink); font-weight: 600; }

/* Tlačítka pod dlaždicí dokumentu */
.priloha .btn { align-self: center; margin-top: .35rem; }

.sleva-znacka--pozor { color: var(--err-fg); }
