/*
 * Rezervuj.info – vzhľad a responzivita (Etapa 8).
 * Načítava sa po index.css / index2.css a prepisuje ich. Farby stavov v mriežke (zelená voľné,
 * žltá predbežne, červená rezervované, tmavšie pre minulé dni) a ich význam sa nemenia – definuje ich index.css.
 * Pevné šírky (1040, 1020, 1200, 1000, 800, 700, 600 px) sú nahradené max-width; na dotyk ovládacie prvky ≥ 44 px.
 */

:root {
	--bg: #F0F5E0;
	--panel: #ffffff;
	--accent: #6c7a60;
	--accent-2: #9FA996;
	--text: #262a22;
	--muted: #5b6355;
	--line: #d6dcc8;
	--radius: 8px;
	--tap: 44px;
}

*, *::before, *::after { box-sizing: border-box; }

/* atribút hidden platí vždy – inak ho prebije display v triedach (ukazovateľ sily hesla, Caps Lock, okno) */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	padding: 0 10px 24px;
	background: var(--bg);
	color: var(--text);
	font-family: "Segoe UI", Calibri, Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.35;
}

/* ---------- tlačidlá ---------- */

.button, .button2 {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 7px 14px;
	margin-right: 0;
	border: 0;
	border-radius: 999px;
	background: var(--accent-2);
	color: #1f241b;
	font-family: inherit;
	font-size: 13px;
	font-weight: bold;
	line-height: 1.2;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
	cursor: pointer;
	text-decoration: none;
}
.button:hover, .button2:hover { filter: brightness(1.08); }
/* odkaz ako tlačidlo (Zrušiť) aj vo formulári v rámčeku – pravidlo .login fieldset a z index.css ho farbilo ako odkaz */
.login fieldset a.button, .login fieldset a.button2, .login fieldset a.button:hover, .login fieldset a.button2:hover { color: #1f241b; text-decoration: none; }
.button:focus-visible, .button2:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid #2b6cb0; outline-offset: 2px; }

/* panel horných tlačidiel (buttons.php) */
.toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
	margin: 10px 0;
}
.toolbar form { margin: 0; }

/* nadpis stránky a horné tlačidlá v jednom riadku (pôvodne h1 style="float:left") */
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
.page-head > h1 { flex: 1 1 auto; }
.page-head > .toolbar { margin-left: auto; }

/* ---------- informačný panel ---------- */

#infopanel {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 16px;
	width: auto;
	margin: 8px 0;
	padding: 8px 12px;
	border-radius: var(--radius);
	background: #d9ddd0;
	font-size: 12px;
}
#infopanel .left, #infopanel .center, #infopanel .right { float: none; width: auto; font-size: 12px; }
#infopanel .left { flex: 1 1 200px; }
#infopanel .center { flex: 2 1 320px; }
#infopanel .right { flex: 1 1 180px; }
#infopanel > br { display: none; }

/* ---------- prepínač obdobia ---------- */

table.date { margin: 8px auto; border-collapse: separate; border-spacing: 6px; }
table.date td { text-align: center; }
table.date form { margin: 0; }
table.date select { min-height: 32px; padding: 2px 4px; border-radius: 6px; border: 1px solid #888; background: #fff; font: inherit; }

/* ---------- obsah, formuláre, administrácia ---------- */

div.content { width: auto; max-width: 1020px; font-family: inherit; }
.login { width: auto; max-width: 400px; }
.login fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 12px 16px; }
.login fieldset.warning { background: transparent; }
.login input[type=text], .login input[type=password], .login textarea, .login select,
.dlg input[type=text], .dlg input[type=password], .dlg textarea, .dlg select {
	padding: 6px 8px;
	border: 1px solid #a9b19f;
	border-radius: 6px;
	background: #fff;
	font: inherit;
	font-size: 14px;
	max-width: 100%;
}
.login table td, .edit table td { padding: 4px; }

table.details { width: 100%; max-width: 1000px; }
table.detail_info { width: 100%; max-width: 1200px; }
table.legenda { width: 100%; max-width: 600px; }
table.users { width: 100%; max-width: 700px; margin-left: auto; margin-right: auto; }
table.room_types td { width: auto; }
.log_screen { width: auto; max-width: 800px; }

/* triedy namiesto inline style="width:…px;float:…" v PHP šablónach */
.login.wide { max-width: 800px; }                 /* formulárové panely (pôvodne width:800px) */
.msg-box { max-width: 800px; margin-top: 30px; } /* potvrdenie mazania / rezervácie */
table.form-table { width: 100%; max-width: 600px; }
input.date-input { width: 110px; }
/* administrácia: údaje zariadenia vľavo, typy miestností / časy vpravo (pôvodne float 400 + 500/550 px) */
.admin-cols { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 24px; }
.admin-col { flex: 0 1 400px; min-width: 0; }
.admin-col + .admin-col { flex-basis: 550px; }
/* výber zariadenia v hodinovom module (pôvodne striedavo float:left / float:right) */
.choose-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 20px; }
.choose-item { padding: 20px; text-align: center; }
a.link_button, button.link_button { display: inline-block; max-width: 100%; } button.link_button { padding: 10px 30px; min-height: 44px; border: 1px solid; border-color: #CCC #555 #555 #CCC; background: #D4D4D4; font: inherit; font-weight: bold; color: #000; cursor: pointer; } button.link_button:hover { border-color: #555 #CCC #CCC #555; } form.choose-item { margin: 0; }

/* ---------- mriežky ---------- */

/* posun do strany s primrznutým prvým stĺpcom (tablet, mobil) */
.grid-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.grid-scroll table { margin-left: auto; margin-right: auto; }
.grid-scroll tr > th:first-child { position: sticky; left: 0; z-index: 2; }
.grid-scroll tr > th:first-child:not([class*="line"]) { background: var(--bg); }

/* riadok pod myšou */
table.details tr:hover > th.number, table.details2 tr:hover > th.number,
table.prehlad tr:hover > th.number, table.prehlad2 tr:hover > th.number { box-shadow: inset 4px 0 0 var(--accent); }

/* ikony v mriežke – väčšie cieľové plochy */
table.details td a, table.details2 td a { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 30px; }
table.details td a img, table.details2 td a img { width: 22px; height: 22px; }

/* ---------- detail rezervácie (bublina) ---------- */

.has-detail { cursor: pointer; }
.tip {
	position: absolute;
	z-index: 1100;
	max-width: min(320px, calc(100vw - 16px));
	padding: 8px 10px;
	border: 1px solid #c9b458;
	border-radius: 6px;
	background: #fffbe6;
	color: var(--text);
	font-size: 12px;
	text-align: left;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .2);
}
.tip[hidden] { display: none; }

/* ---------- okno s formulárom (namiesto fancybox) ---------- */

.dlg-overlay {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 12px;
	overflow: auto;
	background: rgba(0, 0, 0, .55);
}
.dlg-overlay[hidden] { display: none; }
.dlg {
	position: relative;
	width: 100%;
	max-width: 840px;
	padding: 18px 16px 16px;
	border-radius: 10px;
	background: var(--panel);
	text-align: left;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.dlg-close {
	position: absolute;
	top: 4px;
	right: 6px;
	width: var(--tap);
	height: var(--tap);
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}
.dlg .login { max-width: none; width: auto !important; }
.dlg .login fieldset { margin-top: 0; border: 0; padding: 0; }
.dlg table { width: 100%; }
.dlg-loading, .dlg-error { padding: 30px; text-align: center; }
body.dlg-open { overflow: hidden; }

/* ---------- týždenný systém po dňoch (mobil) ---------- */

.dayview { display: none; }
.dayview-tabs { position: relative; display: flex; gap: 4px; overflow-x: auto; padding-bottom: 4px; }
.dayview-tab {
	flex: 0 0 auto;
	min-height: var(--tap);
	padding: 4px 10px;
	border: 1px solid var(--line);
	border-radius: 6px;
	background: var(--panel);
	font: inherit;
	font-size: 12px;
	line-height: 1.2;
}
.dayview-tab.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
.dayview-room {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin: 6px 0;
	padding: 10px;
	border-radius: 6px;
	text-align: left;
	font-size: 13px;
}
.dayview-name { flex: 0 0 64px; font-weight: bold; }
.dayview-body { flex: 1 1 auto; }
.dayview-body .icons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dayview-body a { display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap); }
.dayview-body a img { width: 26px; height: 26px; }
/* rovnaké farby stavov ako v mriežke */
.dayview-room.res { background: #FFCC00; }
.dayview-room.preres { background: #FF490D; }
.dayview-room.free { background: #66CC00; }
.dayview-room.na { background: #888888; }
.dayview-room.res_h { background: #947600; color: #fff; }
.dayview-room.preres_h { background: #942A08; color: #fff; }
.dayview-room.free_h { background: #3B7600; color: #fff; }
.dayview-room.na_h { background: #888888; color: #fff; }
.dayview-room.break { background: #336699; color: #fff; }
.dayview-room.break_h { background: #1F3B57; color: #fff; }

/* hodinový model po dňoch: časová os každej miestnosti, voľné úseky ako tlačidlá so začiatkom */
.hourview-room { margin: 10px 0 18px; }
.hourview-name { margin: 0 0 4px; font-size: 15px; text-align: left; }
.hourview-room .dayview-room { flex-direction: column; gap: 2px; }
.hourview-room .dayview-name { flex: 0 0 auto; }
.hourview-room .dayview-body { width: 100%; }
.hourview-state { font-weight: bold; }
.dayview-body .slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 6px; }
.dayview-body .slots:empty { display: none; }
.dayview-body a.slot {
	min-width: 0;
	padding: 0 4px;
	border-radius: 6px;
	background: rgba(255, 255, 255, .9);
	color: #1f241b;
	font-weight: bold;
	text-decoration: none;
}

/* ---------- dotykové zariadenia ---------- */

@media (pointer: coarse) {
	.button, .button2, table.date select { min-height: var(--tap); }
	.login input, .login select, .login textarea, .dlg input, .dlg select, .dlg textarea { min-height: var(--tap); font-size: 16px; }
	table.details td a, table.details2 td a { min-width: var(--tap); min-height: var(--tap); }
}

/* ---------- tablet a menej ---------- */

@media (max-width: 1040px) {
	body { padding: 0 6px 24px; }
	#infopanel .center { order: 3; flex-basis: 100%; }
}

/* ---------- mobil ---------- */

@media (max-width: 640px) {
	body { font-size: 14px; }


	#infopanel { font-size: 12px; }
	#infopanel .left, #infopanel .right { flex-basis: 100%; text-align: left; }

	.page-head > h1, .page-head > .toolbar { flex-basis: 100%; }
	.toolbar { justify-content: center; }

	table.date, table.date tbody, table.date tr { display: block; }
	table.date tr { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
	table.date td { display: block; padding: 0; }

	/* kopírovanie: detail kopírovanej rezervácie (10 stĺpcov, na šírku 578 px) ako karta – popisok pri hodnote */
	table.detail_info, table.detail_info tbody, table.detail_info tr, table.detail_info th, table.detail_info td { display: block; width: auto; }
	table.detail_info { margin-top: 12px; border: 1px solid #000; }
	table.detail_info th, table.detail_info td { border: 0; }
	table.detail_info tr:first-child th + th { display: none; }
	table.detail_info tr:first-child th:first-child { padding: 6px 8px; border-bottom: 1px solid #000; }
	table.detail_info td { padding: 3px 8px; overflow-wrap: anywhere; }
	table.detail_info td:before { content: attr(data-label) ": "; font-style: italic; color: #444; }

	/* týždenný systém po dňoch namiesto širokej mriežky */
	.grid-scroll.has-dayview { display: none; }
	.dayview { display: block; }

	/* formuláre: popisky nad poľami */
	.dlg-overlay { padding: 0; }
	.dlg { min-height: 100%; border-radius: 0; padding-top: 48px; }
	.dlg table, .dlg tbody, .dlg tr, .dlg th, .dlg td,
	.login table, .login tbody, .login tr, .login th, .login td { display: block; width: auto !important; text-align: left; }
	.dlg input[type=text], .dlg input[type=password], .dlg textarea, .dlg select,
	.login input[type=text], .login input[type=password], .login textarea, .login select { width: 100%; }

	/* prihlasovacia obrazovka */
	.log_screen { height: auto; min-height: 0; padding: 24px 0; background-size: cover; background-position: center; }
	.log_input { position: static; width: auto; max-width: 300px; margin: 0 auto; padding: 16px; border-radius: var(--radius); background: rgba(255, 255, 255, .85); }
	.log_input input { width: 100%; min-height: var(--tap); font-size: 16px; }

	table.users { margin-left: 0; }
	table.users th, table.users td { font-size: 12px; }
}

/* tlačidlá typov miestností: inline odkaz s paddingom sa pri zalomení riadku prekrýval */
div.content a.rel, div.content a.rel2 { display: inline-block; }
div.content a.rel2 { margin: 0 0 4px 0; }

/* ---------- SuperAdmin: Správa portálu, výber zariadenia, info panel ---------- */

/* info panel: SuperAdmin pracuje v prevádzke, ku ktorej nie je priradený */
.foreign-facility { display: inline-block; margin-top: 2px; padding: 1px 6px; background: #FD0509; color: #fff; font-weight: bold; border-radius: 3px; }

/* výber zariadenia: hľadanie a filter pre SuperAdmina, vypnuté prevádzky */
.choose-filter { margin: 0 0 15px 0; }
.choose-filter input[type=text], .choose-filter select { padding: 4px 6px; margin: 0 6px 6px 0; max-width: 100%; }
.choose-filter .choose-empty { display: none; margin: 10px 0; }
.choose-item.inactive { opacity: 0.6; }

/* Správa portálu */
ul.portal-nav { list-style: none; margin: 0 0 20px 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid #ccc; }
ul.portal-nav li { margin: 0; padding: 0; }
ul.portal-nav a { display: block; padding: 8px 14px; text-decoration: none; border: 1px solid #ccc; border-bottom: 0; border-radius: 4px 4px 0 0; background: #f3f3f3; }
ul.portal-nav li.active a { background: #fff; font-weight: bold; }
div.portal h2 { margin: 25px 0 10px 0; font-size: 14px; }

.portal-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.portal-tile { display: block; padding: 12px 14px; border: 1px solid #ccc; border-radius: 4px; background: #fafafa; text-decoration: none; color: inherit; }
.portal-tile strong { display: block; font-size: 22px; line-height: 1.2; }
.portal-tile span { display: block; margin-top: 4px; color: #666; }
a.portal-tile:hover { background: #f0f0f0; }

ul.portal-alerts { margin: 0; padding: 0 0 0 18px; }
ul.portal-alerts li { margin: 4px 0; }
ul.portal-alerts strong { color: #FD0509; }
.portal-note { color: #666; margin: 10px 0; }
.portal-count { margin: 10px 0 6px 0; }

form.portal-filter { margin: 0 0 10px 0; }
form.portal-filter input[type=text], form.portal-filter select { padding: 4px 6px; margin: 0 6px 6px 0; max-width: 100%; }
form.inline-form { display: inline; margin: 0; }

table.portal-table { width: 100%; border-collapse: collapse; }
table.portal-table th, table.portal-table td { padding: 6px 8px; border-bottom: 1px solid #ddd; text-align: left; vertical-align: middle; }
table.portal-table th { background: #f3f3f3; }
table.portal-table .num { text-align: right; }
table.portal-table tr.inactive td { color: #888; } table.portal-table tr.denied td { background: #fff6f6; } table.audit-detail th { white-space: nowrap; vertical-align: top; } table.audit-detail td { word-break: break-word; } form.portal-filter label { white-space: nowrap; } ul.portal-status { list-style: none; margin: 6px 0 14px 0; padding: 0; } ul.portal-status li { margin: 5px 0; } a.forgot { display: inline-block; margin-top: 8px; font-size: 0.9em; }
table.portal-table tr.denied td { background: #fff1f1; }

/* Priradenia a zoznam užívateľov */
.portal-user-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin: 0 0 10px 0; }
.portal-user-head h2 { margin: 0; }
.badge { display: inline-block; padding: 1px 8px; border: 1px solid #ccc; border-radius: 10px; background: #f3f3f3; }
.badge.on { border-color: #34AC06; color: #1f7a00; font-weight: bold; }
.badge.off { border-color: #FD0509; color: #FD0509; }
.portal-ok { margin: 10px 0; padding: 8px 12px; border: 1px solid #34AC06; background: #f1fbec; }
.portal-confirm { margin: 10px 0; padding: 10px 14px; border: 1px solid #FD0509; background: #fff6f6; }
.portal-confirm h2 { margin-top: 0; }
ul.portal-reasons { margin: 6px 0; padding: 0 0 0 18px; color: #a15c00; }
.assign-new { margin: 16px 0; padding: 10px 12px; border: 1px dashed #bbb; text-align: left; }
.assign-new select { padding: 4px 6px; max-width: 100%; }
table.portal-table .center { text-align: center; }
table.portal-table tr.to-remove td { text-decoration: line-through; color: #888; }
table.portal-table tr.to-remove td:last-child { text-decoration: none; color: #FD0509; }
table.portal-table details ul { margin: 4px 0 0 0; padding: 0 0 0 16px; }
table.portal-table summary { cursor: pointer; }
.portal-pages a, .portal-pages strong { display: inline-block; padding: 2px 8px; }

/* formulár prevádzky */
form.facility-form textarea { width: 100%; max-width: 320px; }
form.facility-form input[type=number] { width: 70px; }
form.facility-form tr.hourly.hidden { display: none; }
table.portal-table td form.inline-form input.button { margin: 0 0 2px 0; }

/* na úzkej obrazovke sa riadok tabuľky zobrazí ako karta s popiskami */
@media (max-width: 700px) {
	table.portal-table, table.portal-table tbody, table.portal-table tr, table.portal-table td { display: block; width: auto; }
	table.portal-table tr:first-child { display: none; }
	table.portal-table tr { margin: 0 0 12px 0; padding: 8px 10px; border: 1px solid #ccc; border-radius: 4px; }
	table.portal-table td { border: 0; padding: 3px 0; text-align: left; }
	table.portal-table td.num, table.portal-table td.center { text-align: left; }
	table.portal-table td:before { content: attr(data-label) ": "; color: #666; }
}

/* ---------- tlač ---------- */

@media print {
	.toolbar, .dayview, .dlg-overlay, .tip { display: none !important; }
	.grid-scroll { overflow: visible; }
	.grid-scroll.has-dayview { display: block !important; }
}

/* ---------- horná lišta (4. kolo, N1 – html/topbar.php) ----------
 * Jedna lišta pre oba moduly v pôvodnej palete (zelená lišta, béžové pozadie). Na počítači: aplikácia a prevádzka
 * vľavo, hlavné menu, vpravo Správa portálu a menu užívateľa; podmenu Administrácie ako druhý riadok. Pod 800 px:
 * prevádzka a tlačidlo Menu, položky pod sebou (aspoň 44 px). Rozbalenie bez JavaScriptu (zaškrtávacie pole, details). */
.skryty-popis { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.topbar { margin: 8px 0 0; text-align: left; }
.topbar-riadok {
	display: flex; flex-wrap: wrap; align-items: stretch; gap: 0;
	border-radius: var(--radius); background: var(--accent); color: #fff;
}
.topbar a, .topbar summary, .topbar button { color: #fff; text-decoration: none; font: inherit; }
.topbar-app { display: flex; align-items: center; min-height: var(--tap); padding: 6px 14px; font-weight: bold; font-size: 16px; white-space: nowrap; }
.topbar-app:hover { background: rgba(255, 255, 255, .12); }
.topbar-prev { display: flex; align-items: center; min-height: var(--tap); padding: 0 12px 0 4px; font-size: 14px; max-width: 360px; }
.topbar-prev-nazov { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-drop { position: relative; }
.topbar-drop > summary { display: flex; align-items: center; gap: 4px; min-height: var(--tap); padding: 6px 12px; cursor: pointer; list-style: none; }
.topbar-drop > summary::-webkit-details-marker { display: none; }
.topbar-drop > summary:hover, .topbar-drop[open] > summary { background: rgba(255, 255, 255, .12); }
.topbar-prev.topbar-drop { padding: 0; }
.topbar-prev.topbar-drop > summary { max-width: 360px; }
.topbar-dropbox {
	position: absolute; z-index: 50; top: 100%; min-width: 240px; max-width: 90vw; padding: 6px 0;
	border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 4px 14px rgba(0, 0, 0, .25);
}
.topbar-prev .topbar-dropbox { left: 0; }
.topbar-uzivatel .topbar-dropbox { right: 0; }
.topbar-dropbox form { margin: 0; }
.topbar-dropbox a, .topbar-dropbox button {
	display: block; width: 100%; min-height: var(--tap); padding: 10px 14px; border: 0; background: none;
	color: var(--text); text-align: left; cursor: pointer; line-height: 1.3;
}
.topbar-dropbox a:hover, .topbar-dropbox button:hover { background: #eef2e4; }
.topbar-dropbox .aktivna { font-weight: bold; background: #e4ead6; }
.topbar-dropbox a:last-child { border-top: 1px solid var(--line); }
.topbar-nav { display: flex; flex: 1 1 auto; flex-wrap: wrap; align-items: stretch; }
.topbar-nav ul { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.topbar-hlavne { flex: 1 1 auto; }
.topbar-vpravo { margin-left: auto !important; }
.topbar-nav li { display: flex; }
.topbar-nav li > a, .topbar-nav li > form > button {
	display: flex; align-items: center; min-height: var(--tap); padding: 6px 12px; border: 0; background: none; cursor: pointer; white-space: nowrap;
}
.topbar-nav li > form { display: flex; margin: 0; }
.topbar-nav li > a:hover, .topbar-nav li > form > button:hover { background: rgba(255, 255, 255, .12); }
.topbar .aktivna { font-weight: bold; }
.topbar-nav a.aktivna { background: rgba(255, 255, 255, .2); box-shadow: inset 0 -3px 0 #F0F5E0; }
.topbar-prepinac, .topbar-menu-tlacidlo { display: none; }
@media (max-width: 799px) { .topbar-prepinac { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; } }
.topbar-kto { font-weight: normal; opacity: .85; }
.topbar-podmenu ul { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; padding: 0; list-style: none; }
.topbar-podmenu a {
	display: flex; align-items: center; min-height: 36px; padding: 6px 12px; border-radius: 999px;
	background: var(--accent-2); color: #1f241b; font-size: 13px; font-weight: bold;
}
.topbar-podmenu a:hover { filter: brightness(1.08); }
.topbar-podmenu a.aktivna { background: var(--accent); color: #fff; }
.len-telefon { display: none !important; }
.topbar-anonym .topbar-app { cursor: default; }
@media print { .topbar { display: none !important; } }

/* domovská stránka po výbere prevádzky (html/domov.php) */
.domov h1 { font-size: 18px; }
.domov-dlazdice { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin: 12px 0; padding: 0; list-style: none; }
.domov-dlazdice a {
	display: flex; flex-direction: column; gap: 4px; min-height: 88px; padding: 14px 16px; border: 1px solid var(--line);
	border-radius: var(--radius); background: var(--panel); color: var(--text); text-align: left; text-decoration: none;
}
.domov-dlazdice a strong { font-size: 16px; color: #3f4a36; }
.domov-dlazdice a span { font-size: 13px; color: var(--muted); }
.domov-dlazdice a:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }

@media (max-width: 799px) {
	.topbar-riadok { align-items: center; }
	.topbar-app { padding: 6px 10px; font-size: 15px; }
	.topbar-prev { flex: 1 1 0; min-width: 0; max-width: none; font-size: 13px; }
	.topbar-prev.topbar-drop > summary { max-width: none; }
	.topbar-menu-tlacidlo {
		display: flex; align-items: center; gap: 6px; margin-left: auto; min-height: var(--tap); min-width: var(--tap);
		padding: 6px 14px; font-weight: bold; cursor: pointer; border-left: 1px solid rgba(255, 255, 255, .25);
	}
	.topbar-prepinac:focus-visible + .topbar-menu-tlacidlo { outline: 3px solid #2b6cb0; outline-offset: -3px; }
	.topbar-nav { display: none; flex-basis: 100%; flex-direction: column; border-top: 1px solid rgba(255, 255, 255, .25); }
	.topbar-prepinac:checked ~ .topbar-nav, .topbar-nav.is-open { display: flex; }
	.topbar-nav ul { flex-direction: column; }
	.topbar-vpravo { margin-left: 0 !important; border-top: 1px solid rgba(255, 255, 255, .25); }
	.topbar-pod { background: rgba(0, 0, 0, .12); }
	.topbar-pod li > a { padding-left: 28px; }
	.topbar-nav li > a, .topbar-nav li > form, .topbar-nav li > form > button { width: 100%; }
	.topbar-nav li > a, .topbar-nav li > form > button { padding: 10px 14px; white-space: normal; }
	.len-telefon { display: flex !important; }
	.len-pocitac { display: none !important; }
	.topbar-dropbox { position: fixed; left: 8px !important; right: 8px !important; top: auto; min-width: 0; max-width: none; }
}

/* ---------- Moje prevádzky, Môj účet, Moji užívatelia (4. kolo, N2–N4) ---------- */
.ucet { max-width: 1100px; text-align: left; }
.ucet h1 { font-size: 18px; }
.ucet h2 { font-size: 15px; margin: 0 0 10px; }
.ucet-zalozky ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.ucet-zalozky a {
	display: flex; align-items: center; min-height: var(--tap); padding: 8px 16px; border: 1px solid var(--line);
	border-radius: 999px; background: var(--panel); color: var(--text); text-decoration: none; font-weight: bold; font-size: 14px;
}
.ucet-zalozky a.aktivna { background: var(--accent); border-color: var(--accent); color: #fff; }
.ucet-stlpce { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.ucet-stlpce > .ucet-cast { flex: 1 1 360px; }
.ucet-cast { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
table.moje-prevadzky, table.moji-uzivatelia { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); }
table.moje-prevadzky th, table.moje-prevadzky td, table.moji-uzivatelia th, table.moji-uzivatelia td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; font-size: 14px; }
table.moje-prevadzky thead th, table.moji-uzivatelia thead th { background: #e4ead6; font-size: 13px; }
table.moje-prevadzky thead th a { color: inherit; }
table.moje-prevadzky tr.otvorena td { background: #f6f9ee; }
table.moje-prevadzky tr.neaktivna td, table.moji-uzivatelia tr.neaktivna td { color: #6b6b6b; background: #f2f2f2; }
table.moje-prevadzky td.akcia, table.moji-uzivatelia td.akcia { white-space: nowrap; }
table.moje-prevadzky td.akcia form, .inline-form { display: inline; margin: 0; }
table.moji-uzivatelia td.akcia .button2 { margin: 2px 0; }
.obec { color: var(--muted); font-size: 13px; }
.znacka { display: inline-block; margin: 2px 4px 0 0; padding: 1px 8px; border-radius: 999px; background: #e4ead6; color: #2f3a28; font-size: 12px; white-space: nowrap; }
.znacka-otvorena { background: #3f6b2c; color: #fff; }
.znacka-neaktivna { background: #6b6b6b; color: #fff; }
.prepinac { display: inline-flex; align-items: center; gap: 6px; min-height: var(--tap); cursor: pointer; }
.prepinac input { width: 22px; height: 22px; margin: 0; accent-color: #3f6b2c; }
.prepinac-stav { margin-left: 6px; font-size: 12px; color: #2f6b1f; }
.prepinac-stav.chyba { color: #b00020; }
html.js .bez-js { display: none; }
.choose-filter input[type=search] { min-height: 36px; padding: 4px 8px; border: 1px solid #888; border-radius: 6px; font: inherit; }

/* ---------- formuláre (F1–F6) ---------- */
.formular { max-width: 460px; text-align: left; }
.pole { margin: 0 0 12px; }
.pole > label, .pole-popis { display: block; margin: 0 0 4px; font-weight: bold; font-size: 14px; }
.pole input[type=text], .pole input[type=email], .pole input[type=password], .pole input[type=date], .pole input[type=number], .pole select, .pole textarea {
	display: block; width: 100%; max-width: 420px; min-height: 40px; padding: 7px 10px; border: 1px solid #a9b19f; border-radius: 6px;
	background: #fff; color: var(--text); font: inherit; font-size: 15px;
}
.pole-hodnota { display: block; padding: 4px 0; font-size: 15px; }
.pole-pomoc { margin-top: 4px; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.pole-chyba { margin-top: 4px; color: #b00020; font-size: 13px; font-weight: bold; }
.pole-chyba:empty { display: none; }
.pole-zle input, .pole-zle select, .pole-zle textarea, input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border: 2px solid #b00020 !important; }
.form-chyba { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #e3a6ae; border-radius: 6px; background: #fdecee; color: #8a0018; font-weight: bold; }
.form-ulozene { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #a8cf98; border-radius: 6px; background: #eef8e8; color: #1f5a12; font-weight: bold; }
.formular-tlacidla { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.heslo-obal { position: relative; max-width: 420px; }
.heslo-obal input { padding-right: 48px !important; }
.heslo-oko { position: absolute; top: 0; right: 0; width: var(--tap); height: 100%; min-height: 40px; border: 0; background: none; cursor: pointer; font-size: 18px; }
.heslo-oko[aria-pressed=true] { opacity: .55; }
.heslo-sila { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; font-weight: bold; }
.heslo-sila-pas { display: inline-block; width: 120px; height: 8px; border-radius: 4px; background: #dcdcdc; overflow: hidden; }
.heslo-sila-pas span { display: block; height: 100%; width: 0; background: #b00020; }
.heslo-sila[data-uroven="1"] .heslo-sila-pas span { width: 33%; background: #b00020; }
.heslo-sila[data-uroven="2"] .heslo-sila-pas span { width: 66%; background: #b26b00; }
.heslo-sila[data-uroven="3"] .heslo-sila-pas span { width: 100%; background: #2f6b1f; }
.heslo-sila[data-uroven="1"] .heslo-sila-text { color: #b00020; }
.heslo-sila[data-uroven="2"] .heslo-sila-text { color: #8a5300; }
.heslo-sila[data-uroven="3"] .heslo-sila-text { color: #2f6b1f; }
.heslo-zhoda { margin-top: 4px; font-size: 13px; font-weight: bold; }
.heslo-zhoda.ok { color: #2f6b1f; }
.heslo-zhoda.zle { color: #b00020; }
.heslo-caps { margin-top: 4px; color: #8a5300; font-size: 13px; font-weight: bold; }

/* tabuľky ako karty na telefóne (Moje prevádzky, Moji užívatelia) */
@media (max-width: 799px) {
	table.karty, table.karty tbody, table.karty tr, table.karty td { display: block; width: auto; }
	table.karty thead { display: none; }
	table.karty { border: 0; background: none; }
	table.karty tr { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
	table.karty td { padding: 4px 0; border: 0; }
	table.karty td[data-label]:not([data-label=""])::before { content: attr(data-label) ": "; display: block; color: var(--muted); font-size: 12px; font-weight: normal; }
	table.karty td.akcia { padding-top: 8px; white-space: normal; }
	table.karty td.akcia .button, table.karty td.akcia .button2 { min-height: var(--tap); }
}

/* ---------- 4. kolo, časť 4 a F8: dotykové plochy, potvrdenia, legenda, kontrast ---------- */
/* Áno / Nie v potvrdeniach (08b): medzera aspoň 12 px, „Nie“ ako neutrálne tlačidlo */
input[type=submit][value="Áno"] + input[type=submit][value="Nie"], .tlacidlo-neutralne { margin-left: 16px; }
input[type=submit][value="Nie"], .button2.tlacidlo-neutralne {
	background: #fff; color: #2f3a28; border: 2px solid #6c7a60; box-shadow: none;
}
.potvrdenie-tlacidla { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; }
.potvrdenie-tlacidla input[type=submit][value="Nie"] { margin-left: 0; }
.tlacidlo-pozor { background: #a33a1f !important; color: #fff !important; }
.potvrdenie h1 { font-size: 16px; }
/* typy miestností a dlaždice miestností: tmavý text na sivozelenej (pôvodne biely, kontrast okolo 2 : 1) */
div.content .rel, div.content .rel2, div.content li.rooms a { color: #1f241b; }
div.content li.rooms a.miestnost-uprava { display: flex; align-items: center; justify-content: center; min-height: var(--tap); }
/* upozornenie pod formulárom (*) – čitateľné písmo */
.login fieldset.warning { font-size: 13px; color: #a00000; }
/* kopírovaný detail: odlíšená farba (pôvodne #ff0000, takmer ako Rezervované #FF490D) */
table.prehlad td.copy, table.details td.copy { background: #8E44AD !important; }
.legenda-minule { background: #3B7600; }
/* ikonové tlačidlá a zaškrtávacie políčka – dotyková plocha 44 × 44 px aj pri malej ikone (F8) */
@media (pointer: coarse), (max-width: 799px) {
	table.details td a[rel], table.details2 td a[rel], table.details td .icons a, table.details2 td .icons a,
	.dayview-body a[rel], .dayview-body .icons a, table.users td a, table.room_types a, td.center a {
		display: inline-flex; align-items: center; justify-content: center; min-width: var(--tap); min-height: var(--tap);
	}
	table.details td .icons, .dayview-body .icons { display: flex; flex-wrap: wrap; gap: 4px; }
	img.ico_new { width: 24px; height: 24px; }
	table.details input[type=checkbox], table.prehlad input[type=checkbox], .dayview-body input[type=checkbox] {
		width: 26px; height: 26px; margin: 9px;
	}
	.zmazat-vyber { display: flex; align-items: center; min-height: var(--tap); font-weight: bold; }
	/* mesačný prehľad: bunky aspoň 44 px (pôvodne okolo 18 px), tabuľka sa posúva do strany s ukotveným 1. stĺpcom */
	table.prehlad td, table.prehlad2 td { min-width: var(--tap); height: var(--tap); }
}
/* legenda na telefóne: farba a popis pod sebou, nie natlačené v jednom riadku */
@media (max-width: 799px) {
	table.legenda tr:has(> td[style*="background"]) { display: grid; grid-template-columns: 24px 1fr; gap: 6px 10px; align-items: center; }
	table.legenda tr:has(> td[style*="background"]) > td { display: block; width: auto !important; height: 20px; }
	table.legenda tr:has(> td[style*="background"]) > td:nth-child(even) { height: auto; }
	table.legenda td { text-align: left; }
}
.topbar-kto { margin-left: 4px; }
.topbar-nav li > a > span[aria-hidden] { margin-right: 4px; }

/* ---------- 5. kolo ---------- */
/* U1: okno s jedným formulárom široké podľa formulára (nie 840 px s formulárom vľavo); na telefóne bez zmeny */
.dlg:has(.formular), .dlg:has(.rez-formular), .dlg:has(.msg-box), .dlg:has(.login) { max-width: 560px; }
.dlg .login fieldset table { margin-left: auto; margin-right: auto; }
.dlg .formular { margin-left: auto; margin-right: auto; }
/* U2: formuláre rezervácie – tlačidlá v strede pod formulárom, neutrálna poznámka „* povinné“ (červená len pri chybe) */
.rez-tlacidla { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 14px; }
.rez-povinne { margin: 10px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
@media (min-width: 641px) { .rez-formular table th { text-align: right; padding-right: 8px; vertical-align: top; } }
@media (max-width: 640px) { .rez-formular table th { text-align: left; } }
.rez-formular .pole-chyba { max-width: 260px; }
/* K5: „€“ ako popis za poľom ceny */
.pole-jednotka { white-space: nowrap; }
/* U10 (5. kolo) */
/* Moji užívatelia: login sa nezalomí na pomlčke */
table.moji-uzivatelia td[data-label="Login"] { white-space: nowrap; }
/* tlačidlá formulára rovnako veľké aj na telefóne (Uložiť / Zrušiť) */
.formular-tlacidla .button, .formular-tlacidla .button2, .rez-tlacidla .button, .rez-tlacidla .button2,
.login .formular-tlacidla input.button, .login .rez-tlacidla input.button { font-family: inherit; font-size: 15px; line-height: 1.2; color: #1f241b; }
/* čísla izieb v mriežke sú kotvy (#izba), nie odkazy – nevyzerajú ako odkaz */
table.details th a:not([href]), table.details2 th a:not([href]), table.details2 td a:not([href]) { color: inherit; text-decoration: none; cursor: default; }
