/* Svatovi Nova — design system
   "Luxury wedding stationery × modern SaaS" palette: navy, ivory and
   champagne gold, used sparingly. Light/dark toggled via [data-theme] on
   <html>, with a prefers-color-scheme fallback for a first visit with no
   saved choice. Status colors (ok/danger/warn) stay muted and are used only
   where they carry real meaning (RSVP state) — everything else stays
   neutral: ivory, white, navy, champagne. */

:root {
    --bg: #f9f7f2;
    --bg-raised: #ffffff;
    --bg-sunken: #f2ede2;
    --ink: #142033;
    --ink-soft: #7c8491;
    --line: #e9e5dd;
    --line-strong: #ddd5c6;
    --brand: #142033;
    --brand-2: #1f3350;
    --brand-ink: #ffffff;
    --brand-soft: #ece6d8;
    --accent: #c9a86a;
    --ok-bg: #e9f0e7;
    --ok-ink: #5b7a5e;
    --danger-bg: #f5e9e7;
    --danger-ink: #a15f57;
    --warn-bg: #f8efdf;
    --warn-ink: #a17d3f;
    --info-bg: #eef1ef;
    --info-ink: #5c7266;
    --radius-lg: 18px;
    --radius-md: 14px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(20, 32, 51, 0.04), 0 1px 3px rgba(20, 32, 51, 0.05);
    --shadow-md: 0 2px 6px rgba(20, 32, 51, 0.04), 0 10px 24px rgba(20, 32, 51, 0.06);
    --shadow-lg: 0 8px 16px rgba(20, 32, 51, 0.05), 0 26px 48px rgba(20, 32, 51, 0.1);
    --font-display: "Plus Jakarta Sans", "Inter", "Segoe UI", sans-serif;
    --font-body: "Plus Jakarta Sans", "Inter", "Segoe UI", sans-serif;
    --font-heading: "Playfair Display", "Plus Jakarta Sans", Georgia, serif;
    --font-script: "Dancing Script", "Segoe Script", cursive;
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --gold: #c9a86a;
    --gold-ink: #93762f;
    --gold-soft: rgba(201, 168, 106, 0.16);
    --sidebar-bg: linear-gradient(185deg, #182338, #0b1220);
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #0f172a;
        --bg-raised: #182338;
        --bg-sunken: #0b1220;
        --ink: #edf2f7;
        --ink-soft: #94a3b8;
        --line: #263449;
        --line-strong: #33455e;
        --brand: #2c5282;
        --brand-2: #3182ce;
        --brand-ink: #ffffff;
        --brand-soft: #1c3454;
        --accent: #63b3ed;
        --ok-bg: #123625;
        --ok-ink: #6fdca4;
        --danger-bg: #3a1f1c;
        --danger-ink: #fca5a5;
        --warn-bg: #382b10;
        --warn-ink: #f0c46a;
        --info-bg: #16233a;
        --info-ink: #93c5fd;
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.22), 0 10px 26px rgba(0, 0, 0, 0.32);
        --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.28), 0 28px 60px rgba(0, 0, 0, 0.45);
        --gold-ink: #e2be82;
        --gold-soft: rgba(226, 190, 130, 0.22);
        color-scheme: dark;
    }
}

:root[data-theme="dark"] {
    --bg: #0f172a;
    --bg-raised: #182338;
    --bg-sunken: #0b1220;
    --ink: #edf2f7;
    --ink-soft: #94a3b8;
    --line: #263449;
    --line-strong: #33455e;
    --brand: #2c5282;
    --brand-2: #3182ce;
    --brand-ink: #ffffff;
    --brand-soft: #1c3454;
    --accent: #63b3ed;
    --ok-bg: #123625;
    --ok-ink: #6fdca4;
    --danger-bg: #3a1f1c;
    --danger-ink: #fca5a5;
    --warn-bg: #382b10;
    --warn-ink: #f0c46a;
    --info-bg: #16233a;
    --info-ink: #93c5fd;
    --shadow-md: 0 10px 26px rgba(0, 0, 0, 0.32);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.45);
    --gold-ink: #e2be82;
    --gold-soft: rgba(226, 190, 130, 0.22);
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    /* clip, not hidden: hidden computes overflow-y to auto too (per spec,
       when one axis isn't visible the other stops being visible as well),
       which turns html/body into their own scroll container and breaks
       position: sticky on .app-sidebar (it then sticks to that container
       instead of the visual viewport). clip blocks the same horizontal
       overflow without creating a scroll container at all. */
    overflow-x: clip;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 4px;
}

body {
    margin: 0;
    min-height: 100vh;
    /* Safety net: catches any element that overflows its container width
       (a fixed-width grid track, an unwrapped long word, etc.) so it clips
       instead of dragging the whole page — header included — into a
       sideways scroll. The .field-row/.page-shell fixes elsewhere address
       the actual causes found on menus.php/guests.php/overview.php; this
       guards against the next one. clip (not hidden) so this doesn't turn
       body into its own scroll container and break the sidebar's sticky
       positioning — see the html rule above. */
    overflow-x: clip;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.bg-glow {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
}

.bg-glow-a {
    width: 420px;
    height: 420px;
    top: -160px;
    left: -140px;
    background: radial-gradient(circle, var(--brand), transparent 70%);
}

.bg-glow-b {
    width: 420px;
    height: 420px;
    bottom: -160px;
    right: -140px;
    background: radial-gradient(circle, var(--accent), transparent 70%);
}

a {
    color: inherit;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    margin: 0 0 10px;
    letter-spacing: 0.01em;
}

h2 {
    font-size: 1.7rem;
}

p {
    margin: 0 0 10px;
}

/* ---------- Top bar ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px min(5vw, 28px);
    background: color-mix(in srgb, var(--bg-raised) 92%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    min-width: 0;
}

.brand-mark {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--brand), var(--accent));
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.14);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.brand-text strong {
    font-size: 0.86rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink);
}

.brand-text em {
    font-style: normal;
    font-size: 0.76rem;
    color: var(--ink-soft);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: none;
}

.theme-toggle {
    position: relative;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
    background: var(--bg-sunken);
    color: var(--ink);
    box-shadow: none;
    border: 1px solid var(--line);
    flex: none;
}

.theme-toggle-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s ease, transform 0.25s ease;
}

.theme-toggle-icon svg {
    width: 18px;
    height: 18px;
}

.theme-toggle-icon-dark {
    opacity: 0;
    transform: rotate(-40deg) scale(0.6);
}

:root[data-theme="dark"] .theme-toggle-icon-light {
    opacity: 0;
    transform: rotate(40deg) scale(0.6);
}

:root[data-theme="dark"] .theme-toggle-icon-dark {
    opacity: 1;
    transform: none;
}

/* ---------- Buttons ---------- */

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 11px 18px;
    font: inherit;
    font-weight: 700;
    font-size: 0.86rem;
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    color: var(--brand-ink);
    background: var(--brand);
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease, background 0.15s ease;
    box-shadow: 0 1px 2px rgba(26, 32, 44, 0.06);
}

button:hover, .btn:hover {
    background: var(--brand-2);
    transform: none;
}

button:active, .btn:active {
    transform: translateY(0);
}

button:disabled, .btn[aria-disabled="true"] {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
}

button svg, .btn svg {
    width: 17px;
    height: 17px;
    flex: none;
}

.btn-block {
    width: 100%;
}

.btn-ghost {
    background: var(--bg-raised);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    box-shadow: none;
}

/* button:hover darkens every button; a ghost button has dark text, so keep it light on hover. */
.btn-ghost:hover { background: var(--bg-sunken); color: var(--ink); }

.btn-soft {
    background: var(--brand-soft);
    color: var(--brand);
    box-shadow: none;
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger-ink);
    box-shadow: none;
}

.btn-gold {
    background: var(--gold-soft);
    color: var(--gold-ink);
    box-shadow: none;
}

.btn-gold:hover {
    background: rgba(226, 190, 130, 0.3);
}

.btn-warm {
    background: linear-gradient(135deg, var(--accent), var(--brand));
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.82rem;
}

.btn-icon {
    padding: 10px;
    border-radius: 12px;
}

.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---------- Layout shell ---------- */

.page-shell {
    /* No z-index here on purpose: position + z-index would create a new
       stacking context that traps high z-index descendants (lightbox,
       modals) below the sticky topbar, making them unclickable where they
       visually overlap it. Plain DOM order already paints this above the
       pointer-events:none background glow. */
    position: relative;
    /* calc(100% - 6vw), not a bare 94vw: 94vw is 94% of the whole viewport,
       which ignores the .app-sidebar eating 230px of that width on desktop
       (see .app-main .page-shell below) — 100% correctly resolves against
       this element's actual parent instead, whatever that parent's width is. */
    width: min(1100px, calc(100% - 6vw));
    margin: 22px auto 40px;
    display: grid;
    /* minmax(0, 1fr) — not the bare implicit "auto" track — so a wide
       descendant anywhere on the page (e.g. a data table with min-width)
       can never stretch this track past the page's own width. Any child
       with overflow-x:auto still scrolls internally instead. */
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

.page-shell-bare {
    width: min(560px, 92vw);
}

/* ---------- Event shell: sidebar + couple topbar ---------- */
/* Wraps every event-scoped page (Pregled/Gosti/Stolovi/Galerija/Postavke)
   once an event is open — desktop only; mobile keeps the plain page-shell
   plus the bottom .tab-bar for navigation instead (see below). */

.app-shell {
    display: block;
}

.app-sidebar {
    display: none;
}

@media (min-width: 900px) {
    .app-shell {
        display: flex;
        align-items: stretch;
        min-height: calc(100vh - 61px);
    }

    .app-sidebar {
        display: flex;
        flex-direction: column;
        width: 230px;
        flex: none;
        background: var(--sidebar-bg);
        color: rgba(255, 255, 255, 0.85);
        padding: 26px 18px;
        position: sticky;
        top: 0;
        align-self: flex-start;
        height: 100vh;
        overflow-y: auto;
    }

    .app-main {
        flex: 1;
        min-width: 0;
    }
}

.app-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    /* Fixed (not theme-adaptive): the sidebar itself is always a dark navy
       gradient regardless of the light/dark toggle, so its gold accents stay
       the light gold tuned for a dark background in both modes. */
    color: #e2be82;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: 0.01em;
    margin-bottom: 26px;
    padding: 0 4px;
}

.app-sidebar-brand svg {
    width: 24px;
    height: 24px;
}

.app-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.app-sidebar-link {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 12px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
    font-size: 0.86rem;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.app-sidebar-link svg {
    width: 18px;
    height: 18px;
    flex: none;
}

.app-sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.app-sidebar-link.is-active {
    background: rgba(201, 168, 106, 0.14);
    color: #fff;
}

.app-sidebar-link.is-active svg {
    color: var(--gold);
}

/* Pushed to the bottom of the sidebar's flex column regardless of how many
   nav items there are, so the wedding card always anchors low instead of
   leaving a big gap of empty navy underneath it. */
.app-sidebar-bottom {
    margin-top: auto;
    padding-top: var(--space-6);
}

/* Elegant, compact card — replaces the old oversized standalone rose. The
   same illustration returns only as a faint corner watermark. */
.app-wedding-card {
    position: relative;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(201, 168, 106, 0.22);
    border-radius: var(--radius-md);
    padding: var(--space-5) var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.app-wedding-card-watermark {
    position: absolute;
    top: -18px;
    right: -28px;
    width: 120px;
    height: auto;
    opacity: 0.1;
    pointer-events: none;
}

.app-wedding-card .label {
    position: relative;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.app-wedding-card .main {
    position: relative;
    font-family: var(--font-heading);
    font-weight: 700;
    color: #fff;
    font-size: 1rem;
    line-height: 1.25;
}

.app-wedding-card .sub {
    position: relative;
    margin-top: var(--space-2);
    display: inline-flex;
    align-items: center;
    background: rgba(201, 168, 106, 0.18);
    color: #d9bd85;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.74rem;
    font-weight: 700;
}

.app-wedding-card .divider {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    margin: var(--space-3) 0 var(--space-2);
}

.app-wedding-card .divider span {
    flex: 1;
    height: 1px;
    background: rgba(201, 168, 106, 0.3);
}

.app-wedding-card .divider svg {
    width: 11px;
    height: 11px;
    color: var(--gold);
    flex: none;
}

.app-wedding-card .mini {
    position: relative;
    font-family: var(--font-script);
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.75);
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 18px min(5vw, 30px);
    border-bottom: 1px solid var(--line);
    background: var(--bg-raised);
}

.app-topbar-couple {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-topbar-couple h1 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-script);
    font-weight: 700;
    font-size: 2rem;
    color: var(--ink);
    margin: 0;
    line-height: 1.1;
}

.app-topbar-couple h1 svg {
    width: 17px;
    height: 17px;
    color: var(--gold);
    flex: none;
}

.app-topbar-couple .date {
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.app-topbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.app-topbar-icon-btn {
    position: relative;
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-sunken);
    color: var(--ink-soft);
    border: 1px solid var(--line);
    flex: none;
}

/* Unlike the decorative bell/mail, the theme toggle is a real control — it
   stays visible at every width instead of only appearing from 560px up. */
.app-topbar-icon-btn.theme-toggle {
    display: flex;
}

.app-topbar-icon-btn.has-dot::after {
    content: "";
    position: absolute;
    top: 6px;
    right: 7px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--danger-ink);
    border: 1.5px solid var(--bg-raised);
}

.app-topbar-icon-btn svg {
    width: 16px;
    height: 16px;
}

.app-topbar-avatar-menu {
    position: relative;
}

.app-topbar-avatar {
    display: flex;
    align-items: center;
    gap: 9px;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 2px;
    cursor: pointer;
    color: inherit;
}

.app-topbar-avatar > svg {
    width: 14px;
    height: 14px;
    color: var(--ink-soft);
    transition: transform 0.15s ease;
}

.app-topbar-avatar-menu[data-open] .app-topbar-avatar > svg {
    transform: rotate(180deg);
}

.app-topbar-avatar-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 800;
    font-size: 0.86rem;
    flex: none;
}

.app-topbar-avatar-info {
    display: none;
    flex-direction: column;
    line-height: 1.25;
    text-align: left;
}

.app-topbar-avatar-info strong {
    font-size: 0.84rem;
}

.app-topbar-avatar-info span {
    font-size: 0.72rem;
    color: var(--ink-soft);
}

.app-topbar-avatar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 210px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-2);
    z-index: 40;
}

.app-topbar-avatar-menu[data-open] .app-topbar-avatar-dropdown {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.app-topbar-avatar-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: var(--radius-sm);
    color: var(--ink);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 600;
}

.app-topbar-avatar-dropdown a svg {
    width: 15px;
    height: 15px;
    color: var(--ink-soft);
    flex: none;
}

.app-topbar-avatar-dropdown a:hover {
    background: var(--bg-sunken);
}

@media (min-width: 560px) {
    .app-topbar-icon-btn {
        display: flex;
    }

    .app-topbar-avatar-info {
        display: flex;
    }
}

.app-main .page-shell {
    /* Same fix as the base .page-shell rule above: sized against .app-main's
       actual width (100%), not the full viewport, so it no longer overlaps
       the sidebar. */
    width: min(1360px, calc(100% - 6vw));
    margin-top: var(--space-6);
}

/* Bottom tab bar — mobile only */

.tab-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    background: color-mix(in srgb, var(--bg-raised) 96%, transparent);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 6px max(6px, env(safe-area-inset-left)) calc(6px + var(--safe-bottom)) max(6px, env(safe-area-inset-right));
}

.tab-bar-link {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 6px 2px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--ink-soft);
    font-size: 0.68rem;
    font-weight: 700;
}

.tab-bar-icon svg {
    width: 21px;
    height: 21px;
}

.tab-bar-link.is-active {
    color: var(--brand);
    background: var(--brand-soft);
}

@media (min-width: 760px) {
    .tab-bar {
        display: none;
    }
}

@media (max-width: 759px) {
    .page-shell {
        margin-bottom: calc(78px + var(--safe-bottom));
    }
}

/* ---------- Footer ---------- */

.footerbar {
    margin-top: var(--space-8);
    padding: 22px 3vw;
    background: var(--bg-sunken);
    border-top: 1px solid var(--line);
}

@media (max-width: 759px) {
    /* The bottom tab bar is fixed/overlaid, so without this the footer's
       own bottom edge ends up hidden underneath it once fully scrolled. */
    .footerbar {
        margin-bottom: calc(70px + var(--safe-bottom));
    }
}

.footerbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px 28px;
    flex-wrap: wrap;
}

.footerbar-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading, var(--font-body));
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
}

.footerbar-brand svg {
    width: 16px;
    height: 16px;
    flex: none;
    color: var(--gold-ink);
    fill: var(--gold-soft);
}

.footerbar-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 22px;
}

.footerbar-links a,
.footerbar-city {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--ink-soft);
    text-decoration: none;
}

.footerbar-links a svg,
.footerbar-city svg {
    width: 14px;
    height: 14px;
    flex: none;
}

.footerbar-links a:hover {
    color: var(--gold-ink);
}

@media (max-width: 560px) {
    .footerbar-inner {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

/* ---------- Hero / panel primitives ---------- */

.hero {
    position: relative;
    padding: 40px min(7vw, 46px);
    border-radius: var(--radius-lg);
    background: linear-gradient(150deg, var(--bg-raised), var(--bg-sunken));
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.hero h1 {
    font-size: clamp(2.1rem, 5.4vw, 3.4rem);
    font-weight: 600;
    line-height: 1.06;
}

.hero p {
    max-width: 620px;
    color: var(--ink-soft);
}

.hero.text-center p {
    margin-left: auto;
    margin-right: auto;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

/* ---------- Event header (navy executive band) ---------- */

.event-header {
    position: relative;
    padding: 18px min(5vw, 26px);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    color: #fff;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.event-header-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.event-header-avatar {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.event-header-avatar svg {
    width: 20px;
    height: 20px;
}

.event-header-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.event-header-title h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #fff;
}

.event-header-code {
    display: inline-flex;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: "Consolas", "Courier New", monospace;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.event-header-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 3px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.7);
}

.event-header-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.event-header-meta svg {
    width: 13px;
    height: 13px;
    color: var(--accent);
}

.event-header-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.event-header-actions .btn {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.event-header-actions .btn:hover {
    background: rgba(255, 255, 255, 0.24);
}

.event-header-actions .btn-solid {
    background: #fff;
    color: var(--brand);
    border-color: transparent;
}

.event-header-actions .btn-solid:hover {
    background: #fff;
    filter: brightness(0.97);
}

/* Lightweight per-page header used inside the event shell (Pregled/Gosti/
   Stolovi/Galerija/Postavke) — just a description + optional actions, no
   navy banner or couple name/avatar, since the app-topbar above already
   carries that identity and repeating it here read as a duplicate header. */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.page-toolbar-desc {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 0.88rem;
    font-weight: 600;
}

.page-toolbar-desc svg {
    width: 15px;
    height: 15px;
    color: var(--gold-ink);
    flex: none;
}

.page-toolbar-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.panel {
    padding: 24px min(6vw, 30px);
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.panel-head h2 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.panel-head h2 svg {
    width: 19px;
    height: 19px;
    flex: none;
    color: var(--gold-ink);
}

.page-title {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 8px;
}

.eyebrow svg {
    width: 14px;
    height: 14px;
}

.meta, .hint {
    color: var(--ink-soft);
    font-size: 0.9rem;
}

/* ---------- Forms ---------- */

.field-grid {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 6px;
    font-size: 0.86rem;
    font-weight: 700;
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="password"],
input[type="tel"],
input[type="email"],
textarea,
select {
    width: 100%;
    font: inherit;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
    padding: 12px 14px;
    background: var(--bg-raised);
    color: var(--ink);
    min-height: 46px;
}

textarea {
    min-height: 96px;
    resize: vertical;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent);
}

input[name="p"], .pin-input {
    letter-spacing: 0.3em;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.field-row {
    display: grid;
    gap: 14px;
}

/* Grid tracks don't shrink below a text input's intrinsic min-content width
   by default (~170-190px in most browsers), so a row of several inputs can
   force the grid — and with it the whole page, header included — wider than
   the viewport on narrow phones. Every .field-row child gets min-width: 0 so
   the *-column layouts below can actually collapse to fit. */
.field-row > * {
    min-width: 0;
}

@media (min-width: 620px) {
    .field-row-2 {
        grid-template-columns: 1fr 1fr;
    }
}

/* Guest quick-add (guests.php): name field + submit button, side by side
   only once there's room for both without squeezing the input unusably. */
@media (min-width: 480px) {
    .field-row-quickadd {
        grid-template-columns: 1fr auto;
        align-items: end;
    }
}

/* Menu item edit row (menus.php): course select + dish name. */
@media (min-width: 480px) {
    .field-row-course-name {
        grid-template-columns: 140px 1fr;
    }
}

/* Menu item add form (menus.php): course + name + description + submit —
   the widest row in the app, needs the most room before going multi-column. */
@media (min-width: 640px) {
    .field-row-item-add {
        grid-template-columns: 140px 1fr 1fr auto;
        align-items: end;
    }
}

/* ---------- Flash / toast ---------- */

.flash {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 14px;
    border: 1px solid transparent;
}

.flash.ok { background: var(--ok-bg); color: var(--ok-ink); }
.flash.error { background: var(--danger-bg); color: var(--danger-ink); }

.toast-root {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(420px, 92vw);
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    padding: 13px 16px;
    border-radius: var(--radius-sm);
    background: var(--ink);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: toastIn 0.25s ease both;
}

.toast.ok { background: #1f6b3f; }
.toast.error { background: #a3352a; }

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.toast.is-leaving {
    animation: toastOut 0.2s ease both;
}

@keyframes toastOut {
    to { opacity: 0; transform: translateY(-8px); }
}

/* ---------- Copy field ---------- */

.copy-field {
    display: flex;
    align-items: stretch;
    gap: 6px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-sunken);
    padding: 4px;
}

.copy-field input {
    border: 0;
    background: transparent;
    min-height: 38px;
    padding: 8px 10px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 0.82rem;
    color: var(--ink);
}

.copy-field input:focus {
    box-shadow: none;
}

.copy-field button {
    flex: none;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--brand);
}

.copy-field button svg {
    width: 15px;
    height: 15px;
}

/* ---------- Admin: events grid ---------- */

.events-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.event-card {
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: var(--bg-raised);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.event-card:not(.has-cover)::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--brand), var(--accent));
}

.event-card-cover {
    height: 150px;
    background-color: var(--bg-sunken);
    background-size: cover;
    background-position: center;
}

.event-stats-row {
    display: flex;
    gap: 14px;
    margin-top: 4px;
}

.event-stats-row span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.event-stats-row svg {
    width: 13px;
    height: 13px;
    color: var(--ink-soft);
}

/* Plain welcome heading used by the admin dashboard (the Pregled page below
   has its own richer .wedding-hero instead). */
.overview-welcome {
    margin: 4px 0 2px;
}

.overview-welcome .page-title {
    margin: 0;
}

.overview-welcome .lead {
    margin: 4px 0 0;
    color: var(--ink-soft);
}

/* ---------- Couple overview page ("Pregled") ---------- */

.wedding-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 200px;
    padding: var(--space-6);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, var(--bg-sunken), var(--bg-raised) 75%);
    border: 1px solid var(--line);
}

.wedding-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: url("../images/gold-rose.png") no-repeat center;
    background-size: 420px auto;
    opacity: 0.045;
    pointer-events: none;
}

.wedding-hero-eyebrow {
    position: relative;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    color: var(--gold-ink);
}

.wedding-hero-names {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: var(--space-1) 0 2px;
    font-family: var(--font-script);
    font-weight: 700;
    font-size: clamp(2.1rem, 4vw, 2.7rem);
    color: var(--ink);
    line-height: 1.1;
}

.wedding-hero-names svg { width: 21px; height: 21px; color: var(--gold); }

.wedding-hero-date {
    position: relative;
    margin: 0;
    color: var(--ink-soft);
    font-size: 0.92rem;
    font-weight: 600;
}

.wedding-hero-date .dot { margin: 0 6px; color: var(--gold); }

/* ---------- KPI cards (premium variant, scoped to the Pregled page) ---------- */

.stat-grid.is-premium .stat-card {
    padding: var(--space-5);
}

.stat-grid.is-premium .stat-card-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
}

.stat-grid.is-premium .stat-card-icon svg { width: 15px; height: 15px; }

.stat-grid.is-premium .stat-card strong {
    font-size: 2.05rem;
    font-family: var(--font-heading);
}

.stat-sub {
    display: block;
    font-size: 0.72rem;
    color: var(--ink-soft);
    margin-top: 2px;
}

/* ---------- Main content grid: floor plan + gallery ---------- */

.overview-main-grid {
    display: grid;
    /* minmax(0, Nfr), not a bare Nfr — a bare fr track won't shrink below
       its item's min-content width (the gallery/QR block content here is
       wider than that), which was stretching this panel past the viewport
       on narrow phones. */
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: var(--space-5);
    align-items: start;
}

@media (max-width: 900px) {
    .overview-main-grid { grid-template-columns: minmax(0, 1fr); }
}

.overview-floorplan-panel .mini-floorplan { margin-top: var(--space-2); }

.mini-floorplan {
    position: relative;
    height: 340px;
    border-radius: var(--radius-md);
    background-color: var(--bg-sunken);
    background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
    background-size: 22px 22px;
    border: 1px solid var(--line);
    /* No overflow:hidden on purpose — the table popover (a child, positioned
       above whichever table was clicked) needs to be free to render outside
       these bounds near the top/side edges instead of getting clipped. The
       inset ::before/::after below stay within bounds on their own either
       way, since inset box-shadows and inset-positioned borders never
       overflow their own element regardless of the parent's overflow. */
}

/* A faint inset line reading as the room's own walls, plus a soft vignette
   toward the edges — turns the dot grid into a defined space instead of an
   open-ended sheet of graph paper. */
.mini-floorplan::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(20, 32, 51, 0.07);
    border-radius: calc(var(--radius-md) - 5px);
    pointer-events: none;
}

.mini-floorplan::after {
    content: "";
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 36px rgba(20, 32, 51, 0.05);
    pointer-events: none;
}

@media (max-width: 900px) {
    .mini-floorplan { height: 260px; }
}

.mini-floorplan-table {
    position: absolute;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
    background: var(--bg-raised);
    border: 2px solid var(--line-strong);
    color: var(--ink-soft);
    box-shadow: 0 1px 2px rgba(20, 32, 51, 0.06), 0 4px 10px rgba(20, 32, 51, 0.1);
    cursor: pointer;
    z-index: 2;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

/* Same three shapes as the seating studio (.studio-table), just at the mini floorplan's scale, so a rectangular
   or bridal table here looks like the table the couple actually placed, not a generic round dot. */
.mini-floorplan-table[data-shape="rectangular"] { width: 38px; height: 26px; border-radius: 6px; }
.mini-floorplan-table[data-shape="bridal"] { width: 48px; height: 22px; border-radius: 8px; }

.mini-floorplan-table:hover { transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(1.12); }

.mini-floorplan-table.is-full { border-color: var(--ok-ink); background: var(--ok-bg); color: var(--ok-ink); }
.mini-floorplan-table.is-partial { border-color: var(--warn-ink); background: var(--warn-bg); color: var(--warn-ink); }
.mini-floorplan-table.is-empty { border-color: var(--line-strong); background: var(--bg-raised); color: var(--ink-soft); }

.mini-floorplan-table.is-selected {
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg)) scale(1.12);
    box-shadow: 0 0 0 4px var(--gold-soft);
}

.mini-floorplan-dancefloor {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 34%;
    height: 32%;
    min-width: 90px;
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-sm);
    background: rgba(201, 168, 106, 0.04);
}

.mini-floorplan-dancefloor span {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-soft);
    opacity: 0.7;
}

.mini-floorplan-popover {
    display: none;
    position: absolute;
    z-index: 10;
    transform: translate(-50%, calc(-100% - 16px));
    width: 200px;
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: var(--space-3);
    text-align: left;
}

.mini-floorplan-popover.is-open { display: block; }

.mini-floorplan-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: var(--space-2);
    font-size: 0.82rem;
}

.mini-floorplan-popover-head span { color: var(--ink-soft); font-size: 0.74rem; }

.mini-floorplan-popover ul {
    list-style: none;
    margin: 0 0 var(--space-3);
    padding: 0;
    display: grid;
    gap: 4px;
    max-height: 140px;
    overflow-y: auto;
}

.mini-floorplan-popover li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
}

.mini-floorplan-popover li svg { width: 12px; height: 12px; color: var(--ok-ink); flex: none; }

.mini-floorplan-popover .hint { margin: 0 0 var(--space-3); }

.mini-floorplan-marker {
    position: absolute;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--brand);
    color: var(--gold);
    box-shadow: 0 1px 2px rgba(20, 32, 51, 0.08), 0 4px 10px rgba(20, 32, 51, 0.14);
    border: 2px solid rgba(255, 255, 255, 0.14);
}

.mini-floorplan-marker svg { width: 13px; height: 13px; }

.mini-floorplan-legend {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-top: var(--space-3);
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.mini-floorplan-legend span { display: inline-flex; align-items: center; gap: 5px; }

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    border: 2px solid var(--line-strong);
}

.legend-dot.is-full { border-color: var(--ok-ink); background: var(--ok-bg); }
.legend-dot.is-partial { border-color: var(--warn-ink); background: var(--warn-bg); }
.legend-dot.is-empty { background: var(--bg-raised); }

/* ---------- Gallery & QR panel ---------- */

.overview-gallery-stats {
    display: flex;
    gap: var(--space-6);
    margin-bottom: var(--space-4);
}

.overview-gallery-stats div { display: flex; flex-direction: column; }

.overview-gallery-stats strong {
    color: var(--ink);
    font-size: 1.5rem;
    font-family: var(--font-heading);
    line-height: 1.1;
}

.overview-gallery-stats span {
    font-size: 0.74rem;
    color: var(--ink-soft);
}

.overview-gallery-main {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--bg-sunken);
    border-radius: var(--radius-md);
}

.overview-gallery-qr {
    width: 108px;
    height: 108px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: #fff;
    padding: 5px;
    flex: none;
}

.overview-gallery-main-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.overview-gallery-main-body p {
    margin: 0;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--ink);
}

.overview-gallery-url {
    font-size: 0.72rem;
    color: var(--ink-soft);
    font-family: "Consolas", "Courier New", monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.overview-gallery-main-body .btn { width: fit-content; }

.overview-gallery-thumbs {
    margin-top: var(--space-4);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2);
}

.overview-gallery-thumbs img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius-sm);
    transition: transform 0.2s ease;
}

.overview-gallery-thumbs img:hover { transform: scale(1.04); }

/* ---------- Guest list panel ---------- */

.mini-guest-list {
    list-style: none;
    margin: var(--space-3) 0 0;
    padding: 0;
    display: grid;
    gap: 2px;
}

.mini-guest-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-2);
    background: none;
    border: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: none;
    border-radius: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.mini-guest-list li:last-child .mini-guest-row { border-bottom: 0; }

.mini-guest-row:hover { background: var(--bg-sunken); }

.mini-guest-row > svg {
    width: 14px;
    height: 14px;
    color: var(--ink-soft);
    flex: none;
    transition: transform 0.15s ease;
}

.mini-guest-list li.is-open .mini-guest-row > svg { transform: rotate(180deg); }

.mini-guest-name {
    font-weight: 700;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mini-guest-table { flex: none; }

.mini-guest-detail {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-4);
    padding: 0 var(--space-2) var(--space-3);
    font-size: 0.82rem;
    color: var(--ink-soft);
}

.mini-guest-list li.is-open .mini-guest-detail { display: flex; }

.mini-guest-detail span { display: inline-flex; align-items: center; gap: 5px; }
.mini-guest-detail svg { width: 13px; height: 13px; }
.mini-guest-detail a { color: var(--gold-ink); font-weight: 700; text-decoration: none; }
.mini-guest-detail a:hover { text-decoration: underline; }

/* ---------- Quick actions ---------- */

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.quick-actions-primary,
.quick-actions-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.quick-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.86rem;
    border-radius: var(--radius-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.quick-action.is-primary {
    padding: 12px 20px;
    background: var(--brand);
    color: var(--brand-ink);
    box-shadow: var(--shadow-sm);
}

.quick-action.is-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.quick-action.is-primary svg { width: 16px; height: 16px; }

.quick-actions-secondary .quick-action {
    padding: 9px 14px;
    background: var(--bg-sunken);
    color: var(--ink-soft);
}

.quick-actions-secondary .quick-action:hover { background: var(--line); color: var(--ink); }
.quick-actions-secondary .quick-action svg { width: 14px; height: 14px; }

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--line-strong);
}

.event-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 16px 18px 0;
}

.event-card-head h3 {
    margin: 0 0 3px;
    font-family: var(--font-body);
    font-size: 1.14rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.event-date-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.event-date-row svg {
    width: 13px;
    height: 13px;
    flex: none;
    color: var(--ink-soft);
}

.countdown-pill {
    background: var(--brand-soft);
    color: var(--brand);
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 0.72rem;
    font-weight: 800;
}

.countdown-pill.is-soon {
    background: var(--ok-bg);
    color: var(--ok-ink);
}

.event-toolbar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    padding: 16px 18px;
}

.event-toolbar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 2px;
    border-radius: 12px;
    background: var(--bg-sunken);
    color: var(--ink-soft);
    box-shadow: none;
    font-size: 0.62rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1.1;
}

.event-toolbar-btn:hover {
    background: var(--brand-soft);
    color: var(--brand);
    transform: none;
}

.event-toolbar-btn svg {
    width: 17px;
    height: 17px;
}

.event-toolbar-btn.is-primary {
    background: var(--brand);
    color: var(--brand-ink);
}

.event-toolbar-btn.is-primary:hover {
    filter: brightness(1.08);
}

.event-details-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 13px 18px;
    margin: 0;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--ink-soft);
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: none;
}

.event-details-toggle svg {
    width: 15px;
    height: 15px;
    transition: transform 0.2s ease;
    flex: none;
}

.event-details-toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.event-details {
    display: none;
    padding: 2px 18px 18px;
    background: var(--bg-sunken);
    border-top: 1px solid var(--line);
}

.event-details.is-open {
    display: block;
}

.event-details-qr {
    display: flex;
    justify-content: center;
    padding: 14px 0 16px;
}

.event-details-qr img {
    width: 160px;
    height: 160px;
    border-radius: 14px;
    border: 1px solid var(--line);
    padding: 6px;
    background: #fff;
}

.code-list {
    display: grid;
    gap: 8px;
}

.code-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.82rem;
    color: var(--ink-soft);
}

.code-row strong {
    color: var(--ink);
    font-family: "Consolas", "Courier New", monospace;
}

.event-card-archive {
    flex: none;
}

/* ---------- Upload / dropzone ---------- */

.dropzone {
    border: 2px dashed var(--line-strong);
    border-radius: var(--radius-md);
    padding: 28px 18px;
    text-align: center;
    background: var(--bg-sunken);
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.dropzone.is-dragover {
    border-color: var(--brand);
    background: var(--brand-soft);
}

.dropzone input[type="file"] {
    display: none;
}

.dropzone-icon {
    display: inline-flex;
    width: 40px;
    height: 40px;
    margin: 0 auto 8px;
    color: var(--brand);
}

.dropzone-icon svg {
    width: 100%;
    height: 100%;
}

.dropzone strong {
    display: block;
    margin-bottom: 4px;
}

.upload-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(74px, 1fr));
    gap: 8px;
    margin-top: 14px;
}

.upload-preview-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--bg-sunken);
}

.upload-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.upload-progress {
    margin-top: 14px;
    height: 8px;
    border-radius: 999px;
    background: var(--bg-sunken);
    overflow: hidden;
    display: none;
}

.upload-progress.is-active {
    display: block;
}

.upload-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--brand), var(--accent));
    transition: width 0.2s ease;
}

/* ---------- Gallery ---------- */

.gallery-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.gallery-filter-bar strong { color: var(--danger-ink); }
.gallery-filter-bar svg { width: 14px; height: 14px; vertical-align: -2px; color: var(--danger-ink); }

.gallery-filter-select {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
}

.gallery-filter-select > svg { width: 16px; height: 16px; color: var(--ink-soft); }

.gallery-filter-select select {
    width: auto;
    min-width: 200px;
}

/* A tight, edge-to-edge mosaic (Google Photos style) rather than spaced
   info cards: the grid is just photos, with small overlay chips for the
   handful of things worth seeing at a glance (table, likes, admin actions).
   Guest name and caption live in the lightbox instead of cluttering every
   thumbnail with a footer. */
.gallery-grid {
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.photo-card {
    position: relative;
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    background: #0f172a;
}

.photo-card[data-filter-hidden="1"] { display: none; }

.photo-open {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    cursor: zoom-in;
    overflow: hidden;
}

.photo-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.photo-open:hover img {
    transform: scale(1.06);
}

.photo-table-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.68);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    backdrop-filter: blur(2px);
    pointer-events: none;
}

.photo-like-btn {
    position: absolute;
    bottom: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    box-shadow: none;
    backdrop-filter: blur(2px);
    transition: transform 0.12s ease, background 0.12s ease;
}

.photo-like-btn:hover { transform: scale(1.08); background: rgba(229, 62, 62, 0.85); }
.photo-like-btn:active { transform: scale(0.94); }
.photo-like-btn svg { width: 12px; height: 12px; fill: #fff; stroke: #fff; }

/* Already liked from this device: a filled red heart, and it no longer reacts. */
.photo-like-btn.is-liked,
.photo-like-btn.is-liked:hover { background: rgba(229, 62, 62, 0.92); transform: none; cursor: default; }
.lightbox-like-btn.is-liked,
.lightbox-like-btn.is-liked:hover { background: #c53030; cursor: default; opacity: 0.85; }

.photo-card-admin-actions {
    position: absolute;
    top: 6px;
    right: 6px;
    display: flex;
    gap: 4px;
}

.photo-card-admin-actions button {
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.6);
    color: #fff;
    box-shadow: none;
    backdrop-filter: blur(2px);
}

.photo-card-admin-actions button:hover { background: rgba(15, 23, 42, 0.85); }
.photo-card-admin-actions svg { width: 12px; height: 12px; }

.photo-feature-btn.is-active {
    background: #d69e2e;
    color: #fff;
}

.photo-feature-btn.is-active svg { fill: #fff; }

.empty-state {
    text-align: center;
    padding: 40px 16px;
    color: var(--ink-soft);
}

.empty-state > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand);
    margin-bottom: 14px;
}

.empty-state svg {
    width: 26px;
    height: 26px;
}

.empty-state p {
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Lightbox ---------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(10, 9, 7, 0.92);
}

.lightbox.is-open {
    display: flex;
}

.lightbox-frame {
    max-width: min(96vw, 1200px);
    max-height: 94vh;
    background: var(--brand);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.lightbox img {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    width: auto;
    height: auto;
    margin: 0 auto;
    background: #000;
    touch-action: pan-y;
    user-select: none;
}

.lightbox-info {
    padding: 12px 20px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lightbox-info-main {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.lightbox-guest {
    font-weight: 800;
    font-size: 0.95rem;
}

.lightbox-table-badge {
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.68rem;
    font-weight: 700;
}

.lightbox-table-badge:empty { display: none; }

.lightbox-caption {
    margin: 0;
    font-size: 0.84rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.82);
}

.lightbox-caption:empty { display: none; }

.lightbox-info-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.lightbox-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 16px;
    border-radius: 999px;
    background: #e53e3e;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 800;
}

.lightbox-like-btn:hover { background: #c53030; }
.lightbox-like-btn svg { width: 15px; height: 15px; fill: #fff; }

.lightbox-info-actions a {
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    box-shadow: none;
}

.lightbox-counter {
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.14);
    padding: 6px 14px;
    border-radius: 999px;
}

.lightbox-close, .lightbox-nav {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    box-shadow: none;
}

.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }

/* ---------- Slideshow ---------- */

.slideshow-page {
    position: relative;
    min-height: 100vh;
    background: #030712;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.slideshow-frame {
    position: relative;
    flex: 1;
    overflow: hidden;
}

.slide-item {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 1.2s ease, transform 6s ease;
}

.slide-item.is-active {
    opacity: 1;
    transform: scale(1);
}

.slide-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* A compact floating card, top-left — deliberately NOT bottom-anchored so
   it never collides with the QR float or playback controls, which both
   live in the bottom region regardless of caption length or photo count. */
.slide-photo-info {
    position: absolute;
    top: 96px;
    left: min(6vw, 40px);
    z-index: 20;
    max-width: min(78vw, 360px);
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(3px);
    color: #fff;
    pointer-events: none;
}

.slide-photo-guest-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.slide-photo-guest {
    font-size: 0.98rem;
    font-weight: 800;
}

.slide-photo-table {
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 0.64rem;
    font-weight: 700;
}

.slide-photo-caption {
    margin: 0;
    font-size: 0.8rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
}

.slide-photo-likes {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(229, 62, 62, 0.2);
    border: 1px solid rgba(229, 62, 62, 0.4);
    color: #feb2b2;
    font-weight: 800;
    font-size: 0.72rem;
}

.slide-photo-likes svg { width: 13px; height: 13px; fill: #feb2b2; }

@media (max-width: 640px) {
    .slide-photo-info { top: auto; bottom: 176px; }
}

.slideshow-top-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 20px 22px;
    background: linear-gradient(to bottom, rgba(3, 7, 18, 0.92), transparent);
}

.slideshow-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.slideshow-brand h1 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
}

.slideshow-brand p {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent);
}

/* A white card with a proper quiet zone: readable from the back of the hall and easy for a phone to lock onto.
   The code is an SVG so it stays razor sharp at any screen size. */
.slideshow-qr-float {
    position: absolute;
    bottom: 90px;
    right: 22px;
    z-index: 30;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: clamp(150px, 15vw, 250px);
    padding: clamp(10px, 1vw, 16px);
    border-radius: 22px;
    background: #fff;
    border: 3px solid #c9a86a;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
    text-align: center;
}

.slideshow-qr-code {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    padding: 8%;
    border-radius: 14px;
    background: #fff;
    box-sizing: border-box;
}

.slideshow-qr-code img {
    display: block;
    width: 100%;
    height: 100%;
}

.slideshow-qr-float p {
    display: grid;
    gap: 2px;
    margin: 4px 0 2px;
    color: #142033;
    line-height: 1.25;
}

.slideshow-qr-float p strong {
    font-family: var(--font-heading);
    font-size: clamp(0.85rem, 1.05vw, 1.2rem);
}

.slideshow-qr-float p span {
    font-size: clamp(0.68rem, 0.8vw, 0.95rem);
    font-weight: 700;
    color: #7a5f24;
}

@media (max-width: 700px) {
    .slideshow-qr-float { width: 110px; right: 10px; bottom: 84px; padding: 8px; border-width: 2px; border-radius: 16px; }
    .slideshow-qr-float p strong { display: none; }
    .slideshow-qr-float p span { font-size: 0.62rem; }
}

.slideshow-controls-float {
    position: absolute;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: rgba(26, 54, 93, 0.92);
    border: 1px solid var(--brand-2);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.slideshow-nav-btn {
    padding: 9px;
    border-radius: var(--radius-sm);
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    box-shadow: none;
}

.slideshow-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.slideshow-nav-btn svg { width: 16px; height: 16px; }

.slideshow-play-btn {
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    background: var(--accent);
    font-size: 0.76rem;
}

.slideshow-play-btn svg { width: 14px; height: 14px; }

.slideshow-counter {
    padding: 0 8px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    font-family: "Consolas", "Courier New", monospace;
}

/* ---------- Stat cards ---------- */

.stat-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    margin: 16px 0;
}

.stat-card {
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--line);
    background: var(--bg-sunken);
    box-shadow: var(--shadow-sm);
}

.stat-card.is-icon-style {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--gold-soft);
    color: var(--gold-ink);
    flex: none;
}

.stat-card-icon svg { width: 20px; height: 20px; }

.stat-card-body { display: flex; flex-direction: column; }

.stat-card strong {
    display: block;
    font-size: 1.9rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.stat-card span {
    color: var(--ink-soft);
    font-size: 0.82rem;
}

.stat-card.is-confirmed { background: var(--ok-bg); }
.stat-card.is-declined { background: var(--danger-bg); }
.stat-card.is-maybe { background: var(--warn-bg); }
.stat-card.is-guests { background: var(--info-bg); }

.stat-card.is-confirmed .stat-card-icon { background: rgba(29, 131, 72, 0.15); color: var(--ok-ink); }
.stat-card.is-declined .stat-card-icon { background: rgba(197, 48, 48, 0.12); color: var(--danger-ink); }
.stat-card.is-maybe .stat-card-icon { background: rgba(183, 121, 31, 0.14); color: var(--warn-ink); }
.stat-card.is-guests .stat-card-icon { background: rgba(43, 108, 176, 0.12); color: var(--info-ink); }
.stat-card.is-archive .stat-card-icon { background: var(--bg-raised); color: var(--ink-soft); }

/* ---------- Badges ---------- */

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 800;
}

.badge-ok { background: var(--ok-bg); color: var(--ok-ink); }
.badge-danger { background: var(--danger-bg); color: var(--danger-ink); }
.badge-warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge-soft { background: var(--bg-sunken); color: var(--ink-soft); }

/* ---------- Lists ---------- */

.list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-sunken);
    border: 1px solid transparent;
}

.list-row-main {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.list-row form {
    flex: none;
}

.icon-btn {
    padding: 8px;
    border-radius: 10px;
    background: var(--danger-bg);
    color: var(--danger-ink);
    box-shadow: none;
}

.icon-btn svg {
    width: 15px;
    height: 15px;
}

.search-box {
    position: relative;
    margin-bottom: 12px;
}

.search-box svg {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    color: var(--ink-soft);
}

.search-box input {
    padding-left: 38px;
}

/* ---------- Cards: tables ---------- */

.tables-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    margin-top: 14px;
}

.table-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px;
    background: var(--bg-raised);
}

.table-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.table-card-head h3 {
    margin: 0;
    font-size: 1.1rem;
}

.access-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand);
    font-weight: 700;
    font-size: 0.86rem;
}

/* ---------- Admin auth split screen ---------- */

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
}

@media (min-width: 860px) {
    .auth-shell {
        grid-template-columns: 1.05fr 1fr;
        min-height: 540px;
    }
}

.auth-visual {
    position: relative;
    background: linear-gradient(155deg, var(--brand), #0c1930);
    color: #fff;
    padding: 40px min(6vw, 46px);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.auth-visual::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -140px;
    bottom: -140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(49, 130, 206, 0.35), transparent 70%);
}

.auth-visual-inner {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.auth-visual .eyebrow {
    color: #93c5fd;
}

.auth-visual h1 {
    font-size: clamp(1.7rem, 3.2vw, 2.3rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 8px 0 12px;
    color: #fff;
    line-height: 1.15;
}

.auth-visual p.lead {
    color: rgba(255, 255, 255, 0.82);
    margin: 0 0 24px;
    font-size: 0.96rem;
    line-height: 1.6;
}

.auth-points {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 13px;
}

.auth-points li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-points svg {
    width: 19px;
    height: 19px;
    flex: none;
    margin-top: 1px;
    color: #7fd9a0;
    background: rgba(127, 217, 160, 0.16);
    border-radius: 50%;
    padding: 3px;
    box-sizing: content-box;
}

.auth-form-wrap {
    background: var(--bg-raised);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 44px min(6vw, 40px);
}

.auth-form-card {
    width: 100%;
    max-width: 320px;
    text-align: center;
}

/* ---------- Access gate ---------- */

.gate-card {
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.gate-icon {
    display: inline-flex;
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    color: var(--brand);
}

.gate-icon svg {
    width: 100%;
    height: 100%;
}

/* ---------- Guest data table ---------- */

.data-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.pagination[hidden] {
    display: none;
}

.pagination-info {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ink-soft);
    white-space: nowrap;
}

.pagination [data-page-prev],
.pagination [data-page-next] {
    flex: none;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
    min-width: 560px;
}

.data-table thead th {
    text-align: left;
    padding: 10px 14px;
    background: var(--bg-sunken);
    color: var(--ink-soft);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.data-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: var(--bg-sunken);
}

/* On a tablet or a narrow window the table scrolls sideways; the actions column stays pinned so edit/delete are never hidden off-screen. */
@media (min-width: 721px) {
    .data-table th:last-child,
    .data-table td:last-child {
        position: sticky;
        right: 0;
        background: var(--bg-raised);
        box-shadow: -1px 0 0 var(--line);
    }
    .data-table thead th:last-child { background: var(--bg-sunken); }
    .data-table tbody tr:hover td:last-child { background: var(--bg-sunken); }
}

.data-table .guest-name {
    font-weight: 700;
    color: var(--ink);
}

.status-select {
    min-height: 34px;
    min-width: 128px;
    /* Extra right padding clears the native dropdown-arrow icon so the
       widest option text ("Nepoznato") doesn't get visually clipped by it. */
    padding: 6px 26px 6px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-strong);
}

.status-select.st-confirmed { background: var(--ok-bg); color: var(--ok-ink); border-color: transparent; }
.status-select.st-declined { background: var(--danger-bg); color: var(--danger-ink); border-color: transparent; }
.status-select.st-maybe { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.status-select.st-unknown { background: var(--bg-sunken); color: var(--ink-soft); }

/* ---------- Seating: interactive floor plan ---------- */

.seating-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.seating-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.floor-plan-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 16px;
}

@media (min-width: 980px) {
    .floor-plan-grid {
        grid-template-columns: minmax(0, 1fr) 320px;
        align-items: start;
    }
}

.floor-plan-card {
    /* min-width: 0 stops the fixed-size (1900px) canvas inside from ever
       expanding this grid track / any ancestor — without it, a single
       oversized descendant can blow out the whole page's layout width. */
    min-width: 0;
    background: linear-gradient(160deg, var(--brand), #0f1f38);
    border-radius: var(--radius-lg);
    padding: 16px;
    border: 1px solid var(--brand-2);
    box-shadow: var(--shadow-lg);
}

.floor-plan-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.floor-plan-card-head span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.floor-plan-card-head svg {
    width: 16px;
    height: 16px;
    flex: none;
}

.floor-plan-scroll {
    overflow: auto;
    max-height: min(72vh, 680px);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.floor-plan-canvas {
    position: relative;
    width: 1900px;
    height: 1200px;
    background-color: #0a1526;
    background-image:
        radial-gradient(circle at center, rgba(49, 130, 206, 0.1) 0%, transparent 70%),
        linear-gradient(to right, rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 100% 100%, 28px 28px, 28px 28px;
    /* NOT touch-action: none here — this fills the whole scrollable area,
       so blocking touch-action here would block finger-panning to reach
       tables that are off-screen. Only the draggable pieces themselves
       (.table-node, .floor-zone-draggable) opt out of default touch
       scrolling; empty canvas space stays pannable. */
    touch-action: pan-x pan-y;
    user-select: none;
}

.floor-zone {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    background: #16253f;
    border: 1px solid rgba(226, 190, 130, 0.4);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    color: #f5d9a8;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 7px;
    white-space: nowrap;
}

.floor-zone svg { width: 14px; height: 14px; }

.floor-zone-rotatable { display: inline-block; }

/* Positioned at the pill's own left/right edges, inside the same wrapper
   that carries the rotation transform (see .floor-zone-rotatable inline
   style) — so box and buttons rotate together as one rigid unit and the
   buttons stay flanking the pill's ends at any angle. */
.marker-rotate-btn {
    position: absolute;
    top: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 1px solid rgba(226, 190, 130, 0.4);
    border-radius: 50%;
    background: #16253f;
    color: inherit;
    cursor: pointer;
    z-index: 1;
}

.marker-rotate-btn.is-left { left: -24px; transform: translateY(-50%); }
.marker-rotate-btn.is-right { right: -24px; transform: translateY(-50%); }

.marker-rotate-btn:hover { background: rgba(226, 190, 130, 0.3); }
.marker-rotate-btn svg { width: 10px; height: 10px; }

.floor-zone-draggable {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: grab;
    touch-action: none;
    z-index: 4;
    transition: box-shadow 0.15s ease;
}

.floor-zone-draggable:hover { box-shadow: 0 0 0 3px rgba(226, 190, 130, 0.25); border-radius: var(--radius-sm); }

.floor-zone-draggable.is-dragging {
    cursor: grabbing;
    z-index: 25;
}

.floor-zone-dance {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 260px;
    height: 170px;
    border-radius: 20px;
    border: 2px dashed rgba(96, 165, 250, 0.3);
    background:
        repeating-linear-gradient(45deg, rgba(96, 165, 250, 0.06) 0 16px, transparent 16px 32px),
        rgba(96, 165, 250, 0.04);
    flex-direction: column;
    justify-content: center;
    color: rgba(191, 219, 254, 0.55);
    pointer-events: none;
    z-index: 0;
}

.table-node {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: grab;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

.table-node.is-dragging {
    cursor: grabbing;
    z-index: 20;
}

.table-node.is-selected {
    z-index: 15;
}

.table-node-shape {
    position: relative;
    text-align: center;
    padding: 6px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.table-node:hover .table-node-shape {
    border-color: rgba(226, 190, 130, 0.55);
}

.table-node[data-shape="round"] .table-node-shape { width: 74px; height: 74px; border-radius: 50%; }
.table-node[data-shape="rectangular"] .table-node-shape { width: 92px; height: 58px; border-radius: 10px; }
.table-node[data-shape="bridal"] .table-node-shape { width: 132px; height: 58px; border-radius: 12px; background: var(--brand); }

.table-node.is-selected .table-node-shape {
    background: var(--brand-2);
    box-shadow: 0 0 0 3px var(--accent), 0 6px 16px rgba(0, 0, 0, 0.35);
}

.table-node-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

.table-node-name {
    font-size: 0.66rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.table-node-occ {
    margin-top: 4px;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 999px;
    background: #334155;
    color: #cbd5e0;
}

.table-node-occ.is-full {
    background: var(--ok-ink);
    color: #fff;
}

.floor-plan-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.55);
}

.floor-plan-hint svg { width: 12px; height: 12px; }

.table-inspector {
    display: none;
}

.table-inspector.is-active {
    display: block;
}

.table-inspector-card {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-md);
}

.table-inspector-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.table-inspector-head h3 {
    margin: 0;
    font-size: 1.02rem;
    font-family: var(--font-body);
}

.seated-guest-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-sunken);
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.unassigned-mini {
    margin-top: 14px;
}

.unassigned-mini-card {
    background: var(--bg-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-md);
}

/* ---------- Modal ---------- */

.modal-overlay {
    position: fixed !important;
    inset: 0;
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

body.modal-is-open {
    overflow: hidden;
}

.modal-overlay[hidden] {
    display: none;
}

.modal-card {
    width: min(440px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-raised);
    border-radius: var(--radius-lg);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 22px;
}

.modal-card-lg {
    width: min(620px, 100%);
}

.modal-card h3 {
    margin: 0 0 4px;
    font-family: var(--font-body);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-card h3 svg {
    width: 20px;
    height: 20px;
    flex: none;
    color: var(--brand);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

/* ---------- Utility ---------- */

.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }

.animate-in {
    animation: fadeUp 0.5s ease both;
}

/* ---------- Settings page ---------- */

.settings-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 900px) {
    .settings-grid {
        grid-template-columns: minmax(0, 1fr) 300px;
        align-items: start;
    }
}

.settings-form {
    display: grid;
    gap: 20px;
}

.settings-section {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
    display: grid;
    gap: 12px;
}

.settings-section:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.settings-section h3 {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--brand);
}

.capacity-card {
    background: linear-gradient(160deg, var(--brand), #0f1f38);
    border-radius: var(--radius-lg);
    border: 1px solid var(--brand-2);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    color: #fff;
}

.capacity-card h3 {
    margin: 0 0 14px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(191, 219, 254, 0.85);
}

.capacity-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.capacity-row:last-of-type { border-bottom: 0; }
.capacity-row strong { color: #fff; font-size: 0.92rem; }
.capacity-row strong.is-free { color: #7ed6a5; }

.capacity-progress { margin-top: 14px; }

.capacity-progress-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 6px;
}

.capacity-progress-track {
    height: 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.14);
    overflow: hidden;
}

.capacity-progress-bar {
    height: 100%;
    background: var(--accent);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* ---------- Guest list: richer details ---------- */

.guest-name > div:first-child {
    font-weight: 700;
}

.guest-plus-one-row .guest-name svg {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: -3px;
    color: var(--ink-soft);
}

.guest-subtags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

.guest-subtag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-sunken);
    color: var(--ink-soft);
    font-size: 0.68rem;
    font-weight: 700;
    white-space: nowrap;
}

.guest-subtag svg { width: 11px; height: 11px; }
.guest-subtag-kids { background: var(--warn-bg); color: var(--warn-ink); }

.guest-dietary {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 4px;
}

.guest-dietary-tag {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    background: var(--ok-bg);
    color: var(--ok-ink);
    font-size: 0.64rem;
    font-weight: 700;
    white-space: nowrap;
}

.guest-contact-link {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.76rem;
    color: var(--ink-soft);
    white-space: nowrap;
}

.guest-contact-link:hover { color: var(--brand); }
.guest-contact-link svg { width: 12px; height: 12px; flex: none; }

/* Service inquiries panel (dashboard): icon + text on one line, icon kept small. */
.req-line { display: flex; align-items: center; gap: 7px; line-height: 1.4; }
.req-line + .req-line { margin-top: 3px; }
.req-line svg { width: 14px; height: 14px; flex: none; }
#upiti .btn-sm { white-space: nowrap; }


.guest-form-plusone {
    padding: 12px;
    border-radius: var(--radius-md);
    background: var(--bg-sunken);
    border: 1px solid var(--line);
}

.guest-dietary-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.guest-dietary-option {
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--bg-sunken);
    border: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 0.76rem;
    font-weight: 700;
    box-shadow: none;
}

.guest-dietary-option.is-active {
    background: var(--ok-ink);
    color: #fff;
    border-color: var(--ok-ink);
}

.batch-example {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: var(--bg-sunken);
    border: 1px solid var(--line);
    font-size: 0.76rem;
    color: var(--ink-soft);
}

.batch-example pre {
    margin: 6px 0 0;
    font-size: 0.72rem;
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    white-space: pre-wrap;
    color: var(--ink);
}

/* ---------- Menus (jelovnici) ---------- */

.menu-items-list {
    margin-top: 14px;
    display: grid;
    gap: 14px;
}

.menu-course-group {
    display: grid;
    gap: 6px;
}

.menu-course-label {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
}

.menu-item-row {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg-raised);
    border: 1px solid var(--line);
}

.menu-item-row strong {
    font-size: 0.88rem;
}

.menu-item-view {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.menu-item-row-actions {
    display: flex;
    gap: 4px;
    flex: none;
}

.menu-item-edit-form {
    display: none;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
}

.menu-item-row.is-editing .menu-item-view {
    display: none;
}

.menu-item-row.is-editing .menu-item-edit-form {
    display: grid;
}

.menu-item-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.menu-preview {
    padding-top: 4px;
}

.menu-preview h3 {
    margin: 0;
    font-family: var(--font-body);
}

.menu-preview-courses {
    margin-top: 14px;
    display: grid;
    gap: 14px;
}

/* ---------- Slideshow: fullscreen (projector) mode ---------- */
/* On the projector, guests should just see the photo, the like count and
   the QR code to contribute their own — no admin chrome (brand bar, exit/
   back buttons, playback controls) or per-photo name/table/caption text. */

.slideshow-page:fullscreen .slideshow-top-gradient,
.slideshow-page:fullscreen .slideshow-controls-float,
.slideshow-page:fullscreen .slide-photo-details {
    display: none;
}

/* ---------- Upload form: optional details disclosure ---------- */
/* Photo picking is the one thing every guest actually needs to do; name/
   table/caption are a nice-to-have, so they start collapsed instead of
   fronting the form with three fields before the dropzone. */

.upload-details-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 11px 14px;
    background: var(--bg-sunken);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    color: var(--ink-soft);
    font-size: 0.84rem;
    font-weight: 700;
    box-shadow: none;
}

.upload-details-toggle span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.upload-details-toggle svg {
    width: 15px;
    height: 15px;
    flex: none;
}

.upload-details-toggle svg:last-child {
    transition: transform 0.2s ease;
}

.upload-details-toggle[aria-expanded="true"] svg:last-child {
    transform: rotate(180deg);
}

.upload-details {
    display: none;
    padding: 14px;
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    margin-top: -12px;
    background: var(--bg-sunken);
    flex-direction: column;
    gap: 14px;
}

.upload-details.is-open {
    display: flex;
}

/* ---------- Guest table: card layout on narrow screens ---------- */

@media (max-width: 720px) {
    .data-table-wrap {
        overflow-x: visible;
        border: 0;
        background: none;
    }

    .data-table {
        min-width: 0;
    }

    .data-table thead {
        display: none;
    }

    .data-table, .data-table tbody, .data-table tr, .data-table td {
        display: block;
        width: 100%;
    }

    .data-table tr {
        margin-bottom: 12px;
        padding: 12px 14px;
        border: 1px solid var(--line);
        border-radius: var(--radius-md);
        background: var(--bg-raised);
        box-shadow: var(--shadow-sm);
    }

    .data-table td {
        padding: 7px 0;
        border-bottom: 1px dashed var(--line);
    }

    .data-table td:last-child {
        border-bottom: 0;
        padding-top: 10px;
    }

    .data-table td[data-label]::before {
        content: attr(data-label);
        display: block;
        font-size: 0.62rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--ink-soft);
        margin-bottom: 4px;
    }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Seating studio (seating_studio.php) ---------- */
/* Same navy / ivory / champagne tokens as the rest of the app, so it follows
   the light/dark toggle. Rotation and size are CSS variables (--rot, --scale)
   set inline by PHP and updated live by assets/js/seating-studio.js. */

.studio-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.studio-page-head h1 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    font-weight: 600;
}

.studio-page-head p {
    margin: 4px 0 0;
    color: var(--ink-soft);
    font-size: 0.86rem;
}

.studio-page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.studio-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

.studio-board-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
    box-shadow: var(--shadow-md);
}

.studio-board-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    font-size: 0.86rem;
    font-weight: 800;
}

.studio-board-head > span svg,
.studio-hint svg { width: 15px; height: 15px; vertical-align: -3px; color: var(--gold-ink); }

.studio-floor-shape {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--ink-soft);
}

.studio-floor-shape select {
    width: auto;
    min-height: 34px;
    padding: 4px 10px;
    font-size: 0.78rem;
}

.studio-hint {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 6px 0 12px;
    color: var(--ink-soft);
    font-size: 0.78rem;
}

.studio-board-scroll {
    overflow: auto;
    max-height: min(70vh, 720px);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.studio-board-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; }
.studio-board-tools [hidden] { display: none !important; }
.studio-grid-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.studio-grid-tools select { width: auto; min-height: 34px; padding: 4px 10px; font-size: 0.78rem; }
.studio-grid-tools [aria-pressed="true"] { background: var(--gold-soft); border-color: var(--gold); color: var(--gold-ink); }
.studio-grid-tools [aria-pressed="true"]:hover { background: var(--gold-soft); color: var(--gold-ink); }

/* Grid: drawn as extra background layers of the plan itself, so it sits under the
   tables and follows the plan's size and zoom. Lines fall on multiples of --grid,
   which is exactly where a snapped table centre goes. */
.studio-board.has-grid {
    background-image:
        linear-gradient(to right, rgba(20, 32, 51, 0.13) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(20, 32, 51, 0.13) 1px, transparent 1px),
        radial-gradient(var(--line-strong) 1px, transparent 1px);
    background-size: var(--grid, 40px) var(--grid, 40px), var(--grid, 40px) var(--grid, 40px), 22px 22px;
}
.studio-scroll-hint { display: none; }

/* Full-screen plan: the card covers the window; only the plan itself scrolls. */
html.studio-fs { overflow: hidden; }
.studio-board-card.is-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: flex;
    flex-direction: column;
    padding: 12px 16px;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}
.studio-board-card.is-fullscreen .studio-board-scroll { flex: 1 1 auto; min-height: 0; max-height: none; }
.studio-board-card.is-fullscreen .studio-hint { display: none; }
.studio-board-card.is-fullscreen .studio-board-head { margin-bottom: 8px; }
@media (max-width: 600px) {
    .studio-board-card.is-fullscreen { padding: 8px 10px; }
    .studio-board-card.is-fullscreen .studio-board-head > span { flex-basis: 100%; font-size: 0.78rem; }
    .studio-board-card.is-fullscreen .studio-board-tools { gap: 6px 10px; }
    .studio-board-card.is-fullscreen .studio-floor-shape { gap: 4px; font-size: 0.68rem; }
    .studio-board-card.is-fullscreen .studio-floor-shape select { min-height: 30px; font-size: 0.72rem; }
}

.studio-board {
    position: relative;
    width: 100%;
    min-height: 560px;
    transform-origin: top left;
    background-color: var(--bg-sunken);
    background-image: radial-gradient(var(--line-strong) 1px, transparent 1px);
    background-size: 22px 22px;
}

/* The room's walls: a faint inset line, like the mini floor plan on Pregled. */
.studio-board::before {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid var(--line-strong);
    border-radius: calc(var(--radius-md) - 4px);
    pointer-events: none;
}

.studio-board-empty {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    margin: 0;
    padding: 0 24px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.9rem;
    pointer-events: none;
}

.studio-dance {
    position: absolute;
    left: 50%;
    top: 53%;
    width: 34%;
    height: 25%;
    transform: translate(-50%, -50%);
    display: grid;
    place-items: center;
    border: 2px dashed var(--gold);
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold-ink);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    pointer-events: none;
}

.studio-dance[data-shape="rectangle"] { border-radius: 14px; }
.studio-dance[data-shape="circle"] { width: 25%; height: 34%; border-radius: 50%; }

/* Stage / entrance / bar: a rigid pill (label + rotate buttons) that turns as one. */
.studio-zone {
    position: absolute;
    z-index: 2;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border: 1px solid var(--gold);
    border-radius: 999px;
    background: var(--bg-raised);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: grab;
    user-select: none;
    touch-action: none;
}

.studio-zone-label { display: inline-flex; align-items: center; gap: 5px; padding: 0 4px; }
.studio-zone-label svg { width: 13px; height: 13px; color: var(--gold-ink); }

.studio-zone-rot {
    width: 22px;
    height: 22px;
    padding: 0;
    border-radius: 50%;
    background: var(--gold-soft);
    color: var(--gold-ink);
    box-shadow: none;
}

.studio-zone-rot:hover { background: var(--gold); color: var(--brand); }
.studio-zone-rot svg { width: 12px; height: 12px; }

.studio-table {
    position: absolute;
    z-index: 1;
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
    width: calc(82px * var(--scale, 1));
    height: calc(60px * var(--scale, 1));
    display: grid;
    place-items: center;
    padding: 0;
    border: 2px solid var(--line-strong);
    border-radius: 50%;
    background: var(--bg-raised);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    cursor: grab;
    user-select: none;
    touch-action: none;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.studio-table[data-shape="rectangular"] { border-radius: 8px; }

.studio-table[data-shape="bridal"] {
    width: calc(140px * var(--scale, 1));
    border-radius: 8px;
    background: var(--brand);
    border-color: var(--brand);
    color: var(--brand-ink);
}

/* The global button:hover / :active rules would otherwise replace the
   centering + rotation transform (and the hover background) mid-drag. */
.studio-table:hover,
.studio-table:active,
.studio-table:focus-visible {
    transform: translate(-50%, -50%) rotate(var(--rot, 0deg));
    background: var(--bg-raised);
}

.studio-table[data-shape="bridal"]:hover,
.studio-table[data-shape="bridal"]:active,
.studio-table[data-shape="bridal"]:focus-visible { background: var(--brand-2); }

.studio-table.is-full { border-color: var(--ok-ink); }
.studio-table.is-over { border-color: var(--danger-ink); }

/* Layout problems the studio flags itself (see seating-studio.js): a table
   touching another table / the dance floor / the stage, or sharing a name. */
.studio-table.is-overlap {
    background: var(--danger-bg);
    outline: 2px dashed var(--danger-ink);
    outline-offset: 3px;
}
.studio-table.is-overlap:hover,
.studio-table.is-overlap:active,
.studio-table.is-overlap:focus-visible { background: var(--danger-bg); }
.studio-table.is-dup:not(.is-overlap) { outline: 2px dotted var(--gold-ink); outline-offset: 3px; }

.studio-checks {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin: 0 0 12px;
    padding: 9px 12px;
    border: 1px solid var(--gold-soft);
    border-radius: var(--radius-md);
    background: var(--gold-soft);
    color: var(--gold-ink);
    font-size: 0.8rem;
    font-weight: 600;
}
.studio-checks[hidden] { display: none; }
.studio-checks p { margin: 0; flex: 1 1 260px; line-height: 1.45; }
.studio-checks-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.studio-checks-actions [hidden] { display: none !important; }
.studio-checks .btn-ghost { background: var(--bg-raised); color: var(--brand); border: 1px solid var(--line-strong); }

.studio-table.is-selected {
    z-index: 3;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px var(--gold-soft), var(--shadow-md);
}

/* Counter-rotate so the label always reads upright, whatever the table angle. */
.studio-table-label {
    display: grid;
    justify-items: center;
    gap: 2px;
    max-width: 100%;
    transform: rotate(calc(var(--rot, 0deg) * -1));
    pointer-events: none;
}

.studio-table-label strong {
    max-width: var(--label-max, 120px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.7rem;
}

.studio-table-label span { font-size: 0.62rem; font-weight: 800; color: var(--ink-soft); }
.studio-table[data-shape="bridal"] .studio-table-label span { color: rgba(255, 255, 255, 0.75); }

.studio-zoom {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
}

.studio-zoom button {
    min-width: 32px;
    min-height: 32px;
    padding: 0 8px;
    background: var(--bg-raised);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    box-shadow: none;
}

.studio-zoom button:hover { background: var(--bg-sunken); }

.studio-zoom output {
    min-width: 46px;
    text-align: center;
    color: var(--ink-soft);
    font-size: 0.72rem;
    font-weight: 700;
}

.studio-inspector {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
    box-shadow: var(--shadow-md);
}

.studio-inspector-head {
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-sunken);
}

.studio-inspector-head small {
    color: var(--gold-ink);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.studio-inspector-head h2 {
    margin: 4px 0 0;
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
}

.studio-inspector-body { max-height: 70vh; padding: 14px 16px; overflow: auto; }

.studio-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }

.studio-stat {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg-sunken);
}

.studio-stat strong { display: block; font-family: var(--font-heading); font-size: 1.2rem; }
.studio-stat span { display: block; color: var(--ink-soft); font-size: 0.68rem; }

.studio-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }

.studio-controls button {
    min-height: 34px;
    padding: 0 8px;
    background: var(--bg-raised);
    color: var(--ink);
    border: 1px solid var(--line-strong);
    box-shadow: none;
    font-size: 0.72rem;
}

.studio-controls button:hover { background: var(--gold-soft); border-color: var(--gold); }
.studio-controls button svg { width: 13px; height: 13px; }

.studio-edit {
    display: grid;
    gap: 8px;
    padding: 14px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.studio-edit label,
.studio-create label { gap: 4px; font-size: 0.72rem; color: var(--ink-soft); }

.studio-edit input,
.studio-edit select { min-height: 36px; padding: 6px 10px; font-size: 0.82rem; }

.studio-edit-actions { display: flex; gap: 8px; margin-top: 4px; }

.studio-section-title {
    margin: 16px 0 8px;
    color: var(--gold-ink);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.studio-guest {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px dotted var(--line);
    font-size: 0.82rem;
}

.studio-guest .icon-btn { width: 26px; height: 26px; padding: 0; font-size: 1rem; line-height: 1; }
.studio-guest-tag { color: var(--ink-soft); font-size: 0.66rem; font-weight: 700; }
.studio-empty { margin: 0; padding: 6px 0; color: var(--ink-soft); font-size: 0.8rem; }

.studio-table-list { display: grid; gap: 5px; }
.studio-table-list .btn { justify-content: flex-start; width: 100%; }

.studio-table-list .btn.is-active {
    background: var(--gold-soft);
    border-color: var(--gold);
    color: var(--gold-ink);
}

.studio-bottom {
    margin-top: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
    box-shadow: var(--shadow-sm);
}

.studio-bottom-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.studio-bottom-head strong { font-size: 0.9rem; }
.studio-bottom-head span { color: var(--ink-soft); font-size: 0.72rem; }

.studio-unassigned { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }

.studio-unassigned-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--bg);
    font-size: 0.78rem;
}

.studio-unassigned-item small { display: block; color: var(--ink-soft); font-size: 0.68rem; }
.studio-unassigned-item button { min-height: 30px; padding: 0 12px; font-size: 0.72rem; }

.studio-modal {
    position: fixed;
    inset: 0;
    z-index: 400;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
}

.studio-modal[hidden] { display: none; }

.studio-modal-card {
    width: min(430px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--bg-raised);
    box-shadow: var(--shadow-lg);
}

.studio-modal-card h2 { margin: 0 0 14px; font-family: var(--font-heading); font-size: 1.2rem; font-weight: 600; }
.studio-create { display: grid; gap: 10px; }
.studio-create-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

@media (max-width: 900px) {
    .studio-workspace { grid-template-columns: minmax(0, 1fr); }
    .studio-inspector-body { max-height: none; }
    .studio-board-scroll { max-height: 68vh; }
    .studio-scroll-hint { display: flex; }
}

@media (max-width: 600px) {
    .studio-page-actions { width: 100%; }
    .studio-page-actions .btn { flex: 1; }
    .studio-board-card { padding: 12px; }
    /* Tables, signs and the plan keep their full size on a phone: the plan is
       simply wider than the screen and the board scrolls, so a layout made on a
       desktop is never squeezed or shuffled. */
}

/* Mini floor plan on Pregled follows the dance-floor shape chosen in the studio. */
.mini-floorplan-dancefloor[data-shape="ellipse"] { border-radius: 50%; }
.mini-floorplan-dancefloor[data-shape="circle"] { width: 24%; height: 36%; border-radius: 50%; }

/* ---------- Demo bar (inside a demo wedding) ---------- */

.demo-bar {
    position: sticky;
    top: 0;
    z-index: 160;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 8px 14px;
    background: #142033;
    color: #fff;
    font-size: 0.82rem;
    line-height: 1.35;
    text-align: center;
}
.demo-bar-badge {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--gold);
    color: #142033;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}
.demo-bar-time { font-variant-numeric: tabular-nums; font-size: 0.95rem; color: #e2be82; }
.demo-bar-time.is-low { color: #ff9b9b; }
.demo-bar-cta {
    padding: 4px 12px;
    border-radius: 999px;
    background: #fff;
    color: #142033;
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.demo-bar-cta:hover { background: var(--gold-soft); }
@media (max-width: 640px) {
    .demo-bar-long { display: none; }
}
body.has-demo-bar .studio-board-card.is-fullscreen { top: 42px; }
body.has-demo-bar .app-shell { min-height: calc(100vh - 61px - 42px); }

/* ---------- Guest page: hero + photo upload (mobile first) ---------- */
/* A guest scans a QR code on a table and lands here, on a phone, usually in a dim hall with one
   free hand: one big button, big tap targets, 16px fields (so iOS does not zoom), and a send
   button that stays in reach of the thumb. */

.guest-hero {
    position: relative;
    margin: 4px 0 16px;
    padding: 30px 22px 26px;
    border-radius: 26px;
    text-align: center;
    color: #fff;
    overflow: hidden;
    background:
        radial-gradient(70% 90% at 90% 0%, rgba(201, 168, 106, 0.38), transparent 70%),
        radial-gradient(60% 70% at 0% 100%, rgba(58, 96, 150, 0.4), transparent 70%),
        linear-gradient(180deg, #1a2b47, #0f1a2e);
    box-shadow: var(--shadow-lg);
}

.guest-hero-ring svg { width: 34px; height: 34px; margin: 0 auto 6px; color: var(--gold); }

.guest-hero-eyebrow {
    display: block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #e2be82;
}

.guest-hero-title {
    margin: 8px 0 2px;
    font-family: var(--font-script);
    font-weight: 700;
    font-size: clamp(2.5rem, 12vw, 3.6rem);
    line-height: 1.05;
    color: #fff;
}

.guest-hero-date { margin: 0; color: rgba(255, 255, 255, 0.72); font-size: 0.9rem; letter-spacing: 0.03em; }

.guest-hero-lead { margin: 14px auto 0; max-width: 30ch; font-size: 1rem; line-height: 1.5; color: rgba(255, 255, 255, 0.9); }

.guest-hero-table {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(226, 190, 130, 0.5);
    font-size: 0.84rem;
    color: #fff;
}
.guest-hero-table svg { width: 15px; height: 15px; color: #e2be82; }

.guest-upload {
    max-width: 680px;
    margin: 0 auto 16px;
    padding: 20px 16px 18px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--bg-raised);
    box-shadow: var(--shadow-md);
}

.guest-upload-title { margin: 0 0 14px; font-family: var(--font-heading); font-size: 1.45rem; text-align: center; }

.guest-pick { display: grid; gap: 12px; }
.guest-pick input[type="file"] { display: none; }

.guest-pick-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 84px;
    padding: 16px 18px;
    border-radius: 20px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.guest-pick-btn:active { transform: scale(0.98); }

.guest-pick-icon { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; }
.guest-pick-icon svg { width: 26px; height: 26px; }
.guest-pick-text strong { display: block; font-size: 1.15rem; line-height: 1.2; }
.guest-pick-text small { display: block; margin-top: 2px; font-size: 0.82rem; line-height: 1.3; opacity: 0.8; }

/* On a computer the camera button would only open a file dialog, so it is a touch-screen thing. */
.guest-pick-camera { display: none; }

.guest-pick-gallery {
    color: #fff;
    background: linear-gradient(135deg, #23385a, #142033);
    box-shadow: 0 8px 20px rgba(20, 32, 51, 0.28);
}
.guest-pick-gallery .guest-pick-icon { background: rgba(255, 255, 255, 0.14); color: #e2be82; }

@media (hover: none) and (pointer: coarse) {
    .guest-pick-camera {
        display: flex;
        color: #fff;
        background: linear-gradient(135deg, #23385a, #142033);
        box-shadow: 0 8px 20px rgba(20, 32, 51, 0.28);
        min-height: 104px;
    }
    .guest-pick-camera .guest-pick-icon { width: 64px; height: 64px; background: var(--gold); color: #142033; }
    .guest-pick-camera .guest-pick-icon svg { width: 32px; height: 32px; }
    .guest-pick-camera .guest-pick-text strong { font-size: 1.4rem; }

    .guest-pick-gallery {
        color: var(--ink);
        background: var(--bg-sunken);
        border: 1.5px solid var(--line-strong);
        box-shadow: none;
    }
    .guest-pick-gallery .guest-pick-icon { background: var(--gold-soft); color: var(--gold-ink); }
}

.guest-pick.is-dragover .guest-pick-gallery { outline: 3px dashed var(--gold); outline-offset: 3px; }

.guest-pick-hint { margin: 12px 4px 0; text-align: center; color: var(--ink-soft); font-size: 0.8rem; line-height: 1.45; }

.guest-selected { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.guest-selected[hidden] { display: none; }
.guest-selected-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 0.95rem; }

.guest-link-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 4px;
    border: 0;
    background: none;
    box-shadow: none;
    color: var(--gold-ink);
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}
.guest-link-btn:hover { background: none; color: var(--ink); }

.guest-selected .upload-preview { grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 0; }

.upload-tile { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--bg-sunken); }
.upload-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }

.upload-tile-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.74);
    box-shadow: none;
    color: #fff;
    font-size: 1.2rem;
    line-height: 1;
}
.upload-tile-remove:hover { background: rgba(15, 23, 42, 0.92); }

.upload-tile-status {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
}
.upload-tile.is-done .upload-tile-status { background: rgba(35, 120, 80, 0.74); font-size: 1.6rem; }
.upload-tile.is-error .upload-tile-status { background: rgba(170, 40, 40, 0.8); font-size: 1.6rem; }

.guest-fields { display: grid; gap: 14px; margin-top: 18px; }
.guest-fields label { display: grid; gap: 6px; color: var(--ink-soft); font-size: 0.86rem; font-weight: 700; }
.guest-fields input, .guest-fields select { min-height: 52px; padding: 12px 14px; border-radius: 14px; font-size: 16px; }

.guest-progress { display: none; margin-top: 16px; }
.guest-progress.is-active { display: block; }
.guest-progress-track { height: 10px; border-radius: 999px; background: var(--bg-sunken); overflow: hidden; }
.guest-progress-bar { width: 0; height: 100%; background: linear-gradient(90deg, var(--gold), #e2be82); transition: width 0.25s ease; }
.guest-progress-text { display: block; margin-top: 8px; color: var(--ink-soft); font-size: 0.86rem; font-weight: 700; text-align: center; }

/* The send button follows the thumb while the list of photos scrolls. */
.guest-bar { position: sticky; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 30; margin-top: 16px; }
.guest-bar[hidden] { display: none; }

.guest-send {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    padding: 0 20px;
    border: 0;
    border-radius: 18px;
    background: linear-gradient(180deg, #e2be82, #c9a86a);
    box-shadow: 0 10px 24px rgba(147, 118, 47, 0.38);
    color: #142033;
    font-size: 1.06rem;
    font-weight: 800;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}
.guest-send:hover { background: linear-gradient(180deg, #e8c88f, #d1b174); }
.guest-send:active { transform: scale(0.985); }
.guest-send:disabled { opacity: 0.6; }
.guest-send svg { width: 22px; height: 22px; flex: none; }

.guest-done { padding: 28px 12px 8px; text-align: center; }
.guest-done[hidden] { display: none; }
.guest-done-check {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--ok-bg);
    color: var(--ok-ink);
    animation: guestPop 0.5s cubic-bezier(0.2, 1.4, 0.4, 1);
}
.guest-done-check svg { width: 36px; height: 36px; }
.guest-done h3 { margin: 0 0 6px; font-family: var(--font-heading); font-size: 1.6rem; }
.guest-done p { max-width: 32ch; margin: 0 auto 18px; color: var(--ink-soft); }
.guest-done-actions { display: grid; gap: 6px; justify-items: center; }
.guest-done-actions .guest-send { max-width: 340px; }

@keyframes guestPop {
    from { transform: scale(0.3); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .guest-done-check { animation: none; }
}

/* The gallery below: two even columns on a phone, bigger thumb targets. */
@media (max-width: 600px) {
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }
    .photo-like-btn { min-height: 34px; padding: 4px 10px; font-size: 0.78rem; }
    .photo-like-btn svg { width: 14px; height: 14px; }
}

/* ---------- Logo (assets/images/logo*.png) ---------- */
.app-sidebar-brand img { display: block; width: auto; height: 30px; flex: none; }
.brand-mark img { display: block; width: auto; height: 26px; }
.guest-hero-ring img { display: block; width: auto; height: 50px; margin: 0 auto 6px; }
.auth-logo { display: block; width: min(240px, 70%); height: auto; margin: 0 0 18px; }

.brand-mark:has(img) { background: #142033; }
