/* =========================================================
   Andrle Autoservis – přihlášení, registrace, portál, admin
   Navazuje na css/styles.css (barvy, písma, tlačítka, pole).
   ========================================================= */

:root {
  --ok: #157F3B;
  --ok-bg: #E7F6EC;
  --warn: #8A5300;
  --warn-bg: #FFF3DC;
  --bad: #B00F14;
  --bad-bg: #FFECEC;
  --wait: #1F4E99;
  --wait-bg: #E8F0FD;
  --muted-bg: #EEEDEA;
  --sidebar-w: 264px;
}

body.app-body { background: var(--paper); padding-bottom: 0; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.spinner--on { display: inline-block; }
[hidden] { display: none !important; }

/* ---------- Pilulky stavů ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill--ok { background: var(--ok-bg); color: var(--ok); }
.pill--warn { background: var(--warn-bg); color: var(--warn); }
.pill--bad { background: var(--bad-bg); color: var(--bad); }
.pill--wait { background: var(--wait-bg); color: var(--wait); }
.pill--muted { background: var(--muted-bg); color: var(--ink-soft); }

/* ---------- Demo lišta ---------- */
.demo-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px;
  padding: 8px 16px; background: #FFF3DC; color: #5C3800; font-size: .9rem; font-weight: 600; text-align: center;
  border-bottom: 1px solid #F0D9A8;
}
.demo-bar button { border: 0; background: none; padding: 4px 6px; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; min-height: 32px; }

/* =========================================================
   PŘIHLÁŠENÍ / REGISTRACE
   ========================================================= */
.auth { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.auth__side {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 40px clamp(24px, 4vw, 56px); background: var(--black); color: var(--white);
}
.auth__side::after {
  content: ""; position: absolute; z-index: -1; right: -20%; top: 0; bottom: 0; width: 60%;
  background: var(--red); opacity: .9; clip-path: polygon(62% 0, 70% 0, 38% 100%, 30% 100%);
}
.auth__side h1 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(2.4rem, 4.5vw, 3.8rem); line-height: .95; margin-bottom: 20px; }
.auth__side p { color: var(--on-dark-soft); max-width: 40ch; }
.auth__perks { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.auth__perks li { display: flex; gap: 12px; align-items: flex-start; font-weight: 500; }
.auth__perks .i { color: var(--white); background: var(--red); padding: 5px; width: 30px; height: 30px; border-radius: 4px; }
.auth__back { color: var(--on-dark-soft); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.auth__back:hover { color: var(--white); }

.auth__main { display: flex; align-items: center; justify-content: center; padding: 40px var(--gutter); }
.auth__card { width: 100%; max-width: 520px; }
.auth__card h2 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 2.6rem; line-height: 1; margin-bottom: 8px; }
.auth__card > p { color: var(--ink-soft); margin-bottom: 28px; }
.auth__switch { margin-top: 24px; color: var(--ink-soft); }
.auth__switch a { color: var(--red); font-weight: 700; }

.panel { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); }

/* Kroky registrace */
.progress { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 24px; padding: 0; counter-reset: p; }
.progress li { counter-increment: p; display: flex; flex-direction: column; gap: 6px; font-size: .9rem; font-weight: 600; color: var(--ink-soft); }
.progress li::before { content: ""; height: 4px; border-radius: 2px; background: var(--line); }
.progress li.is-done::before, .progress li.is-current::before { background: var(--red); }
.progress li.is-current { color: var(--ink); }
.progress li span::before { content: counter(p) ". "; }

.step-actions { display: flex; gap: 12px; justify-content: space-between; margin-top: 8px; flex-wrap: wrap; }
.step-actions .btn { flex: 1 1 160px; }
.btn--outline { border-color: var(--black); color: var(--black); background: transparent; }
.btn--outline:hover { background: var(--black); color: var(--white); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: 1rem; }
.btn--ok { background: var(--ok); color: #fff; }
.btn--ok:hover { background: #0F6A30; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.field input.is-upper { text-transform: uppercase; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.field__count { font-size: .85rem; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.field__row { display: flex; justify-content: space-between; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.summary-list { margin: 0 0 20px; display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; }
.summary-list dt { color: var(--ink-soft); }
.summary-list dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.summary-title { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 10px; }
.summary-title h3 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.3rem; }
.summary-title button { border: 0; background: none; color: var(--red); font-weight: 700; cursor: pointer; min-height: 44px; }

.sent { text-align: center; padding: 12px 0; }
.sent .i { width: 64px; height: 64px; padding: 14px; color: var(--white); background: var(--red); border-radius: 50%; margin: 0 auto 16px; }
.sent h3 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.9rem; margin-bottom: 8px; }
.sent p { color: var(--ink-soft); }
.sent strong { color: var(--ink); overflow-wrap: anywhere; }
.demo-link { margin-top: 20px; padding: 16px; border: 2px dashed #E5C27A; background: #FFF9EC; border-radius: var(--radius); text-align: left; }
.demo-link p { color: #5C3800; font-size: .95rem; margin-bottom: 10px; }
.notice { padding: 14px 16px; border-left: 4px solid var(--red); background: var(--bad-bg); color: #7A0A0D; margin-bottom: 18px; }
.notice a { color: inherit; font-weight: 700; }
.demo-accounts { margin-top: 20px; font-size: .92rem; color: var(--ink-soft); }
.demo-accounts button { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius); padding: 6px 10px; margin: 4px 6px 0 0; cursor: pointer; font-weight: 600; min-height: 36px; }
.demo-accounts button:hover { border-color: var(--black); }

/* =========================================================
   PORTÁL – rozvržení
   ========================================================= */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 24px;
  padding: 24px 16px; background: var(--black); color: var(--white); border-right: 4px solid var(--red);
}
.sidebar .logo { padding: 0 8px; }
.sidebar__nav { display: flex; flex-direction: column; gap: 4px; }
.navlink {
  display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px;
  border-radius: var(--radius); color: var(--on-dark-soft); text-decoration: none; font-weight: 600;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.navlink:hover { background: var(--black-3); color: var(--white); }
.navlink[aria-current="page"] { background: var(--red); color: var(--white); }
.navlink .count { margin-left: auto; min-width: 24px; height: 24px; padding: 0 7px; display: grid; place-items: center; border-radius: 12px; background: var(--white); color: var(--red); font-size: .8rem; font-weight: 800; }
.navlink[aria-current="page"] .count { background: var(--black); color: var(--white); }
.sidebar__user { margin-top: auto; padding: 14px; border-radius: var(--radius); background: var(--black-2); }
.sidebar__user strong { display: block; overflow-wrap: anywhere; }
.sidebar__user span { display: block; color: var(--on-dark-soft); font-size: .88rem; overflow-wrap: anywhere; }
.sidebar__user button {
  margin-top: 12px; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px;
  border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius); background: transparent; color: var(--white); font-weight: 600; cursor: pointer;
}
.sidebar__user button:hover { background: var(--white); color: var(--black); }

.topbar-m { display: none; }
.bottomnav { display: none; }

.main { min-width: 0; }
.page { max-width: 1180px; margin: 0 auto; padding: clamp(20px, 3vw, 40px) clamp(16px, 3vw, 40px) 64px; }
.page__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.page__head h1 { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(2rem, 4vw, 2.8rem); line-height: 1; }
.page__head p { color: var(--ink-soft); margin-top: 6px; }

/* ---------- Karty ---------- */
.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; min-width: 0; }
.card--dark { background: var(--black); color: var(--white); border-color: var(--black); }
.card--accent { border-top: 4px solid var(--red); }
.card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.card__head h2, .card__head h3 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.45rem; line-height: 1.05; }
.card__sub { color: var(--ink-soft); font-size: .95rem; }
.card--dark .card__sub { color: var(--on-dark-soft); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: .97rem; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.mono { font-variant-numeric: tabular-nums; letter-spacing: .04em; }

.stat { display: flex; flex-direction: column; gap: 2px; }
.stat strong { font-family: var(--font-display); font-size: 2.4rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--ink-soft); font-size: .92rem; }

.empty { text-align: center; padding: 36px 16px; color: var(--ink-soft); }
.empty .i { width: 44px; height: 44px; color: var(--line); margin: 0 auto 10px; stroke-width: 1.6; }
.empty strong { display: block; color: var(--ink); font-size: 1.1rem; margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }

.skeleton { border-radius: var(--radius); background: linear-gradient(90deg, #ECEBE8 0%, #F6F5F3 50%, #ECEBE8 100%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; min-height: 120px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- Stav zakázky (stepper) ---------- */
.stepper { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.stepper li { display: flex; flex-direction: column; gap: 8px; font-size: .86rem; font-weight: 600; color: var(--on-dark-soft); }
.stepper li::before { content: ""; height: 6px; border-radius: 3px; background: var(--black-3); }
.stepper li.is-done::before { background: var(--white); }
.stepper li.is-done { color: var(--white); }
.stepper li.is-current::before { background: var(--red); }
.stepper li.is-current { color: var(--white); }
.stage-now { display: flex; align-items: center; gap: 12px; margin-top: 18px; padding: 14px 16px; background: var(--black-2); border-left: 4px solid var(--red); }
.stage-now strong { font-family: var(--font-display); font-size: 1.5rem; text-transform: uppercase; }

/* ---------- Seznamy ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }
.list__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--radius); background: var(--paper); color: var(--ink); flex-shrink: 0; }
.list__icon--red { background: var(--bad-bg); color: var(--bad); }
.list__icon--warn { background: var(--warn-bg); color: var(--warn); }
.list__body { flex: 1; min-width: 0; }
.list__body strong { display: block; }
.list__body span { color: var(--ink-soft); font-size: .93rem; }
.list__end { margin-left: auto; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* ---------- Diagnostika ---------- */
.report { padding: 0; overflow: hidden; }
.report__head { padding: 20px 22px; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.report__head h2 { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; font-size: 1.5rem; }
.report__summary { padding: 18px 22px; background: var(--paper); border-bottom: 1px solid var(--line); }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.item:last-child { border-bottom: 0; }
.item__title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; font-weight: 700; font-size: 1.05rem; }
.item__desc { color: var(--ink-soft); margin-top: 4px; font-size: .96rem; }
.item__side { display: flex; align-items: center; gap: 12px; justify-content: flex-end; flex-wrap: wrap; }
.item__price { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; font-variant-numeric: tabular-nums; min-width: 100px; text-align: right; }
.item__actions { display: flex; gap: 8px; }
.item.is-approved { background: #F5FBF7; }
.item.is-rejected .item__title, .item.is-rejected .item__price { color: var(--ink-soft); text-decoration: line-through; }
.report__foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 22px; background: var(--black); color: var(--white); }
.report__foot strong { font-family: var(--font-display); font-size: 1.8rem; font-variant-numeric: tabular-nums; }
.link-btn { border: 0; background: none; padding: 6px 4px; color: var(--ink-soft); font-weight: 600; text-decoration: underline; cursor: pointer; min-height: 40px; }

/* ---------- Auta ---------- */
.carcard__plate { display: inline-block; padding: 3px 10px; border: 2px solid var(--black); border-left: 10px solid #1F4E99; border-radius: 3px; font-weight: 800; letter-spacing: .08em; font-variant-numeric: tabular-nums; background: var(--white); color: var(--black); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 18px 16px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 3px solid var(--red); }
.timeline time { font-size: .88rem; color: var(--ink-soft); font-weight: 600; }
.timeline strong { display: block; }
.timeline p { color: var(--ink-soft); font-size: .95rem; }

/* ---------- Kalendář ---------- */
.cal { user-select: none; }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal__head h3 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; text-transform: uppercase; }
.cal__nav { display: flex; gap: 6px; }
.iconbtn { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); cursor: pointer; color: var(--ink); }
.iconbtn:hover:not(:disabled) { border-color: var(--black); }
.iconbtn:disabled { opacity: .35; cursor: not-allowed; }
.cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal__dow { text-align: center; font-size: .8rem; font-weight: 700; text-transform: uppercase; color: var(--ink-soft); padding: 4px 0; }
.cal__day {
  position: relative; height: 52px; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background-color .15s var(--ease), border-color .15s var(--ease);
}
.cal__day:hover:not(:disabled) { border-color: var(--black); }
.cal__day:disabled { background: transparent; border-color: transparent; color: #B5B4B0; cursor: not-allowed; font-weight: 500; }
.cal__day.is-today { box-shadow: inset 0 0 0 2px var(--black); }
.cal__day[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--white); }
.cal__day.is-full:not(:disabled) { background: var(--paper); color: var(--ink-soft); }
.cal__day .dots { display: flex; gap: 3px; height: 6px; }
.cal__day .dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.cal__day .dots i.ok { background: var(--ok); }
.cal__day .dots i.wait { background: var(--wait); }
.cal__day .num { font-size: .72rem; font-weight: 800; color: var(--ink-soft); }
.cal__day[aria-pressed="true"] .num { color: var(--white); }
.cal__day.is-outside { visibility: hidden; }
.cal__legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 12px; font-size: .86rem; color: var(--ink-soft); }
.cal__legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal__legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }

.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot {
  min-height: 48px; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--white);
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; font-variant-numeric: tabular-nums; cursor: pointer;
}
.slot:hover:not(:disabled) { border-color: var(--black); }
.slot[aria-pressed="true"] { background: var(--black); border-color: var(--black); color: var(--white); }
.slot:disabled { color: #B5B4B0; text-decoration: line-through; cursor: not-allowed; background: var(--paper); }
.slot-group { margin-bottom: 14px; }
.slot-group h4 { font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); margin: 0 0 8px; }
.picked { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--black); color: var(--white); border-left: 4px solid var(--red); border-radius: var(--radius); margin: 16px 0; }
.picked strong { font-family: var(--font-display); font-size: 1.35rem; text-transform: uppercase; }

/* ---------- Admin kalendář: prázdné dny malé, dny s prací s náhledem ---------- */
.acal-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.acal-layout [data-daypanel] { scroll-margin-top: 16px; }
.acal { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)) repeat(2, minmax(0, .55fr)); gap: 4px; }
.acal__dow { padding: 4px 6px; font-size: .78rem; font-weight: 700; text-transform: uppercase; color: var(--ink-soft); }
.acal__day {
  display: flex; flex-direction: column; align-items: stretch; gap: 4px; min-width: 0; min-height: 40px;
  padding: 6px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  font: inherit; text-align: left; color: var(--ink-soft); cursor: pointer;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.acal__day:hover { border-color: var(--black); }
.acal__day.is-outside { visibility: hidden; }
.acal__day.is-past:not(.has-items) { background: transparent; color: #A6A5A1; }
.acal__day.has-items { color: var(--ink); border-color: #CFCDC8; padding-bottom: 8px; }
.acal__day[aria-pressed="true"] { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); background: #FFF8F8; }
.acal__num { font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; line-height: 1.4; }
.acal__day.is-today .acal__num { align-self: flex-start; padding: 0 7px; border-radius: 10px; background: var(--black); color: var(--white); }
.acal__items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.acal__item {
  display: block; min-width: 0; padding: 3px 6px; border-left: 3px solid; border-radius: 2px;
  font-size: .8rem; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink);
}
.acal__item b { font-variant-numeric: tabular-nums; }
.acal__item small { margin-left: 4px; color: var(--ink-soft); font-size: .76rem; }
/* stav = barva + styl čáry, aby šel rozlišit i bez barev */
.acal__item--requested { background: var(--wait-bg); border-left-color: var(--wait); border-left-style: dashed; }
.acal__item--proposed { background: var(--bad-bg); border-left-color: var(--red); border-left-style: dotted; border-left-width: 4px; }
.acal__item--confirmed { background: var(--ok-bg); border-left-color: var(--ok); }
.acal__item--done { background: var(--muted-bg); border-left-color: #8C8C94; color: var(--ink-soft); }
.acal__more { font-size: .78rem; font-weight: 700; color: var(--ink-soft); padding-left: 6px; }
.acal__key { display: inline-block; width: 18px !important; height: 12px !important; border-radius: 2px !important; padding: 0; }

.booking-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }

/* ---------- Tabulka (admin) ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
table.table { width: 100%; border-collapse: collapse; font-size: .97rem; }
.table th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); padding: 12px 14px; border-bottom: 2px solid var(--black); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; transition: background-color .15s; }
.table tbody tr:hover, .table tbody tr:focus-within { background: var(--paper); }
.table td small { display: block; color: var(--ink-soft); }
.searchbox { position: relative; max-width: 360px; width: 100%; }
.searchbox .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-soft); }
.searchbox input { padding-left: 40px !important; }

/* Žádosti (admin) */
.req { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.req:last-child { border-bottom: 0; }
.req__when { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; text-transform: uppercase; }
.req__who { font-weight: 600; }
.req__meta { color: var(--ink-soft); font-size: .93rem; }
.req__note { margin-top: 6px; padding: 8px 12px; background: var(--paper); border-radius: var(--radius); font-size: .95rem; }
.req__actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }

/* ---------- Dialog ---------- */
dialog.modal { width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: var(--radius); box-shadow: 0 24px 80px rgba(0,0,0,.35); overflow: auto; }
dialog.modal::backdrop { background: rgba(14,14,16,.6); }
dialog.modal[open] { animation: pop .2s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.modal__head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; background: var(--black); color: var(--white); border-bottom: 4px solid var(--red); }
.modal__head h2 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.5rem; }
.modal__head .iconbtn { background: transparent; color: var(--white); border-color: rgba(255,255,255,.25); }
.modal__body { padding: 20px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 16px 20px; border-top: 1px solid var(--line); background: var(--paper); }
dialog.modal--wide { width: min(920px, calc(100% - 32px)); }

.item-rows { display: grid; gap: 12px; }
.item-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 120px 44px; gap: 8px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); }
.item-row .field { margin-bottom: 0; }
.item-row .span-all { grid-column: 1 / -1; }

/* ---------- Toasty ---------- */
.toasts { position: fixed; z-index: 1000; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; max-width: calc(100% - 32px); }
.toast { padding: 14px 18px; border-radius: var(--radius); background: var(--black); color: var(--white); border-left: 4px solid var(--ok); box-shadow: 0 8px 30px rgba(0,0,0,.25); font-weight: 600; animation: pop .2s var(--ease); transition: opacity .3s, transform .3s; }
.toast--bad { border-left-color: var(--red); }
.toast.is-out { opacity: 0; transform: translateY(8px); }

/* ---------- Přepínač ---------- */
.switch { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch input { appearance: none; width: 48px; height: 28px; border-radius: 14px; background: #C9C8C4; position: relative; cursor: pointer; flex-shrink: 0; transition: background-color .2s; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .2s var(--ease); }
.switch input:checked { background: var(--ok); }
.switch input:checked::after { transform: translateX(20px); }
.switch input:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }

/* =========================================================
   Responzivita
   ========================================================= */
@media (max-width: 1100px) {
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .booking-layout { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .topbar-m {
    position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px; background: var(--black); color: var(--white); border-bottom: 3px solid var(--red);
  }
  .topbar-m .logo__svg { height: 44px; }
  .topbar-m .iconbtn { background: transparent; color: var(--white); border-color: rgba(255,255,255,.25); }
  .bottomnav {
    position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; display: grid; grid-auto-columns: 1fr; grid-auto-flow: column;
    background: var(--white); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 20px rgba(0,0,0,.08);
  }
  .bottomnav a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 60px; font-size: .74rem; font-weight: 700; color: var(--ink-soft); text-decoration: none; }
  .bottomnav a[aria-current="page"] { color: var(--red); }
  .bottomnav a[aria-current="page"]::before { content: ""; position: absolute; top: 0; left: 25%; right: 25%; height: 3px; background: var(--red); }
  .bottomnav .count { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: .7rem; display: grid; place-items: center; }
  .main { padding-bottom: 80px; }
  .toasts { bottom: 84px; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__side { padding: 24px var(--gutter); gap: 16px; }
  .auth__side h1 { font-size: 2.2rem; margin-bottom: 10px; }
  .auth__perks, .auth__side .auth__lead { display: none; }
  .auth__main { align-items: flex-start; padding-top: 28px; }
}
@media (max-width: 700px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .item { grid-template-columns: 1fr; }
  .item__side { justify-content: space-between; }
  .item__price { text-align: left; min-width: 0; }
  .stepper { grid-template-columns: repeat(5, 1fr); }
  .stepper li { font-size: 0; gap: 0; }
  .req { grid-template-columns: 1fr; }
  .req__actions { flex-direction: row; flex-wrap: wrap; }
  .req__actions .btn { flex: 1 1 140px; }
  .item-row { grid-template-columns: 1fr 1fr; }
  .item-row .field:first-child { grid-column: 1 / -1; }
  .table .hide-sm { display: none; }
  /* na mobilu místo textu jen barevné proužky podle stavu */
  .acal { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
  .acal__day { padding: 4px; min-height: 44px; align-items: center; }
  .acal__items { width: 100%; gap: 2px; }
  .acal__item { height: 5px; padding: 0; font-size: 0; border-left: 0; }
  .acal__item--requested { background: var(--wait); }
  .acal__item--proposed { background: var(--red); }
  .acal__item--confirmed { background: var(--ok); }
  .acal__item--done { background: #8C8C94; }
  .acal__more { font-size: .65rem; padding: 0; text-align: center; }
}

/* =========================================================
   Předplatné – portál a administrace
   ========================================================= */
.tier {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: var(--radius);
  font-family: var(--font-display); font-size: .92rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  border: 1.5px solid var(--ink); color: var(--ink); background: var(--white); white-space: nowrap;
}
.tier--plus { background: var(--red); border-color: var(--red); color: var(--white); }
.tier--premium { background: var(--black); border-color: var(--black); color: var(--white); }
.tier--premium::before { content: ""; width: 6px; height: 6px; background: var(--red); transform: rotate(45deg); }

.subcard__badges { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.subcard--none { border-style: dashed; background: transparent; }

.paybox { margin-top: 16px; padding: 16px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.paybox__title { display: block; font-family: var(--font-display); font-size: 1.2rem; text-transform: uppercase; margin-bottom: 10px; }
.paybox__ways { display: grid; gap: 8px; margin-bottom: 12px; font-size: .95rem; }
.paybox__ways div { display: flex; gap: 10px; align-items: flex-start; }
.paybox__ways .i { color: var(--red); margin-top: 2px; }
.paybox__kv { padding-top: 12px; border-top: 1px dashed var(--line); }

.plans__head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 20px; margin-bottom: 28px; }
.plans__title { font-family: var(--font-display); font-size: 1.9rem; text-transform: uppercase; }
.plans .plan__list .i { color: var(--red); }

/* volba v dialogu (tarif, placení) */
.choice { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.choice legend { font-weight: 700; margin-bottom: 8px; padding: 0; }
.choice__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.choice__grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice__grid--1 { grid-template-columns: 1fr; }
.choice__opt { position: relative; display: block; cursor: pointer; }
.choice__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.choice__opt > span {
  display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px;
  border: 2px solid var(--line); border-radius: var(--radius); background: var(--white); transition: border-color .15s, background-color .15s;
}
.choice__opt small { color: var(--ink-soft); line-height: 1.35; }
.choice__opt b { margin-top: 6px; font-variant-numeric: tabular-nums; }
.choice__opt:hover > span { border-color: #BDBBB6; }
.choice__opt input:checked + span { border-color: var(--red); background: #FFF6F6; box-shadow: inset 0 0 0 1px var(--red); }
.choice__opt input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.choice__opt.is-disabled { cursor: not-allowed; opacity: .55; }
.sub-total { margin-top: 18px; padding: 12px 14px; background: var(--paper); border-radius: var(--radius); }

/* admin */
.subtools { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--white);
  font-weight: 600; cursor: pointer; touch-action: manipulation;
}
.chip[aria-pressed="true"] { background: var(--black); border-color: var(--black); color: var(--white); }
.stat--btn { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.stat--btn:hover { border-color: #BDBBB6; }
.subrow .req__who { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.topbar-m__actions { display: flex; gap: 8px; }

@media (max-width: 700px) {
  .choice__grid, .choice__grid--2 { grid-template-columns: 1fr; }
  .subtools .searchbox { max-width: none; }
}

/* ---------- Nedostupnost ---------- */
/* zavřený den v kalendáři zákazníka: přeškrtnutý, s vysvětlením pod kalendářem */
.cal__day.is-closed:disabled { background: repeating-linear-gradient(135deg, #F3F1EC 0 6px, #E9E6E0 6px 12px); color: #8C8B87; text-decoration: line-through; }
.cal__key-closed { width: 14px !important; height: 10px !important; border-radius: 2px !important; background: repeating-linear-gradient(135deg, #F3F1EC 0 3px, #D9D6CF 3px 6px); }
.cal__closed { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.cal__closed li { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-left: 3px solid var(--warn); background: var(--warn-bg); color: #5E3A00; font-size: .92rem; }
.cal__closed .i { width: 18px; height: 18px; flex-shrink: 0; margin-top: 2px; }
/* admin kalendář */
.acal__day.is-closed { background: repeating-linear-gradient(135deg, #FAF9F6 0 6px, #F1EFEA 6px 12px); }
.acal__closed { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--warn); line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
@media (max-width: 640px) { .acal__closed { display: none; } }
/* karty nedostupnosti */
.closure__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 16px; align-items: start; }
.closure--clash { border-color: var(--red); border-left-width: 4px; }
.closure__clash { margin-top: 14px; padding-top: 10px; border-top: 1px dashed var(--line); }
.closure__clash > p { display: flex; gap: 8px; align-items: center; color: var(--bad); }
.closure__clash > p .i { width: 18px; height: 18px; }
@media (max-width: 640px) { .closure__head { grid-template-columns: 1fr; } }
.notice--link { display: flex; gap: 10px; align-items: center; text-decoration: none; background: var(--warn-bg); border-left-color: var(--warn); color: #5E3A00; }
.notice--link .i { width: 20px; height: 20px; flex-shrink: 0; }
.notice--link.notice--bad { background: var(--bad-bg); border-left-color: var(--red); color: #7A0A0D; }
.notice--link:hover { filter: brightness(.98); }

/* ---------- Půjčovna ---------- */
.tabs-app { display: flex; gap: 4px; box-shadow: inset 0 -2px 0 var(--line); margin-bottom: 20px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tab-app { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; font-weight: 700; color: var(--ink-soft); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab-app:hover { color: var(--ink); }
.tab-app[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--red); }
.dlg-h { font-family: var(--font-display); text-transform: uppercase; font-size: 1.2rem; margin: 22px 0 10px; }
.dlg-h:first-child { margin-top: 0; }

/* obsazenost (časová osa) */
.tl { overflow-x: auto; padding-bottom: 6px; }
.tl__row { display: grid; grid-template-columns: 150px repeat(21, minmax(26px, 1fr)); gap: 3px; align-items: center; min-width: 760px; margin-bottom: 3px; }
.tl__name { font-weight: 700; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding-right: 8px; }
.tl__day { display: flex; flex-direction: column; align-items: center; font-size: .7rem; color: var(--ink-soft); line-height: 1.15; }
.tl__day b { font-size: .85rem; color: var(--ink); }
.tl__day.is-today b { background: var(--black); color: var(--white); border-radius: 8px; padding: 0 5px; }
.tl__cell { height: 26px; border-radius: 4px; background: var(--paper); }
.tl__cell--closed { background: repeating-linear-gradient(135deg, #F3F1EC 0 4px, #E4E1DA 4px 8px); }
.tl__cell--requested { background: var(--wait); }
.tl__cell--confirmed { background: var(--ok); }
.tl__cell--picked_up { background: var(--red); }
.tl__key { width: 14px !important; height: 10px !important; border-radius: 2px !important; }

/* karty aut v administraci */
.rcars { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.rcar { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.rcar.is-off { opacity: .65; }
.rcar__img { position: relative; aspect-ratio: 16 / 10; background: var(--paper); display: grid; place-items: center; color: #B5B4B0; }
.rcar__img img { width: 100%; height: 100%; object-fit: cover; }
.rcar__img > .i { width: 40px; height: 40px; }
.rcar__count { position: absolute; right: 8px; bottom: 8px; display: inline-flex; gap: 4px; align-items: center; padding: 3px 8px; border-radius: 999px; background: rgba(14,14,16,.8); color: #fff; font-size: .8rem; font-weight: 700; }
.rcar__count .i { width: 14px; height: 14px; }
.rcar__body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.rcar__body h3 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.3rem; line-height: 1.1; }
.rcar__body .btn { justify-self: start; margin-top: 4px; }
.rcar__price strong { font-size: 1.1rem; }

/* fotky v dialogu */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-bottom: 10px; }
.photo { position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; background: var(--paper); border: 1px solid var(--line); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo__main { position: absolute; left: 6px; top: 6px; padding: 2px 8px; border-radius: 999px; background: var(--red); color: #fff; font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.photo__tools { position: absolute; inset: auto 0 0 0; display: flex; justify-content: center; gap: 4px; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.55)); }
.photo__tools .iconbtn { width: 36px; height: 36px; background: rgba(255,255,255,.95); }
.photo__tools .iconbtn:disabled { opacity: .4; cursor: not-allowed; }
.photos__empty { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; justify-content: center; padding: 26px; border: 2px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); }
.photos__add { cursor: pointer; }
.photos__add.is-loading { pointer-events: none; opacity: .6; }
.photos__add:focus-within { outline: 3px solid var(--red); outline-offset: 2px; }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 12px; }
.feat { display: flex; gap: 8px; align-items: center; min-height: 40px; cursor: pointer; }
.feat input { width: 20px; height: 20px; accent-color: var(--red); }
.checklist { margin: 0 0 14px; padding-left: 20px; display: grid; gap: 4px; }

/* půjčovna – zákazník */
.rent { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.rent__main { display: grid; gap: 20px; min-width: 0; }
.rent__sum { position: sticky; top: 20px; display: grid; gap: 12px; }
.rent__sum h2 { font-family: var(--font-display); text-transform: uppercase; font-size: 1.4rem; }
.stepno { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: 6px; border-radius: 50%; background: var(--black); color: var(--white); font-size: .95rem; vertical-align: 2px; }
.rpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.rpick__car { display: flex; flex-direction: column; text-align: left; padding: 0; border: 2px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.rpick__car:hover { border-color: var(--black); }
.rpick__car[aria-checked="true"] { border-color: var(--red); box-shadow: 0 0 0 2px var(--red); }
.rpick__car:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.rpick__img { aspect-ratio: 16 / 10; background: var(--paper); display: grid; place-items: center; color: #B5B4B0; }
.rpick__img img { width: 100%; height: 100%; object-fit: cover; }
.rpick__img .i { width: 40px; height: 40px; }
.rpick__body { display: grid; gap: 3px; padding: 12px 14px 14px; }
.rpick__body strong { font-family: var(--font-display); text-transform: uppercase; font-size: 1.2rem; line-height: 1.1; }
.rpick__body small { color: var(--ink-soft); }
.rpick__price b { font-size: 1.05rem; }
.rdetail { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--line); display: grid; gap: 12px; }
.rdetail__gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
.rdetail__gallery img { flex: 0 0 auto; width: min(320px, 80%); aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); scroll-snap-align: start; }
.chips-static { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips-static li { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; background: var(--paper); font-size: .9rem; font-weight: 600; }
.chips-static .i { width: 15px; height: 15px; color: var(--ok); }
.rdetail__kv { margin: 0; }
.rhint { margin-bottom: 10px; }
.rday.is-busy:disabled { background: repeating-linear-gradient(135deg, #F3F1EC 0 6px, #E4E1DA 6px 12px); color: #9C9B97; text-decoration: line-through; }
.rday.is-closed:disabled { text-decoration: line-through; }
.rday.is-in { background: #FBD9DA; border-color: #FBD9DA; }
.rday.is-start, .rday.is-end, .rday[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: var(--white); }
.rextras { display: grid; gap: 8px; }
.rextra { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.rextra:has(input:checked) { border-color: var(--red); background: #FFF8F8; }
.rextra input { width: 22px; height: 22px; accent-color: var(--red); }
.rextra small { display: block; color: var(--ink-soft); font-size: .88rem; }
.rextra__price { text-align: right; font-weight: 800; white-space: nowrap; }
.rextra__price small { font-weight: 500; }
.rsum__car { display: grid; gap: 8px; }
.rsum__car img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); }
.rsum__car strong { font-family: var(--font-display); text-transform: uppercase; font-size: 1.25rem; }
.rsum { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; margin: 10px 0 0; font-size: .95rem; }
.rsum dd { margin: 0; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.rsum dt { color: var(--ink-soft); }
.rsum__total { padding-top: 10px; margin-top: 4px; border-top: 2px solid var(--black); font-size: 1.15rem; color: var(--ink) !important; font-weight: 800; }
.rsum__save { display: flex; gap: 6px; align-items: center; color: var(--ok); font-weight: 700; font-size: .92rem; }
.rsum__save .i { width: 18px; height: 18px; }
.myrent { align-items: flex-start !important; }
.myrent > img { width: 88px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); flex-shrink: 0; }
@media (max-width: 1240px) {
  .rent { grid-template-columns: 1fr; }
  .rent__sum { position: static; }
}
