:root {
    --bg: #0b1220;
    --bg-2: #111827;
    --surface: #1f2937;
    --surface-2: #0f172a;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --accent: #14b8a6;
    --accent-rgb: 20, 184, 166;
    --border: #374151;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at top right, #1e293b 0%, var(--bg) 45%, var(--bg-2) 100%);
}


.wrapper {
    padding: 36px 40px 56px;
}

@media (max-width: 768px) {
    .wrapper { padding: 24px 16px 40px; }
}

h1 {
    margin: 0 0 10px;
    font-size: 2rem;
    color: #f8fafc;
}

.subtitle {
    color: var(--muted);
    margin: 0 0 28px;
}

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

.card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.card {
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.card-link:hover .card {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.my-event-card:has(.card-link:hover) {
    transform: translateY(-3px);
    border-color: var(--accent);
}

.ticket-codes-block {
    border-top: 1px solid var(--border);
    margin-top: 14px;
    padding-top: 12px;
}

.ticket-codes-block .ticket-code-title {
    margin-bottom: 8px;
}

.ticket-code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.ticket-code-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ticket-code-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ticket-code-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.ticket-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ticket-picker-select {
    width: 100%;
    font-family: monospace;
    font-size: 0.88rem;
    cursor: pointer;
}

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

.ticket-resend-form {
    margin: 0;
}

.ticket-resend-form .ticket-export-btn {
    width: auto;
}

.ticket-code {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.72);
    color: #f8fafc;
    font-size: 0.82rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ticket-export-btn {
    min-height: 36px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 10px;
    background: rgba(56, 189, 248, 0.12);
    color: #e0f2fe;
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s ease;
}

.ticket-export-btn:hover {
    border-color: rgba(125, 211, 252, 0.5);
    background: rgba(56, 189, 248, 0.2);
    color: #f8fafc;
}

.ticket-export-btn--secondary {
    padding: 0 12px;
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.2);
    color: #e2e8f0;
}

.ticket-export-btn--google {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.3);
    color: #bbf7d0;
}

.ticket-export-btn--google:hover {
    background: rgba(34, 197, 94, 0.22);
    border-color: rgba(134, 239, 172, 0.54);
}

.event-image {
    width: 100%;
    height: 170px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--border);
    margin-bottom: 12px;
    display: block;
}

.event-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: rgba(148, 163, 184, 0.12);
    font-size: 0.85rem;
}

.meta {
    font-size: 0.9rem;
    color: var(--muted);
    margin: 4px 0;
}

.title {
    font-size: 1.15rem;
    margin: 0 0 10px;
    color: #f3f4f6;
}

.row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.pill {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    color: #031614;
    background: var(--accent);
    border-radius: 999px;
    padding: 4px 10px;
}

.status {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-radius: 999px;
    padding: 4px 10px;
    color: #f8fafc;
    background: #64748b;
}

/* Darker shades keep white badge text above 4.5:1 contrast. */
.status.active { background: #15803d; }
.status.inactive { background: #b45309; }
.status.cancelled { background: #b91c1c; }

.empty {
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 28px;
    color: var(--muted);
    text-align: center;
}

.back-link {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.event-details-card {
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

/* Show the whole image: event posters are often portrait. */
.event-hero {
    display: block;
    width: 100%;
    height: auto;
    max-height: 640px;
    object-fit: contain;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.event-details-body {
    padding: 22px;
}

.event-page-title {
    margin: 0;
    font-size: 1.8rem;
}

.event-description {
    margin-top: 16px;
    color: #d1d5db;
    line-height: 1.6;
    white-space: pre-wrap;
}

.booking-box {
    margin-top: 22px;
    border-top: 1px solid var(--border);
    padding-top: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.donation-booking-box {
    display: block;
}

.donation-booking-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
    align-items: flex-end;
}

.donation-booking-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.donation-booking-field .meta {
    margin: 0;
}

.seats-input {
    width: 90px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #0b1220;
    color: var(--text);
    padding: 8px 10px;
}

.donation-input {
    width: 120px;
}

.booking-paypal-block {
    width: 100%;
    max-width: 460px;
    margin-top: 18px;
    color: #f8fafc;
    color-scheme: light;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.92) 0%, rgba(241, 245, 249, 0.9) 82%, rgba(255, 255, 255, 0.96) 100%);
    border-radius: 14px;
    padding: 14px;
}

#paypal-button-container {
    width: 100%;
    min-width: 0;
}

#paypal-button-container > div {
    max-width: 100%;
}



.book-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    background: var(--accent);
    color: #031614;
    font-weight: 700;
    line-height: 1.2;
    border-radius: 8px;
    padding: 9px 14px;
    cursor: pointer;
    text-decoration: none;
}


@media (max-width: 640px) {
    .top-nav-inner {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .top-nav-left {
        flex-direction: column;
        align-items: flex-start;
    }

    .top-nav-right {
        margin-left: 0;
        justify-content: flex-end;
    }

    .event-hero {
        max-height: 480px;
    }

    .donation-booking-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .donation-booking-field,
    .booking-paypal-block {
        max-width: none;
    }

    .donation-booking-field .seats-input,
    .donation-booking-field .donation-input {
        width: 100%;
    }
}


.field-error {
    flex-basis: 100%;
    margin: 0;
    color: #fca5a5;
    font-size: 0.82rem;
    min-height: 1.1rem;
}

.book-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.event-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1rem 0;
}

.event-inline-form {
    display: inline-flex;
    margin: 0;
}

.event-admin-actions .book-btn {
    box-sizing: border-box;
    min-height: 40px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.2;
}

.event-delete-btn {
    background: #f87171;
    color: #2f0707;
}

.event-toggle-row {
    align-items: flex-start;
    margin: 0;
}

.admin-log-context {
    max-width: 420px;
    max-height: 150px;
    overflow: auto;
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.78rem;
}

.admin-logs-card {
    display: grid;
    gap: 1.25rem;
}

.admin-log-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.admin-log-stat {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    padding: 1rem;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.86), rgba(30, 41, 59, 0.72));
}

.admin-log-stat span {
    display: block;
    margin-bottom: 0.45rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.admin-log-stat strong {
    display: block;
    color: var(--text);
    font-size: 1.3rem;
}

.admin-log-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.9fr) minmax(150px, 0.8fr) auto;
    gap: 0.75rem;
    align-items: end;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.42);
}

.admin-log-clear-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid rgba(248, 113, 113, 0.24);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(127, 29, 29, 0.24), rgba(15, 23, 42, 0.58));
}

.admin-log-clear-form strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #fecaca;
}

.admin-log-clear-form p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.admin-log-clear-danger {
    flex: 0 0 auto;
    background: #f87171;
    color: #2f0707;
}

.admin-log-filters .auth-label {
    margin-bottom: 0.35rem;
}

.admin-log-filter-field {
    min-width: 0;
}

.admin-log-filter-actions {
    display: inline-flex;
    gap: 0.55rem;
}

.admin-log-clear {
    background: rgba(148, 163, 184, 0.18);
    color: var(--text);
    border-color: rgba(148, 163, 184, 0.25);
}

.admin-log-export {
    background: #38bdf8;
}

.admin-log-pagination-summary {
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-log-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-end;
    color: var(--muted);
}

.admin-log-pagination .is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

.admin-log-list {
    display: grid;
    gap: 0.85rem;
}

.admin-log-item {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background:
        radial-gradient(circle at top left, rgba(var(--accent-rgb), 0.12), transparent 30%),
        rgba(15, 23, 42, 0.54);
}

.admin-log-item-main {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.admin-log-item h2 {
    margin: 0 0 0.25rem;
    color: var(--text);
    font-size: 1rem;
}

.admin-log-item p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.admin-log-action-badge {
    flex: 0 0 auto;
    min-width: 138px;
    padding: 0.45rem 0.65rem;
    border-radius: 999px;
    text-align: center;
    color: #04111d;
    font-size: 0.78rem;
    font-weight: 800;
}

.admin-log-action-badge.neutral {
    background: #cbd5e1;
}

.admin-log-action-badge.info {
    background: #93c5fd;
}

.admin-log-action-badge.success {
    background: color-mix(in srgb, var(--accent) 60%, #ffffff);
}

.admin-log-action-badge.danger {
    background: #fca5a5;
}

.admin-log-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 0.9rem;
}

.admin-log-detail-chip {
    display: inline-flex;
    gap: 0.45rem;
    align-items: center;
    max-width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    background: rgba(2, 6, 23, 0.26);
    color: var(--muted);
    font-size: 0.82rem;
}

.admin-log-detail-chip strong {
    color: var(--text);
}

@media (max-width: 900px) {
    .admin-log-stats,
    .admin-log-filters {
        grid-template-columns: 1fr 1fr;
    }

    .admin-log-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .admin-log-stats,
    .admin-log-filters {
        grid-template-columns: 1fr;
    }

    .admin-log-item-main {
        flex-direction: column;
    }

    .admin-log-action-badge {
        min-width: 0;
    }

    .admin-log-filter-actions {
        flex-direction: column;
    }
}

.auth-card {
    max-width: 460px;
    margin: 24px auto 0;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
}

.auth-title {
    margin: 0 0 8px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-label {
    font-size: 0.9rem;
    color: var(--muted);
}

.auth-input {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #0b1220;
    color: var(--text);
    padding: 10px 12px;
}

.auth-submit {
    margin-top: 8px;
    width: fit-content;
}

.auth-error {
    margin: 12px 0;
    color: #fca5a5;
    font-size: 0.9rem;
}

.auth-info {
    margin: 12px 0;
    color: #93c5fd;
    font-size: 0.9rem;
}


.auth-links {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.auth-link-btn {
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--text);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9rem;
    background: rgba(148, 163, 184, 0.08);
}

.auth-link-btn:hover {
    border-color: var(--accent);
    color: #f8fafc;
}



.user-avatar-icon {
    width: 18px;
    height: 18px;
    display: block;
}


.user-menu {
    position: relative;
}

.user-menu summary {
    list-style: none;
    cursor: pointer;
}

.user-menu summary::-webkit-details-marker {
    display: none;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 150px;
    background: #0f172a;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 20;
}

.user-menu[open] .user-dropdown {
    display: flex;
}

.user-dropdown-link {
    text-decoration: none;
    color: var(--text);
    font-size: 0.88rem;
    border-radius: 8px;
    padding: 8px 10px;
}

.user-dropdown-link:hover {
    background: rgba(var(--accent-rgb), 0.18);
}

.user-dropdown-logout {
    color: #fca5a5;
}


.events-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
}

.admin-event-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid var(--border);
    color: #f8fafc;
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 700;
    background: rgba(var(--accent-rgb), 0.16);
    cursor: pointer;
}

.admin-event-btn:hover {
    border-color: var(--accent);
}

.admin-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
}

.admin-home-actions form {
    margin: 0;
}

.admin-event-btn--secondary {
    background: rgba(148, 163, 184, 0.18);
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.24);
}


.alert-inline {
    margin: 0 0 18px;
}

.event-form-card {
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
}

.event-form-header {
    margin-bottom: 18px;
}

.event-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.event-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-field-full {
    grid-column: 1 / -1;
}

.event-textarea {
    resize: vertical;
    min-height: 160px;
}

.field-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.event-actions {
    display: flex;
    justify-content: flex-end;
}

.file-input {
    padding: 8px 10px;
}

.event-datetime-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.event-datetime-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.event-datetime-inputs {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(120px, 0.8fr);
    gap: 10px;
}

.image-preview-card {
    position: relative;
    width: min(100%, 320px);
    min-height: 140px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.7);
}

/* Whole image in the preview, like on the event page (posters are often portrait). */
.image-preview-media {
    display: block;
    width: 100%;
    height: 240px;
    object-fit: contain;
}

.image-preview-placeholder {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    color: var(--muted);
    font-size: 0.9rem;
}

.image-preview-card.is-empty .image-preview-media {
    display: none;
}

.image-preview-card.is-empty .image-preview-placeholder {
    display: flex;
}

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

    .event-datetime-grid,
    .event-datetime-inputs {
        grid-template-columns: 1fr;
    }

    .image-preview-card {
        width: 100%;
    }
}

.report-page {
    display: grid;
    gap: 24px;
}

.report-header {
    align-items: end;
}

.report-card {
    overflow: hidden;
}

.report-table-wrap {
    min-width: 0;
}

.report-event-link {
    color: #f8fafc;
    text-decoration: none;
    font-weight: 700;
}

.report-event-link:hover {
    color: #f59e0b;
}

.report-page .dataTables_wrapper {
    display: grid;
    gap: 18px;
    width: 100%;
}

.report-page .report-datatable-toolbar,
.report-page .report-datatable-footer {
    align-items: center;
    display: flex;
    gap: 14px;
    justify-content: space-between;
}

.report-page .report-datatable-toolbar {
    flex-wrap: wrap;
}

.report-page .report-datatable-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.report-page .report-datatable-length {
    flex: 1 1 210px;
}

.report-page .report-datatable-search {
    flex: 1 1 260px;
    text-align: right;
}

.report-page .report-datatable-footer {
    border-top: 1px solid rgba(156, 163, 175, 0.16);
    flex-wrap: wrap;
    padding-top: 14px;
}

.report-page .dataTables_scroll {
    border: 1px solid rgba(156, 163, 175, 0.16);
    border-radius: 14px;
    overflow: hidden;
}

.report-page .dataTables_scrollBody {
    background: rgba(15, 23, 42, 0.3);
}

.report-page .dataTables_scrollBody::-webkit-scrollbar {
    height: 10px;
}

.report-page .dataTables_scrollBody::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.85);
}

.report-page .dataTables_scrollBody::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.58);
    border-radius: 999px;
}

.report-page .table.dataTable,
.report-page table.dataTable {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 0 !important;
}

.report-page table.dataTable thead th,
.report-page table.dataTable tbody td {
    background: transparent !important;
    color: #e5e7eb !important;
    border-bottom: 1px solid rgba(156, 163, 175, 0.18) !important;
}

.report-page table.dataTable thead th {
    background: rgba(15, 23, 42, 0.62) !important;
    color: #f8fafc !important;
    font-size: 0.92rem;
    line-height: 1.2;
    padding: 16px 28px 16px 10px !important;
    white-space: normal;
}

.report-page table.dataTable tbody td {
    padding: 14px 10px !important;
    vertical-align: middle;
}

.report-page .dataTables_wrapper .dataTables_length,
.report-page .dataTables_wrapper .dataTables_filter,
.report-page .dataTables_wrapper .dataTables_info,
.report-page .dataTables_wrapper .dataTables_paginate {
    color: #d1d5db !important;
    float: none !important;
    margin: 0;
    padding: 0;
}

.report-page .dataTables_wrapper .dataTables_filter label,
.report-page .dataTables_wrapper .dataTables_length label {
    align-items: center;
    display: inline-flex;
    gap: 8px;
}

.report-page .dataTables_wrapper .dataTables_filter input,
.report-page .dataTables_wrapper .dataTables_length select {
    background: rgba(15, 23, 42, 0.92) !important;
    border: 1px solid rgba(156, 163, 175, 0.24);
    border-radius: 8px;
    color: #f8fafc !important;
    padding: 8px 10px;
}

.report-page .dataTables_wrapper .dataTables_filter input {
    min-width: 210px;
}

.report-page .dataTables_wrapper .dataTables_length select option {
    background: #0f172a;
    color: #f8fafc;
}

.report-page .dataTables_wrapper .dt-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    float: none !important;
}

.report-page button.dt-button,
.report-page div.dt-button,
.report-page a.dt-button {
    background: linear-gradient(135deg, #f59e0b, #ea580c) !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: #111827 !important;
    font-weight: 700 !important;
    padding: 10px 16px !important;
    box-shadow: none !important;
}

.report-page button.dt-button:hover:not(.disabled),
.report-page div.dt-button:hover:not(.disabled),
.report-page a.dt-button:hover:not(.disabled) {
    background: linear-gradient(135deg, #fbbf24, #f97316) !important;
}

.report-page .dataTables_wrapper .dataTables_paginate .paginate_button {
    border: 1px solid transparent !important;
    border-radius: 8px !important;
    color: #e5e7eb !important;
    margin-left: 2px;
}

.report-page .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: rgba(148, 163, 184, 0.14) !important;
    border-color: rgba(148, 163, 184, 0.24) !important;
    color: #f8fafc !important;
}

.report-page .dataTables_wrapper .dataTables_paginate .paginate_button.current,
.report-page .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: rgba(245, 158, 11, 0.18) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    color: #f8fafc !important;
}

@media (max-width: 768px) {
    .report-page .report-datatable-toolbar,
    .report-page .report-datatable-footer {
        align-items: stretch;
        display: grid;
    }

    .report-page .report-datatable-search,
    .report-page .dataTables_wrapper .dataTables_length,
    .report-page .dataTables_wrapper .dataTables_filter,
    .report-page .dataTables_wrapper .dataTables_info,
    .report-page .dataTables_wrapper .dataTables_paginate {
        text-align: left !important;
    }

    .report-page .dataTables_wrapper .dataTables_filter label,
    .report-page .dataTables_wrapper .dataTables_length label,
    .report-page .dataTables_wrapper .dataTables_filter input,
    .report-page .dataTables_wrapper .dataTables_length select {
        width: 100%;
    }
}

.event-info-link {
    color: #f8fafc;
    text-decoration: underline;
    text-decoration-color: rgba(245, 158, 11, 0.65);
    text-underline-offset: 3px;
    font-weight: 600;
}

.event-info-link:hover {
    color: #fbbf24;
}

.events-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card-link.is-lazy-hidden {
    display: none;
}

.card-link.is-lazy-visible {
    animation: lazyCardReveal 220ms ease;
}

.events-scroll-status {
    display: flex;
    justify-content: center;
    margin-top: 22px;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.events-scroll-status.is-hidden,
.events-scroll-sentinel.is-hidden,
.events-scroll-status.is-finished {
    display: none;
}

.events-scroll-status.is-loading {
    opacity: 0.8;
}

.events-scroll-sentinel {
    width: 100%;
    height: 1px;
}

@keyframes lazyCardReveal {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 960px) {
    .events-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .events-grid {
        grid-template-columns: 1fr;
    }
}



.report-detail-card {
    display: grid;
    gap: 18px;
    overflow: visible;
}

.report-detail-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 420px);
    align-items: start;
    gap: 20px;
}

.report-detail-title {
    margin: 0 0 6px;
    color: #f8fafc;
}

.report-filter-form {
    display: grid;
    gap: 8px;
    min-width: 0;
    width: 100%;
}

.report-filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.report-event-select {
    min-width: 260px;
}

.report-selected-event-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    color: #d1d5db;
}

@media (max-width: 640px) {
    .report-detail-header {
        grid-template-columns: 1fr;
    }

    .report-filter-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .report-event-select {
        min-width: 100%;
    }
}


.report-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.report-tab-btn {
    border: 1px solid rgba(156, 163, 175, 0.24);
    background: rgba(15, 23, 42, 0.6);
    color: #d1d5db;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
}

.report-tab-btn.is-active {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    border-color: transparent;
    color: #111827;
}

.report-tab-panel {
    display: none;
}

.report-tab-panel.is-active {
    display: block;
}


.report-event-search {
    width: 100%;
}


.report-combobox {
    position: relative;
    width: 100%;
}

.report-combobox-trigger {
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.report-combobox-panel[hidden] {
    display: none !important;
}

.report-combobox-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 60;
    background: #0f172a;
    border: 1px solid rgba(156, 163, 175, 0.24);
    border-radius: 14px;
    padding: 10px;
    display: grid;
    gap: 10px;
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.35);
}

.report-combobox-options {
    display: grid;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
}

.report-combobox-option {
    border: 1px solid transparent;
    background: rgba(15, 23, 42, 0.7);
    color: #e5e7eb;
    border-radius: 10px;
    padding: 10px 12px;
    text-align: left;
    cursor: pointer;
}

.report-combobox-option:hover,
.report-combobox-option.is-selected {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.16);
    color: #f8fafc;
}

.report-combobox-empty {
    color: #9ca3af;
    font-size: 0.9rem;
    padding: 4px 2px;
}
.event-map-card {
    margin-top: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.72));
}

.event-map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.event-map-title {
    margin: 0;
    font-size: 1rem;
    color: #f8fafc;
}

.event-map-link {
    color: #7dd3fc;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}

.event-map-link:hover {
    color: #bae6fd;
}

.event-map-frame {
    width: 100%;
    height: 320px;
    border: 0;
    display: block;
    background: #0b1220;
}

@media (max-width: 640px) {
    .event-map-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .event-map-frame {
        height: 260px;
    }
}
.events-toolbar {
    margin: 0 0 22px;
}

.events-search-box {
    width: 100%;
    display: grid;
    gap: 8px;
}

.events-search-input {
    width: 100%;
}

.events-search-hint,
.events-search-empty {
    margin: 0;
    font-size: 0.9rem;
}

.events-search-hint {
    color: var(--muted);
}

.events-search-empty {
    color: #fca5a5;
    margin-top: 18px;
}

.events-search-hint.is-hidden,
.events-search-empty.is-hidden {
    display: none;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(14px);
}

.top-nav-inner {
    padding: 14px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.top-nav-left {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.top-nav-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand {
    color: #f8fafc;
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.1px;
    white-space: nowrap;
}

.menu {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-link {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    color: #dbe4f0;
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 600;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.menu-link:hover {
    border-color: rgba(var(--accent-rgb), 0.18);
    background: rgba(var(--accent-rgb), 0.08);
    color: #f8fafc;
}

.menu-link.is-active {
    border-color: rgba(var(--accent-rgb), 0.22);
    background: rgba(var(--accent-rgb), 0.12);
    color: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-link {
    color: #b9c4d3;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
}

.lang-link.is-active,
.lang-link:hover {
    color: #f8fafc;
}

.lang-divider {
    color: rgba(148, 163, 184, 0.45);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--accent-rgb), 0.08);
}

.user-avatar:hover {
    border-color: rgba(var(--accent-rgb), 0.26);
    background: rgba(var(--accent-rgb), 0.14);
}

.user-dropdown {
    top: calc(100% + 10px);
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: #111827;
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.28);
}

@media (max-width: 640px) {
    .top-nav-inner {
        padding: 12px 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .top-nav-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .top-nav-right {
        margin-left: 0;
        justify-content: space-between;
    }

    .menu {
        flex-wrap: wrap;
    }
}

.site-footer {
    width: 100%;
    margin: 56px 0 28px;
    padding: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.24);
}

.footer-inner-shell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding-top: 20px;
    padding-bottom: 20px;
}

.footer-menu-card {
    width: min(260px, 100%);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    padding: 16px 18px;
}

.footer-menu {
    display: grid;
    gap: 10px;
    justify-items: start;
    text-align: left;
}

.footer-menu-item {
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.3;
    opacity: 0.94;
}

.footer-copy-wrap {
    width: 100%;
    margin-top: 18px;
    display: flex;
    justify-content: center;
    padding-top: 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.14);
}

.footer-copy {
    width: 100%;
    text-align: center;
    color: var(--muted);
    font-size: 0.95rem;
}

@media (max-width: 640px) {
    .site-footer {
        margin: 40px 0 22px;
    }

    .footer-inner-shell {
        padding: 12px 16px;
    }

    .footer-menu-card {
        width: 100%;
    }
}


.booking-paypal-block--auth,
.booking-paypal-block--message {
    background: rgba(15, 23, 42, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
    padding: 18px;
}

.booking-auth-message,
.booking-paypal-block--message .auth-error {
    margin: 0 0 12px;
    color: #dbeafe;
    font-size: 0.98rem;
    line-height: 1.55;
}

.booking-paypal-block--auth .auth-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 112px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.booking-paypal-block--auth .auth-link-btn:hover {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(56, 189, 248, 0.55);
    transform: translateY(-1px);
}
#address-field-wrapper.is-optional .auth-label::after {
    content: ' (optional)';
    color: var(--muted);
    font-weight: 400;
}

.event-access-card {
    margin-top: 20px;
    padding: 18px;
    border-radius: 14px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background: rgba(15, 23, 42, 0.72);
}

.event-access-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border-radius: 10px;
    background: rgba(34, 197, 94, 0.18);
    border: 1px solid rgba(34, 197, 94, 0.38);
    color: #dcfce7;
    font-weight: 700;
    text-decoration: none;
}

.event-access-link:hover {
    background: rgba(34, 197, 94, 0.24);
}

.event-access-note {
    margin: 12px 0 0;
    color: #dbeafe;
    line-height: 1.6;
}


#address-field-wrapper.is-optional .auth-label::after {
    content: '';
}



.footer-menu-link {
    text-decoration: none;
    transition: color 120ms ease, opacity 120ms ease;
}

.footer-menu-link:hover {
    color: #7dd3fc;
    opacity: 1;
}

.legal-page {
    display: grid;
    gap: 22px;
}

.legal-hero {
    display: grid;
    gap: 10px;
    max-width: 760px;
}

.legal-kicker {
    margin: 0;
    color: #7dd3fc;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.legal-subtitle {
    max-width: 760px;
}

.legal-updated {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.legal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.legal-card {
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.legal-card h2 {
    margin: 0 0 10px;
    font-size: 1.05rem;
    color: #f8fafc;
}

.legal-card p {
    margin: 0;
    color: #d1d5db;
    line-height: 1.7;
}

.legal-card-wide {
    max-width: none;
}

@media (max-width: 768px) {
    .legal-grid {
        grid-template-columns: 1fr;
    }
}


.booking-consent {
    width: 100%;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    color: #dbe4f0;
    font-size: 0.92rem;
    line-height: 1.6;
}

.booking-consent input {
    margin-top: 3px;
    accent-color: var(--accent);
}

.booking-consent a {
    color: #7dd3fc;
    text-decoration: none;
    font-weight: 700;
}

.booking-consent a:hover {
    color: #bae6fd;
}

.users-page {
    display: grid;
    gap: 22px;
}

.users-card {
    overflow: hidden;
}

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

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.14);
    text-align: left;
    vertical-align: top;
}

.admin-table th {
    color: #f8fafc;
    font-size: 0.9rem;
}

.admin-table td {
    color: #dbe4f0;
    font-size: 0.92rem;
}

.table-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    border: 1px solid rgba(var(--accent-rgb), 0.2);
    background: rgba(var(--accent-rgb), 0.08);
    color: color-mix(in srgb, var(--accent) 20%, #ffffff);
    font-size: 0.82rem;
    font-weight: 700;
}

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

.admin-actions form {
    margin: 0;
}

.admin-action-link,
.admin-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    cursor: pointer;
}

.admin-action-btn--success:hover {
    border-color: rgba(74, 222, 128, 0.45) !important;
    background: rgba(74, 222, 128, 0.14) !important;
    color: #dcfce7 !important;
}

.admin-action-btn--warn:hover {
    border-color: rgba(251, 191, 36, 0.45) !important;
    background: rgba(251, 191, 36, 0.14) !important;
    color: #fde68a !important;
}

.admin-action-btn--info:hover {
    border-color: rgba(56, 189, 248, 0.5) !important;
    color: #bae6fd !important;
}

.users-form-card {
    max-width: 720px;
}

.check-in-card {
    display: grid;
    gap: 22px;
}

.check-in-dashboard {
    display: grid;
    gap: 1rem;
    margin: 20px 0 22px;
    padding: 18px;
    border: 1px solid rgba(var(--accent-rgb), 0.18);
    border-radius: 18px;
    background:
        radial-gradient(circle at top right, rgba(var(--accent-rgb), 0.18), transparent 30%),
        rgba(15, 23, 42, 0.5);
}

.check-in-dashboard-header {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
}

.check-in-dashboard-header h2 {
    margin: 0 0 0.35rem;
    color: var(--text);
    font-size: 1.15rem;
}

.check-in-dashboard-header p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.check-in-dashboard-actions {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: center;
    justify-content: flex-end;
}

.check-in-dashboard-actions > strong {
    flex: 0 0 auto;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(var(--accent-rgb), 0.14);
    color: color-mix(in srgb, var(--accent) 40%, #ffffff);
    font-size: 1.25rem;
}

.check-in-export-btn {
    background: #38bdf8;
}

.check-in-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.check-in-dashboard-stats article {
    padding: 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.22);
}

.check-in-dashboard-stats span {
    display: block;
    margin-bottom: 0.3rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.check-in-dashboard-stats strong {
    color: var(--text);
    font-size: 1.25rem;
}

.check-in-event-list {
    display: grid;
    gap: 0.65rem;
}

.check-in-event-row {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(180px, 0.8fr);
    gap: 0.85rem;
    align-items: center;
    padding: 0.8rem;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.44);
}

.check-in-event-meta a {
    display: inline-block;
    margin-bottom: 0.25rem;
    color: #f8fafc;
    font-weight: 800;
    text-decoration: none;
}

.check-in-event-meta span {
    display: block;
    color: var(--muted);
    font-size: 0.86rem;
}

.check-in-event-progress {
    display: grid;
    gap: 0.35rem;
}

.check-in-progress-track {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.2);
}

.check-in-progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), #38bdf8);
}

.check-in-event-progress strong {
    color: color-mix(in srgb, var(--accent) 20%, #ffffff);
    text-align: right;
    font-size: 0.88rem;
}

.deleted-events-page {
    display: grid;
    gap: 1.25rem;
}

.deleted-events-list {
    display: grid;
    gap: 0.85rem;
}

.deleted-event-card {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.84), rgba(30, 41, 59, 0.62));
}

.deleted-event-card h2 {
    margin: 0 0 0.4rem;
    color: var(--text);
    font-size: 1.05rem;
}

.deleted-event-card p {
    margin: 0.2rem 0;
    color: var(--muted);
}

.check-in-input {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.check-in-scanner-panel {
    margin-bottom: 22px;
    padding: 18px;
    border: 1px solid rgba(56, 189, 248, 0.16);
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.42);
}

.check-in-scanner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.check-in-camera-hint {
    margin-top: 12px;
}

.check-in-camera-status {
    margin: 12px 0 0;
    color: #bae6fd;
    font-size: 0.92rem;
}

.check-in-camera-reader {
    margin-top: 16px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: #020617;
}

.check-in-camera-reader video {
    border-radius: 16px;
}

.check-in-result {
    margin-top: 22px;
}

.check-in-warning {
    margin: 0 0 16px;
    color: #fde68a;
    font-weight: 700;
}

.check-in-result-card {
    padding: 18px;
}

.check-in-result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}

.check-in-detail-label {
    display: block;
    margin-bottom: 4px;
    color: #94a3b8;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.check-in-result-grid strong {
    color: #f8fafc;
    font-size: 0.96rem;
    line-height: 1.45;
}

.users-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 768px) {
    .admin-table {
        min-width: 760px;
    }

    .check-in-result-grid {
        grid-template-columns: 1fr;
    }

    .check-in-dashboard-stats,
    .check-in-event-row {
        grid-template-columns: 1fr;
    }

    .check-in-event-progress strong {
        text-align: left;
    }

    .deleted-event-card {
        align-items: stretch;
        flex-direction: column;
    }
}

.users-lock-meta {
    margin-top: 8px;
    color: #fbbf24;
    font-size: 0.82rem;
    font-weight: 600;
}

.admin-dashboard-page {
    display: grid;
    gap: 22px;
}

.admin-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.admin-dashboard-stats article,
.admin-dashboard-panel {
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.92), rgba(15, 23, 42, 0.92));
}

.admin-dashboard-stats article {
    padding: 18px;
}

.admin-dashboard-stats span {
    display: block;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-dashboard-stats strong {
    color: #f8fafc;
    font-size: 1.45rem;
}

.admin-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.admin-dashboard-panel h2 {
    margin: 0 0 14px;
    color: #f8fafc;
    font-size: 1.1rem;
}

.admin-dashboard-list {
    display: grid;
    gap: 10px;
}

.admin-dashboard-list a {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.5);
    color: inherit;
    text-decoration: none;
}

.admin-dashboard-list a:hover {
    border-color: rgba(var(--accent-rgb), 0.4);
}

.admin-dashboard-list span {
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-dashboard-danger {
    border-color: rgba(248, 113, 113, 0.26);
}

.admin-dashboard-cleanup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
}

.admin-dashboard-cleanup-actions form {
    margin: 0;
}

.ticket-export-link {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.ticket-resend-form {
    margin: 0;
}

.ticket-resend-form .ticket-export-btn {
    width: 100%;
}

@media (max-width: 780px) {
    .admin-dashboard-stats,
    .admin-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   FOCUS STATES
   ===================================================== */

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

button:focus-visible,
.book-btn:focus-visible,
.admin-event-btn:focus-visible,
.auth-link-btn:focus-visible,
.menu-link:focus-visible,
.user-avatar:focus-visible,
.report-tab-btn:focus-visible,
.ticket-export-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* =====================================================
   INPUT IMPROVEMENTS
   ===================================================== */

::placeholder {
    color: var(--muted);
    opacity: 0.65;
}

.auth-input:focus,
.seats-input:focus,
.donation-input:focus,
.events-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

/* =====================================================
   ALERT BOXES
   ===================================================== */

.auth-error {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(248, 113, 113, 0.3);
    background: rgba(127, 29, 29, 0.18);
    color: #fca5a5;
}

.auth-info {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.28);
    background: rgba(12, 74, 110, 0.22);
    color: #93c5fd;
}

/* =====================================================
   BUTTON VARIANTS
   ===================================================== */

.book-btn {
    transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.book-btn:hover:not(:disabled) {
    opacity: 0.88;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.25);
}

.event-edit-btn {
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.32);
    color: #e0f2fe;
}

.event-edit-btn:hover {
    background: rgba(56, 189, 248, 0.28);
    border-color: rgba(125, 211, 252, 0.5);
    color: #f8fafc;
}

.event-duplicate-btn {
    background: rgba(148, 163, 184, 0.14);
    border: 1px solid rgba(148, 163, 184, 0.28);
    color: #e2e8f0;
}

.event-duplicate-btn:hover {
    background: rgba(148, 163, 184, 0.22);
    border-color: rgba(203, 213, 225, 0.45);
    color: #f8fafc;
}

.event-delete-btn:hover {
    background: #ef4444;
    transform: translateY(-1px);
}

/* =====================================================
   EVENT CARDS
   ===================================================== */

.card .title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Whole image inside a fixed frame, so portrait posters are not cropped and cards stay equal. */
.card .event-image {
    aspect-ratio: 4 / 3;
    height: auto;
    object-fit: contain;
    background: var(--bg);
}

.card .event-image-placeholder {
    aspect-ratio: 4 / 3;
    height: auto;
    min-height: 120px;
}

.card-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.88rem;
    margin: 4px 0 8px;
    line-height: 1.5;
}

/* =====================================================
   EVENTS GRID: tablet breakpoint (3 → 2 col)
   ===================================================== */

@media (max-width: 768px) {
    .events-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =====================================================
   LAZY CARD SKELETON
   ===================================================== */

.card-link.is-lazy-loading .card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.card-link.is-lazy-loading .card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(148, 163, 184, 0.06) 50%,
        transparent 100%
    );
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    from { transform: translateX(-100%); }
    to   { transform: translateX(100%); }
}

/* =====================================================
   MISC POLISH
   ===================================================== */

.back-link {
    transition: color 0.15s ease, transform 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.back-link:hover {
    color: color-mix(in srgb, var(--accent) 80%, #ffffff);
}

.admin-action-btn {
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    border: 1px solid rgba(56, 189, 248, 0.3);
    background: rgba(56, 189, 248, 0.1);
    color: #7dd3fc;
}

.admin-action-btn:hover {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.5);
    color: #e0f2fe;
}

.admin-action-btn--danger {
    border-color: rgba(248, 113, 113, 0.3);
    background: rgba(248, 113, 113, 0.1);
    color: #fca5a5;
}

.admin-action-btn--danger:hover {
    background: rgba(248, 113, 113, 0.2);
    border-color: rgba(248, 113, 113, 0.55);
    color: #fecaca;
}

.admin-action-link {
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    background: rgba(var(--accent-rgb), 0.1);
    color: color-mix(in srgb, var(--accent) 60%, #ffffff);
}

.admin-action-link:hover {
    background: rgba(var(--accent-rgb), 0.2);
    border-color: rgba(var(--accent-rgb), 0.5);
    color: color-mix(in srgb, var(--accent) 20%, #ffffff);
}

.card {
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.card-link:hover .card {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}

.pill {
    transition: background 0.15s ease;
}

/* =====================================================
   ADMIN LAYOUT — sidebar + main shell
   ===================================================== */

.admin-body {
    margin: 0;
    overflow: hidden;
    height: 100dvh;
    background: var(--bg);
}

.admin-shell {
    display: flex;
    height: 100dvh;
}

/* --- Sidebar --- */

.admin-sidebar {
    width: 220px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    position: sticky;
    top: 0;
    background: #080e1a;
    border-right: 1px solid rgba(148, 163, 184, 0.1);
    overflow: hidden;
    transition: width 0.2s ease;
    z-index: 40;
}

.admin-sidebar.is-collapsed {
    width: 52px;
}

.admin-sidebar.is-collapsed .admin-sidebar-label {
    display: none;
}

.admin-sidebar.is-collapsed .admin-sidebar-arrow {
    transform: rotate(180deg);
}

.admin-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    height: 52px;
    padding: 0 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    flex-shrink: 0;
}

.admin-sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #f8fafc;
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.admin-sidebar-toggle {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 7px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-sidebar-toggle:hover {
    background: rgba(148, 163, 184, 0.1);
    color: #f8fafc;
}

.admin-sidebar-arrow {
    width: 14px;
    height: 14px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.admin-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.12s ease, color 0.12s ease;
    min-width: 0;
}

.admin-nav-link:hover {
    background: rgba(148, 163, 184, 0.08);
    color: #f8fafc;
}

.admin-nav-link.is-active {
    background: rgba(var(--accent-rgb), 0.14);
    color: var(--accent);
}

.admin-nav-link--muted {
    color: rgba(148, 163, 184, 0.5);
}

.admin-nav-link--muted:hover {
    color: #f8fafc;
}

.admin-nav-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.admin-nav-sep {
    padding: 14px 10px 4px;
    color: rgba(148, 163, 184, 0.35);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
    overflow: hidden;
}

.admin-sidebar-footer {
    flex-shrink: 0;
    padding: 10px 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.admin-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    color: var(--muted);
    font-size: 0.82rem;
    min-width: 0;
}

.admin-sidebar-username {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-sidebar-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: 7px;
    color: #fca5a5;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.12s ease;
    white-space: nowrap;
}

.admin-sidebar-logout:hover {
    background: rgba(248, 113, 113, 0.1);
}

/* --- Main content area --- */

.admin-main {
    flex: 1;
    min-width: 0;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    background: radial-gradient(circle at top right, #1e293b 0%, var(--bg) 45%, var(--bg-2) 100%);
    display: flex;
    flex-direction: column;
}

.admin-content {
    flex: 1;
    padding: 28px 32px 48px;
}

.admin-content .wrapper {
    padding: 0;
    max-width: none;
    margin: 0;
}

/* --- Topbar --- */

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 52px;
    padding: 0 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    background: rgba(8, 14, 26, 0.6);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 30;
    flex-shrink: 0;
}

.admin-topbar-left {
    min-width: 0;
}

.admin-topbar-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.admin-topbar-user {
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-topbar-logout {
    font-size: 0.88rem;
    font-weight: 600;
    color: #fca5a5;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 7px;
    border: 1px solid rgba(248, 113, 113, 0.22);
    transition: background 0.12s ease;
}

.admin-topbar-logout:hover {
    background: rgba(248, 113, 113, 0.12);
}

/* --- Admin Events List --- */

.admin-events-page {
    display: grid;
    gap: 20px;
    padding-top: 0;
}

.admin-events-table {
    min-width: 760px;
}

.admin-events-title-link {
    color: #f8fafc;
    text-decoration: none;
    font-weight: 600;
}

.admin-events-title-link:hover {
    color: var(--accent);
}

.admin-events-date {
    white-space: nowrap;
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-events-capacity {
    white-space: nowrap;
    font-size: 0.9rem;
}

/* Section titles must not be squeezed when the menu is taller than the screen (it scrolls instead). */
.admin-sidebar-nav > * {
    flex-shrink: 0;
}

.admin-menu-btn {
    display: none;
}

.admin-topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Phones: the sidebar is a drawer opened from the topbar button. */
@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: min(280px, 85vw);
        z-index: 50;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 0.2s ease, visibility 0s linear 0.2s;
    }

    .admin-sidebar.is-mobile-open {
        transform: none;
        visibility: visible;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
        transition: transform 0.2s ease;
    }

    .admin-sidebar .admin-sidebar-label {
        display: inline;
    }

    .admin-sidebar-toggle {
        width: 44px;
        height: 44px;
    }

    .admin-backdrop {
        position: fixed;
        inset: 0;
        z-index: 45;
        background: rgba(2, 6, 23, 0.6);
    }

    .admin-backdrop[hidden] {
        display: none;
    }

    .admin-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        margin-left: -10px;
        border: 0;
        border-radius: 8px;
        background: transparent;
        color: #f8fafc;
        cursor: pointer;
    }

    .admin-menu-btn svg {
        width: 22px;
        height: 22px;
    }

    .admin-menu-btn:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
    }

    .admin-topbar-user {
        display: none;
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-content {
        padding: 20px 16px 40px;
    }

    .admin-topbar {
        padding: 0 16px;
    }
}

/* =====================================================
   ADMIN EVENTS — inline status select
   ===================================================== */

.admin-status-select {
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.74rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: var(--surface);
    color: #f8fafc;
    cursor: pointer;
}

.admin-status-select.status-active   { background: #16a34a; border-color: transparent; }
.admin-status-select.status-inactive { background: #d97706; border-color: transparent; }
.admin-status-select.status-cancelled{ background: #dc2626; border-color: transparent; }

/* =====================================================
   BULK ACTION BAR
   ===================================================== */

.bulk-bar {
    display: none;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 16px;
    margin-bottom: 12px;
    background: rgba(var(--accent-rgb), 0.08);
    border: 1px solid rgba(var(--accent-rgb), 0.24);
    border-radius: 12px;
    color: var(--text);
    font-size: 0.9rem;
}

.bulk-bar.is-visible { display: flex; }

.bulk-checkbox {
    width: 16px;
    height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* =====================================================
   ADMIN TICKETS PAGE
   ===================================================== */

.admin-tickets-page {
    display: grid;
    gap: 20px;
    padding-top: 0;
}

.admin-tickets-table {
    min-width: 700px;
}

.admin-ticket-code {
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    color: #93c5fd;
}

.admin-ticket-row--cancelled td {
    opacity: 0.5;
}

/* =====================================================
   VIEW TOGGLE (grid / calendar)
   ===================================================== */

.events-toolbar {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 22px;
}

.events-search-box {
    flex: 1;
}

.view-toggle {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    padding-top: 2px;
}

.view-toggle-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(148, 163, 184, 0.08);
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.view-toggle-btn:hover {
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.38);
}

.view-toggle-btn.is-active {
    background: rgba(var(--accent-rgb), 0.16);
    border-color: rgba(var(--accent-rgb), 0.36);
    color: var(--accent);
}

/* =====================================================
   CALENDAR
   ===================================================== */

.calendar-wrap {
    margin-bottom: 32px;
}

.cal-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.cal-month-title {
    margin: 0;
    font-size: 1.1rem;
    color: #f8fafc;
    flex: 1;
    text-align: center;
}

.cal-nav-btn {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 8px;
    color: var(--text);
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background 0.15s ease;
}

.cal-nav-btn:hover { background: rgba(148, 163, 184, 0.2); }

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
}

.cal-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    padding: 6px 0 10px;
}

.cal-cell {
    min-height: 90px;
    padding: 6px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.1);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cal-cell--empty { background: transparent; border-color: transparent; }

.cal-cell--today { border-color: rgba(var(--accent-rgb), 0.4); background: rgba(var(--accent-rgb), 0.06); }

.cal-day-num {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 600;
    align-self: flex-end;
}

.cal-cell--today .cal-day-num { color: var(--accent); }

.cal-event {
    display: block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: rgba(var(--accent-rgb), 0.18);
    color: color-mix(in srgb, var(--accent) 60%, #ffffff);
    border: 1px solid rgba(var(--accent-rgb), 0.25);
    transition: background 0.12s ease;
}

.cal-event:hover { background: rgba(var(--accent-rgb), 0.28); }
.cal-event--inactive { background: rgba(217, 119, 6, 0.15); color: #fbbf24; border-color: rgba(217, 119, 6, 0.25); }
.cal-event--cancelled { background: rgba(220, 38, 38, 0.12); color: #fca5a5; border-color: rgba(220, 38, 38, 0.22); }

@media (max-width: 640px) {
    .cal-cell { min-height: 56px; padding: 4px; }
    .cal-event { font-size: 0.65rem; }
}

/* =====================================================
   CATEGORY FILTER PILLS
   ===================================================== */

.category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background: rgba(148, 163, 184, 0.08);
    color: var(--muted);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.category-pill:hover {
    color: #f8fafc;
    border-color: rgba(148, 163, 184, 0.4);
    background: rgba(148, 163, 184, 0.14);
}

.category-pill.is-active {
    background: rgba(var(--cat-color, 20 184 166) / 0.18);
    border-color: var(--cat-color, var(--accent));
    color: var(--cat-color, var(--accent));
}

/* Admin categories page */
.admin-categories-page {
    display: grid;
    gap: 20px;
    padding-top: 0;
}



/* =====================================================
   SOCIAL SHARE
   ===================================================== */

.event-show-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 4px;
}

.social-share {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: rgba(148, 163, 184, 0.08);
    color: var(--muted);
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.social-share-btn:hover { color: #f8fafc; background: rgba(148,163,184,0.18); }
.social-share-btn--fb:hover  { background: rgba(59,89,152,0.3); color: #93c5fd; }
.social-share-btn--wa:hover  { background: rgba(37,211,102,0.2); color: #86efac; }
.social-share-btn--x:hover   { background: rgba(255,255,255,0.1); color: #f8fafc; }

/* =====================================================
   BOOKING SUCCESS PAGE
   ===================================================== */

.booking-success-page {
    max-width: 560px;
    margin: 40px auto;
    text-align: center;
    display: grid;
    gap: 24px;
}

.booking-success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(var(--accent-rgb), 0.18);
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.booking-success-title {
    font-size: 1.6rem;
    color: #f8fafc;
}

.booking-success-event {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px 20px;
    display: grid;
    gap: 4px;
}

.booking-success-tickets {
    display: grid;
    gap: 8px;
}

.booking-success-code {
    display: block;
    padding: 8px 14px;
    background: rgba(15,23,42,0.7);
    border: 1px solid rgba(148,163,184,0.18);
    border-radius: 8px;
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    color: #93c5fd;
}

.booking-success-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* =====================================================
   ANALYTICS PAGE
   ===================================================== */

.analytics-page {
    display: grid;
    gap: 20px;
    padding-top: 0;
}

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

.analytics-card { padding: 18px; }
.analytics-card--full { grid-column: 1 / -1; }

.analytics-title {
    margin: 0 0 16px;
    font-size: 0.95rem;
    color: #f8fafc;
    font-weight: 700;
}

.analytics-check-in-list { display: grid; gap: 10px; }

.analytics-ci-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(120px, 180px) 90px;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
}

.analytics-ci-title {
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analytics-ci-bar-wrap {
    height: 8px;
    background: rgba(148,163,184,0.12);
    border-radius: 999px;
    overflow: hidden;
}

.analytics-ci-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #38bdf8);
    border-radius: inherit;
    transition: width 0.4s ease;
}

.analytics-ci-label { color: var(--muted); font-size: 0.82rem; text-align: right; }

@media (max-width: 768px) {
    .analytics-grid { grid-template-columns: 1fr; }
    .analytics-ci-row { grid-template-columns: 1fr auto; }
    .analytics-ci-bar-wrap { display: none; }
}

/* Discount code + waiting list */
.donation-discount-field { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0; }
.donation-discount-field .discount-input { width: 180px; text-transform: uppercase; }
.donation-discount-field .auth-link-btn { width: auto; }
.donation-discount-field #discount-message { flex-basis: 100%; margin: 0; }
.waitlist-box form { margin-top: 10px; }
.users-bulk-form { display: flex; gap: 8px; margin-bottom: 12px; align-items: center; }
.users-bulk-select { max-width: 240px; }

/* Filters, cookie notice */
.events-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 12px 0; }
.events-filters .auth-input { width: auto; min-width: 140px; }
.events-filters label.meta { display: flex; flex-direction: column; gap: 4px; }
.cookie-notice { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 50; max-width: 720px; margin: 0 auto; display: flex; gap: 16px; align-items: center; padding: 14px 18px; border: 1px solid var(--border, #334155); border-radius: 14px; background: rgba(15, 23, 42, 0.96); color: #e2e8f0; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4); }
.cookie-notice[hidden] { display: none; }
.cookie-notice p { margin: 0; font-size: 0.9rem; line-height: 1.5; }
.cookie-notice a { color: color-mix(in srgb, var(--accent) 60%, #ffffff); }
.cookie-notice .auth-link-btn { flex-shrink: 0; width: auto; }
@media print { .cookie-notice { display: none; } }

/* Donation goal, check-in search */
.donation-goal { margin: 12px 0; }
.donation-goal-bar { height: 10px; border-radius: 999px; background: rgba(148, 163, 184, 0.25); overflow: hidden; }
.donation-goal-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #22c55e); }
.check-in-search { margin: 16px 0; }
.check-in-search-results { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.check-in-search-results li { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 8px 12px; border: 1px solid var(--border, #334155); border-radius: 10px; font-size: 0.88rem; }
.check-in-search-results .auth-link-btn { width: auto; }

/* Installer */
.install-card { max-width: 640px; }
.install-card h2 { font-size: 1.05rem; margin: 18px 0 8px; }
.install-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.install-check { display: grid; grid-template-columns: 22px 1fr; gap: 2px 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; }
.install-check .meta { grid-column: 2; word-break: break-word; }
.install-check-mark { font-weight: 700; }
.install-check.is-ok .install-check-mark { color: var(--accent); }
.install-check.is-warning .install-check-mark { color: #f59e0b; }
.install-check.is-error { border-color: #ef4444; }
.install-check.is-error .install-check-mark { color: #ef4444; }

/* Accessibility and touch targets */
input,
select,
textarea {
    font-size: 16px;
}

:focus-visible,
.auth-input:focus-visible,
.seats-input:focus-visible,
.donation-input:focus-visible,
.events-search-input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.view-toggle-btn {
    width: 44px;
    height: 44px;
}

.lang-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
}

@media (max-width: 768px) {
    input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    select,
    button,
    .book-btn,
    .auth-link-btn {
        min-height: 44px;
    }
}

.password-field {
    position: relative;
}

.password-field .auth-input {
    width: 100%;
    padding-right: 104px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 4px;
    transform: translateY(-50%);
    min-height: 36px;
    padding: 0 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--accent);
    font: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Links inside running text: readable on the dark background. */
main p a:not([class]),
main li a:not([class]) {
    color: var(--accent);
    text-decoration: underline;
}

.social-share-btn {
    min-width: 44px;
    min-height: 44px;
}

@media (max-width: 768px) {
    .brand,
    .menu-link,
    .footer-menu-link {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}

/* Touch targets: links and small buttons found in the logged-in pages. */
.brand,
.footer-menu-link,
.back-link,
.event-map-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

input[name="accept_terms"],
input[name="newsletter_opt_in"],
input[name="test_only"] {
    width: 20px;
    height: 20px;
}

@media (max-width: 768px) {
    .category-pill,
    .ticket-export-btn,
    .auth-link-btn {
        min-height: 44px;
    }
}

.ticket-picker-select {
    font-size: 16px;
}

/* Admin: larger checkboxes and touch targets on phones. */
.bulk-checkbox,
.bulk-check,
.users-select-all,
.users-select-row,
.event-form-grid input[type="checkbox"] {
    width: 20px;
    height: 20px;
}

.admin-sidebar-brand {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

@media (max-width: 768px) {
    .admin-nav-link,
    .admin-sidebar-logout,
    .admin-topbar-logout,
    .admin-action-btn,
    .admin-action-link,
    .admin-event-btn,
    .report-event-link,
    .paginate_button {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}

/* Sign in with Google */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 0 12px;
    color: var(--muted);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #dadce0;
    background: #ffffff;
    color: #1f1f1f;
    font-weight: 600;
    text-decoration: none;
}

.google-btn:hover {
    background: #f1f3f4;
}

/* Save to Google Wallet: Google's badge style (black pill, wallet icon, white text). */
.wallet-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 16px 8px 12px;
    border-radius: 999px;
    border: 1px solid #5f6368;
    background: #000000;
    color: #ffffff;
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.wallet-btn:hover,
.wallet-btn:focus-visible {
    background: #202124;
    border-color: #9aa0a6;
    color: #ffffff;
}

.wallet-btn-icon {
    width: 26px;
    height: 21px;
    flex-shrink: 0;
}

/* Admin: per-event ticket stats */
.ticket-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.ticket-stats article {
    padding: 14px 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(31, 41, 55, 0.92), rgba(15, 23, 42, 0.92));
}

.ticket-stats span {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.ticket-stats strong {
    color: #f8fafc;
    font-size: 1.5rem;
}

.ticket-stats small {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.ticket-stats .is-full strong {
    color: #f87171;
}

.ticket-fill {
    margin-bottom: 20px;
}

.ticket-fill-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.85rem;
}

.ticket-fill-label strong {
    color: #f8fafc;
}

.ticket-fill-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
}

.ticket-fill-bar span {
    display: block;
    height: 100%;
    border-radius: 999px;
    background: var(--accent);
}

/* Report: seats per event (stacked: checked in / booked / free). Blues validated as an ordinal pair on the dark card. */
.seat-chart {
    margin-bottom: 20px;
}

.seat-chart h2 {
    margin: 0 0 10px;
    color: #f8fafc;
    font-size: 1.05rem;
}

.seat-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: 0.85rem;
}

.seat-chart-legend li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.seat-chart-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.seat-chart-rows {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.seat-chart-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(140px, 260px) 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 6px 8px;
    border-radius: 8px;
    outline: none;
}

.seat-chart-row:hover,
.seat-chart-row:focus-visible {
    background: rgba(148, 163, 184, 0.08);
}

.seat-chart-row:focus-visible {
    box-shadow: 0 0 0 2px var(--accent);
}

.seat-chart-label {
    overflow: hidden;
    color: #e5e7eb;
    font-size: 0.9rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seat-chart-label small {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
}

.seat-chart-bar {
    display: flex;
    gap: 2px;
    height: 14px;
}

.seat-chart-bar .seg {
    min-width: 2px;
}

.seat-chart-bar .seg:first-child {
    border-radius: 4px 0 0 4px;
}

.seat-chart-bar .seg:last-child {
    border-radius: 0 4px 4px 0;
}

.seat-chart-bar .seg:only-child {
    border-radius: 4px;
}

.seg--in {
    background: #3987e5;
}

.seg--booked {
    background: #86b6ef;
}

.seg--free {
    background: rgba(148, 163, 184, 0.22);
}

.seat-chart-value {
    color: #e5e7eb;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.seat-chart-tip {
    position: absolute;
    z-index: 20;
    top: calc(100% - 2px);
    left: 50%;
    display: none;
    gap: 4px;
    min-width: 200px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 10px;
    background: #0f172a;
    color: #e5e7eb;
    font-size: 0.85rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    pointer-events: none;
}

.seat-chart-tip > span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.seat-chart-row:hover .seat-chart-tip,
.seat-chart-row:focus-visible .seat-chart-tip {
    display: grid;
}

@media (max-width: 640px) {
    .seat-chart-row {
        grid-template-columns: 1fr auto;
    }

    .seat-chart-bar {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .seat-chart-tip {
        left: 8px;
    }
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
}

.contact-details {
    display: grid;
    gap: 6px;
    margin: 12px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    list-style: none;
    color: var(--text);
}

.contact-details a {
    color: var(--accent);
}

/* Admin: site settings. One column on phones/tablets; on wide screens Appearance takes two thirds
   and Contact + Company stack in the last third. */
.settings-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

@media (min-width: 1100px) {
    .settings-form {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }
}

.settings-form > .card,
.settings-side {
    min-width: 0;
}

.settings-side {
    display: grid;
    gap: 16px;
    align-content: start;
}

.settings-form > .auth-submit,
.settings-form > input[type="hidden"] {
    grid-column: 1 / -1;
}

.settings-form .card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px;
}

.settings-form .auth-label {
    margin-top: 6px;
}

.settings-form .auth-input {
    width: 100%;
    box-sizing: border-box;
}

.settings-form input[type="file"].auth-input {
    padding: 8px;
    color: var(--muted);
}

.settings-form .field-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.settings-form h2 {
    margin: 0 0 8px;
    color: #f8fafc;
    font-size: 1.05rem;
}

.settings-color {
    width: 72px;
    height: 44px;
    padding: 2px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    cursor: pointer;
}

.settings-preview {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 4px 0 8px;
}

.settings-preview img {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #000000;
    object-fit: contain;
}

.settings-preview-link {
    display: inline-flex;
    border-radius: 8px;
    cursor: zoom-in;
}

.settings-preview-link:hover img {
    border-color: var(--accent);
}

/* Lightbox for images opened from links with data-lightbox */
.lightbox {
    max-width: min(92vw, 900px);
    max-height: 92vh;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #000000;
    cursor: zoom-out;
}

.lightbox::backdrop {
    background: rgba(2, 6, 23, 0.82);
}

.lightbox img {
    display: block;
    max-width: 100%;
    max-height: 88vh;
    margin: auto;
    object-fit: contain;
}

/* Admin: edit About / GDPR / Terms / Privacy */
.page-edit-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    margin-top: 12px;
}

@media (min-width: 1100px) {
    .page-edit-grid {
        grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    }
}

.settings-form-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    padding: 20px;
}

.settings-form-card h2,
.page-edit-help h2 {
    margin: 0 0 8px;
    color: #f8fafc;
    font-size: 1.05rem;
}

.settings-form-card .auth-input {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.page-body-input {
    min-height: 420px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 0.92rem;
    line-height: 1.6;
    resize: vertical;
}

.page-edit-actions {
    margin-top: 8px;
}

.page-edit-help {
    min-width: 0;
    padding: 20px;
}

.page-edit-help dl {
    display: grid;
    gap: 4px 0;
    margin: 0 0 16px;
}

.page-edit-help dt code {
    color: var(--accent);
    font-size: 0.88rem;
}

.page-edit-help dd {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 0.85rem;
}

.legal-card ul {
    margin: 0 0 12px;
    padding-left: 20px;
}

.legal-card a {
    color: var(--accent);
}

.admin-table .status {
    white-space: nowrap;
}

/* Admin → Security */
.admin-security-page .card {
    margin-bottom: 20px;
    overflow-x: auto;
}

.admin-security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
    gap: 20px;
}

.admin-security-heading {
    margin: 0 0 14px;
    font-size: 1rem;
    color: #f8fafc;
}

.admin-security-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.admin-security-heading-row .admin-security-heading {
    margin: 0;
}

.admin-security-form {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.admin-security-form .auth-input {
    flex: 1 1 140px;
    min-width: 0;
    margin: 0;
}
