:root {
    /* Primary theme — Aqua (default) */
    --primary:  #0d9488;
    --deep:     #0f766e;
    --accent:   #0ea5e9;
    --bg:       #e9f8f4;
    --soft:     #d2f1ea;
    --ink:      #0c3b37;
    --sub:      #5f8b86;
    --ring:     #9ce6da;

    /* Amber — crowded indicator */
    --amber-surface: #fef3c7;
    --amber-ink:     #92400e;
    --amber-border:  #fcd34d;

    /* Neutral */
    --white:    #ffffff;
    --grey-100: #f1f5f9;
    --grey-200: #e2e8f0;
    --grey-400: #94a3b8;
    --grey-700: #334155;

    /* Radius scale */
    --r-sm:  12px;
    --r-md:  16px;
    --r-lg:  24px;
    --r-btn: 14px;

    /* Shadows */
    --shadow-card: 0 6px 18px rgba(15, 40, 60, .07);
    --shadow-btn:  0 10px 22px -6px var(--primary);

    /* Fonts */
    --font-display: 'Fredoka', sans-serif;
    --font-body: 'Nunito', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-weight: 600;
    background: var(--bg);
    color: var(--ink);
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    margin: 0;
    color: var(--ink);
}

p {
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select {
    font-family: inherit;
}

button {
    cursor: pointer;
}

input::placeholder {
    color: #a9bcc0;
}

select {
    appearance: none;
    -webkit-appearance: none;
}

img {
    max-width: 100%;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDki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jEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred.";
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: var(--grey-200);
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: var(--primary);
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* ===== Layout helpers ===== */

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== Buttons ===== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: var(--r-btn);
    padding: 15px 26px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: background .15s, transform .1s;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-btn);
}

.btn-primary:disabled {
    background: var(--grey-400);
    box-shadow: none;
    cursor: not-allowed;
}

.btn-outline {
    background: var(--white);
    color: var(--deep);
    border: 2px solid var(--ring);
}

.btn-text {
    background: transparent;
    color: var(--sub);
    box-shadow: none;
    padding: 10px 4px;
}

/* For CTAs that are anchors, not <button>, so :disabled can't apply — same look, no click. */
.btn-disabled {
    background: var(--grey-400);
    color: var(--white);
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

.registration-closed-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--sub);
}

.error-banner {
    background: #fdecea;
    color: #c0392b;
    font-weight: 700;
    font-size: 13.5px;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
}

/* ===== Cards & badges ===== */

.card {
    background: var(--white);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 800;
    font-size: 12px;
    padding: 6px 11px;
    border-radius: 20px;
}

.badge-soft {
    background: var(--soft);
    color: var(--deep);
}

.badge-crowded {
    background: var(--amber-surface);
    color: var(--amber-ink);
    border: 1px solid var(--amber-border);
}

/* ===== Admin ===== */

.admin-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.admin-page-header h1 {
    font-size: 24px;
}

.admin-page-subtitle {
    margin-top: 4px;
    font-size: 13.5px;
    color: var(--sub);
    font-weight: 600;
}

.admin-saved-banner {
    background: #e3f7ea;
    color: #1f9d4e;
    font-weight: 800;
    padding: 14px 18px;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--sub);
    margin-bottom: 24px;
}

.admin-table-wrap {
    background: var(--white);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    overflow-x: auto;
    margin-bottom: 24px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.admin-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--sub);
    padding: 14px 16px;
    border-bottom: 2px solid var(--grey-100);
    white-space: nowrap;
}

.admin-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--grey-100);
    font-size: 14px;
    color: var(--ink);
    font-weight: 600;
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table-subtext {
    font-size: 12px;
    font-weight: 600;
    color: var(--sub);
}

.admin-filters {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

@media (min-width: 640px) {
    .admin-filters {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

.admin-table-empty {
    text-align: center;
    color: var(--sub);
    font-weight: 700;
    padding: 40px 16px !important;
}

.admin-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 800;
    padding: 5px 10px;
    border-radius: 20px;
}

.admin-pill-active {
    background: #e3f7ea;
    color: #1f9d4e;
}

.admin-pill-inactive {
    background: var(--grey-100);
    color: var(--grey-400);
}

.admin-pill-warn {
    background: #fff3e6;
    color: #cf7d2e;
}

.admin-pill-danger {
    background: #fdecea;
    color: #c0392b;
}

.admin-film-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.admin-link-btn {
    border: none;
    background: transparent;
    color: var(--accent);
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    padding: 0;
}

.admin-link-btn-danger {
    color: #c75c4a;
}

.admin-panel {
    background: var(--white);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-card);
    padding: 22px;
    margin-bottom: 24px;
}

.admin-panel h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 18px;
}

.admin-form-grid .field-wide {
    grid-column: 1 / -1;
}

.admin-form-actions {
    display: flex;
    gap: 10px;
}

.admin-actions-wrap {
    flex-wrap: wrap;
    align-items: center;
}

.admin-list-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.admin-list-toolbar label {
    font-size: 13px;
    font-weight: 800;
    color: var(--sub);
}

.admin-list-toolbar select {
    width: auto;
    padding: 8px 12px;
    border: 2px solid var(--soft);
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    background: var(--white);
    color: var(--ink);
}

.admin-panel-warn {
    background: #fff3e6;
    color: #cf7d2e;
    font-weight: 700;
    font-size: 14px;
}

.admin-panel-danger {
    background: #fdecea;
    color: #c0392b;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-panel-danger .admin-link-btn {
    color: #c0392b;
    text-decoration: underline;
}

.admin-children-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.admin-child-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--grey-100);
    flex-wrap: wrap;
}

.admin-child-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.admin-child-text {
    flex: 1;
    min-width: 140px;
}

.admin-child-name {
    font-weight: 800;
    color: var(--ink);
    font-size: 14.5px;
}

.admin-child-meta {
    font-size: 12.5px;
    color: var(--sub);
    font-weight: 600;
}

.admin-child-select select {
    padding: 10px 12px;
    border: 2px solid var(--soft);
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 700;
    background: #fbfdfd;
    color: var(--ink);
}

.admin-child-price {
    font-weight: 800;
    color: var(--primary);
    font-size: 14.5px;
}

.admin-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 2px solid var(--grey-100);
    font-size: 15px;
    color: var(--ink);
    font-weight: 700;
}

.admin-total-row strong {
    color: var(--primary);
    font-size: 19px;
}

.admin-report-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 640px) {
    .admin-report-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.admin-report-card {
    text-align: center;
}

.admin-report-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin: 0 auto 14px;
}

.admin-report-card h2 {
    margin-bottom: 8px;
}

.admin-report-card p {
    font-size: 13.5px;
    color: var(--sub);
    font-weight: 600;
    line-height: 1.5;
    margin: 0 0 18px;
}

.admin-action-message {
    margin: 14px 0 0;
    font-size: 13px;
    font-weight: 700;
    color: #1f9d4e;
}

.field label {
    display: block;
    font-size: 13px;
    font-weight: 800;
    color: var(--sub);
    margin-bottom: 7px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 12px 13px;
    border: 2px solid var(--soft);
    border-radius: 12px;
    font-size: 14.5px;
    font-family: inherit;
    font-weight: 600;
    background: #fbfdfd;
    color: var(--ink);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--primary);
    outline: none;
}

.field-hint {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--sub);
    font-weight: 600;
}

.field-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.field-checkbox input {
    width: auto;
}

@media (min-width: 640px) {
    .admin-form-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== Animations ===== */

.page-enter {
    animation: fadeSlideIn 300ms ease both;
}

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

.float-emoji {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
