:root {
    color-scheme: light;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    background:
        radial-gradient(circle at top, #fff7ed 0, #f9fafb 34%, #eef2ff 100%);
    line-height: 1.5;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #111827;
    overflow-x: hidden;
}

.admin-shell { width: 100%; max-width: 1400px; display: grid; gap: 16px; }
.admin-header, .admin-nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.admin-header h1 { margin-bottom: 4px; }
.admin-header p { margin-top: 0; }
.admin-header form, .admin-nav form { margin: 0; }
.admin-header button, .admin-nav button, .admin-action { width: auto; padding: 8px 12px; border: 0; border-radius: 8px; background: #2563eb; color: #fff; cursor: pointer; font: inherit; }
.admin-refresh-control { position: sticky; bottom: 16px; z-index: 2; align-self: end; padding: 10px 14px; border: 1px solid #cbd5e1; border-radius: 12px; background: rgb(255 255 255 / 94%); box-shadow: 0 8px 24px rgb(15 23 42 / 14%); }
.admin-refresh-control { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.admin-refresh-control button { width: auto; padding: 8px 12px; border: 0; border-radius: 8px; background: #2563eb; color: #fff; cursor: pointer; font: inherit; }
.admin-refresh-control button:disabled { opacity: .6; cursor: wait; }
.admin-card { width: 100%; padding: 20px; background: #fff; border: 1px solid rgb(148 163 184 / 18%); border-radius: 18px; box-shadow: 0 12px 35px rgb(15 23 42 / 8%); overflow: hidden; }
.admin-card h2 { margin-top: 0; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th, .admin-table td { padding: 9px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
.admin-table th { color: #475569; font-size: .85rem; }
.admin-table pre, .admin-card > pre { max-width: 700px; white-space: pre-wrap; font-size: .75rem; }
.admin-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.admin-form label { display: grid; gap: 4px; font-weight: 600; color: #334155; }
.admin-form input, .admin-form select, .admin-form textarea { width: 100%; min-height: 40px; padding: 8px; border: 1px solid #cbd5e1; border-radius: 8px; font: inherit; }
.admin-form .admin-checkbox { display: flex; align-items: center; gap: 8px; }
.admin-form .admin-checkbox input[type="checkbox"] { flex: 0 0 auto; width: 18px; min-width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; }
.admin-form fieldset { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; border: 1px solid #cbd5e1; border-radius: 10px; }
.admin-form button, .button-link, .danger-action { display: inline-block; width: auto; padding: 8px 12px; border: 0; border-radius: 8px; background: #2563eb; color: #fff; text-decoration: none; cursor: pointer; font: inherit; }
.danger-action { background: #dc2626; margin-top: 6px; }
.venue-status { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: .8rem; font-weight: 700; }
.status-active { background: #dcfce7; color: #166534; } .status-past { background: #e2e8f0; color: #475569; } .status-planned { background: #fef3c7; color: #92400e; }

.site-header,
.site-footer {
    padding: 14px 20px;
    text-align: center;
}

.cookie-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgb(15 23 42 / 62%);
    backdrop-filter: blur(3px);
}

.cookie-banner {
    width: auto;
    max-width: 720px;
    margin: 0 auto;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgb(148 163 184 / 18%);
    background: rgb(255 255 255 / 98%);
    box-shadow: 0 22px 60px rgb(15 23 42 / 18%);
}

body:has(.cookie-modal-backdrop) {
    overflow: hidden;
}

.cookie-banner-content {
    display: grid;
    gap: 16px;
}

.cookie-banner-copy h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
    line-height: 1.15;
}

.cookie-banner-copy p {
    margin: 0;
    color: #475569;
}

.cookie-banner-actions {
    display: grid;
    gap: 10px;
}

.cookie-banner-actions form {
    margin: 0;
}

.cookie-banner-actions button {
    width: 100%;
}

.cookie-banner-primary {
    min-height: 54px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 12px 26px rgb(37 99 235 / 24%);
    cursor: pointer;
}

.cookie-banner-secondary {
    min-height: 54px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    color: #0f172a;
    box-shadow: inset 0 0 0 1px rgb(15 23 42 / 10%);
}

.cookie-banner-primary:hover,
.cookie-banner-secondary:hover {
    filter: brightness(1.02);
}

.site-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.site-brand-text {
    color: #111827;
    font-size: clamp(1.05rem, 3vw, 1.35rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 20px;
    gap: 16px;
}

.hero {
    width: 100%;
    max-width: 520px;
    padding: 28px 20px;
    text-align: left;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid rgb(148 163 184 / 18%);
    box-shadow: 0 18px 50px rgb(15 23 42 / 10%);
}

.hero h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 6vw, 36px);
    line-height: 1.1;
}

.hero p {
    margin: 0 0 14px;
    color: #475569;
}

.hero > p:last-of-type {
    margin-bottom: 0;
}

.hero a {
    color: #2563eb;
}

.hero form {
    margin-top: 18px;
}

.hero label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #334155;
}

.hero input,
.hero select,
.hero button {
    width: 100%;
    max-width: 100%;
    font: inherit;
    border-radius: 14px;
}

.hero input,
.hero select {
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 16px;
    min-width: 0;
    max-width: 100%;
}

.hero input.readonly-field {
    background: #f1f5f9;
    color: #475569;
    cursor: not-allowed;
}

.hero input.readonly-field:focus {
    outline: none;
    border-color: #cbd5e1;
}

.hero input[type="date"] {
    appearance: auto;
    -webkit-appearance: auto;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    display: block;
}

.hero .birth-date-input {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: block;
}

.hero input:focus,
.hero select:focus {
    outline: 2px solid rgb(59 130 246 / 20%);
    border-color: #60a5fa;
}

.hero .consent-field label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.hero .consent-field input[type="checkbox"] {
    flex: 0 0 auto;
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 2px 0 0;
    padding: 0;
}

.hero button,
.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 16px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 24px rgb(37 99 235 / 22%);
    cursor: pointer;
}

.hero button,
.button-link {
    -webkit-appearance: none;
    appearance: none;
}

.hero button,
.button-link,
.hero button:visited,
.button-link:visited {
    color: #ffffff;
}

.hero a.button-link,
.hero a.button-link:visited {
    color: #ffffff;
}

.hero a.button-link.google-button,
.hero a.button-link.google-button:visited {
    color: #1f1f1f;
}

.hero button:hover,
.button-link:hover {
    filter: brightness(1.03);
}

.hero button:active,
.button-link:active {
    transform: translateY(1px);
}

.hero .auth-actions {
    display: grid;
    gap: 12px;
    margin: 18px 0 8px;
}

.hero .auth-actions .button-link {
    width: 100%;
}

.hero .google-button {
    gap: 12px;
    background: #ffffff;
    color: #1f1f1f;
    border: 1px solid #747775;
    box-shadow: none;
}

.hero .google-button svg {
    flex: 0 0 auto;
}

.hero .auth-actions-inline {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
}

.hero .button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin: 18px 0 8px;
}

.hero .button-group form {
    margin: 0;
}

.hero .connection-action {
    margin-top: 14px;
}

.hero .button-group .button-link,
.hero .button-group button {
    min-width: 160px;
}

@media (max-width: 520px) {
    .hero .button-group {
        flex-direction: column;
        align-items: stretch;
    }

    .hero .button-group .button-link,
    .hero .button-group button {
        width: 100%;
        min-width: 0;
    }
}

.hero .secondary-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding-inline: 20px;
    border-radius: 16px;
    min-height: 54px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    color: #0f172a;
    box-shadow: inset 0 0 0 1px rgb(15 23 42 / 10%);
}

.hero .secondary-action {
    background: #0f172a;
    box-shadow: 0 10px 24px rgb(15 23 42 / 16%);
}

.hero .separator {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 18px;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hero .separator::before,
.hero .separator::after {
    content: "";
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, transparent, #cbd5e1, transparent);
}

.hero .muted {
    color: #64748b;
    font-size: 0.96rem;
}

.hero .form-grid {
    display: grid;
    gap: 14px;
}

.hero .field-group {
    margin: 0;
    min-width: 0;
    overflow: visible;
}

.hero .field-error {
    display: inline-block;
    margin-top: 6px;
    color: #b91c1c;
}

.hero .field-hint {
    display: inline-block;
    margin-top: 6px;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 500;
}

.hero .form-grid > .field-group,
.hero .form-grid > button,
.hero .form-grid > .auth-actions {
    min-width: 0;
}

.hero .alert {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 0.96rem;
}

.hero .alert-success {
    background: rgb(34 197 94 / 12%);
    color: #166534;
}

.hero .alert-error {
    background: rgb(239 68 68 / 12%);
    color: #991b1b;
}

.hero .verification-warning {
    color: #b91c1c;
}

.hero .activation-countdown {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgb(59 130 246 / 10%);
    color: #1e40af;
    font-size: 0.96rem;
    font-weight: 700;
}

.hero .activation-code-help {
    margin: 14px 0 0;
    color: #475569;
}

.hero .activation-code-help p {
    margin: 0 0 8px;
}

.hero .queue-prompt {
    margin: 14px 0 0;
    padding: 16px;
    border-radius: 16px;
    background: rgb(251 191 36 / 14%);
    color: #78350f;
}

.hero .queue-prompt h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.hero .queue-prompt p {
    margin: 0 0 12px;
}

.hero .queue-prompt form,
.hero .queue-prompt button {
    width: 100%;
}

.queue-cancel-form {
    margin-top: 14px;
}

.message-carousel {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: 250px;
    min-height: 250px;
    margin-top: 16px;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
    background: transparent;
}

.message-carousel-item {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    height: 250px;
    margin: 0;
    overflow: hidden;
}

.message-carousel-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero .email-provider-button {
    width: 100%;
    margin-top: 12px;
}

.hero .activation-countdown-warning {
    background: rgb(245 158 11 / 14%);
    color: #92400e;
}

.hero .activation-countdown-expired {
    background: rgb(239 68 68 / 12%);
    color: #991b1b;
}

.hero .secondary-action.activation-countdown-warning {
    background: #dc2626;
    color: #fff;
}

.hero .secondary-action:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.flash {
    width: 100%;
    max-width: 520px;
    padding: 14px 16px;
    border-radius: 18px;
    font-weight: 600;
    box-shadow: 0 14px 34px rgb(15 23 42 / 10%);
}

.flash-success {
    background: rgb(220 252 231 / 95%);
    color: #166534;
    border: 1px solid rgb(134 239 172 / 70%);
}

.flash-error {
    background: rgb(254 226 226 / 95%);
    color: #991b1b;
    border: 1px solid rgb(252 165 165 / 70%);
}

.site-footer {
    color: #64748b;
    padding-top: 8px;
}

@media (min-width: 720px) {
    .site-header,
    .site-footer {
        padding-left: 28px;
        padding-right: 28px;
        text-align: center;
    }

    .cookie-banner {
        margin: 0 auto;
    }

    .cookie-banner-actions {
        grid-template-columns: 1fr 1fr;
    }

    .page {
        padding: 32px;
    }

    .hero {
        padding: 36px 32px;
    }
}
