/* Administrace klienta a správa služby. Barvy a písmo podle návrhu v recepcni-design. */
:root {
	--ink: #1C2340;
	--muted: #5E6785;
	--body: #434B66;
	--line: #E4E8F0;
	--line-strong: #D5DBE6;
	--band: #F4F6FA;
	--accent: #D81E5B;
	--yellow: #FFD23F;
	--yellow-soft: #FFF6D6;
	--ok: #14803F;
	--warn: #A8590B;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	font-family: 'Nunito', sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: var(--ink);
	background: #FFFFFF;
}

a { color: var(--ink); }
a:hover { color: var(--accent); }

.shell { display: flex; flex-wrap: wrap; min-height: 100vh; }

.side {
	flex: 1 1 232px;
	max-width: 100%;
	background: var(--band);
	border-right: 1px solid var(--line);
	padding: 18px 14px;
	display: flex;
	flex-direction: column;
	gap: 22px;
}
.side--admin { background: var(--ink); color: #D5DAEA; border-right: 0; }

.brand { font-weight: 900; font-size: 22px; letter-spacing: -0.5px; text-decoration: none; padding: 0 8px; }
.side--admin .brand { color: #FFFFFF; }
.brand small { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.6px; color: var(--yellow); }

.firm { padding: 9px 10px; background: #FFFFFF; border: 1px solid var(--line-strong); border-radius: 7px; }
.firm strong { display: block; font-weight: 800; }
.firm span { font-size: 12px; color: var(--muted); }

.menu { display: flex; flex-direction: column; gap: 2px; }
.menu a { display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 6px; text-decoration: none; }
.menu a.is-active { background: var(--ink); color: #FFFFFF; font-weight: 700; }
.side--admin .menu a { color: #D5DAEA; }
.side--admin .menu a.is-active { background: #FFFFFF; color: var(--ink); font-weight: 800; }
.badge { background: var(--yellow); color: var(--ink); font-size: 12px; font-weight: 800; border-radius: 9px; padding: 0 7px; }

.usage { margin-top: auto; padding: 12px 10px; border-top: 1px solid var(--line-strong); font-size: 13px; }
.usage__row { display: flex; justify-content: space-between; margin-bottom: 6px; }
.usage__row strong { font-weight: 800; }
.meter { height: 6px; border-radius: 3px; background: var(--line-strong); }
.meter span { display: block; height: 6px; border-radius: 3px; background: var(--ink); max-width: 100%; }
.usage small { display: block; color: var(--muted); margin-top: 8px; }
.side--admin .usage { border-top-color: #343E6C; color: #9AA3BA; }

.main { flex: 999 1 560px; min-width: 0; padding: 22px 26px; }
.main h1 { margin: 0 0 14px; font-size: 24px; font-weight: 900; }

.table-wrap { overflow-x: auto; }
table.list { width: 100%; min-width: 600px; border-collapse: collapse; }
table.list th { padding: 10px 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-align: left; border-bottom: 1px solid var(--line-strong); }
table.list td { padding: 12px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list tr.is-open { background: var(--yellow-soft); }
table.list .sub { color: var(--muted); }
.state--open { color: var(--warn); font-weight: 700; }
.state--ok { color: var(--ok); }

.empty { padding: 40px 0; color: var(--body); max-width: 520px; }
.empty strong { display: block; font-size: 18px; font-weight: 900; color: var(--ink); margin-bottom: 4px; }

.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; background: var(--band); }
.flash--success { background: #D8F3E3; }
.flash--error { background: #FBDDE6; }

/* přihlášení */
.auth { display: flex; flex-wrap: wrap; min-height: 100vh; font-size: 17px; }
.auth__form { flex: 1 1 480px; min-width: 0; padding: 36px 56px 40px; display: flex; flex-direction: column; }
.auth__form .brand { font-size: 26px; padding: 0; }
.auth__box { margin: auto 0; max-width: 400px; width: 100%; padding: 40px 0; }
.auth__box h1 { margin: 0 0 6px; font-size: 36px; line-height: 1.15; font-weight: 900; letter-spacing: -0.5px; }
.auth__box p { margin: 0 0 26px; color: var(--body); }
.auth__box label { display: block; font-weight: 800; font-size: 15px; margin-bottom: 5px; }
.auth__box input[type=email], .auth__box input[type=password] {
	font: inherit; color: var(--ink); width: 100%; border: 1.5px solid #C3CAD8; border-radius: 10px; padding: 12px 14px; margin-bottom: 16px;
}
.auth__box input[type=submit] {
	font: inherit; font-weight: 900; font-size: 18px; color: #FFFFFF; background: var(--accent); border: 0; border-radius: 30px; padding: 14px 24px; width: 100%; cursor: pointer; margin-top: 6px;
}
.auth__box ul.error { list-style: none; margin: 0 0 16px; padding: 10px 14px; border-radius: 8px; background: #FBDDE6; font-size: 15px; }
.auth__aside { flex: 1 1 480px; min-width: 0; background: var(--ink); color: #FFFFFF; padding: 56px; display: flex; flex-direction: column; justify-content: center; }
.auth__aside h2 { margin: 0 0 6px; font-size: 30px; line-height: 1.2; font-weight: 900; }
.auth__aside p { margin: 0; color: #D5DAEA; max-width: 420px; }

/* správce v cizím účtu */
.notice { background: var(--yellow); color: var(--ink); padding: 8px 26px; font-weight: 700; font-size: 14px; }
.notice a { margin-left: 10px; }
.notice a.notice__back { display: inline-block; padding: 3px 12px; border-radius: 8px; background: var(--ink); color: #FFFFFF; text-decoration: none; }

/* obsah obrazovek */
.main h2 { margin: 34px 0 8px; font-size: 18px; font-weight: 900; }
.main .lead { margin: 0 0 18px; color: var(--body); max-width: 640px; }
.main .sub { color: var(--muted); font-size: 13px; }
.back { margin: 0 0 14px; font-size: 14px; }
.row-actions a { display: block; white-space: nowrap; font-size: 14px; }

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 20px; }
.button { display: inline-block; font-weight: 800; color: #FFFFFF; background: var(--ink); border: 1.5px solid var(--ink); border-radius: 8px; padding: 8px 16px; text-decoration: none; }
.button:hover { color: #FFFFFF; background: var(--accent); border-color: var(--accent); }
.button--ghost { color: var(--ink); background: transparent; }



/* formuláře */
.main form table { border-collapse: collapse; width: 100%; max-width: 640px; }
.main form th, .main form td { display: block; text-align: left; padding: 0; }
.main form th { font-weight: 800; font-size: 14px; margin: 14px 0 4px; }
.main form input[type=text], .main form input[type=email], .main form input[type=password], .main form input[type=tel], .main form input[type=url], .main form select, .main form textarea {
	font: inherit; color: var(--ink); width: 100%; background: #FFFFFF; border: 1.5px solid #C3CAD8; border-radius: 8px; padding: 9px 12px;
}
.main form textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
.main form input:focus-visible, .main form select:focus-visible, .main form textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.main form input[type=submit] { font: inherit; font-weight: 800; color: #FFFFFF; background: var(--accent); border: 0; border-radius: 8px; padding: 10px 22px; margin-top: 18px; cursor: pointer; }
.main form small, .main form .error { display: block; font-size: 13px; color: var(--muted); margin-top: 3px; }
.main form .error, .main form ul.error { color: var(--warn); }
.main form ul.error { list-style: none; padding: 0; margin: 0 0 10px; font-weight: 700; }
.auth__box p.auth__signup { margin: 22px 0 0; font-size: 15px; }

/* pravidla po hovoru */
.rules { max-width: 640px; }
.rule { padding: 14px 0; border-bottom: 1px solid var(--line); }
.rule__check { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 16px; cursor: pointer; }
.rule__check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; flex: none; }
.rule__target { margin: 8px 0 0 28px; }
.rule__target label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 3px; }
.rule__target input { max-width: 360px; }
.rule:has(.rule__check input:not(:checked)) .rule__target { opacity: 0.55; }
table.list td.wrap { overflow-wrap: anywhere; }
/* kalendář */
.agenda { max-width: 760px; }
.agenda h2 { margin: 22px 0 4px; font-size: 16px; }
.agenda ul { list-style: none; margin: 0; padding: 0; }
.agenda li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.agenda__time { flex: 0 0 110px; font-weight: 800; font-variant-numeric: tabular-nums; }
.agenda__who { flex: 1 1 260px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.agenda__cancel { font-size: 14px; }
.choice { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.choice label { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1.5px solid #C3CAD8; border-radius: 10px; font-weight: 700; cursor: pointer; }
.choice label:has(input:checked) { border-color: var(--ink); background: var(--yellow-soft); }
.choice input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; flex: none; }
.rules .rule > label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.rules .rule > input, .rules .rule > select { max-width: 360px; }
.hint { font-size: 14px; color: var(--muted); margin: 6px 0 0; max-width: 600px; }
.hint strong { color: var(--ink); overflow-wrap: anywhere; }
.main form table.hours { width: auto; margin-top: 6px; }
.main form table.hours th, .main form table.hours td { display: table-cell; padding: 4px 10px 4px 0; margin: 0; font-size: 15px; vertical-align: middle; }
.main form table.hours th { font-weight: 700; min-width: 84px; }
.main form table.hours input { width: 96px; }

table.list td:nth-child(3) { max-width: 520px; }


/* přehled hovorů: telefon k vytočení a tlačítko na detail */
table.list a.phone { display: block; white-space: nowrap; font-weight: 700; }
table.list strong + a.phone { font-weight: 400; }
.button--small { padding: 4px 12px; font-size: 14px; white-space: nowrap; }

/* detail hovoru */
.call__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 14px 32px; max-width: 1080px; margin-bottom: 22px; }
.call__head h1 { margin: 0 0 4px; font-size: 28px; line-height: 1.2; }
.call__head .actions { margin: 4px 0 0; }
.call__when { color: var(--muted); }
.call__when span { margin-left: 10px; font-weight: 700; }
.call { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 28px 40px; max-width: 1080px; }
.call__main { flex: 999 1 460px; min-width: 0; }
.call__main h2 { margin-top: 28px; }
.call__side { flex: 1 1 280px; min-width: 0; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }

.summary { margin: 0; padding: 16px 18px; background: var(--yellow-soft); border-radius: 12px; font-size: 17px; line-height: 1.5; }

.card { border: 1px solid var(--line-strong); border-radius: 12px; padding: 16px 18px; background: #FFFFFF; }
.main .card h2 { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: var(--muted); }
.card audio { display: block; width: 100%; height: 40px; margin: 14px 0 10px; }
.card__link { display: block; font-size: 14px; margin-top: 6px; }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }

.transcript { display: flex; flex-direction: column; gap: 10px; }
.line { padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 4px 12px 12px 12px; margin-right: 12%; }
.line--caller { background: var(--band); border-color: transparent; border-radius: 12px 4px 12px 12px; margin: 0 0 0 12%; }

.runs { list-style: none; margin: 0; padding: 0; font-size: 15px; }
.runs li { padding: 7px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.runs li:first-child { border-top: 0; padding-top: 0; }
.runs li > span { font-weight: 700; margin-right: 4px; }

/* přehled hovorů: hromadný výběr */
.bulk__bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 12px; min-height: 34px; }
.bulk__bar .button:disabled { background: transparent; color: var(--muted); border-color: var(--line-strong); cursor: default; }
.bulk__export { margin-left: auto; font-size: 14px; }
button.button { font: inherit; font-weight: 800; cursor: pointer; }
table.list .check { width: 28px; padding-right: 0; }
table.list .check input { width: 17px; height: 17px; accent-color: var(--ink); margin: 2px 0 0; }

/* tabulka přehledu je uvnitř formuláře kvůli hromadnému výběru; pravidla pro formulářové tabulky na ni neplatí */
.main form table.list { max-width: none; }
.main form table.list th, .main form table.list td { display: table-cell; margin: 0; }
.main form table.list th { padding: 10px 8px; font-size: 12px; font-weight: 700; }
.main form table.list td { padding: 12px 8px; }
.main form table.list .check { padding-right: 0; }

.empty p { margin: 16px 0 0; }

/* nastavení kalendáře: svátky a dny volna */
.holidays { margin-top: 18px; }
.closures { list-style: none; margin: 0 0 16px; padding: 0; max-width: 640px; }
.closures li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.closures li a { margin-left: auto; font-size: 14px; }
.closure-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 14px; max-width: 760px; }
.closure-form > div { flex: 0 1 170px; }
.closure-form > .closure-form__note { flex: 1 1 200px; }
.closure-form label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.closure-form label .sub { font-weight: 400; }
.main form.closure-form input[type=date] { font: inherit; color: var(--ink); width: 100%; background: #FFFFFF; border: 1.5px solid #C3CAD8; border-radius: 8px; padding: 8px 12px; }
.main form.closure-form input[type=submit] { margin-top: 0; }
.main form.closure-form ul.error { flex: 1 1 100%; }
.main form input[type=date], .main form input[type=time] { font: inherit; color: var(--ink); background: #FFFFFF; border: 1.5px solid #C3CAD8; border-radius: 8px; padding: 8px 12px; }

/* výběr dne a času (flatpickr) v barvách aplikace */
.flatpickr-calendar { font-family: inherit; border-radius: 12px; box-shadow: 0 10px 30px rgba(28, 35, 64, 0.18); border: 1px solid var(--line-strong); }
.flatpickr-calendar.arrowTop::before, .flatpickr-calendar.arrowTop::after { display: none; }
.flatpickr-current-month { font-size: 16px; font-weight: 800; }
.flatpickr-current-month .flatpickr-monthDropdown-months { font-weight: 800; }
span.flatpickr-weekday { color: var(--muted); font-weight: 700; }
.flatpickr-day { border-radius: 8px; color: var(--ink); }
.flatpickr-day.today { border-color: var(--yellow); }
.flatpickr-day:hover, .flatpickr-day.today:hover { background: var(--band); border-color: var(--band); color: var(--ink); }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.flatpickr-time input { font-family: inherit; font-weight: 800; color: var(--ink); }
.flatpickr-calendar.hasTime.noCalendar { width: 170px; }
.main form input.flatpickr-input[readonly] { cursor: pointer; background: #FFFFFF; }
.main form.closure-form input[type=text] { width: 100%; }

/* nastavení v kartách vedle sebe místo jednoho dlouhého sloupce */
.panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 18px; align-items: start; max-width: 1180px; }
.panels--three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.panels--aside { grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
.panels__wide { grid-column: 1 / -1; }
.panels__column { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.panel { border: 1px solid var(--line-strong); border-radius: 14px; padding: 20px 22px; background: #FFFFFF; min-width: 0; }
.panel--wide { max-width: 1180px; box-sizing: border-box; margin-top: 18px; }
.panel--plain { border-style: dashed; background: transparent; }
.main .panel h2 { margin: 0 0 14px; font-size: 18px; font-weight: 900; }
.panel > .hint:first-of-type { margin: -6px 0 12px; }
.panel .choice { margin-bottom: 4px; }
.field { margin-top: 14px; }
.panel > .field:first-of-type, .panel h2 + .field { margin-top: 0; }
.field > label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1 1 0; min-width: 0; margin-top: 0; }
.field-row + .field { margin-top: 14px; }
.main form.panels input[type=submit], .main form.panel input[type=submit] { margin-top: 0; }
.main form.panel input[type=submit] { margin-top: 16px; }
.main form .panel textarea { min-height: 0; }
.main form.panels ul.error, .main form.panel ul.error { margin: 0; }
.panels .rule { padding: 18px 20px; border-bottom: 1px solid var(--line-strong); }
.panels .rule__check { align-items: flex-start; line-height: 1.35; }
.panels .rule__check input { margin-top: 2px; }
.panels .rule__target input { max-width: none; }
.panel .closures, .panel .closure-form { max-width: none; }
.panels--aside > .empty { padding: 20px 0; }
@media (max-width: 900px) { .panels--aside { grid-template-columns: 1fr; } }
.panel--form { max-width: 520px; }
.panel--form table tr:first-child th { margin-top: 0; }

.panel--below { margin-top: 26px; }

/* termín, který při hovoru domluvila recepční */
.booked { display: block; margin-top: 3px; font-size: 14px; font-weight: 800; color: var(--ok); }
.booked--box { margin: 0 0 12px; padding: 12px 16px; border: 1.5px solid var(--ok); border-radius: 12px; font-size: 16px; font-weight: 400; color: var(--ink); }
.booked--box a { margin-left: 8px; font-size: 14px; }

.field-row--spaced { margin-top: 14px; }

/* kalendář: týdenní pohled */
.week__bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px; margin-bottom: 12px; max-width: 1180px; }
.week__nav { display: flex; align-items: center; gap: 6px; }
.week__nav strong { margin-left: 10px; font-size: 18px; font-weight: 900; }
.week { --hour: 52px; display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); max-width: 1180px; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; background: #FFFFFF; }
.week__head { height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-bottom: 1px solid var(--line-strong); font-size: 13px; color: var(--muted); }
.week__head strong { font-size: 16px; font-weight: 900; color: var(--ink); }
.week__day { border-left: 1px solid var(--line); min-width: 0; }
.week__day.is-today .week__head { background: var(--yellow-soft); }
.week__day.is-today .week__head strong { color: var(--accent); }
.week__body { position: relative; height: calc(var(--hours) * var(--hour)); background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px); background-size: 100% var(--hour); }
.week__day:not(.is-closed) .week__body { cursor: pointer; }
.week__times .week__body { background: none; }
.week__times span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.week__times span:first-child { transform: none; top: 2px !important; }
.week__shade { position: absolute; left: 0; right: 0; background: rgba(238, 242, 248, 0.75); pointer-events: none; }
.week__closed { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding: 14px 4px; background: repeating-linear-gradient(135deg, #F3F5F9, #F3F5F9 8px, #EAEEF5 8px, #EAEEF5 16px); color: var(--muted); font-size: 13px; text-align: center; }
.week__item { position: absolute; left: 3px; right: 3px; box-sizing: border-box; padding: 2px 6px; border-radius: 6px; background: var(--ink); color: #FFFFFF; font-size: 13px; line-height: 1.3; font-weight: 700; text-decoration: none; overflow: hidden; z-index: 1; border: 1px solid #FFFFFF; }
.week__item:hover { color: #FFFFFF; filter: brightness(1.15); }
.week__item span { font-weight: 400; opacity: 0.85; }
.week__item--receptionist { background: var(--accent); }
.week__legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 10px 0 0; font-size: 13px; color: var(--body); }
.week__legend .sub { margin-left: 8px; }
.week__dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--ink); margin-left: 8px; }
.week__dot:first-child { margin-left: 0; }
.week__dot--receptionist { background: var(--accent); }
.agenda h3 { margin: 18px 0 2px; font-size: 15px; font-weight: 900; }
.agenda li:target { background: var(--yellow-soft); }
@media (max-width: 760px) { .week { --hour: 44px; grid-template-columns: 40px repeat(7, minmax(0, 1fr)); } .week__item { font-size: 11px; padding: 1px 3px; } }

/* okno termínu v kalendáři */
button.week__item { font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
.popup { width: min(440px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: 16px; box-shadow: 0 20px 60px rgba(28, 35, 64, 0.3); color: var(--ink); overflow: visible; }
.popup::backdrop { background: rgba(28, 35, 64, 0.45); }
.popup__form { position: relative; padding: 24px 26px 22px; }
.popup__close { position: absolute; top: 12px; right: 14px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: var(--band); color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
.popup__when { font-size: 14px; color: var(--muted); padding-right: 40px; }
.popup h2 { margin: 2px 0 2px; font-size: 22px; font-weight: 900; }
.popup__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 18px; }
.popup__meta a { font-weight: 700; }
.popup .field label { display: block; font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.popup input[type=text], .popup input[type=date], .popup input[type=time] { font: inherit; color: var(--ink); width: 100%; box-sizing: border-box; background: #FFFFFF; border: 1.5px solid #C3CAD8; border-radius: 8px; padding: 9px 12px; }
.popup .flatpickr-wrapper { display: block; }
.popup__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; }
.popup input[type=submit] { font: inherit; font-weight: 800; color: #FFFFFF; background: var(--accent); border: 0; border-radius: 8px; padding: 10px 22px; cursor: pointer; }
.popup__cancel { color: var(--warn); font-weight: 700; font-size: 15px; cursor: pointer; }

/* odkazy zpět a do nastavení jako viditelná tlačítka */
.back { margin: 0 0 16px; }
.back a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px 6px 10px; border: 1.5px solid var(--ink); border-radius: 8px; font-size: 14px; font-weight: 800; color: var(--ink); text-decoration: none; background: #FFFFFF; }
.back a::before { content: "‹"; font-size: 18px; line-height: 1; }
.back a:hover { background: var(--ink); color: #FFFFFF; }
.week__settings { display: inline-flex; align-items: center; gap: 7px; }
.week__settings svg { flex: none; }

/* nastavení kalendáře: dvě stejně vysoké karty přes celou šířku */
.panels--two { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.panels__save { display: flex; justify-content: flex-end; }
.field-row { align-items: flex-end; }
@media (max-width: 900px) { .panels--two { grid-template-columns: 1fr; } .panels__save { justify-content: flex-start; } }

/* nastavení recepční */
.settings { max-width: 720px; }
.settings section { padding: 4px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.settings section:last-of-type { border-bottom: 0; margin-bottom: 4px; }
.settings h2 { margin: 0 0 12px; }
.settings .field textarea { min-height: 0; field-sizing: content; }
.choice--inline { flex-direction: row; gap: 8px; margin: 0; }
.choice--inline label { padding: 8px 14px; }
.facts--wide dd { font-weight: 400; }
.facts--wide dd a { margin-left: 6px; font-size: 14px; }
.prompt { max-width: 720px; margin-top: 22px; font-size: 14px; }
.prompt summary { cursor: pointer; font-weight: 700; color: var(--body); }
.prompt pre { white-space: pre-wrap; font: inherit; line-height: 1.5; background: var(--band); border-radius: 10px; padding: 14px 16px; margin: 10px 0 0; }
.main form :disabled { background: var(--band); color: var(--body); cursor: not-allowed; }

/* správa: pokyny klienta */
.admin-prompt textarea { min-height: 360px; font-size: 15px; }

.rule__check--plain { font-weight: 400; font-size: 16px; margin-top: 6px; }
.booked--cancelled { color: var(--warn); }
.booked--box.booked--cancelled { border-color: var(--warn); }

/* Obchod: karty se seznamy klientů */
.deals { margin-top: 18px; }
.deals .panel h2 { margin: 0 0 4px; display: flex; align-items: center; gap: 10px; }
.deals .hint { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.deals__empty { margin: 0; padding: 14px 16px; border-radius: 10px; background: var(--band); color: var(--muted); font-size: 14px; }
.deals__list { list-style: none; margin: 0; padding: 0; }
.deals__list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--line-strong); }
.deals__who { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.deals__what { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.deals__steps { display: inline-flex; align-items: center; }
.deals .timeline li:first-child { padding-top: 0; }
.deals .timeline li:last-child { border-bottom: 0; padding-bottom: 0; }
.count { display: inline-block; min-width: 24px; padding: 1px 7px; box-sizing: border-box; border-radius: 12px; background: var(--band); color: var(--ink); font-size: 13px; font-weight: 800; text-align: center; }
.count--alert { background: var(--yellow-soft); }

.deals__closed { margin: 14px 0 0; font-size: 14px; color: var(--muted); }
.call__head > h1 { margin: 0; }
.lead-form form table { display: block; max-width: 940px; }
.lead-form form tbody { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.lead-form form tr { display: block; min-width: 0; }
.lead-form form tr:nth-last-child(-n+2) { grid-column: 1 / -1; }
.lead-form form tr:nth-child(-n+2) th { margin-top: 0; }
@media (max-width: 720px) { .lead-form form tbody { grid-template-columns: 1fr; } }

/* Nastavení: rozbalovací skupina v menu a přepínač sekcí nahoře na stránce */
.menu__group summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 9px 10px; border-radius: 6px; user-select: none; }
.menu__group summary::-webkit-details-marker { display: none; }
.menu__group summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -3px 4px 0 0; transition: transform 0.15s; }
.menu__group[open] summary::after { transform: rotate(225deg); margin-top: 4px; }
.menu__group summary:hover { background: var(--band); }
.menu__group summary.is-open { font-weight: 800; }
.menu__group a { padding: 7px 10px 7px 22px; font-size: 15px; }
.menu__group[open] { display: flex; flex-direction: column; gap: 2px; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 22px; padding-bottom: 14px; border-bottom: 1px solid var(--line-strong); }
.tabs a { padding: 7px 14px; border: 1.5px solid var(--line-strong); border-radius: 20px; font-size: 14px; font-weight: 700; color: var(--ink); text-decoration: none; white-space: nowrap; }
.tabs a:hover { border-color: var(--ink); }
.tabs a.is-active { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.92em; overflow-wrap: anywhere; }
.secret { display: flex; gap: 8px; margin: 0 0 8px; }
.secret input { flex: 1; min-width: 0; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; color: var(--ink); background: var(--band); border: 1.5px solid #C3CAD8; border-radius: 8px; padding: 9px 12px; }
.secret button { font: inherit; font-weight: 800; color: #FFFFFF; background: var(--ink); border: 0; border-radius: 8px; padding: 9px 16px; cursor: pointer; white-space: nowrap; }
.panel h2 + p, .panel p + h2 { margin-top: 0; }
.panel > h2:not(:first-child) { margin-top: 26px; }

/* Nabídka akcí pod třemi tečkami */
.more { position: relative; display: inline-block; }
.more summary { list-style: none; cursor: pointer; width: 36px; height: 32px; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--line-strong); border-radius: 8px; font-size: 20px; font-weight: 900; line-height: 1; user-select: none; }
.more summary::-webkit-details-marker { display: none; }
.more summary:hover, .more[open] summary { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.more__menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; min-width: 250px; padding: 6px; display: flex; flex-direction: column; background: #FFFFFF; border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 10px 30px rgba(28, 35, 64, 0.16); text-align: left; }
.more__menu a { padding: 9px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; white-space: nowrap; }
.more__menu a:hover { background: var(--band); }
.table-wrap:has(.more[open]) { overflow: visible; }
td.row-actions { text-align: right; width: 1%; }

/* Telefonní číslo */
.panel .number { margin: 0 0 14px; font-size: 30px; font-weight: 900; letter-spacing: 0.5px; }
.panel > p { margin: 0 0 12px; color: var(--body); }
.panel .facts--wide { margin-bottom: 16px; }
.todo { margin: 14px 0 6px; padding-left: 20px; color: var(--body); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }

/* Návštěvnost */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 190px; max-width: 1180px; padding: 22px 0 22px; box-sizing: border-box; margin-bottom: 18px; }
.chart__day { flex: 1 1 0; min-width: 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; }
.chart__bar { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: var(--ink); }
.chart__value { font-size: 11px; font-weight: 700; color: var(--muted); line-height: 1.4; }
.chart__label { position: absolute; top: 100%; margin-top: 4px; font-size: 11px; color: var(--muted); white-space: nowrap; }
.panel table.list { width: 100%; min-width: 0; }
.panel table.list td:first-child { overflow-wrap: anywhere; }

/* Obchodní přehled ve správě */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; max-width: 1180px; margin: 0 0 8px; }
.stat { border: 1px solid var(--line-strong); border-radius: 12px; padding: 14px 16px; background: #FFFFFF; color: var(--body); font-size: 14px; }
.stat strong { display: block; font-size: 26px; font-weight: 900; line-height: 1.15; color: var(--ink); }
.stat span { display: block; font-weight: 700; }
.stat--good span { color: var(--ok); }
.stat--bad span { color: var(--warn); }
.steps { display: inline-flex; gap: 4px; margin-right: 8px; vertical-align: middle; }
.steps span { width: 18px; height: 8px; border-radius: 4px; background: var(--line-strong); }
.steps span.is-done { background: var(--ok); }
.timeline { list-style: none; margin: 0; padding: 0; max-width: 1180px; }
.timeline li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line-strong); }
.timeline li > div { flex-basis: 100%; color: var(--body); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.checklist li { padding-left: 26px; position: relative; color: var(--muted); }
.checklist li::before { content: ''; position: absolute; left: 0; top: 4px; width: 14px; height: 14px; border: 2px solid var(--line-strong); border-radius: 50%; box-sizing: border-box; }
.checklist li.is-done { color: var(--ink); font-weight: 700; }
.checklist li.is-done::before { border-color: var(--ok); background: var(--ok); }
.card h2 { margin-top: 0; }
.card form table { max-width: none; }
.card form tr:first-child th { margin-top: 0; }
