/* RUS – vzhled sjednocený s www.ubytovani-praha.info
   Paleta: krémová fasáda, zeleň zahrady, terakotová střecha. Bez build kroku. */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url("../fonts/fraunces-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url("../fonts/fraunces-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
    src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap;
    src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
    --paper: #f6f2ea;
    --paper-2: #ede6d8;
    --card: #fffdf9;
    --ink: #1e2a25;
    --ink-2: #4d5a54;
    --ink-3: #75807a;
    --line: #ddd4c3;
    --line-soft: #ebe4d6;
    --green: #2e5a4c;
    --green-dark: #1f4237;
    --green-soft: #dfe8df;
    --leaf: #7fa36b;
    --leaf-soft: #e9f0e1;
    --terra: #c4623a;
    --terra-dark: #a64f2c;
    --terra-soft: #f6e3d8;
    --amber: #d9a441;
    --amber-soft: #f8edd2;
    --danger: #b3261e;
    --danger-soft: #f9e1de;

    --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
    --font-sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --radius: 18px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgb(30 42 37 / 6%), 0 8px 28px rgb(30 42 37 / 8%);
    --shadow-lg: 0 2px 4px rgb(30 42 37 / 6%), 0 24px 60px rgb(30 42 37 / 16%);
    --header-h: 68px;
    --gutter: clamp(12px, 3vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; background: var(--paper); color: var(--ink);
    font-family: var(--font-sans); font-size: 1rem; line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; } }
img, svg { max-width: 100%; }
a { color: var(--green); text-underline-offset: .18em; text-decoration: none; }
a:hover { color: var(--terra-dark); text-decoration: underline; }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -.015em; line-height: 1.15; margin: 0 0 .6em; }
h1 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2rem); }
h2 { font-size: 1.2rem; color: var(--green-dark); margin-top: 1.2rem; }
h3 { font-size: 1.02rem; }
.muted { color: var(--ink-3); }
.small { font-size: .86rem; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- záhlaví ---------- */
.topbar {
    position: sticky; top: 0; z-index: 50; height: var(--header-h);
    display: flex; align-items: center; gap: 1.25rem; padding: 0 var(--gutter);
    background: rgb(246 242 234 / 92%); backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; color: var(--ink); flex-shrink: 0; }
.brand:hover { text-decoration: none; color: var(--ink); }
.brand img { height: 42px; width: auto; }
.brand .brand-mark { display: none; height: 38px; }
.brand .app { font-weight: 800; font-size: .72rem; letter-spacing: .18em; color: var(--paper); background: var(--green); padding: .2rem .5rem; border-radius: 6px; }
.mainnav { display: flex; gap: .15rem; flex: 1; align-items: center; min-width: 0; }
.mainnav a, .navmore > summary {
    padding: .5rem .8rem; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: .95rem; cursor: pointer; white-space: nowrap;
}
.mainnav a:hover, .navmore > summary:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.mainnav a.active { background: var(--green); color: #fff; }
.navmore { position: relative; }
.navmore > summary { list-style: none; }
.navmore > summary::-webkit-details-marker { display: none; }
.navmore > summary::after { content: " ▾"; font-size: .75em; }
.navmore > div, .usermenu > div {
    position: absolute; z-index: 60; top: calc(100% + .4rem); left: 0; min-width: 190px; padding: .4rem;
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
}
.navmore > div a, .usermenu > div a, .usermenu > div button {
    display: block; width: 100%; text-align: left; padding: .5rem .75rem; border-radius: 8px; color: var(--ink); font: inherit; font-weight: 500; background: none; border: 0; cursor: pointer;
}
.navmore > div a:hover, .usermenu > div a:hover, .usermenu > div button:hover { background: var(--paper-2); text-decoration: none; }
.topsearch { flex: 0 1 240px; }
.topsearch input { border-radius: 999px; padding-left: 2.1rem; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2375807a' stroke-width='2'%3E%3Ccircle cx='7' cy='7' r='5'/%3E%3Cpath d='m11 11 4 4'/%3E%3C/svg%3E") no-repeat .75rem center; }
.usermenu { position: relative; }
.usermenu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .5rem; }
.usermenu > summary::-webkit-details-marker { display: none; }
.usermenu > div { left: auto; right: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--terra); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: .9rem; }

/* spodní lišta na mobilu */
.bottomnav { display: none; }

.container { max-width: 1440px; margin: 0 auto; padding: 1.25rem var(--gutter) 2rem; }
.container.wide { max-width: none; }
.footer { text-align: center; color: var(--ink-3); font-size: .8rem; padding: 1.5rem 0 2.5rem; }

/* ---------- panely ---------- */
.panel { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 1.1rem 1.25rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.panel > h2:first-child, .panel > header h2 { margin-top: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; margin-bottom: .6rem; }
.panel-head h2 { margin: 0; }
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.pagehead { display: flex; align-items: center; justify-content: space-between; gap: .75rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.pagehead h1 { margin: 0; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }

.stat { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: .9rem 1.1rem; box-shadow: var(--shadow); }
.stat .label { color: var(--ink-3); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.stat .value { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 600; line-height: 1.2; color: var(--green-dark); }
.stat .value small { font-size: .9rem; color: var(--ink-3); font-family: var(--font-sans); }

/* ---------- hlášky, toasty ---------- */
.flash { padding: .8rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1rem; border: 1px solid; }
.flash ul { margin: .3rem 0 0 1.2rem; padding: 0; }
.flash.ok { background: var(--leaf-soft); color: var(--green-dark); border-color: #c9d9bd; }
.flash.err { background: var(--danger-soft); color: var(--danger); border-color: #efc1bc; }
.flash.warn { background: var(--amber-soft); color: #6e5110; border-color: #ecd59b; }
.toasts { position: fixed; z-index: 100; left: 50%; bottom: 1.25rem; transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; align-items: center; width: min(92vw, 520px); }
.toast { background: var(--ink); color: #fff; padding: .75rem 1rem; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; gap: 1rem; align-items: center; justify-content: space-between; width: 100%; animation: toast-in .2s ease-out; }
.toast.err { background: var(--danger); }
.toast button { background: none; border: 1px solid rgb(255 255 255 / 40%); color: #fff; border-radius: 8px; padding: .3rem .7rem; font: inherit; font-weight: 700; cursor: pointer; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } }

/* ---------- tlačítka ---------- */
.btn, button.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 40px;
    padding: .5rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
    font: inherit; font-weight: 700; font-size: .92rem; cursor: pointer; line-height: 1.15; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--paper-2); text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--terra); border-color: var(--terra); color: #fff; }
.btn.primary:hover { background: var(--terra-dark); border-color: var(--terra-dark); }
.btn.green { background: var(--green); border-color: var(--green); color: #fff; }
.btn.green:hover { background: var(--green-dark); }
.btn.danger { color: var(--danger); border-color: #ebb9b4; }
.btn.danger:hover { background: var(--danger-soft); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.small { min-height: 32px; padding: .25rem .7rem; font-size: .82rem; }
.btn.icon { width: 40px; padding: 0; }
.btn[disabled], fieldset[disabled] .btn { opacity: .5; cursor: not-allowed; }
button.link { background: none; border: 0; color: var(--green); cursor: pointer; font: inherit; padding: 0; }
button.link:hover { text-decoration: underline; }

/* ---------- formuláře ---------- */
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
label { font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input[type=tel], select, textarea {
    font: inherit; font-size: 1rem; padding: .55rem .75rem; min-height: 42px; width: 100%;
    border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px rgb(46 90 76 / 18%); }
input[disabled], select[disabled], textarea[disabled] { background: var(--paper); color: var(--ink-2); }
textarea { min-height: 5rem; resize: vertical; }
input.num { text-align: right; font-variant-numeric: tabular-nums; }
.form-grid { display: grid; grid-template-columns: 170px 1fr; gap: .65rem 1rem; align-items: center; }
.form-grid > label { text-align: right; color: var(--ink-2); font-weight: 600; font-size: .92rem; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: .3rem; }
.field > label, .field > .label { font-size: .85rem; color: var(--ink-2); }
.fields { display: grid; gap: .8rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.inline { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.inline > input[type=number], .inline > input.num { width: 7.5rem; }
.inline > input[type=date] { width: 11rem; }
.inline > input[type=time] { width: 8rem; }
.check { display: inline-flex; gap: .5rem; align-items: center; font-weight: 500; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--green); }
.field-error { color: var(--danger); font-size: .85rem; }
.hint { color: var(--ink-3); font-size: .82rem; }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.filters > div { display: flex; flex-direction: column; gap: .2rem; }
.filters label { font-size: .78rem; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.filters input, .filters select { width: auto; min-width: 9rem; }
.pagehead .inline select, .pagehead .inline input { width: auto; }
.pagehead .inline input[type=number] { width: 6.5rem; }

/* přepínač (segmented control) */
.segmented { display: inline-flex; flex-wrap: wrap; background: var(--paper-2); border-radius: 999px; padding: 3px; gap: 2px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { padding: .45rem .9rem; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.segmented input:checked + label { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgb(30 42 37 / 15%); }
.segmented input:focus-visible + label { outline: 3px solid var(--terra); }

/* krokovač +/- */
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.stepper button { width: 40px; height: 40px; border: 0; background: none; font-size: 1.25rem; font-weight: 700; color: var(--green); cursor: pointer; border-radius: 999px; }
.stepper button:hover { background: var(--paper-2); }
.stepper input { width: 3rem !important; min-height: 38px; border: 0; text-align: center; padding: 0; font-weight: 700; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper input:focus { box-shadow: none; }

/* výběr pokoje (karty) */
.apt-choice { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.apt-choice input { position: absolute; opacity: 0; pointer-events: none; }
.apt-choice label {
    display: flex; flex-direction: column; gap: .1rem; padding: .6rem .75rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    background: #fff; cursor: pointer; font-weight: 500; position: relative; min-height: 64px;
}
.apt-choice label strong { font-weight: 700; }
.apt-choice label span { font-size: .78rem; color: var(--ink-3); }
.apt-choice label:hover { border-color: var(--green); }
.apt-choice input:checked + label { border-color: var(--green); background: var(--green-soft); box-shadow: inset 0 0 0 1px var(--green); }
.apt-choice input:focus-visible + label { outline: 3px solid var(--terra); }
.apt-choice label.busy { background: repeating-linear-gradient(-45deg, #fff, #fff 6px, var(--paper) 6px, var(--paper) 12px); }
.apt-choice label.busy::after { content: "obsazeno"; position: absolute; top: .35rem; right: .45rem; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--danger); }
.apt-choice label.free::after { content: "volno"; position: absolute; top: .35rem; right: .45rem; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--leaf); }
.apt-choice label.disabled { opacity: .45; }

/* výběr kontaktu */
.picker { position: relative; }
.picker .picked { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .35rem .35rem .35rem .8rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; min-height: 42px; }
.picker .picked strong { font-weight: 700; flex: 1; }
.picker .results {
    position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-height: 340px; overflow: auto; padding: .3rem;
}
.picker .results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .5rem .7rem; font: inherit; cursor: pointer; border-radius: 8px; }
.picker .results button:hover, .picker .results button.active { background: var(--green-soft); }
.picker .results small { display: block; color: var(--ink-3); }
.picker .results .new { color: var(--terra-dark); font-weight: 700; }
.picker-row { display: flex; gap: .5rem; align-items: flex-start; }
.picker-row .picker { flex: 1; }

/* ---------- tabulky ---------- */
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { padding: .6rem .7rem; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: middle; }
table.list th { font-weight: 700; font-size: .75rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; background: var(--paper); }
table.list tbody tr:hover { background: #fbf8f2; }
table.list td.num, table.list th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.list tfoot td { font-weight: 700; background: var(--paper); }
table.list tr.clickable { cursor: pointer; }
tr.is-cancelled td { color: var(--ink-3); }
tr.is-cancelled td:first-child a { text-decoration: line-through; }
tr.is-overdue td { background: #fdf3f1; }
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); }
.table-wrap table.list th:first-child { border-top-left-radius: var(--radius); }
.table-wrap table.list th:last-child { border-top-right-radius: var(--radius); }
td.apt, th.apt { white-space: nowrap; }

.badge { display: inline-block; padding: .12rem .55rem; border-radius: 999px; font-size: .74rem; font-weight: 800; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.badge.ok { background: var(--leaf-soft); color: var(--green-dark); }
.badge.err { background: var(--danger-soft); color: var(--danger); }
.badge.warn { background: var(--amber-soft); color: #7a5a12; }
.badge.info { background: var(--green-soft); color: var(--green-dark); }
a.badge:hover { text-decoration: none; filter: brightness(.96); }

/* stránkování */
.pagination { display: flex; gap: .3rem; flex-wrap: wrap; margin: 1rem 0; align-items: center; }
.pagination a, .pagination span { padding: .35rem .75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card); font-weight: 600; font-size: .9rem; }
.pagination .current { background: var(--green); color: #fff; border-color: var(--green); }
.pagination .disabled { color: var(--ink-3); }

/* ---------- kalendář (časová osa) ---------- */
.cal-toolbar { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .75rem; }
.cal-toolbar h1 { margin: 0 auto 0 0; }
.cal-toolbar .range { font-weight: 700; color: var(--ink-2); }
.timeline-wrap { position: relative; background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; max-height: calc(100vh - var(--header-h) - 170px); min-height: 280px; touch-action: pan-x pan-y; }
.timeline { --day: 46px; --row: 54px; --head: 54px; --label: 150px; position: relative; user-select: none; -webkit-user-select: none; }
.tl-head { position: sticky; top: 0; z-index: 6; display: flex; height: var(--head); background: var(--paper); border-bottom: 1px solid var(--line); }
.tl-corner { position: sticky; left: 0; z-index: 7; width: var(--label); flex-shrink: 0; background: var(--paper); border-right: 1px solid var(--line); display: flex; align-items: center; padding: 0 .75rem; font-size: .75rem; font-weight: 800; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
.tl-days { display: flex; }
.tl-day { width: var(--day); flex-shrink: 0; text-align: center; font-size: .72rem; color: var(--ink-3); border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; justify-content: center; line-height: 1.15; }
.tl-day b { font-size: .95rem; color: var(--ink); font-weight: 700; }
.tl-day.weekend { background: #f0e9dc; }
.tl-day.weekend b { color: var(--terra-dark); }
.tl-day.today { background: var(--terra); color: #fff; }
.tl-day.today b { color: #fff; }
.tl-day.month-start { border-left: 2px solid var(--ink-3); }
.tl-row { display: flex; height: var(--row); border-bottom: 1px solid var(--line-soft); position: relative; }
.tl-label { position: sticky; left: 0; z-index: 5; width: var(--label); flex-shrink: 0; background: var(--card); border-right: 1px solid var(--line); padding: .35rem .75rem; display: flex; flex-direction: column; justify-content: center; line-height: 1.2; }
.tl-label strong { font-size: .95rem; }
.tl-label span { font-size: .72rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-cells { position: relative; display: flex; }
.tl-cell { width: var(--day); flex-shrink: 0; border-right: 1px solid var(--line-soft); cursor: cell; }
.tl-cell.weekend { background: #faf6ee; }
.tl-cell.today { background: rgb(196 98 58 / 7%); }
.tl-cell.sel { background: var(--green-soft) !important; }
.tl-cell.month-start { border-left: 2px solid var(--line); }
.tl-bar {
    position: absolute; top: 7px; height: calc(var(--row) - 14px); z-index: 3; border-radius: 10px;
    background: var(--green); color: #fff; padding: .3rem .55rem; font-size: .78rem; line-height: 1.2; overflow: hidden;
    cursor: grab; box-shadow: 0 1px 2px rgb(30 42 37 / 20%); display: flex; flex-direction: column; justify-content: center;
    touch-action: pan-x pan-y; transition: box-shadow .15s; text-decoration: none !important;
}
.tl-bar.armed { outline: 3px solid var(--amber); }
.tl-bar strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.tl-bar small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.tl-bar:hover { box-shadow: 0 4px 14px rgb(30 42 37 / 28%); }
.tl-bar.unpaid { background: var(--terra); }
.tl-bar.t100 { background: var(--amber-soft); color: #5f4510; border: 1.5px dashed var(--amber); }
.tl-bar.t250 { background: #c9cfc9; color: var(--ink); }
.tl-bar.cut-left { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tl-bar.cut-right { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tl-bar.dragging { cursor: grabbing; opacity: .9; box-shadow: var(--shadow-lg); z-index: 8; }
.tl-bar.conflict { outline: 3px solid var(--danger); }
.tl-bar.saving { opacity: .6; }
.tl-bar.readonly { cursor: pointer; }
.tl-bar .h { position: absolute; top: 0; bottom: 0; width: 10px; cursor: ew-resize; }
.tl-bar .h.l { left: 0; }
.tl-bar .h.r { right: 0; }
.tl-bar .h::after { content: ""; position: absolute; top: 30%; bottom: 30%; left: 4px; width: 2px; border-radius: 2px; background: rgb(255 255 255 / 55%); }
.tl-bar.t100 .h::after { background: var(--amber); }
.tl-ghost { position: absolute; top: 7px; height: calc(var(--row) - 14px); z-index: 2; border-radius: 10px; border: 2px dashed var(--green); background: rgb(46 90 76 / 8%); pointer-events: none; }
.tl-ghost.bad { border-color: var(--danger); background: rgb(179 38 30 / 8%); }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--terra); z-index: 4; pointer-events: none; }
.legend { display: flex; gap: .4rem 1rem; font-size: .82rem; flex-wrap: wrap; margin: .6rem 0; color: var(--ink-2); align-items: center; }
.legend span::before { content: ""; display: inline-block; width: 1rem; height: .8rem; margin-right: .35rem; vertical-align: -1px; border-radius: 4px; }
.legend .l-paid::before { background: var(--green); }
.legend .l-unpaid::before { background: var(--terra); }
.legend .l-res::before { background: var(--amber-soft); border: 1.5px dashed var(--amber); }
.legend .l-maint::before { background: #c9cfc9; }

/* popover / modální okno */
.popover { position: fixed; z-index: 90; width: min(340px, 92vw); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 1rem 1.1rem; }
.popover h3 { margin: 0 0 .3rem; }
.popover .actions { margin-top: .8rem; }
.popover .kv { font-size: .9rem; }
dialog { border: 0; border-radius: var(--radius); padding: 0; box-shadow: var(--shadow-lg); width: min(640px, 94vw); background: var(--card); color: var(--ink); }
dialog::backdrop { background: rgb(30 42 37 / 45%); backdrop-filter: blur(2px); }
dialog .dlg-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem .4rem; }
dialog .dlg-head h2 { margin: 0; }
dialog .dlg-body { padding: .5rem 1.25rem 1rem; max-height: 70vh; overflow: auto; }
dialog .dlg-foot { padding: .9rem 1.25rem; display: flex; gap: .5rem; justify-content: flex-end; border-top: 1px solid var(--line-soft); background: var(--paper); flex-wrap: wrap; }

/* ---------- přehled ---------- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .5rem 0; border-bottom: 1px dashed var(--line); }
ul.plain li:last-child { border-bottom: 0; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- objednávka ---------- */
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.order-side { position: sticky; top: calc(var(--header-h) + 1rem); }
.summary { background: var(--green-dark); color: #fff; border-radius: var(--radius); padding: 1.1rem 1.25rem; box-shadow: var(--shadow); }
.summary h2 { color: #fff; margin: 0 0 .6rem; }
.summary dl { display: grid; grid-template-columns: 1fr auto; gap: .3rem .75rem; margin: 0 0 .8rem; font-size: .92rem; }
.summary dt { opacity: .8; }
.summary dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.summary .total { font-family: var(--font-serif); font-size: 2rem; font-weight: 600; line-height: 1.1; }
.summary .total small { display: block; font-family: var(--font-sans); font-size: .8rem; opacity: .8; font-weight: 500; }
.summary .warn { background: rgb(255 255 255 / 12%); border-radius: 8px; padding: .4rem .6rem; font-size: .85rem; margin-top: .5rem; }
.summary .btn { width: 100%; margin-top: .5rem; }
.summary .btn.ghost { color: #fff; border-color: rgb(255 255 255 / 30%); }
.summary .btn.ghost:hover { background: rgb(255 255 255 / 10%); }
.daterange { display: grid; grid-template-columns: 1fr auto 1fr; gap: .5rem; align-items: end; }
.daterange .nights { padding-bottom: .55rem; font-weight: 700; color: var(--green); white-space: nowrap; text-align: center; }
.quickdates { display: flex; gap: .3rem; flex-wrap: wrap; margin-top: .3rem; }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.price-grid .field input { text-align: right; }
.gross { font-size: .78rem; color: var(--ink-3); text-align: right; }
.toggle { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-weight: 600; font-size: .9rem; }
.toggle input { appearance: none; width: 40px; height: 22px; border-radius: 999px; background: var(--line); position: relative; cursor: pointer; transition: background .15s; flex-shrink: 0; }
.toggle input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .15s; }
.toggle input:checked { background: var(--green); }
.toggle input:checked::after { left: 21px; }
.section-title { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 600; margin: 0 0 .7rem; color: var(--green-dark); display: flex; align-items: center; gap: .5rem; }
.section-title .num { width: 26px; height: 26px; border-radius: 50%; background: var(--terra); color: #fff; font-family: var(--font-sans); font-size: .8rem; font-weight: 800; display: grid; place-items: center; }

/* přihlášení */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; background: radial-gradient(1200px 600px at 20% 0%, var(--green-soft), transparent), var(--paper); }
.login { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 2rem; width: 100%; max-width: 400px; box-shadow: var(--shadow-lg); }
.login .logo { display: block; margin: 0 auto 1.2rem; height: 54px; }
.login .row { margin-bottom: 1rem; display: flex; flex-direction: column; gap: .3rem; }
.login .btn { width: 100%; }

/* náhled dokladu v aplikaci */
.pdf-frame { width: 100%; height: min(80vh, 1100px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }

/* ---------- tisk ---------- */
@media print {
    @page { size: A4; margin: 10mm; }
    body { background: #fff; }
    .no-print, .topbar, .footer, .bottomnav, .flash, .toasts { display: none !important; }
    .container { padding: 0; max-width: none; }
    .panel, .table-wrap, .stat { border: 0; box-shadow: none; padding: 0; }
    a { color: inherit; }
    .timeline-wrap { max-height: none; overflow: visible; box-shadow: none; }
}

/* ---------- responzivita ---------- */
@media (max-width: 1180px) {
    .topsearch { display: none; }
    .brand img.brand-full { display: none; }
    .brand .brand-mark { display: block; }
}
@media (max-width: 980px) {
    .order-layout { grid-template-columns: 1fr; }
    .order-side { position: static; }
}
@media (max-width: 860px) {
    :root { --header-h: 58px; }
    .mainnav { display: none; }
    .topbar { justify-content: space-between; }
    .bottomnav {
        display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 50; left: 0; right: 0; bottom: 0;
        background: var(--card); border-top: 1px solid var(--line); padding: .3rem .2rem calc(.3rem + env(safe-area-inset-bottom));
        box-shadow: 0 -6px 20px rgb(30 42 37 / 8%);
    }
    .bottomnav a, .bottomnav summary { display: flex; flex-direction: column; align-items: center; gap: .1rem; font-size: .68rem; font-weight: 700; color: var(--ink-3); padding: .3rem 0; border-radius: 10px; cursor: pointer; list-style: none; }
    .bottomnav summary::-webkit-details-marker { display: none; }
    .bottomnav svg { width: 24px; height: 24px; }
    .bottomnav a.active { color: var(--green); }
    .bottomnav a.add { color: var(--terra); }
    .bottomnav details { position: relative; }
    .bottomnav details > div { position: absolute; bottom: calc(100% + .6rem); right: .3rem; min-width: 200px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: .4rem; }
    .bottomnav details > div a { flex-direction: row; font-size: .95rem; color: var(--ink); padding: .6rem .75rem; }
    body { padding-bottom: 76px; }
    .toasts { bottom: 88px; }
    .container { padding-top: 1rem; }
    .form-grid { grid-template-columns: 1fr; gap: .35rem; }
    .form-grid > label { text-align: left; margin-top: .4rem; }
    .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
    .filters > div { flex: 1 1 140px; }
    .filters input, .filters select { width: 100%; min-width: 0; }
    .price-grid { grid-template-columns: 1fr; }
    .timeline { --day: 40px; --label: 96px; --row: 50px; }
    .timeline-wrap { max-height: calc(100vh - var(--header-h) - 200px); }
    .cal-toolbar h1 { width: 100%; }

    /* tabulky jako karty */
    table.list.cards thead { display: none; }
    table.list.cards, table.list.cards tbody, table.list.cards tr, table.list.cards td { display: block; width: 100%; }
    table.list.cards tr { padding: .7rem .9rem; border-bottom: 1px solid var(--line-soft); }
    table.list.cards td { border: 0; padding: .12rem 0; display: flex; justify-content: space-between; gap: 1rem; text-align: right; }
    table.list.cards td::before { content: attr(data-label); color: var(--ink-3); font-size: .8rem; font-weight: 600; text-align: left; }
    table.list.cards td[data-label=""]::before { content: none; }
    table.list.cards td.primary { font-size: 1.02rem; font-weight: 700; justify-content: flex-start; text-align: left; }
    table.list.cards td.primary::before { content: none; }
    table.list.cards td.hide-m { display: none; }
    table.list.cards tfoot { display: block; }
}
@media (max-width: 480px) {
    .pagehead .actions { width: 100%; }
    .pagehead .actions .btn { flex: 1; }
    .daterange { grid-template-columns: 1fr; }
    .daterange .nights { text-align: left; padding: 0; }
}
.menu-head { padding: .45rem .75rem .55rem; font-size: .8rem; color: var(--ink-3); border-bottom: 1px solid var(--line-soft); margin-bottom: .3rem; white-space: nowrap; }
@media (max-width: 860px) { .topbar .hide-m { display: none; } }
.mt { margin-top: .9rem; }
.mb { margin-bottom: .9rem; }
.filters .grow { flex: 1 1 320px; } .filters .grow input { width: 100%; }
.cal-toolbar input[type=date] { width: auto; }
.cal-toolbar .actions { justify-content: flex-end; }
.field > .stepper, .field > .segmented, .field > .toggle { align-self: flex-start; }
.tl-bar.locked strong::before { content: ""; display: inline-block; width: 10px; height: 11px; margin-right: 4px; vertical-align: -1px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 11'%3E%3Crect x='1' y='5' width='8' height='6' rx='1' fill='white'/%3E%3Cpath d='M3 5V3.5a2 2 0 0 1 4 0V5' fill='none' stroke='white' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat center / contain; }
.tl-bar.locked.t100 strong::before { filter: invert(1); }
.adv-toggle { display: none !important; }
.hint-touch { display: none; }
@media (pointer: coarse) { .hint-desktop { display: none; } .hint-touch { display: inline; } }
@media (max-width: 860px) {
    .filters .adv { display: none; }
    .filters.expanded .adv { display: flex; }
    .adv-toggle { display: flex !important; }
    .cal-toolbar .actions { justify-content: flex-start; }
}
.mobile-save { display: none; }
@media (max-width: 980px) {
    .mobile-save { display: flex; position: sticky; bottom: 0; z-index: 30; margin: 1rem calc(-1 * var(--gutter)) 0; padding: .7rem var(--gutter);
        background: var(--card); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgb(30 42 37 / 10%); align-items: center; justify-content: space-between; gap: 1rem; }
    .mobile-save div { display: flex; flex-direction: column; line-height: 1.2; }
    .mobile-save strong { font-family: var(--font-serif); font-size: 1.3rem; color: var(--green-dark); }
}
@media (max-width: 860px) { .mobile-save { bottom: 70px; } }
@media (max-width: 1360px) { .topsearch { display: none; } }
.kv { grid-template-columns: minmax(0, auto) minmax(0, 1fr); }
.kv dd { overflow-wrap: anywhere; }
.stats-kv { grid-template-columns: minmax(0, 1fr) auto; }
.stats-kv dd { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
form > .actions { margin: 0 0 1rem; }
.fields .full-row { grid-column: 1 / -1; }
.ico-input { max-width: 11rem; font-variant-numeric: tabular-nums; letter-spacing: .04em; }
.hint.ok { color: var(--green); font-weight: 600; }
.hint.err { color: var(--danger); font-weight: 600; }
input.filled-ares { background: var(--leaf-soft); transition: background 1.5s; }
.footer { display: flex; justify-content: space-between; gap: .5rem 1.5rem; flex-wrap: wrap; max-width: 1440px; margin: 0 auto; padding: 1.25rem var(--gutter) 2rem; text-align: left; }
.footer a { color: var(--ink-2); }
.footer a:hover { color: var(--terra-dark); }
@media (max-width: 600px) { .footer { flex-direction: column; align-items: center; text-align: center; } }
table.heat td.heat-0 { background: #fbf8f2; color: var(--ink-3); }
table.heat td.heat-1 { background: #eef2e6; }
table.heat td.heat-2 { background: #d9e6d0; }
table.heat td.heat-3 { background: #b9d1ad; }
table.heat td.heat-4 { background: #8fb47d; color: #fff; font-weight: 700; }
.segmented a.seg-link { padding: .45rem .9rem; border-radius: 999px; font-weight: 600; font-size: .9rem; color: var(--ink-2); text-decoration: none; }
.segmented a.seg-link.active { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgb(30 42 37 / 15%); }

/* Faktury po splatnosti na nástěnce */
.duelist { list-style: none; margin: 0; padding: 0; }
.duelist li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .4rem 1rem; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--line-soft); }
.duelist li:last-child { border-bottom: 0; }
.due-main { display: flex; flex-direction: column; min-width: 0; }
.due-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.due-payer { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.due-meta { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.due-amount { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.due-meta .small { white-space: nowrap; }
.small.danger { color: var(--danger); font-weight: 700; }
@media (max-width: 480px) {
  .duelist li { grid-template-columns: minmax(0, 1fr) auto; }
  .duelist li .btn { grid-column: 1 / -1; justify-self: start; }
}
