:root {
	--ink: #152028;
	--muted: #5a6670;
	--line: rgba(21, 32, 40, 0.12);
	--accent: #2b7de0;
	--accent-deep: #1a5fb4;
	--ok: #0f6e5c;
	--paper: #f4f6f8;
	--white: #fff;
	--font: "IBM Plex Sans", "Segoe UI", sans-serif;
	--brand: Syne, "Avenir Next", sans-serif;
}

* { box-sizing: border-box; }
body {
	margin: 0;
	font-family: var(--font);
	color: var(--ink);
	background: var(--paper);
	line-height: 1.45;
}
a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.app-main {
	display: flex;
	min-height: 100vh;
}
.app-sidebar {
	width: 220px;
	flex-shrink: 0;
	background: var(--white);
	border-right: 1px solid var(--line);
	padding: 1.25rem 0.85rem;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
	position: sticky;
	top: 0;
	align-self: flex-start;
	min-height: 100vh;
}
.sidebar-brand {
	font-family: var(--brand);
	font-weight: 800;
	font-size: 1.25rem;
	letter-spacing: -0.03em;
	padding: 0 0.55rem;
}
.sidebar-nav {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}
.sidebar-link {
	display: block;
	padding: 0.5rem 0.65rem;
	border-radius: 6px;
	font-weight: 600;
	color: var(--ink);
}
.sidebar-link:hover { background: #eef3f8; text-decoration: none; }
.sidebar-link.is-active {
	background: #e4eefb;
	color: var(--accent-deep);
}
.sidebar-firma {
	margin-top: auto;
	padding: 0.75rem 0.55rem 0.25rem;
	border-top: 1px solid var(--line);
	font-size: 0.9rem;
}
.firma-switch summary { cursor: pointer; color: var(--muted); font-size: 0.8rem; margin-top: 0.25rem; }
.firma-switch ul { list-style: none; padding: 0.5rem 0; margin: 0; }
.firma-switch li { margin: 0.25rem 0; }

.app-main__outer { flex: 1; min-width: 0; }
.content { max-width: 1100px; margin: 0 auto; padding: 1.5rem 1.25rem 3rem; }
.foot { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 1rem; }

.sidebar-label {
	font-size: 0.7rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--muted);
	padding: 0.85rem 0.65rem 0.25rem;
	margin-top: 0.35rem;
	border-top: 1px solid var(--line);
}
.sidebar-nav > .sidebar-label:first-child {
	margin-top: 0;
	border-top: 0;
	padding-top: 0.25rem;
}
.sidebar-label--intra {
	color: var(--accent-deep, #1a4a7a);
}
.sidebar-link--intra {
	border-left: 2px solid transparent;
	padding-left: calc(0.65rem - 2px);
}
.sidebar-link--intra:hover,
.sidebar-link--intra.is-active {
	border-left-color: var(--accent, #3b7bbf);
}
.sidebar-link--sub {
	padding-left: calc(1.35rem - 2px);
	font-weight: 550;
	font-size: 0.92rem;
	color: #3a4650;
}
.stats {
	display: flex; flex-wrap: wrap; gap: 0.75rem;
	margin: 1rem 0 1.25rem;
}
.stat {
	background: var(--white); border: 1px solid var(--line);
	border-radius: 8px; padding: 0.65rem 0.9rem; min-width: 5.5rem;
	color: inherit;
	text-decoration: none;
	transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
a.stat:hover {
	border-color: color-mix(in srgb, var(--accent, #3b7bbf) 45%, var(--line));
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
	text-decoration: none;
}
a.stat.is-active {
	border-color: var(--accent, #3b7bbf);
	background: #e4eefb;
}
.stat strong { display: block; font-size: 1.25rem; font-family: var(--brand); }
.stat span { color: var(--muted); font-size: 0.8rem; }
.prehled-h {
	font-size: 1.05rem;
	margin: 0.5rem 0 0.75rem;
}

.table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 0.92rem; }
.table th { background: #eef2f6; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.acts { white-space: nowrap; }
.small { font-size: 0.8rem; }
.pill {
	display: inline-block; font-size: 0.75rem; font-weight: 600;
	padding: 0.15rem 0.45rem; border-radius: 4px; background: #e8eef5;
}
.pill.ok { background: #e4f2ea; color: #1f6b45; }
.pill.wait { background: #fef3e2; color: #9a5b00; }

.kat-grid, .mapa-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}
.kat-grid h3, .mapa-grid h3 { margin: 0 0 0.35rem; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.insight-list { list-style: none; padding: 0; margin: 0; }
.insight-list li { padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.insight-list li:last-child { border-bottom: 0; }
.insight-list.compact li { padding: 0.25rem 0; font-size: 0.9rem; }
.insight-text { font-weight: 600; }
.insight-meta { margin-top: 0.2rem; }
.kat-card.empty { opacity: 0.55; }
.prepis {
	white-space: pre-wrap; font-family: var(--font); font-size: 0.9rem;
	line-height: 1.5; max-height: 70vh; overflow: auto;
	background: #f7f9fb; padding: 0.75rem; border-radius: 6px;
}

.note-box {
	background: #fff9ef; border: 1px solid rgba(154, 91, 0, 0.22);
	border-radius: 8px; padding: 0.85rem 1rem; margin: 1rem 0 1.5rem;
}
.note-card {
	background: var(--white); border: 1px solid var(--line);
	border-radius: 8px; padding: 0.85rem 1rem; margin: 0.75rem 0;
}
.note-card.compact { background: transparent; border: 0; border-top: 1px solid rgba(154, 91, 0, 0.15); border-radius: 0; padding: 0.65rem 0; margin: 0.35rem 0 0; }
.note-h { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; flex-wrap: wrap; margin-bottom: 0.35rem; }
.note-body { white-space: pre-wrap; line-height: 1.5; }

form .form-group, form table th { text-align: left; }
form input[type="text"], form select, form textarea {
	width: 100%; max-width: 40rem; margin: 0.25rem 0 0.75rem;
	padding: 0.45rem 0.6rem; border: 1px solid rgba(21,32,40,0.28);
	border-radius: 6px; font: inherit;
}
form label { font-weight: 600; }
/* jen skutečné chybové seznamy Nette — ne checkboxy / běžné ul ve formuláři */
form ul.error,
form .error > li {
	color: #c8102e;
}
form ul.error:empty {
	display: none;
}

.note-form {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 10px;
	padding: 1.25rem 1.35rem 1.5rem;
	max-width: 100%;
}
.note-form table {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
}
.note-form table th {
	width: 8.5rem;
	padding: 0.65rem 1.25rem 0.65rem 0;
	vertical-align: top;
	font-size: 0.9rem;
	color: var(--muted);
	font-weight: 600;
	white-space: nowrap;
}
.note-form table td {
	padding: 0.45rem 0;
	vertical-align: top;
}
.note-form table tr:last-child th,
.note-form table tr:last-child td {
	padding-bottom: 0;
}
.note-form input[type="text"],
.note-form input[type="number"],
.note-form select,
.note-form textarea {
	width: 100%;
	max-width: none;
	box-sizing: border-box;
	padding: 0.65rem 0.85rem;
	font-size: 1rem;
	line-height: 1.45;
	border: 1px solid rgba(21, 32, 40, 0.22);
	border-radius: 6px;
	background: #fbfcfd;
	margin: 0;
}
.note-form textarea {
	min-height: 16rem;
	resize: vertical;
}
.note-form input:focus,
.note-form select:focus,
.note-form textarea:focus {
	outline: 2px solid rgba(43, 125, 224, 0.35);
	outline-offset: 1px;
	background: #fff;
}
.note-form input[type="submit"],
.note-form .btn {
	margin-top: 0.35rem;
	padding: 0.55rem 1.25rem;
	font-size: 1rem;
}

/* Nástroj: plná šířka obsahu; krátký popis nemá výšku jako zadání. */
.nastroj-form textarea[name="popis"] {
	min-height: 4.5rem;
}

/* Editace položky toku — úzké číslo pozice, textarea dle obsahu */
.tok-edit-form textarea {
	min-height: 3.5rem;
	overflow: hidden;
	field-sizing: content;
	resize: vertical;
}
.tok-edit-form .tok-cislo-input,
.tok-edit-form input[type="number"] {
	width: 5.5rem;
	max-width: 5.5rem;
}

.tok-nazev-wrap {
	margin: 0 0 1.25rem;
}
.tok-nazev-form {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	max-width: 32rem;
}
.tok-nazev-form table,
.tok-nazev-form tbody,
.tok-nazev-form tr,
.tok-nazev-form th,
.tok-nazev-form td {
	display: contents;
}
.tok-nazev-input {
	flex: 1;
	min-width: 0;
	width: 100%;
	max-width: none !important;
	margin: 0 !important;
	padding: 0.5rem 0.75rem;
	border: 1px solid rgba(21, 32, 40, 0.22);
	border-radius: 6px;
	font: inherit;
	font-weight: 600;
	background: var(--white);
}
.tok-nazev-form .btn { margin: 0; flex-shrink: 0; }
.tok-toolbar { margin-top: 0.25rem; }
.tok-count { margin-left: 0.25rem; }

.tok-switch {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: 0 0 1rem;
}
.tok-switch__item {
	display: inline-flex;
	align-items: center;
	padding: 0.4rem 0.75rem;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--white);
	font-size: 0.9rem;
	font-weight: 600;
}
.tok-switch__item.is-active {
	background: var(--accent);
	border-color: var(--accent);
	color: #fff;
}
.tok-switch__add { color: var(--muted); font-weight: 500; }
.tok-oddeleni-sec {
	margin: 0 0 1.25rem;
	padding: 0.85rem 1rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 8px;
}
.tok-oddeleni-sec h2 { margin: 0 0 0.35rem; font-size: 1rem; }
.tok-oddeleni-form { margin: 0.5rem 0 0; }

.tok-fold {
	margin: 0 0 0.65rem;
	padding: 0.15rem 0.85rem 0.35rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 8px;
}
.tok-fold > summary {
	cursor: pointer;
	list-style: none;
	padding: 0.65rem 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: baseline;
}
.tok-fold > summary::-webkit-details-marker { display: none; }
.tok-fold > summary::before {
	content: '▸';
	display: inline-block;
	width: 1rem;
	color: var(--muted);
	transition: transform 0.12s ease;
}
.tok-fold[open] > summary::before { transform: rotate(90deg); }
.tok-fold__body { padding: 0 0 0.75rem; }
.tok-fold--spaced { margin-top: 1.25rem; }
.tok-fold .tok-nahled { margin: 0.75rem 0 0; }
.tok-fold .tok-verze-list { margin: 0.5rem 0 0; }
.tok-nazev-wrap { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.tok-zadani-form { width: 100%; }
.tok-zadani-form table,
.tok-zadani-form .form-group { width: 100%; }
.tok-zadani-form textarea {
	display: block;
	width: 100%;
	max-width: none;
	box-sizing: border-box;
	min-height: 8rem;
	font: inherit;
	padding: 0.55rem 0.7rem;
	border: 1px solid rgba(21, 32, 40, 0.22);
	border-radius: 6px;
	resize: vertical;
}
.tok-zadani-form .btn { margin-top: 0.5rem; }

.prompt-card {
	margin: 0 0 1.5rem;
	padding: 1rem 1.1rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 8px;
}
.prompt-card__h { margin-bottom: 0.75rem; }
.prompt-card__h h2 { margin: 0 0 0.2rem; font-size: 1.1rem; }
.prompt-card h3 {
	margin: 0.85rem 0 0.35rem;
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted);
}
.prompt-pre {
	margin: 0;
	padding: 0.75rem 0.85rem;
	background: #f4f6f8;
	border-radius: 6px;
	font-size: 0.82rem;
	line-height: 1.45;
	white-space: pre-wrap;
	overflow-x: auto;
}
.prompt-pre--muted { background: #eef2f6; color: #3a4650; }

.tok-list { list-style: none; padding: 0; margin: 1rem 0 2rem; }
.tok-item {
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 0.85rem 1rem;
	margin: 0.45rem 0;
	border-left: 4px solid var(--accent);
}
.tok-item.tok-cekani { border-left-color: #9a5b00; background: #fffaf2; }
.tok-item.is-in-milnik { box-shadow: inset 0 0 0 1px color-mix(in srgb, #4a7ab5 35%, transparent); }
.tok-milnik-tag {
	margin-top: 0.2rem;
	font-size: 0.74rem;
	font-weight: 650;
	color: #3d5f8a;
}
.tok-pohledy-link {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0.25rem 0 1.25rem;
}
.tok-pohledy {
	margin: 0 0 2rem;
	padding: 1rem 1.1rem 1.15rem;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: #f7f9fc;
}
.tok-pohledy--page {
	margin-top: 0.75rem;
}
.tok-pohledy h2 {
	margin: 0 0 0.35rem;
	font-size: 1.15rem;
}
.tok-pohled-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(12rem, 0.75fr);
	gap: 1rem 1.25rem;
	align-items: start;
	margin-top: 1rem;
}
@media (max-width: 900px) {
	.tok-pohled-grid { grid-template-columns: 1fr; }
}
.tok-pohled-ref {
	position: sticky;
	top: 0.75rem;
	padding: 0.65rem 0.75rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 8px;
	max-height: calc(100vh - 2rem);
	overflow: auto;
}
.tok-pohled-ref__h {
	margin: 0 0 0.25rem;
	font-size: 0.95rem;
}
.tok-pohled-ref-list {
	list-style: none;
	padding: 0;
	margin: 0.4rem 0 0;
	font-size: 0.82rem;
}
.tok-pohled-ref-list li {
	display: flex;
	gap: 0.4rem;
	padding: 0.18rem 0;
	border-bottom: 1px solid #eef2f6;
}
.tok-pohled-ref-num {
	flex: 0 0 1.4rem;
	font-weight: 700;
	color: var(--muted);
	text-align: right;
}
.tok-milnik-list {
	list-style: none;
	padding: 0;
	margin: 0.75rem 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}
.tok-milnik-card {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.75rem;
	padding: 0.55rem 0.7rem;
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 8px;
}
.tok-milnik-card.is-editing {
	border-color: var(--accent);
	box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}
.tok-milnik-card .acts {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	flex-shrink: 0;
}
.tok-milnik-form { margin-top: 0.5rem; }
.tok-milnik-form .oddeleni-pozice-form,
.tok-milnik-form { max-width: 36rem; }
.tok-milnik-form input[type="number"],
.tok-milnik-form .tok-milnik-cislo {
	width: 5.5rem;
	min-width: 5.5rem;
	box-sizing: border-box;
}
.tok-pohled-preview { margin-top: 1rem; }
.tok-pohled-switch {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	margin-bottom: 0.65rem;
}
.tok-pohled-chip {
	display: inline-flex;
	align-items: center;
	padding: 0.28rem 0.65rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--white);
	color: var(--ink);
	text-decoration: none;
	font-size: 0.85rem;
	font-weight: 600;
}
.tok-pohled-chip.is-on {
	border-color: var(--accent);
	background: var(--accent);
	color: #fff;
}
.tok-item.tok-milnik-view {
	border-left-color: #4a7ab5;
	background: #eef4fb;
}
.tok-pohled-list { margin-bottom: 0; }
.tok-num {
	flex-shrink: 0;
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 999px;
	background: #e8eef5;
	color: var(--muted);
	font-size: 0.8rem;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-top: 0.15rem;
}
.tok-item.tok-cekani .tok-num { background: #f5e6c8; }
.tok-preview { flex: 1; min-width: 0; }
.tok-badge {
	display: inline-block;
	font-size: 0.68rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted);
	margin-right: 0.35rem;
}
.tok-nazev { font-size: 1.05rem; }
.tok-edit-cislo {
	display: inline-block;
	margin-left: 0.35rem;
	font-size: 0.85em;
	font-weight: 700;
	color: var(--muted);
	vertical-align: middle;
}
.tok-hotovo { margin-top: 0.25rem; }
.tok-item .acts { flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 0.25rem; }

.tok-nahled-sec { margin-top: 0.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.tok-nahled {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.75rem;
	margin: 1rem 0 2rem;
}
.intra-card {
	border-radius: 10px;
	padding: 0.85rem 1rem;
	border: 1px solid var(--line);
	background: var(--white);
	min-height: 5.5rem;
}
.intra-card.intra-ukol { border-top: 3px solid var(--accent); }
.intra-card.intra-cekani { border-top: 3px solid #c48a2a; background: #fffaf2; }
.intra-label {
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 0.25rem;
}
.intra-title { font-weight: 700; font-size: 1rem; line-height: 1.3; }
.intra-meta { font-size: 0.85rem; margin-top: 0.55rem; }
.intra-meta.muted { color: var(--muted); }
.intra-meta__h {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--muted);
	margin-bottom: 0.12rem;
}

.tok-verze-sec { margin-top: 0.5rem; padding-top: 1.25rem; border-top: 1px solid var(--line); }
.tok-verze-list { margin: 0.75rem 0 2rem; display: flex; flex-direction: column; gap: 0.5rem; }
.tok-verze {
	background: var(--white);
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 0.35rem 0.85rem 0.55rem;
}
.tok-verze > summary {
	cursor: pointer;
	list-style: none;
	padding: 0.55rem 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
	align-items: baseline;
}
.tok-verze > summary::-webkit-details-marker { display: none; }
.tok-verze > summary::before {
	content: '▸';
	display: inline-block;
	width: 1rem;
	color: var(--muted);
	transition: transform 0.12s ease;
}
.tok-verze[open] > summary::before { transform: rotate(90deg); }
.tok-verze-polozky { margin: 0.25rem 0 0.5rem; }

.zam-list { margin: 1rem 0 2rem; }
.zam-card .note-body.small { margin-top: 0.45rem; font-size: 0.9rem; white-space: pre-wrap; }

.oddeleni-pozice-form { margin: 0.75rem 0 2rem; }
.oddeleni-pozice-form .checkbox,
.oddeleni-pozice-form label {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin: 0.35rem 0;
	font-weight: 500;
}
.oddeleni-pozice-form input[type="checkbox"] { margin-top: 0.2rem; }
.oddeleni-pozice-form .input { margin-top: 0.75rem; max-width: 28rem; }

@media (max-width: 700px) {
	.tok-nazev-form { max-width: none; }
	.tok-item { flex-wrap: wrap; }
	.tok-item .acts { width: 100%; }
}

h1 { font-family: var(--brand); letter-spacing: -0.03em; margin: 0 0 0.5rem; }
h2 { font-size: 1.15rem; margin: 1.5rem 0 0.75rem; }
h3 { font-size: 1rem; margin: 1rem 0 0.5rem; }
.lead { color: var(--muted); margin-bottom: 1.25rem; }
.muted { color: var(--muted); font-size: 0.9rem; }
.hint { background: #eef5fc; border-left: 4px solid var(--accent); padding: 0.6rem 0.8rem; border-radius: 0 6px 6px 0; }

.flash { padding: 0.65rem 1rem; margin: 0.75rem 1.5rem; border-radius: 6px; }
.flash-ok { background: #e4f2ea; color: #1f6b45; }
.flash-error { background: #f8e8ea; color: #c8102e; }

.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.card {
	display: block; background: var(--white); border: 1px solid var(--line);
	border-radius: 10px; padding: 1.1rem 1.2rem; color: inherit;
}
.card strong { display: block; font-size: 1.05rem; margin-bottom: 0.25rem; }
.card span { color: var(--muted); font-size: 0.9rem; }
.card:hover { border-color: var(--accent); text-decoration: none; }

.toolbar { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1rem 0; }

.ukol-dialog {
	border: 1px solid var(--line);
	border-radius: 12px;
	padding: 1.35rem 1.5rem 1.5rem;
	max-width: 44rem;
	width: min(44rem, calc(100vw - 2rem));
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
}
.ukol-dialog::backdrop {
	background: rgba(15, 23, 42, 0.45);
}
.ukol-dialog__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin: 0 0 1rem;
}
.ukol-dialog__bar strong {
	font-size: 1.15rem;
}
.ukol-dialog .note-form {
	margin: 0;
	border: none;
	background: transparent;
	padding: 0;
	border-radius: 0;
}
.ukol-dialog .note-form table th {
	width: 9.5rem;
}
.ukol-dialog .ukol-form textarea[name="text"] {
	min-height: 11rem;
	font-size: 1.05rem;
	line-height: 1.5;
}
.ukol-dialog .ukol-form input[type="submit"],
.ukol-dialog .ukol-form .btn {
	margin-top: 0.75rem;
	margin-right: 0.5rem;
}

.btn {
	display: inline-block; border: 1px solid var(--line); background: var(--white);
	color: var(--ink); padding: 0.45rem 0.85rem; border-radius: 6px; font-weight: 600;
	cursor: pointer; font: inherit;
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.small { padding: 0.25rem 0.55rem; font-size: 0.82rem; }
.btn.disabled { opacity: 0.5; pointer-events: none; }

.pozice { background: var(--white); border: 1px solid var(--line); border-radius: 8px; margin: 0.75rem 0; padding: 0.35rem 0.75rem; }
.pozice > summary { font-weight: 700; cursor: pointer; padding: 0.5rem 0; }
.person { border-top: 1px solid var(--line); padding: 0.75rem 0; }
.person-h { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: baseline; margin-bottom: 0.35rem; }
.ints { list-style: none; padding: 0; margin: 0; }
.ints li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; align-items: center; flex-wrap: wrap; }

.block { background: var(--white); border: 1px solid var(--line); border-radius: 8px; margin: 0.65rem 0; }
.block > summary { cursor: pointer; font-weight: 650; padding: 0.7rem 0.9rem; }
.block.cinnost { border-left: 4px solid var(--accent); }
.block.ukon { border-left: 4px solid var(--ok); margin-left: 0.75rem; }
.pad { padding: 0 0.9rem 0.9rem; }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 600; color: var(--muted); margin-left: 0.35rem; }
.nastroj-title {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.5rem;
}
select.badge.nastroj-stav,
.badge.nastroj-stav {
	appearance: none;
	-webkit-appearance: none;
	display: inline-block;
	padding: 0.2rem 1.55rem 0.2rem 0.55rem;
	border-radius: 999px;
	border: 1px solid var(--line);
	background-color: #f3f5f7;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23555'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.55rem center;
	color: var(--ink);
	font: inherit;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.3;
	cursor: pointer;
	margin: 0;
	max-width: 100%;
}
select.badge.nastroj-stav:focus {
	outline: 2px solid var(--accent);
	outline-offset: 1px;
}
.badge.nastroj-stav.is-doplnit_zadani { background-color: #fff4e5; border-color: #f0c36d; }
.badge.nastroj-stav.is-udelat { background-color: #e8f0fe; border-color: #8ab4f8; }
.badge.nastroj-stav.is-v_praci { background-color: #e6f4ea; border-color: #81c995; }
.badge.nastroj-stav.is-hotovo { background-color: #e8eef5; border-color: #9aa5b1; color: var(--muted); }
.note-form select.badge.nastroj-stav,
.nastroj-form select.badge.nastroj-stav {
	width: auto;
	min-width: 11rem;
	margin-top: 0.35rem;
}
.nastroj-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-top: 0.65rem;
	padding-top: 0.55rem;
	border-top: 1px solid var(--line);
}
.valid { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin: 0.75rem 0; }
.quote { color: var(--muted); font-style: italic; border-left: 2px solid var(--line); padding-left: 0.55rem; }
.kat { background: #f7f9fb; border: 1px solid var(--line); border-radius: 6px; padding: 0.55rem 0.7rem; margin: 0.55rem 0; }
.kat ul { margin: 0.35rem 0 0; padding-left: 1.1rem; }

.tabs { display: flex; gap: 0.5rem; margin: 1rem 0; }
.tabs a { padding: 0.4rem 0.75rem; border-radius: 999px; background: #e8eef5; color: var(--ink); font-weight: 600; }
.tabs a.active { background: var(--accent); color: #fff; }

textarea {
	width: 100%; margin-top: 0.35rem; padding: 0.5rem;
	border: 1px solid rgba(21,32,40,0.28); border-radius: 6px; font: inherit;
}
label { display: block; font-weight: 600; margin-top: 0.75rem; }

@media (max-width: 900px) {
	.kat-grid, .mapa-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
	.cards { grid-template-columns: 1fr; }
	.app-main { flex-direction: column; }
	.app-sidebar {
		width: 100%;
		min-height: 0;
		position: static;
		border-right: 0;
		border-bottom: 1px solid var(--line);
	}
	.sidebar-nav { flex-direction: row; flex-wrap: wrap; }
	.sidebar-firma { margin-top: 0; border-top: 0; }
}
