/* ==========================================================================
   Vstupenky – jednotný vzhled pro veřejnou část i administraci
   --------------------------------------------------------------------------
   1. Design tokeny (barvy, písmo, mezery) – měňte hlavně zde
   2. Základ
   3. Rozvržení (veřejná část, administrace)
   4. Komponenty (tlačítka, karty, formuláře, tabulky, štítky, hlášky…)
   5. Specifické části (objednávka, skener, náhled vstupenky)
   6. Pomocné třídy
   Barvy --brand a --accent se načítají z Nastavení → Vzhled.
   ========================================================================== */

/* 1. Design tokeny ------------------------------------------------------- */
:root {
    --brand: #157cc1;
    --accent: #0095eb;

    --bg: #f5f6fa;
    --surface: #ffffff;
    --surface-2: #f9fafc;
    --border: #e3e6ee;
    --border-strong: #cfd4e0;
    --text: #1b2033;
    --text-muted: #646b80;

    --success: #14804a;
    --success-bg: #e7f6ee;
    --warning: #9a6200;
    --warning-bg: #fff4dc;
    --danger: #c8312b;
    --danger-bg: #fdecec;
    --info: #1f5fbf;
    --info-bg: #e8f0fc;

    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SFMono-Regular", Consolas, monospace;

    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(20, 25, 50, .06);
    --shadow: 0 1px 3px rgba(20, 25, 50, .06), 0 6px 24px rgba(20, 25, 50, .06);

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;

    --sidebar-w: 248px;
}

/* 2. Základ -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--text);
    background: var(--bg);
}
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 var(--space-3); font-weight: 650; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 var(--space-3); }
a { color: var(--brand); }
img { max-width: 100%; height: auto; }
code, .mono { font-family: var(--font-mono); font-size: .92em; }
hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-5) 0; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 45%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* 3a. Rozvržení – veřejná část ------------------------------------------- */
/* Písmo Poppins jako na webu stastna-hvezda.cz (SIL OFL, assets/fonts/OFL.txt) – uložené lokálně, nenačítá se od Googlu */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-latin-ext-400.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: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-latin-400.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: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-ext-500.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: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-latin-500.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: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-ext-600.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: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-latin-600.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: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-ext-700.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: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-latin-700.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; }
body.site {
    --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --radius: 14px; --radius-lg: 20px; --radius-sm: 10px;
    --tint: color-mix(in srgb, var(--brand) 8%, #fff);
    --brand-dark: color-mix(in srgb, var(--brand) 72%, #000);
    --shadow-soft: 0 1px 2px rgba(20, 25, 50, .04), 0 8px 28px rgba(20, 25, 50, .07);
    font-family: var(--font); font-size: 15px; background: #f3f8fc; color: #2b3445;
}
body.site h1, body.site h2, body.site h3 { font-weight: 700; color: var(--brand-dark); }
.site-header { background: var(--brand); color: #fff; }
.site-header__inner {
    max-width: 1100px; margin: 0 auto; padding: var(--space-3) var(--space-4);
    display: flex; align-items: center; gap: var(--space-3); min-height: 68px;
}
.site-header img { display: block; max-height: 100px; max-width: min(460px, 60vw); width: auto; height: auto; object-fit: contain; }
@media (max-width: 640px) { .site-header img { max-height: 80px; } }
.site-header__title { font-weight: 600; color: #fff; }
.site-header__link {
    margin-left: auto; font-size: .88rem; font-weight: 600; color: var(--brand); text-decoration: none; white-space: nowrap;
    padding: 7px 16px; border-radius: 99px; background: #fff;
}
.site-header__link:hover { text-decoration: underline; }
.site-header__home { display: flex; align-items: center; gap: var(--space-3); color: inherit; text-decoration: none; min-width: 0; }
.buy-again { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4); }
.buy-again h2 { margin-bottom: var(--space-1); font-size: 1.15rem; }
@media (max-width: 640px) { .buy-again .btn { width: 100%; } }
@media (max-width: 480px) {
    .site-header__title { font-size: .92rem; line-height: 1.3; }
    .site-header__link { font-size: .8rem; padding: 6px 12px; }
}
.site-main { max-width: 1100px; margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-7); }
.site-main--narrow { max-width: 760px; }
.site-footer {
    max-width: 1100px; margin: 0 auto; padding: var(--space-5) var(--space-4) var(--space-6);
    color: var(--text-muted); font-size: .85rem; border-top: 1px solid var(--border);
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3) var(--space-5);
}
.site-footer__seller strong { color: var(--text); }
.site-footer__links { display: flex; flex-wrap: wrap; align-content: flex-start; gap: var(--space-2) var(--space-4); }
.site-footer a { color: inherit; }
body.is-embed { background: transparent; }
body.is-embed .site-header, body.is-embed .site-footer, body.is-embed .mobile-bar { display: none !important; }
body.is-embed .site-main { padding: 0; max-width: none; }

/* Úvodní blok s informacemi o akci */
.event-hero {
    margin-bottom: var(--space-5); padding: var(--space-6);
    background: var(--tint); border-radius: var(--radius-lg);
}
.event-hero__eyebrow { margin-bottom: var(--space-2); color: var(--accent); font-size: .9rem; font-weight: 600; }
.event-hero__title { font-size: clamp(1.8rem, 4.5vw, 2.6rem); font-weight: 700; line-height: 1.15; margin-bottom: var(--space-5); }
.event-facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-3); }
.event-facts li {
    display: flex; align-items: center; gap: var(--space-3);
    padding: 10px 18px 10px 12px; background: var(--surface); border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(20, 25, 50, .05);
}
.event-facts__icon {
    width: 36px; height: 36px; padding: 8px; flex-shrink: 0; border-radius: 10px; background: var(--tint);
    fill: none; stroke: var(--brand); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.event-facts__label { display: block; font-size: .75rem; color: var(--text-muted); }
.event-facts strong { font-weight: 700; }
.event-hero__info { margin: var(--space-4) 0 0; color: var(--text-muted); max-width: 70ch; }
@media (max-width: 640px) {
    .event-hero { padding: var(--space-5) var(--space-4); }
    .event-facts li { width: 100%; }
}

/* Plakát, podtitulek a popis akce */
html { scroll-behavior: smooth; }
.event-hero--poster { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px); gap: var(--space-6); align-items: center; }
.event-hero__subtitle { font-size: 1.1rem; color: var(--text); margin: calc(-1 * var(--space-3)) 0 var(--space-5); max-width: 52ch; }
.event-hero__cta { margin-top: var(--space-5); }
.event-hero__poster { display: block; border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 32px rgba(20, 25, 50, .18); transition: transform .2s; }
.event-hero__poster:hover { transform: scale(1.015); }
.event-hero__poster img { display: block; width: 100%; height: auto; }
@media (max-width: 760px) {
    .event-hero--poster { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
    .event-hero__poster { max-width: 420px; justify-self: center; width: 100%; }
}
.event-about .rich { max-width: 72ch; }
.event-about__content { position: relative; overflow: hidden; }
.event-about__content.is-collapsed::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--surface)); pointer-events: none;
}
.event-about__intro { font-size: 1.08rem; max-width: 70ch; margin-bottom: var(--space-5); }
.event-about__intro p { margin-bottom: var(--space-2); }
.event-about__grid { columns: 2 300px; column-gap: var(--space-4); }
.about-tile {
    break-inside: avoid; display: inline-block; width: 100%; margin-bottom: var(--space-4);
    padding: var(--space-4) var(--space-5); background: var(--tint); border-radius: var(--radius);
}
.about-tile h3 { margin: 0 0 var(--space-2); font-size: 1.05rem; }
.about-tile > :last-child { margin-bottom: 0; }
.about-tile ul:not(.chips) { padding-left: 1.2em; }
.rich ul.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rich ul.chips li { margin: 0; padding: 4px 12px; background: var(--surface); border-radius: 99px; font-size: .9rem; box-shadow: 0 1px 2px rgba(20, 25, 50, .06); }
.event-about__more { margin-top: var(--space-3); margin-right: var(--space-2); }
.rich ul.lines { list-style: none; padding: 0; }
.rich ul.lines li { padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--brand) 12%, transparent); }
.rich ul.lines li:last-child { border-bottom: 0; }
.event-hero__poster { cursor: zoom-in; }
.lightbox {
    position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 56px 16px 16px;
    background: rgba(10, 14, 28, .88); animation: lb-in .15s ease-out; cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: calc(100vh - 80px); border-radius: var(--radius-sm); box-shadow: 0 20px 60px rgba(0, 0, 0, .5); cursor: default; }
.lightbox__close {
    position: fixed; top: 10px; right: 12px; width: 48px; height: 48px; border: 0; border-radius: 50%;
    background: rgba(255, 255, 255, .15); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .3); }
body.has-lightbox { overflow: hidden; }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.event-about__cta { margin-top: var(--space-4); }
.rich h3 { font-size: 1.05rem; margin: var(--space-5) 0 var(--space-2); }
.rich h3:first-child { margin-top: 0; }
.rich ul { margin: 0 0 var(--space-3); padding-left: 1.3em; }
.rich li { margin-bottom: 2px; }
.rich li::marker { color: var(--brand); }
.rich a { word-break: break-word; }
.buy-heading { font-size: 1.5rem; margin: var(--space-6) 0 var(--space-4); scroll-margin-top: var(--space-4); }

/* Jak nákup probíhá */
.how-it-works {
    list-style: none; margin: 0 0 var(--space-6); padding: 0;
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4);
}
.how-it-works li { display: flex; align-items: flex-start; gap: var(--space-3); font-size: .92rem; color: var(--text-muted); }
.how-it-works strong { color: var(--text); }
.how-it-works__num, .step-title__num {
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--brand); color: #fff; font-weight: 750; font-size: .85rem;
}
@media (max-width: 760px) { .how-it-works { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); } }
.order-intro { color: var(--text-muted); margin-bottom: var(--space-5); }
.step-title { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-5); font-size: 1.3rem; font-weight: 750; }

/* 3b. Rozvržení – administrace ------------------------------------------- */
.admin { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: var(--sidebar-w); flex-shrink: 0;
    background: #141a2e; color: #c8cde0;
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar__brand {
    padding: var(--space-5) var(--space-5) var(--space-4);
    color: #fff; font-weight: 700; display: flex; align-items: center; gap: var(--space-2);
}
.admin-sidebar__brand::before {
    content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--accent);
}
.admin-nav { list-style: none; margin: 0; padding: 0 var(--space-3); flex: 1; }
.admin-nav__label {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .08em;
    color: #7c84a0; padding: var(--space-4) var(--space-3) var(--space-1);
}
.admin-nav a {
    display: flex; align-items: center; gap: var(--space-3);
    padding: 9px var(--space-3); border-radius: var(--radius-sm);
    color: inherit; text-decoration: none; font-size: .93rem;
}
.admin-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.admin-nav a.is-active { background: rgba(255, 255, 255, .1); color: #fff; }
.admin-nav .count {
    margin-left: auto; background: var(--accent); color: #1b2033;
    font-size: .72rem; font-weight: 700; border-radius: 99px; padding: 1px 7px;
}
.admin-sidebar__user {
    padding: var(--space-4) var(--space-5); border-top: 1px solid rgba(255, 255, 255, .08);
    font-size: .85rem;
}
.admin-sidebar__user a, .admin-sidebar__user .btn { color: #c8cde0; }
.admin-sidebar__user .btn { padding-left: 0; padding-right: 0; }
.admin-sidebar__name { color: #fff; font-weight: 650; }
.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
    display: none; align-items: center; justify-content: space-between;
    padding: var(--space-3) var(--space-4); background: #141a2e; color: #fff;
}
.admin-content { padding: var(--space-6); max-width: 1280px; }
.page-head {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: var(--space-3); margin-bottom: var(--space-5);
}
.page-head h1 { margin: 0; }
.page-head__sub { color: var(--text-muted); margin-top: var(--space-1); }

@media (max-width: 900px) {
    .admin { display: block; }
    .admin-topbar { display: flex; }
    .admin-sidebar {
        position: fixed; inset: 0 auto 0 0; z-index: 50;
        transform: translateX(-100%); transition: transform .2s;
    }
    .admin.nav-open .admin-sidebar { transform: none; box-shadow: var(--shadow); }
    .admin-content { padding: var(--space-4); }
}

/* 4. Komponenty ---------------------------------------------------------- */

/* Tlačítka */
.btn {
    --btn-bg: var(--surface); --btn-fg: var(--text); --btn-border: var(--border-strong);
    display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
    padding: 9px 16px; border-radius: var(--radius-sm);
    border: 1px solid var(--btn-border); background: var(--btn-bg); color: var(--btn-fg);
    font: inherit; font-weight: 600; font-size: .93rem; line-height: 1.2;
    text-decoration: none; cursor: pointer; white-space: nowrap;
    transition: filter .15s, background .15s;
}
.btn:hover { filter: brightness(.96); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn--primary { --btn-bg: var(--brand); --btn-fg: #fff; --btn-border: var(--brand); }
.btn--accent { --btn-bg: var(--accent); --btn-fg: #1b2033; --btn-border: var(--accent); }
.btn--success { --btn-bg: var(--success); --btn-fg: #fff; --btn-border: var(--success); }
.btn--danger { --btn-bg: var(--surface); --btn-fg: var(--danger); --btn-border: #efc2c0; }
.btn--ghost { --btn-bg: transparent; --btn-border: transparent; }
.edit-customer > summary { list-style: none; }
.edit-customer > summary::-webkit-details-marker { display: none; }
.edit-customer[open] > summary { margin-bottom: var(--space-2); }
.btn--danger-solid { --btn-bg: var(--danger); --btn-fg: #fff; --btn-border: var(--danger); }

/* Potvrzovací okno (admin.js) */
.modal {
    position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: var(--space-4);
    background: rgba(15, 20, 40, .45); animation: modal-fade .12s ease-out;
}
.modal__box {
    width: 100%; max-width: 440px; padding: var(--space-5); background: var(--surface);
    border-radius: var(--radius-lg); box-shadow: 0 20px 60px rgba(15, 20, 40, .3); animation: modal-pop .15s ease-out;
}
.modal__text { font-size: 1.05rem; font-weight: 600; margin: 0 0 var(--space-5); line-height: 1.45; }
.modal__actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
@media (max-width: 480px) { .modal__actions .btn { flex: 1; } }
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.btn--sm { padding: 5px 10px; font-size: .84rem; }
.btn--lg { padding: 14px 24px; font-size: 1.05rem; }
.btn--block { display: flex; width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
.btn-row--center { justify-content: center; }

/* Karty */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow-sm);
    padding: var(--space-5); margin-bottom: var(--space-5);
}
.card__head {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.card__head h2, .card__head h3 { margin: 0; }
.card--flush { padding: 0; }
.card--flush .card__head { padding: var(--space-4) var(--space-5); margin: 0; border-bottom: 1px solid var(--border); }
.card--muted { background: var(--surface-2); box-shadow: none; }
.card--danger { border-color: #efc2c0; }
.card--danger h2 { color: var(--danger); }

/* Statistiky */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: var(--space-4); margin-bottom: var(--space-5); }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-4) var(--space-5); }
.stat__label { color: var(--text-muted); font-size: .85rem; }
.stat__value { font-size: 1.6rem; font-weight: 700; margin-top: var(--space-1); }
.stat__sub { color: var(--text-muted); font-size: .82rem; }
.stats--inline { display: flex; flex-wrap: wrap; gap: var(--space-6); margin-bottom: var(--space-4); }
.day-chart { display: flex; align-items: flex-end; gap: 3px; height: 140px; padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.day-chart__col { flex: 1; height: 100%; display: flex; align-items: flex-end; gap: 1px; min-width: 0; }
.day-chart__bar { flex: 1; min-height: 1px; background: color-mix(in srgb, var(--brand) 35%, #fff); border-radius: 2px 2px 0 0; }
.day-chart__bar--orders { background: var(--brand); }
.day-chart__legend { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-top: var(--space-2); }
.day-chart__range { margin-left: auto; }
.day-chart__dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: color-mix(in srgb, var(--brand) 35%, #fff); vertical-align: -1px; }
.day-chart__dot--orders { background: var(--brand); }
.progress { height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; margin-top: var(--space-2); }
.progress > span { display: block; height: 100%; background: var(--brand); }

/* Formuláře */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }
@media (max-width: 640px) {
    .form-grid, .form-grid--3 { grid-template-columns: minmax(0, 1fr); }
    .form-grid .span-2 { grid-column: auto; }
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 600; font-size: .9rem; }
.field .req { color: var(--danger); }
.hint { color: var(--text-muted); font-size: .83rem; }
.input, .select, .textarea {
    width: 100%; padding: 10px 12px; font: inherit; color: var(--text);
    background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 18%, transparent); }
.textarea { min-height: 96px; resize: vertical; }
.input--color { padding: 4px; height: 42px; }
.input--auto { width: auto; }
.hint--indent { margin-left: 30px; }
.logo-preview { display: block; max-height: 64px; width: auto; max-width: 100%; object-fit: contain; }
.logo-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-5); }
.logo-preview-box { display: flex; align-items: center; justify-content: center; min-height: 88px; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.logo-preview-box--dark { background: var(--brand); color: rgba(255, 255, 255, .8); } /* stejné pozadí jako záhlaví webu a e-mailů */
.logo-preview-box--light { background: #fff; color: var(--text-muted); }
.rte__toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; background: var(--surface-2); border: 1px solid var(--border-strong); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.rte__toolbar button { padding: 5px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font: inherit; font-size: .85rem; cursor: pointer; }
.rte__toolbar button:hover, .rte__toolbar button.is-active { border-color: var(--brand); color: var(--brand); }
.rte__area { min-height: 260px; max-height: 600px; overflow-y: auto; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: var(--surface); }
.rte__area:focus { outline: 3px solid color-mix(in srgb, var(--brand) 18%, transparent); border-color: var(--brand); }
.rte__area h2 { font-size: 1.25rem; margin: var(--space-4) 0 var(--space-2); }
.rte [data-rte-source] { border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-family: var(--font-mono); font-size: .85rem; }
.rich h2 { font-size: 1.2rem; margin: var(--space-5) 0 var(--space-2); }
.pdf-preview { display: block; width: 100%; height: 480px; margin-top: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); }
.poster-preview { max-height: 220px; width: auto; max-width: 100%; align-self: flex-start; object-fit: contain; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.input-group { display: flex; gap: var(--space-2); }
.input-group .input { flex: 1; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: .84rem; }
.check { display: flex; gap: var(--space-3); align-items: flex-start; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--brand); }
.fieldset { border: 0; padding: 0; margin: 0 0 var(--space-5); }
.fieldset > legend { font-weight: 650; font-size: 1.05rem; margin-bottom: var(--space-3); padding: 0; }
.form-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; margin-top: var(--space-5); }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Tabulky */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 11px var(--space-4); text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); font-weight: 600; background: var(--surface-2); white-space: nowrap; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; }
.table .nowrap { white-space: nowrap; }
.table a.row-link { font-weight: 600; text-decoration: none; }
.table--compact th, .table--compact td { padding: 7px var(--space-3); }
.empty { padding: var(--space-6); text-align: center; color: var(--text-muted); }

/* Definiční seznam (detail) */
.dl { display: grid; grid-template-columns: 170px 1fr; gap: var(--space-2) var(--space-4); margin: 0; }
.dl dt { color: var(--text-muted); }
.dl dd { margin: 0; word-break: break-word; }
@media (max-width: 560px) { .dl { grid-template-columns: 1fr; } .dl dd { margin-bottom: var(--space-2); } }

/* Štítky */
.badge {
    display: inline-block; padding: 3px 9px; border-radius: 99px;
    font-size: .76rem; font-weight: 650; white-space: nowrap;
    background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border);
}
.badge--success { background: var(--success-bg); color: var(--success); border-color: transparent; }
.badge--warning { background: var(--warning-bg); color: var(--warning); border-color: transparent; }
.badge--danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge--info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge--muted { background: #eef0f4; color: var(--text-muted); border-color: transparent; }

/* Hlášky */
.alert {
    padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm);
    margin-bottom: var(--space-4); border: 1px solid transparent;
    background: var(--info-bg); color: var(--info);
}
.alert--success { background: var(--success-bg); color: var(--success); }
.alert--warning { background: var(--warning-bg); color: var(--warning); }
.alert--danger, .alert--error { background: var(--danger-bg); color: var(--danger); }
.alert p:last-child { margin: 0; }

/* Záložky */
.tabs { display: flex; gap: var(--space-1); border-bottom: 1px solid var(--border); margin-bottom: var(--space-5); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
    padding: 10px var(--space-4); text-decoration: none; color: var(--text-muted);
    border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; font-weight: 600; font-size: .92rem;
}
.tabs a.is-active { color: var(--brand); border-color: var(--brand); }

/* Filtry */
.filters { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; margin-bottom: var(--space-4); }
.filters .input, .filters .select { width: auto; min-width: 180px; }

/* Časová osa */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 var(--space-4) var(--space-5); border-left: 2px solid var(--border); margin-left: 6px; }
.timeline li::before {
    content: ""; position: absolute; left: -7px; top: 4px;
    width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--brand);
}
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline time { display: block; font-size: .8rem; color: var(--text-muted); }

/* Přihlášení */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--space-4); }
.auth-card { width: 100%; max-width: 380px; }

/* 5. Specifické části ----------------------------------------------------- */

/* Objednávkový formulář */
.order-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: var(--space-5); align-items: start; }
@media (max-width: 900px) { .order-layout { grid-template-columns: minmax(0, 1fr); } }
body.site .card { border: 0; border-radius: var(--radius-lg); padding: var(--space-6); box-shadow: var(--shadow-soft); }
@media (max-width: 640px) { body.site .card { padding: var(--space-5) var(--space-4); } }
body.site .input, body.site .select, body.site .textarea { border-radius: var(--radius-sm); padding: 12px 14px; background: #fbfbfd; }
body.site .input:focus, body.site .textarea:focus { background: #fff; }
body.site .btn { border-radius: 99px; }
body.site .btn--primary { box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 28%, transparent); }
body.site .btn--lg { padding: 16px 24px; font-weight: 750; }

.ticket-list { display: flex; flex-direction: column; gap: var(--space-3); }
.ticket-row {
    display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: var(--space-4);
    padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
    border: 2px solid var(--border); border-radius: var(--radius);
    transition: border-color .15s, background .15s;
}
.ticket-row:hover { border-color: color-mix(in srgb, var(--brand) 35%, var(--border)); }
.ticket-row.is-selected { border-color: var(--brand); background: var(--tint); }
.ticket-row.is-sold-out { opacity: .55; }
.ticket-row__name { font-weight: 750; font-size: 1.05rem; }
.ticket-row__desc { color: var(--text-muted); font-size: .88rem; }
.ticket-row .badge { margin-top: var(--space-2); }
.ticket-row__price { font-weight: 750; font-size: 1.1rem; white-space: nowrap; }
@media (max-width: 520px) {
    .ticket-row { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-3); padding: var(--space-4); }
    .ticket-row__info { grid-column: 1 / -1; }
}
.qty { display: inline-flex; align-items: center; gap: 2px; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 99px; }
.qty button {
    width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface-2);
    color: var(--text); font-size: 1.3rem; line-height: 1; cursor: pointer; transition: background .15s, transform .1s;
}
.qty button[data-step="1"] { background: var(--brand); color: #fff; }
.qty button:hover:not(:disabled) { filter: brightness(1.08); }
.qty button:active:not(:disabled) { transform: scale(.94); }
.qty button:disabled { background: var(--surface-2); color: var(--border-strong); cursor: not-allowed; }
.qty input {
    width: 40px; height: 38px; border: 0; background: transparent; text-align: center;
    font: inherit; font-size: 1.05rem; font-weight: 750; color: var(--text); -moz-appearance: textfield;
}
.qty input::-webkit-inner-spin-button, .qty input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.promo { margin-top: var(--space-2); padding-top: var(--space-3); border-top: 1px dashed var(--border-strong); }
.promo .input { min-width: 0; }
.promo .btn { flex-shrink: 0; }
.promo-msg { font-size: .87rem; margin-top: 6px; }
.promo-msg.is-ok { color: var(--success); }
.promo-msg.is-error { color: var(--danger); }
.promo-msg.is-hint { color: var(--warning); }
.collapsible[hidden] { display: none; }

.summary { position: sticky; top: var(--space-4); }
.summary__title { display: flex; align-items: center; gap: var(--space-3); font-size: 1.3rem; font-weight: 750; margin-bottom: var(--space-4); }
.summary__icon {
    width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--tint);
    fill: none; stroke: var(--brand); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
[data-summary-lines] > p { margin: 0 0 var(--space-2); padding: var(--space-4); text-align: center; background: var(--surface-2); border-radius: var(--radius-sm); }
.summary__row { display: flex; justify-content: space-between; gap: var(--space-3); padding: 7px 0; }
.summary__row > span:last-child { font-weight: 650; white-space: nowrap; }
.summary__row--discount { color: var(--success); }
.summary__total {
    display: flex; justify-content: space-between; align-items: baseline;
    font-size: 1.45rem; font-weight: 800; padding-top: var(--space-3);
}
.summary__note { font-size: .85rem; color: var(--text-muted); margin-top: var(--space-3); }
.summary__terms { padding: var(--space-3) var(--space-4); background: var(--surface-2); border-radius: var(--radius-sm); }
@media (max-width: 900px) { .summary { position: static; } }

/* Lišta s cenou na mobilu */
.mobile-bar { display: none; }
@media (max-width: 900px) {
    .mobile-bar:not([hidden]) {
        display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
        position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
        padding: var(--space-3) var(--space-4) calc(var(--space-3) + env(safe-area-inset-bottom));
        background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -6px 24px rgba(20, 25, 50, .1);
    }
    body.site:has(.mobile-bar:not([hidden])) { padding-bottom: 80px; }
}
.mobile-bar__info { display: flex; flex-direction: column; line-height: 1.25; }
.mobile-bar__count { font-size: .82rem; color: var(--text-muted); }
.mobile-bar__total { font-size: 1.2rem; }

/* Postup objednávky (stránka objednávky) */
.progress-steps { list-style: none; margin: 0 0 var(--space-5); padding: 0; display: flex; gap: var(--space-2); }
.progress-steps li {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: var(--space-2); text-align: center;
    font-size: .85rem; color: var(--text-muted); position: relative;
}
.progress-steps li + li::before {
    content: ""; position: absolute; top: 16px; right: calc(50% + 22px); width: calc(100% - 36px); height: 2px; background: var(--border-strong);
}
.progress-steps li.is-done + li::before { background: var(--success); }
.progress-steps__dot {
    position: relative; z-index: 1; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--border-strong); font-weight: 800; color: var(--text-muted);
}
.progress-steps .is-done { color: var(--success); }
.progress-steps .is-done .progress-steps__dot { background: var(--success); border-color: var(--success); color: #fff; }
.progress-steps .is-current { color: var(--text); font-weight: 650; }
.progress-steps .is-current .progress-steps__dot { border-color: var(--brand); color: var(--brand); }

/* Platba */
.payment { display: grid; grid-template-columns: 220px 1fr; gap: var(--space-5); align-items: center; }
.payment__qr { text-align: center; }
.payment__qr img { width: 220px; height: 220px; border: 1px solid var(--border); border-radius: var(--radius-sm); image-rendering: pixelated; }
@media (max-width: 600px) { .payment { grid-template-columns: 1fr; justify-items: center; } .pay-list { width: 100%; } }
.pay-list { display: flex; flex-direction: column; }
.pay-list__row {
    display: grid; grid-template-columns: 140px minmax(0, 1fr) auto; align-items: center; gap: var(--space-3);
    padding: var(--space-2) 0; border-bottom: 1px solid var(--border);
}
.pay-list__row:last-child { border-bottom: 0; }
.pay-list__label { color: var(--text-muted); font-size: .9rem; }
.pay-list__value { font-weight: 700; word-break: break-word; }
.pay-list__value--big { font-size: 1.3rem; }
@media (max-width: 420px) { .pay-list__row { grid-template-columns: minmax(0, 1fr) auto; } .pay-list__label { grid-column: 1 / -1; margin-bottom: -6px; } }
.copy-btn {
    padding: 5px 10px; border: 1px solid var(--border-strong); border-radius: 99px; background: var(--surface);
    font: inherit; font-size: .78rem; font-weight: 650; color: var(--brand); cursor: pointer; white-space: nowrap;
}
.copy-btn:hover { background: var(--surface-2); }
.copy-btn.is-done { color: var(--success); border-color: var(--success); }
.order-lines .summary__row { border-bottom: 1px solid var(--border); padding: var(--space-2) 0; }
.order-lines__sub { display: block; color: var(--text-muted); font-size: .85rem; }

.status-hero { text-align: center; padding: var(--space-6) var(--space-5); }
.status-hero__icon {
    width: 64px; height: 64px; border-radius: 50%; margin: 0 auto var(--space-4);
    display: grid; place-items: center; font-size: 30px; font-weight: 700;
    background: var(--success-bg); color: var(--success);
}
.status-hero__icon--wait { background: var(--warning-bg); color: var(--warning); }
.status-hero__icon--x { background: var(--danger-bg); color: var(--danger); }

/* Skener a ověření vstupenky */
.scanner { max-width: 560px; margin: 0 auto; }
.scanner__video { width: 100%; border-radius: var(--radius); overflow: hidden; background: #000; min-height: 260px; }
.scanner__video video { width: 100% !important; }
.scan-result {
    border-radius: var(--radius-lg); padding: var(--space-5); margin: var(--space-4) 0;
    text-align: center; color: #fff; background: #6b7280;
}
.scan-result__title { font-size: 1.6rem; font-weight: 800; margin-bottom: var(--space-1); }
.scan-result__meta { opacity: .92; }
.scan-result--ok { background: var(--success); }
.scan-result--used { background: #d97706; }
.scan-result--invalid { background: var(--danger); }
.scan-result .btn { margin-top: var(--space-4); }
.scan-result { position: relative; }
.scan-result__close {
    position: absolute; top: 6px; right: 8px; width: 40px; height: 40px;
    border: 0; background: transparent; color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; opacity: .85;
}
/* skener na mobilu: výsledek jako panel přes spodek obrazovky – bez posouvání */
@media (max-width: 760px) {
    [data-scanner] .scan-result:not([hidden]) {
        position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60;
        margin: 0; max-height: 60vh; overflow-y: auto; box-shadow: 0 12px 40px rgba(0, 0, 0, .35);
        animation: scan-pop .18s ease-out;
    }
}
@keyframes scan-pop { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Odbavení přes PIN (/kontrola) */
.checkin-login { max-width: 400px; margin: var(--space-6) auto; text-align: center; }
.checkin-login__pin { text-align: center; font-size: 1.6rem; letter-spacing: .3em; padding: 14px; }
.checkin-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); margin-bottom: var(--space-4); }
.checkin-head h1 { margin-bottom: var(--space-1); }

/* Náhled vstupenky v nastavení */
.ticket-preview { position: relative; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); container-type: inline-size; }
.ticket-preview img { display: block; width: 100%; }
.ticket-preview__qr {
    position: absolute; aspect-ratio: 1; background: #fff;
    border: 2px dashed var(--danger); display: grid; place-items: center; font-size: .7rem; color: var(--danger); font-weight: 700;
}
.ticket-preview__code { position: absolute; white-space: nowrap; font-weight: 700; border: 1px dashed var(--danger); padding: 0 3px; line-height: 1.3; }
.ticket-preview__qr, .ticket-preview__code { cursor: move; touch-action: none; user-select: none; }
.ticket-preview__qr:hover, .ticket-preview__code:hover, .ticket-preview.is-dragging .ticket-preview__qr, .ticket-preview.is-dragging .ticket-preview__code { border-style: solid; background-color: rgba(255, 255, 255, .85); }
.ticket-preview__resize {
    position: absolute; right: -7px; bottom: -7px; width: 14px; height: 14px; border-radius: 3px;
    background: var(--danger); border: 2px solid #fff; cursor: nwse-resize; touch-action: none;
}

/* 6. Pomocné třídy -------------------------------------------------------- */
.muted { color: var(--text-muted); }
.small { font-size: .85rem; }
.strong { font-weight: 650; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-0 { margin-top: 0; } .mt-3 { margin-top: var(--space-3); } .mt-5 { margin-top: var(--space-5); }
.mb-0 { margin-bottom: 0; } .mb-3 { margin-bottom: var(--space-3); } .mb-5 { margin-bottom: var(--space-5); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-5); }
@media (max-width: 900px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }
.grid-2 > *, .order-layout > *, .form-grid > * { min-width: 0; }
.stack > * + * { margin-top: var(--space-3); }
.inline-form { display: inline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Akční cena (časově omezená sleva) */
.badge--sale { background: #fdecec; color: #c8312b; border-color: transparent; }
.ticket-row__price { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.ticket-row__old { font-size: .85rem; font-weight: 500; color: var(--text-muted); }
.ticket-row__sale { color: #c8312b; }
.sale-box { margin: 0; padding: var(--space-4); border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); }

/* Štítek běžící akce nahoře na stránce a přes plakát */
.sale-flag {
    display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: var(--space-4);
    padding: 8px 16px; border-radius: 99px; background: #d92d20; color: #fff; text-decoration: none;
    box-shadow: 0 6px 16px rgba(217, 45, 32, .3); font-size: .92rem; line-height: 1.3;
}
.sale-flag strong { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.sale-flag:hover { filter: brightness(1.07); }
.event-hero__poster { position: relative; }
.sale-ribbon {
    position: absolute; top: 14px; left: 0; max-width: 85%; padding: 7px 16px 7px 14px;
    background: #d92d20; color: #fff; font-weight: 700; font-size: .95rem; text-transform: uppercase; letter-spacing: .03em;
    border-radius: 0 99px 99px 0; box-shadow: 0 4px 12px rgba(0, 0, 0, .25);
}
@media (max-width: 640px) { .sale-flag { border-radius: 14px; flex-direction: column; gap: 0; } }
