/*
	Konektor ABRA — mcp.bmrc.cloud

	Barvy jako tokeny na :root, tmavá varianta ve DVOU blocích:
	podle systému (pro volbu „auto") a podle data-theme (pro ruční přepnutí).
	Kdyby byla jen jedna, přepínač by v jednom směru nefungoval.
*/

:root {
	--primary: #d97757;          /* barva sekce Konektory Claude na rozcestníku */
	--primary-soft: rgba(217, 119, 87, .12);
	--body: #212529;
	--muted: #6c757d;
	--border: #dee2e6;
	--border-soft: #e9ecef;
	--surface: #fff;
	--bg: #f5f6f8;
	--hover: #f8f9fa;
	--ok: #2e7d32;
	--ne: #c0392b;
	--radius: 10px;
	--shadow: 0 .5rem 1rem rgba(16, 24, 40, .09);

	/* horní lišta je tmavá v obou režimech, stejně jako v ostatních appkách */
	--sb-bg: #111827;
	--sb-hover: #1f2937;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--body: #e6eaf0;
		--muted: #9aa4b2;
		--border: #2c343f;
		--border-soft: #222933;
		--surface: #171d25;
		--bg: #0f141a;
		--hover: #1b222b;
		--ok: #6cc48f;
		--ne: #f1707a;
		--shadow: 0 .5rem 1rem rgba(0, 0, 0, .5);
	}
}

:root[data-theme="dark"] {
	--body: #e6eaf0;
	--muted: #9aa4b2;
	--border: #2c343f;
	--border-soft: #222933;
	--surface: #171d25;
	--bg: #0f141a;
	--hover: #1b222b;
	--ok: #6cc48f;
	--ne: #f1707a;
	--shadow: 0 .5rem 1rem rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--body);
	font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1, h2, h3 { line-height: 1.25; }

/* --- horní lišta ---------------------------------------------------------- */
.topbar {
	position: sticky; top: 0; z-index: 20;
	display: flex; align-items: center; gap: 14px;
	padding: 10px 18px;
	background: var(--sb-bg);
}
.topbar__brand {
	display: flex; align-items: center; gap: 9px;
	color: #e5e7eb; text-decoration: none; font-weight: 600;
}
.topbar__right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.ikonbtn {
	height: 34px; min-width: 34px; padding: 0 10px;
	display: inline-grid; place-items: center;
	border: 1px solid var(--sb-hover); border-radius: 8px;
	background: rgba(255, 255, 255, .06); color: #cbd5e1;
	font: inherit; font-size: 13px; text-decoration: none; cursor: pointer;
}
.ikonbtn:hover { color: #fff; border-color: var(--primary); background: rgba(255, 255, 255, .12); }

.vlajky { display: inline-flex; gap: 4px; }
.vlajka {
	display: grid; place-items: center; width: 32px; height: 34px;
	border: 1px solid transparent; border-radius: 8px; opacity: .55;
}
.vlajka:hover { opacity: 1; }
.vlajka.is-aktivni { opacity: 1; border-color: var(--primary); background: rgba(255, 255, 255, .10); }
.vlajka svg { border-radius: 2px; display: block; }

/* --- přepínač aplikací ---------------------------------------------------- */
.appswitch { position: relative; flex: none; }
.appswitch__btn {
	width: 34px; height: 34px; display: grid; place-items: center;
	border: 1px solid var(--sb-hover); border-radius: 8px;
	background: rgba(255, 255, 255, .06); color: #cbd5e1;
	cursor: pointer; padding: 0;
}
.appswitch__btn:hover, .appswitch__btn[aria-expanded="true"] { color: #fff; border-color: var(--primary); background: rgba(255, 255, 255, .12); }
.appswitch__menu {
	position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
	min-width: 320px; padding: 8px;
	background: var(--surface); border: 1px solid var(--border);
	border-radius: 10px; box-shadow: var(--shadow);
}
.appswitch__portal {
	display: flex; align-items: center; gap: 10px;
	padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--body);
}
.appswitch__portal:hover { background: var(--hover); }
.appswitch__portal-ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary); }
.appswitch__portal small { display: block; color: var(--muted); font-size: 11.5px; }
.appswitch__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border-soft); }
.appswitch__tile { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 8px; text-decoration: none; color: var(--body); text-align: center; }
.appswitch__tile:hover { background: var(--hover); }
.appswitch__tile.is-current { background: var(--primary-soft); pointer-events: none; }
.appswitch__ico { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; color: #fff; font-size: 16px; line-height: 1; }
.appswitch__ico--logo { background: transparent !important; }
.appswitch__name { font-size: 11.5px; color: var(--muted); line-height: 1.25; }

/* --- obsah ---------------------------------------------------------------- */
.obsah { max-width: 46rem; margin: 0 auto; padding: 28px 18px 56px; }

.hero h1 { margin: 0 0 6px; font-size: 1.7rem; }
.hero__podtitul { margin: 0 0 8px; color: var(--muted); font-size: 1.02rem; }

.karta {
	margin-top: 20px; padding: 20px 22px;
	background: var(--surface); border: 1px solid var(--border);
	border-radius: var(--radius);
}
.karta h2 { margin: 0 0 12px; font-size: 1.06rem; }
.karta h3 { margin: 0 0 8px; font-size: .95rem; }
.karta--pozor { border-left: 3px solid var(--primary); }

.tlumene { color: var(--muted); margin: 6px 0 0; font-size: .9rem; }

.stav { margin: 0; font-weight: 600; }
.stav--ano { color: var(--ok); }
.stav--ne { color: var(--ne); }

.tlacitko {
	display: inline-block; margin-top: 12px; padding: 8px 15px;
	background: var(--primary); color: #fff; border: 0;
	border-radius: 8px; text-decoration: none; font: inherit; font-size: .92rem; cursor: pointer;
}
.tlacitko--male { margin: 0; padding: 6px 11px; }

.adresa {
	display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
	padding: 12px 14px; background: var(--hover);
	border: 1px solid var(--border-soft); border-radius: 8px;
}
.adresa__popisek { color: var(--muted); font-size: .82rem; }
.adresa code { font-size: .95rem; word-break: break-all; }

/* --- návod po krocích ----------------------------------------------------- */
.kroky { margin: 20px 0 0; padding: 0; list-style: none; counter-reset: krok; }
.kroky > li {
	position: relative;
	counter-increment: krok;
	padding: 0 0 22px 44px;
	border-left: 2px solid var(--border-soft);
	margin-left: 14px;
}
.kroky > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.kroky > li::before {
	content: counter(krok);
	position: absolute; left: -15px; top: -2px;
	width: 28px; height: 28px;
	display: grid; place-items: center;
	background: var(--primary); color: #fff;
	border-radius: 50%; font-size: .85rem; font-weight: 600;
}
.kroky h3 { margin: 2px 0 4px; }
.kroky p { margin: 0; }

/* --- snímek obrazovky s odznáčky ------------------------------------------ */
.snimek { margin: 14px 0 0; }
.snimek__ramec {
	position: relative; display: inline-block; max-width: 100%;
	border: 1px solid var(--border); border-radius: 10px; overflow: hidden;
}
.snimek img { display: block; width: 100%; height: auto; }
.znacka {
	position: absolute;
	width: 22px; height: 22px;
	display: grid; place-items: center;
	background: var(--primary); color: #fff;
	border: 2px solid #fff;
	border-radius: 50%; font-size: .72rem; font-weight: 700;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}
.snimek figcaption { display: grid; gap: 5px; margin-top: 10px; color: var(--muted); font-size: .86rem; }
.snimek figcaption b {
	display: inline-grid; place-items: center;
	width: 17px; height: 17px; margin-right: 5px;
	background: var(--primary); color: #fff;
	border-radius: 50%; font-size: .68rem; vertical-align: -3px;
}

.seznam { margin: 0; padding-left: 1.2rem; }
.seznam li { margin-bottom: 6px; }
