/* =============================================================================
   star8892 — ADMIN STYLES (linked in App.razor after site.css and public.css).
   The admin pages have no top bar: a full-height sidebar is the main menu.
   Menu rows reuse .a88-events-nav / .a88-events-nav-item from site.css.
   ============================================================================= */

.a88-admin-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    min-height: 100vh;
    align-items: start;
}

/* ── Sidebar: brand / scrolling menu / pinned footer ───────────────────── */

.a88-admin-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--a88-surface);
    border-right: 1px solid var(--a88-line);
    padding-top: env(safe-area-inset-top, 0px);
}

/* The top bar and drawer wrappers only matter on phones; on desktop they don't change the layout. */
.a88-admin-bar {
    display: contents;
}

.a88-admin-burger,
.a88-admin-scrim {
    display: none;
}

.a88-admin-drawer {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.a88-admin-brand {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--a88-line);
    color: var(--a88-text);
    text-decoration: none;
    flex-shrink: 0;
}

    .a88-admin-brand img {
        height: 44px;
        width: auto;
        border-radius: 8px;
    }

    .a88-admin-brand span {
        display: flex;
        flex-direction: column;
        line-height: 1.1;
    }

    .a88-admin-brand strong {
        font-family: var(--a88-font-display);
        font-size: 1.2rem;
        font-weight: 700;
    }

    .a88-admin-brand small {
        margin-top: .2rem;
        font-size: .72rem;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--a88-accent);
    }

.a88-admin-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 1rem .75rem .5rem;
    scrollbar-width: thin;
    scrollbar-color: var(--a88-line) transparent;
}

.a88-admin-group {
    margin: 1rem .6rem .35rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--a88-text-muted);
}

.a88-admin-badge,
.a88-admin-sa {
    margin-left: auto;
    border-radius: 50px;
    font-size: .7rem;
    font-weight: 700;
    padding: .05rem .5rem;
    white-space: nowrap;
}

.a88-admin-badge {
    background: var(--a88-gold);
    color: var(--a88-on-gold);
}

.a88-admin-sa {
    background: rgba(var(--a88-accent-rgb), .14);
    color: var(--a88-accent);
}

.a88-events-nav-item.active .a88-admin-sa {
    background: rgba(255, 255, 255, .25);
    color: #fff;
}

/* Footer: profile + back to site / theme / log out */
.a88-admin-foot {
    flex-shrink: 0;
    border-top: 1px solid var(--a88-line);
    padding: .75rem .75rem calc(.75rem + env(safe-area-inset-bottom, 0px));
}

    .a88-admin-foot .a88-events-nav {
        margin-bottom: 0;
    }

    /* Theme / Log out are <button>s: site.css already resets them (button.a88-events-nav-item),
       so only match the link rows' text size. Don't set a background here - it would beat :hover. */
    .a88-admin-foot button.a88-events-nav-item {
        font-weight: 600;
        font-size: .95rem;
    }

.a88-admin-me {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .4rem .6rem .75rem;
    color: var(--a88-text);
    font-weight: 700;
    text-decoration: none;
    min-width: 0;
}

    .a88-admin-me img {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        object-fit: cover;
        flex-shrink: 0;
    }

    .a88-admin-me span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

/* ── Page column ───────────────────────────────────────────────────────── */

.a88-admin-main {
    min-width: 0;
    padding: 1.75rem 2rem 3rem;
}

    /* Dashboards were built as centered pages; inside the shell they just fill the column. */
    .a88-admin-main .a88-dash {
        max-width: 1100px;
        margin: 0;
        padding: 0;
    }

/* ── Placeholder page ──────────────────────────────────────────────────── */

.a88-admin-actions {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

    .a88-admin-actions li {
        display: flex;
        align-items: center;
        gap: .65rem;
        padding: .6rem .75rem;
        border: 1px solid var(--a88-line);
        border-radius: 10px;
        background: var(--a88-surface-alt);
        font-weight: 600;
        font-size: .92rem;
    }

        .a88-admin-actions li::before {
            content: "✓";
            font-weight: 700;
            color: var(--a88-accent);
        }

.a88-admin-empty {
    border: 2px dashed var(--a88-line);
    border-radius: var(--a88-radius);
    padding: 2rem 1rem;
    text-align: center;
    color: var(--a88-text-muted);
}

/* ── Phones: sidebar becomes a block on top; each menu group scrolls sideways ── */

@media (max-width: 900px) {
    .a88-admin-shell {
        grid-template-columns: 1fr;
    }

    /* Sidebar becomes a slim top bar (logo + menu button); the menu opens as a drawer under it. */
    .a88-admin-sidebar {
        position: sticky;
        top: 0;
        z-index: 50;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--a88-line);
    }

    .a88-admin-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .5rem;
        padding-right: .75rem;
    }

    .a88-admin-brand {
        flex: 1;
        min-width: 0;
        padding: .55rem 1rem;
        border-bottom: 0;
    }

        .a88-admin-brand img {
            height: 36px;
        }

        .a88-admin-brand strong {
            font-size: 1.05rem;
        }

    .a88-admin-burger {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        flex: 0 0 auto;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 1px solid var(--a88-line);
        border-radius: 10px;
        background: var(--a88-surface-alt);
        cursor: pointer;
    }

        .a88-admin-burger span {
            display: block;
            width: 20px;
            height: 2px;
            border-radius: 2px;
            background: var(--a88-text);
            transition: transform .18s ease, opacity .18s ease;
        }

    .a88-admin-sidebar.open .a88-admin-burger span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .a88-admin-sidebar.open .a88-admin-burger span:nth-child(2) {
        opacity: 0;
    }

    .a88-admin-sidebar.open .a88-admin-burger span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .a88-admin-drawer {
        display: none;
    }

    .a88-admin-sidebar.open .a88-admin-drawer {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: calc(100dvh - 64px);
        overflow-y: auto;
        background: var(--a88-surface);
        border-bottom: 1px solid var(--a88-line);
        box-shadow: var(--a88-shadow-lg);
    }

    .a88-admin-nav {
        flex: none;
        overflow: visible;
        padding: .5rem .75rem .25rem;
    }

    .a88-admin-sidebar .a88-events-nav-item {
        min-height: 44px; /* easy to tap */
    }

    .a88-admin-foot {
        border-top: 1px solid var(--a88-line);
    }

    /* Tap outside the drawer to close it; sits under the drawer and over the page. */
    .a88-admin-sidebar.open .a88-admin-scrim {
        display: block;
        position: fixed;
        inset: 0;
        z-index: -1;
        background: rgba(10, 12, 40, .45);
    }

    body:has(.a88-admin-sidebar.open) {
        overflow: hidden;
    }

    .a88-admin-main {
        padding: 1.25rem 1rem 2.5rem;
    }
}

/* ── Pending registrations list ────────────────────────────────────────── */

.a88-admin-people {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

    .a88-admin-people li {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .6rem;
        padding: .75rem .9rem;
        border: 1px solid var(--a88-line);
        border-radius: 10px;
        background: var(--a88-surface-alt);
    }

.a88-admin-person {
    flex: 1 1 220px;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

    .a88-admin-person span {
        color: var(--a88-text-muted);
        font-size: .85rem;
        overflow-wrap: anywhere;
    }

.a88-admin-confirm {
    font-weight: 600;
    font-size: .9rem;
}

.a88-admin-btn {
    background: var(--a88-surface);
    color: var(--a88-text);
    border: 1.5px solid var(--a88-line);
    border-radius: 50px;
    padding: .45rem 1.1rem;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

    .a88-admin-btn:hover {
        background: var(--a88-surface-alt);
    }

.a88-admin-working {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    font-size: .9rem;
    color: var(--a88-text-muted);
}

.a88-admin-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid var(--a88-line);
    border-top-color: var(--a88-accent);
    border-radius: 50%;
    animation: a88-admin-spin .7s linear infinite;
}

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

/* ── Registrations tabs, decision chips and the audit log ─────────────────── */

.a88-admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.a88-admin-btn:disabled {
    opacity: .5;
    cursor: default;
}

.a88-admin-chip {
    display: inline-block;
    padding: .2rem .65rem;
    border-radius: 50px;
    border: 1px solid var(--a88-line);
    background: var(--a88-surface-alt);
    color: var(--a88-text);
    font-size: .78rem;
    font-weight: 700;
    white-space: nowrap;
}

    .a88-admin-chip.ok {
        color: #6fd391;
        border-color: currentColor;
        background: transparent;
    }

    .a88-admin-chip.bad {
        color: #ff8a80;
        border-color: currentColor;
        background: transparent;
    }

    .a88-admin-chip.event {
        color: #b9a4ff;
        border-color: currentColor;
        background: transparent;
    }

html[data-theme="light"] .a88-admin-chip.event {
    color: #5b3fd1;
}

html[data-theme="light"] .a88-admin-chip.ok {
    color: #1f7a3d;
}

html[data-theme="light"] .a88-admin-chip.bad {
    color: #b3261e;
}

.a88-audit-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .75rem;
}

    .a88-audit-filters label {
        display: flex;
        flex-direction: column;
        gap: .25rem;
        font-size: .78rem;
        font-weight: 700;
        color: var(--a88-text-muted);
    }

/* Inside a card (e.g. /admin/admins) the filter row sits right above a result list: give it room */
.a88-settings-card .a88-audit-filters {
    margin: .25rem 0 1.1rem;
}

.a88-audit-search {
    flex: 1 1 200px;
}

.a88-audit-input {
    background: var(--a88-surface-alt);
    color: var(--a88-text);
    border: 1px solid var(--a88-line);
    border-radius: 10px;
    padding: .45rem .75rem;
    font: inherit;
    font-size: .9rem;
    font-weight: 400;
    min-width: 0;
}

.a88-audit-scroll {
    overflow-x: auto;
}

.a88-audit-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

    .a88-audit-table th,
    .a88-audit-table td {
        text-align: left;
        vertical-align: top;
        padding: .6rem .7rem;
        border-bottom: 1px solid var(--a88-line);
    }

    .a88-audit-table th {
        color: var(--a88-text-muted);
        font-size: .78rem;
        text-transform: uppercase;
        letter-spacing: .06em;
    }

    .a88-audit-table small {
        display: block;
        color: var(--a88-text-muted);
        overflow-wrap: anywhere;
    }

    .a88-audit-table summary {
        cursor: pointer;
        font-weight: 600;
    }

    .a88-audit-table pre {
        margin: .25rem 0 .5rem;
        padding: .5rem .65rem;
        background: var(--a88-surface-alt);
        border-radius: 8px;
        font-size: .78rem;
        white-space: pre-wrap;
        overflow-wrap: anywhere;
    }

.a88-audit-nowrap {
    white-space: nowrap;
}

.a88-audit-none {
    color: var(--a88-text-muted);
}

.a88-audit-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    margin-top: .9rem;
    color: var(--a88-text-muted);
    font-size: .85rem;
}

.a88-audit-pager-btns {
    display: inline-flex;
    gap: .5rem;
}

/* ── All members ───────────────────────────────────────────────────────── */

.a88-members {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

    .a88-members > li {
        border: 1px solid var(--a88-line);
        border-radius: 10px;
        background: var(--a88-surface-alt);
    }

.a88-members-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    padding: .75rem .9rem;
}

.a88-members-panel {
    border-top: 1px solid var(--a88-line);
    padding: .25rem .9rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .6rem;
}

    .a88-members-panel h4 {
        margin: .9rem 0 0;
        font-size: 1rem;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: .5rem;
    }

    .a88-members-panel .a88-settings-sub {
        margin: 0;
    }

.a88-members-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .75rem;
}

    .a88-members-form label {
        display: flex;
        flex-direction: column;
        gap: .25rem;
        font-size: .78rem;
        font-weight: 700;
        color: var(--a88-text-muted);
    }

.a88-members-year {
    width: 8rem;
}

.a88-members-confirm {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
    max-width: 34rem;
    padding: .75rem .9rem;
    border: 1px solid var(--a88-line);
    border-radius: 10px;
    background: var(--a88-surface);
}

    .a88-members-confirm span {
        color: var(--a88-text-muted);
        font-size: .9rem;
    }

    .a88-members-confirm .a88-audit-input {
        width: 100%;
    }

.a88-members-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.a88-members-devices {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

    .a88-members-devices li {
        display: flex;
        flex-direction: column;
        font-size: .9rem;
    }

    .a88-members-devices small {
        color: var(--a88-text-muted);
    }

/* ── Pop-up dialog (AdminModal.razor) ─────────────────────────────────────── */

.a88-amodal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(10, 12, 40, .55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    animation: a88-amodal-fade .15s ease-out;
}

/* No scrolling the page behind the dialog */
body:has(.a88-amodal-backdrop) {
    overflow: hidden;
}

.a88-amodal {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 680px;
    max-height: 90vh;
    background: var(--a88-surface);
    border: 1px solid var(--a88-line);
    border-radius: var(--a88-radius-lg);
    box-shadow: var(--a88-shadow-lg);
    outline: none;
    animation: a88-amodal-pop .18s ease-out;
}

.a88-amodal--sm {
    max-width: 440px;
}

.a88-amodal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.25rem;
    border-bottom: 1px solid var(--a88-line);
}

    .a88-amodal-head h2 {
        margin: 0;
        font-size: 1.15rem;
        overflow-wrap: anywhere;
    }

.a88-amodal-x {
    flex-shrink: 0;
    background: none;
    border: none;
    border-radius: 8px;
    padding: .1rem .55rem;
    font-size: 1.6rem;
    line-height: 1.2;
    color: var(--a88-text-muted);
    cursor: pointer;
}

    .a88-amodal-x:hover:not(:disabled) {
        color: var(--a88-text);
        background: var(--a88-surface-2);
    }

    .a88-amodal-x:disabled {
        opacity: .4;
        cursor: default;
    }

/* The body reuses .a88-members-panel's heading / spacing rules, minus the row-divider look */
.a88-amodal-body.a88-members-panel {
    border-top: 0;
    padding: .5rem 1.25rem 1.25rem;
    overflow-y: auto;
}

/* Status line pinned to the top of the dialog so a result is never scrolled out of view */
.a88-amodal-msg {
    position: sticky;
    top: 0;
    z-index: 1;
    align-self: stretch;
    margin: .5rem 0 0;
}

/* ── Feed moderation (/admin/feed) ─────────────────────────────────────── */

.a88-feedmod-title {
    font-weight: 600;
    color: var(--a88-text) !important;
    margin-top: .25rem;
}

.a88-feedmod-body {
    margin: .2rem 0 0;
    font-size: .92rem;
    color: var(--a88-text);
    overflow-wrap: anywhere;
    white-space: pre-line;
}

.a88-feedmod-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(160px, 45%), 1fr));
    gap: .5rem;
    margin: .75rem 0;
}

    .a88-feedmod-photos img {
        width: 100%;
        max-height: 260px;
        object-fit: cover;
        border-radius: 8px;
        border: 1px solid var(--a88-line);
        display: block;
    }

.a88-feedmod-comments {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: .65rem .9rem .9rem;
    border-top: 1px solid var(--a88-line);
}

.a88-feedmod-comment {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    padding: .6rem .75rem;
    border: 1px solid var(--a88-line);
    border-radius: 8px;
    background: var(--a88-surface);
}

@keyframes a88-amodal-fade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes a88-amodal-pop {
    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}


/* ── Admin: Events (/admin/events) ─────────────────────────────────────────── */

.a88-evadm-counts {
    color: var(--a88-text-muted);
}

.a88-evadm-rsvps {
    border-top: 1px solid var(--a88-line);
    padding: .75rem .9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

    /* on the full RSVP page the list sits inside the card, so no divider or side padding */
    .a88-evadm-rsvps.a88-evadm-rsvps--page {
        border-top: 0;
        padding: .75rem 0 0;
    }

.a88-evadm-back {
    display: inline-block;
    margin-bottom: .5rem;
    color: var(--a88-text-muted);
    font-weight: 600;
    text-decoration: none;
}

    .a88-evadm-back:hover {
        color: var(--a88-text);
    }

.a88-evadm-rsvp-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
}

.a88-evadm-find {
    max-width: 16rem;
}

.a88-evadm-rsvp {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    padding: .55rem .7rem;
    background: var(--a88-surface-alt);
    border: 1px solid var(--a88-line);
    border-radius: 12px;
}

    .a88-evadm-rsvp .a88-admin-person {
        flex: 1 1 14rem;
        min-width: 0;
    }

.a88-evadm-note {
    font-style: italic;
}

.a88-evadm-in {
    color: var(--a88-text-muted);
    font-weight: 600;
    white-space: nowrap;
}

/* two-column edit form; .wide spans both columns */
.a88-evadm-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: .75rem 1rem;
    width: 100%;
}

    .a88-evadm-form label.wide {
        grid-column: 1 / -1;
    }

    .a88-evadm-form .a88-audit-input,
    .a88-evadm-form .a88-filter-select {
        width: 100%;
        box-sizing: border-box;
    }

/* Tick box row used inside pop-ups: box on the left, text beside it, whole row clickable */
.a88-members-form label.a88-check,
.a88-check {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: .75rem;
    padding: .7rem .9rem;
    border: 1px solid var(--a88-line);
    border-radius: 12px;
    background: var(--a88-surface-alt);
    color: var(--a88-text);
    font-size: .9rem;
    font-weight: 400;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

    .a88-check:hover {
        border-color: var(--a88-accent);
    }

    .a88-check:has(input:checked) {
        border-color: var(--a88-accent);
        background: rgba(var(--a88-accent-rgb), .12);
    }

    .a88-check input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        flex: 0 0 auto;
        width: 1.3rem;
        height: 1.3rem;
        margin: .1rem 0 0;
        border: 2px solid var(--a88-text-muted);
        border-radius: 6px;
        background: transparent;
        display: grid;
        place-content: center;
        cursor: pointer;
        transition: background-color .15s, border-color .15s;
    }

        .a88-check input[type="checkbox"]::after {
            content: "";
            width: .32rem;
            height: .65rem;
            border: solid #fff;
            border-width: 0 2.5px 2.5px 0;
            transform: translateY(-1px) rotate(45deg) scale(0);
            transition: transform .12s;
        }

        .a88-check input[type="checkbox"]:checked {
            background: var(--a88-accent);
            border-color: var(--a88-accent);
        }

            .a88-check input[type="checkbox"]:checked::after {
                transform: translateY(-1px) rotate(45deg) scale(1);
            }

        .a88-check input[type="checkbox"]:focus-visible {
            outline: 2px solid var(--a88-gold);
            outline-offset: 2px;
        }

    .a88-check > span {
        display: flex;
        flex-direction: column;
        gap: .15rem;
        min-width: 0;
    }

    .a88-check strong {
        font-size: .92rem;
        font-weight: 700;
        color: var(--a88-text);
    }

    .a88-check small {
        font-size: .8rem;
        line-height: 1.35;
        color: var(--a88-text-muted);
    }

/* Drag and drop rows (Site pages) */
.a88-sortable {
    transition: box-shadow .12s, opacity .12s;
}

    .a88-sortable[draggable="true"] {
        cursor: grab;
    }

    .a88-sortable[draggable="true"]:active {
        cursor: grabbing;
    }

    .a88-sortable.dragging {
        opacity: .4;
    }

    .a88-sortable.drop-before {
        box-shadow: 0 -3px 0 0 var(--a88-gold);
    }

    .a88-sortable.drop-after {
        box-shadow: 0 3px 0 0 var(--a88-gold);
    }

.a88-drag-grip {
    flex: 0 0 auto;
    align-self: center;
    touch-action: none; /* a finger on the grip drags the row instead of scrolling the page */
    padding: .5rem .5rem;
    margin: -.5rem -.15rem -.5rem -.4rem;
    color: var(--a88-text-muted);
    font-size: 1.1rem;
    letter-spacing: -.15em;
    line-height: 1;
    user-select: none;
}

/* date + time pair (announcement start / stop) */
.a88-dt-field {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    min-width: 0;
}

.a88-dt-label {
    font-size: .78rem;
    font-weight: 700;
    color: var(--a88-text-muted);
}

.a88-dt-pair {
    display: flex;
    align-items: center;
    gap: .4rem;
}

    .a88-dt-pair .a88-audit-input {
        min-width: 0;
        box-sizing: border-box;
    }

    .a88-dt-pair .a88-audit-input[type="date"] {
        flex: 1 1 60%;
    }

    .a88-dt-pair .a88-audit-input[type="time"] {
        flex: 1 1 40%;
    }

.a88-dt-clear {
    flex: 0 0 auto;
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid var(--a88-line);
    border-radius: 50%;
    background: transparent;
    color: var(--a88-text-muted);
    cursor: pointer;
    line-height: 1;
}

@media (max-width: 560px) {
    .a88-evadm-form {
        grid-template-columns: 1fr;
    }
}

/* ── Games admin: player picker and score box ── */
.a88-gameadm-players {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    max-height: 260px;
    overflow-y: auto;
    padding: .4rem .5rem;
    border: 1px solid var(--a88-gray-line);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.a88-gameadm-player {
    display: flex;
    align-items: center;
    gap: .5rem;
    cursor: pointer;
}

.a88-gameadm-score {
    width: 110px;
    text-align: right;
}


/* ── Games admin: team builder (New match, team games) ── */
.a88-gameadm-team {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    width: 100%;
    box-sizing: border-box;
    padding: .6rem .7rem;
    border: 1px solid var(--a88-gray-line);
    border-radius: 8px;
}

.a88-gameadm-team-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

    .a88-gameadm-team-head .a88-audit-input {
        flex: 1 1 10rem;
        min-width: 0;
    }

.a88-gameadm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

.a88-members-confirm .a88-gameadm-chip,
.a88-gameadm-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .15rem .3rem .15rem .6rem;
    border: 1px solid var(--a88-gray-line);
    border-radius: 999px;
    font-size: .85rem;
    color: inherit;
}

    .a88-gameadm-chip button {
        border: 0;
        background: transparent;
        cursor: pointer;
        font-size: 1rem;
        line-height: 1;
        padding: 0 .3rem;
        color: inherit;
    }

/* ── /admin/settings ─────────────────────────────────────────────────── */
.a88-set-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 1rem 1.25rem;
    margin: .75rem 0 1rem;
}

.a88-set-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    font-size: .82rem;
    font-weight: 700;
    color: var(--a88-text);
}

    .a88-set-field .a88-audit-input {
        width: 100%;
        box-sizing: border-box;
    }

    .a88-set-field small {
        font-weight: 400;
        color: var(--a88-text-muted);
        line-height: 1.35;
    }

.a88-set-wide {
    grid-column: 1 / -1;
}

.a88-set-toggle {
    margin: .5rem 0 1rem;
    align-items: flex-start;
}

.a88-set-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem;
    margin-top: 1rem;
}

.a88-set-info {
    display: grid;
    gap: .5rem;
    margin: .75rem 0 0;
}

    .a88-set-info > div {
        display: grid;
        grid-template-columns: 11rem 1fr;
        gap: .75rem;
    }

    .a88-set-info dt {
        color: var(--a88-text-muted);
        font-size: .85rem;
    }

    .a88-set-info dd {
        margin: 0;
        word-break: break-word;
    }

@media (max-width: 560px) {
    .a88-set-info > div {
        grid-template-columns: 1fr;
        gap: .1rem;
    }
}

/* ── /admin/exports ──────────────────────────────────────────────────── */
.a88-exp-feature {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem 1rem;
    padding: .9rem 1rem;
    margin: .75rem 0 1.25rem;
    background: var(--a88-surface-alt);
    border: 1px solid var(--a88-line);
    border-radius: 12px;
}

    .a88-exp-feature .a88-admin-person {
        flex: 1 1 260px;
    }

.a88-exp-sub {
    margin: 1.25rem 0 .4rem;
    font-size: .95rem;
}

.a88-exp-num {
    text-align: right !important;
    white-space: nowrap;
}

.a88-exp-act {
    text-align: right !important;
    white-space: nowrap;
}

    .a88-exp-act .a88-admin-btn,
    .a88-members-head a.a88-admin-btn,
    .a88-exp-feature a.a88-btn-primary {
        display: inline-block;
        text-decoration: none;
    }

.a88-exp-note {
    margin-top: 1.25rem;
    padding: .9rem 1rem;
    border: 1px dashed var(--a88-line);
    border-radius: 12px;
    font-size: .88rem;
    color: var(--a88-text-muted);
}

    .a88-exp-note ul {
        margin: .4rem 0 0;
        padding-left: 1.2rem;
        display: grid;
        gap: .3rem;
    }

/* ── Dashboard numbers (/admin and /superadmin) ─────────────────────────── */

.a88-dash-h {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--a88-text);
    margin: .75rem 0 -.25rem;
}

.a88-dash-sub {
    display: block;
    margin-top: .35rem;
    color: var(--a88-text-muted);
    font-size: .8rem;
}

.a88-dash-tile strong.a88-dash-small {
    font-size: 1.1rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.a88-dash-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

    .a88-dash-list li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: .75rem;
        padding: .55rem 0;
        border-bottom: 1px solid var(--a88-line);
        font-size: .92rem;
        color: var(--a88-text);
    }

        .a88-dash-list li:last-child {
            border-bottom: 0;
        }

        .a88-dash-list li a {
            color: var(--a88-accent);
            text-decoration: none;
        }

            .a88-dash-list li a:hover {
                text-decoration: underline;
            }

.a88-dash-more {
    display: inline-block;
    margin-top: .75rem;
    color: var(--a88-accent);
    font-size: .9rem;
    text-decoration: none;
}

.a88-dash-split {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 1rem;
}

.a88-dash-bars {
    display: flex;
    align-items: flex-end;
    gap: .6rem;
    height: 150px;
    padding-top: .5rem;
}

.a88-dash-bar {
    flex: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: .25rem;
    font-size: .75rem;
    color: var(--a88-text-muted);
}

    .a88-dash-bar i {
        display: block;
        width: 100%;
        min-height: 3px;
        background: var(--a88-accent);
        border-radius: 6px 6px 0 0;
    }

.a88-dash-bar-n {
    color: var(--a88-text);
    font-weight: 600;
}

/* ── Dashboard loading skeleton ─────────────────────────────────────────── */

.a88-skel-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.a88-skel,
.a88-skel-block {
    background: linear-gradient(90deg, rgba(128,128,128,.12) 25%, rgba(128,128,128,.24) 40%, rgba(128,128,128,.12) 55%);
    background-size: 300% 100%;
    animation: a88-skel-shimmer 1.4s ease-in-out infinite;
    border-radius: 8px;
}

.a88-skel-h {
    width: 120px;
    height: 18px;
    margin-top: .75rem;
}

.a88-skel-tile {
    display: flex;
    flex-direction: column;
    gap: .6rem;
}

.a88-skel-num {
    width: 56px;
    height: 32px;
}

.a88-skel-line {
    width: 70%;
    height: 12px;
}

.a88-skel-short {
    width: 45%;
}

.a88-skel-block {
    min-height: 210px;
}

.a88-skel-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

@keyframes a88-skel-shimmer {
    0%   { background-position: 100% 0; }
    100% { background-position: 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .a88-skel,
    .a88-skel-block { animation: none; }
}

/* ── Dashboard on phones ────────────────────────────────────────────────── */

@media (max-width: 600px) {
    /* Two tiles per row instead of one long column of twelve. */
    .a88-admin-main .a88-dash-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .65rem;
    }

    .a88-admin-main .a88-dash-tile {
        padding: .85rem;
        min-width: 0;
        overflow-wrap: anywhere;
    }

        .a88-admin-main .a88-dash-tile strong {
            font-size: 1.6rem;
        }

        .a88-admin-main .a88-dash-tile span {
            font-size: .82rem;
        }

    .a88-dash-sub {
        font-size: .74rem;
    }

    /* The "next event" tile is wide text: give it the full row. */
    .a88-dash-wide {
        grid-column: 1 / -1;
    }

    .a88-dash-h {
        margin-top: .5rem;
    }

    /* Lists: let long names and chips wrap; the time drops under the text. */
    .a88-dash-list li {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: .25rem .75rem;
    }

        .a88-dash-list li > span {
            min-width: 0;
            overflow-wrap: anywhere;
        }

    .a88-dash-bars {
        gap: .35rem;
        height: 130px;
    }

    .a88-skel-num {
        width: 44px;
        height: 26px;
    }

    .a88-skel-block {
        min-height: 150px;
    }
}

/* ── Admin on phones: forms, filters, dialogs ───────────────────────────── */

@media (max-width: 600px) {
    .a88-admin-main h1 {
        font-size: 1.5rem;
    }

    /* 16px stops iOS Safari zooming the page when a field is focused. */
    .a88-admin-main input:not([type="checkbox"]):not([type="radio"]),
    .a88-admin-main select,
    .a88-admin-main textarea,
    .a88-audit-input,
    .a88-amodal input:not([type="checkbox"]):not([type="radio"]),
    .a88-amodal select,
    .a88-amodal textarea {
        font-size: 16px;
    }

    .a88-admin-main .a88-admin-btn,
    .a88-amodal .a88-admin-btn {
        min-height: 40px;
    }

    /* Filter rows and inline forms stack: one full-width field per line. */
    .a88-audit-filters,
    .a88-members-form {
        flex-direction: column;
        align-items: stretch;
    }

        .a88-audit-filters label,
        .a88-members-form label,
        .a88-audit-search {
            flex: none;
            width: 100%;
        }

        .a88-audit-filters .a88-audit-input,
        .a88-members-form .a88-audit-input {
            width: 100%;
            box-sizing: border-box;
        }

    .a88-members-year {
        width: 100%;
    }

    .a88-members-confirm {
        max-width: 100%;
    }

    .a88-audit-pager {
        justify-content: center;
        text-align: center;
    }

    .a88-audit-scroll {
        -webkit-overflow-scrolling: touch;
    }

    /* Dialogs become bottom sheets that fill the width. */
    .a88-amodal-backdrop {
        padding: 0;
        align-items: flex-end;
    }

    .a88-amodal,
    .a88-amodal--sm {
        max-width: 100%;
        max-height: 92dvh;
        border-radius: 16px 16px 0 0;
    }

    .a88-amodal-head {
        padding: .75rem 1rem;
    }

    .a88-amodal-body.a88-members-panel {
        padding: .5rem 1rem 1.25rem;
    }
}


/* Pending registrations: select several people at once */
.a88-admin-bulkbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .6rem .9rem;
    padding: 0 0 .75rem;
}

    .a88-admin-bulkbar .a88-audit-input {
        flex: 1 1 14rem;
        min-width: 0;
    }

/* ── Admin list / form skeletons (Shared/AdminSkeleton.razor) ─────────────────────────── */
.a88-adm-skel-table {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--a88-line);
    border-radius: 10px;
    overflow: hidden;
}

.a88-adm-skel-row {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: .8rem 1rem;
    border-top: 1px solid var(--a88-line);
}

    .a88-adm-skel-row.head {
        border-top: none;
        gap: 2.5rem;
        background: rgba(128, 128, 128, .06);
    }

.a88-adm-skel-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.a88-adm-skel-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: .45rem;
    min-width: 0;
}

.a88-adm-skel-pill {
    width: 70px;
    height: 22px;
    border-radius: 999px;
    flex-shrink: 0;
}

.a88-adm-skel-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 560px;
}

.a88-adm-skel-field {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
