/* ZAPP shared visual standards — Step 92.4e.
   Apply .zapp-btn classes to links and buttons, without changing their behavior.
   The existing site header retains its own navigation styles. */
:root {
    --zapp-bg: #17191d;
    --zapp-surface: #25282e;
    --zapp-border: #414750;
    --zapp-text: #f5f5f5;
    --zapp-muted: #b8bbc2;
    --zapp-primary: #3476c4;
    --zapp-primary-hover: #4389dc;
    --zapp-secondary: #3b4657;
    --zapp-secondary-hover: #4c5d76;
    --zapp-danger: #b63b47;
    --zapp-danger-hover: #d14a56;
    --zapp-radius: 8px;
    /* Shared layout and accessibility tokens (92.4ae). */
    --zapp-space-1: 4px;
    --zapp-space-2: 8px;
    --zapp-space-3: 12px;
    --zapp-space-4: 16px;
    --zapp-space-5: 20px;
    --zapp-space-6: 24px;
    --zapp-control-height: 42px;
    --zapp-focus-ring: #a7caff;
    --zapp-card-radius: 12px;
    --zapp-content-width: 1150px;
}

/* Explicit reusable components prevent unintended changes to inline links. */
a.zapp-btn,
button.zapp-btn,
input.zapp-btn {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px;
    width: auto !important;
    max-width: 100%;
    min-height: var(--zapp-control-height);
    margin: 0;
    padding: 10px 16px !important;
    border: 1px solid transparent !important;
    border-radius: var(--zapp-radius) !important;
    background: var(--zapp-primary) !important;
    color: #fff !important;
    font: inherit !important;
    font-weight: 600 !important;
    line-height: 1.3;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

a.zapp-btn:hover,
button.zapp-btn:hover,
input.zapp-btn:hover {
    background: var(--zapp-primary-hover) !important;
    color: #fff !important;
    text-decoration: none !important;
}

a.zapp-btn--secondary,
button.zapp-btn--secondary,
input.zapp-btn--secondary {
    background: var(--zapp-secondary) !important;
    border-color: #66768c !important;
}

a.zapp-btn--secondary:hover,
button.zapp-btn--secondary:hover,
input.zapp-btn--secondary:hover {
    background: var(--zapp-secondary-hover) !important;
}

a.zapp-btn--danger,
button.zapp-btn--danger,
input.zapp-btn--danger {
    background: var(--zapp-danger) !important;
}

a.zapp-btn--danger:hover,
button.zapp-btn--danger:hover,
input.zapp-btn--danger:hover {
    background: var(--zapp-danger-hover) !important;
}

.zapp-btn:disabled,
.zapp-btn[aria-disabled="true"] {
    opacity: .55;
    cursor: not-allowed;
}

/* Shared action-row foundation for current and future pages.
   Keep existing per-component spacing and behavior intact. */
.zapp-actions,
.zapp-action-group,
.zapp-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.zapp-actions,
.zapp-action-group {
    gap: 10px;
}

.zapp-form-actions {
    gap: var(--zapp-space-3);
}

/* Reusable classes for future templates and gradual migration. */
.zapp-card {
    background: var(--zapp-surface);
    border: 1px solid var(--zapp-border);
    border-radius: var(--zapp-card-radius);
    padding: 22px;
}

.zapp-field {
    box-sizing: border-box;
    max-width: 100%;
    min-height: var(--zapp-control-height);
    border: 1px solid #758092;
    border-radius: var(--zapp-radius);
    background: var(--zapp-bg);
    color: var(--zapp-text);
    padding: 10px 12px;
    font: inherit;
}


.zapp-muted { color: var(--zapp-muted); }

@media (max-width: 520px) {
    .zapp-actions { align-items: stretch; }
    .zapp-actions .zapp-btn { min-width: 0; }
}

/* Step 92.4f: shared participant action alignment. */
.zapp-btn { vertical-align: middle; }
.zapp-btn + .zapp-btn { margin-left: 4px; }
@media (max-width: 520px) {
    .zapp-btn { white-space: normal; }
    .zapp-btn + .zapp-btn { margin-left: 0; }
}

/* Step 92.4g — Admin interface shared control refinements. */
.zapp-admin-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

@media (max-width: 600px) {
    .zapp-admin-actions {
        align-items: stretch;
    }

    .zapp-admin-actions > .zapp-btn {
        max-width: 100%;
    }
}

/* Step 92.4h — shared administrative form and table components.
   Opt-in classes protect specialized widgets and preserve existing layouts. */
.zapp-form-control:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    box-sizing: border-box;
    max-width: 100%;
    min-height: 42px;
    border: 1px solid #758092;
    border-radius: var(--zapp-radius);
    color: var(--zapp-text);
    background-color: var(--zapp-bg);
    padding: 9px 12px;
    font: inherit;
}
textarea.zapp-form-control {
    min-height: 96px;
    resize: vertical;
}
.zapp-field:focus-visible,
.zapp-form-control:focus-visible {
    outline: 3px solid #a7caff;
    outline-offset: 2px;
}
.zapp-data-table {
    border-collapse: collapse;
    max-width: 100%;
    width: 100%;
}
.zapp-data-table th,
.zapp-data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--zapp-border);
    vertical-align: top;
    overflow-wrap: anywhere;
}
.zapp-data-table th {
    text-align: left;
    font-weight: 700;
}
.zapp-data-table tbody tr:hover {
    background-color: rgba(130, 162, 209, 0.07);
}
@media (max-width: 600px) {
    .zapp-form-control { max-width: 100%; }
    .zapp-data-table th,
    .zapp-data-table td { padding: 9px 8px; }
}

/* Step 92.4i — reusable layout and feedback utilities.
   Explicit classes avoid unexpected changes to existing page-specific widgets. */
.zapp-page-heading {
    margin: 0 0 20px;
    line-height: 1.25;
}

.zapp-section-heading {
    margin: 0 0 14px;
    line-height: 1.35;
}

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

.zapp-form-grid > * {
    min-width: 0;
}

.zapp-help-text {
    color: var(--zapp-muted);
    font-size: .9rem;
    line-height: 1.5;
}

@media (max-width: 700px) {
    .zapp-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Step 92.4j: shared administrative helper text.
   Consolidated from identical per-page declarations. */
.muted {
    color: var(--zapp-muted);
}

/* Step 92.4k: consolidated identical .card styling. */
body.zapp-shared-card .card {
background:#25282e;border:1px solid #414750;border-radius:12px;padding:24px
}

/* Step 92.4k: consolidated identical input styling. */
body.zapp-shared-input input {
display:block;width:100%;max-width:300px;padding:12px;background:#15171b;color:#fff;border:1px solid #687080;border-radius:7px;font-size:1rem
}

/* Step 92.4m: keep compact admin navigation actions readable on mobile. */
@media (max-width: 600px) {
    .zapp-btn {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}

/* Step 92.4n — shared warning action and scoped training table layout. */
.zapp-btn--warning,
a.zapp-btn--warning,
button.zapp-btn--warning {
    background: #865b20 !important;
    border-color: #bd8d49 !important;
    color: #fff !important;
}

.zapp-btn--warning:hover,
a.zapp-btn--warning:hover,
button.zapp-btn--warning:hover {
    background: #a06d27 !important;
}

.practice-table-scroll {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.practice-management-table {
    display: table;
    min-width: 1050px;
    width: 100%;
    max-width: none;
    table-layout: auto;
}

.practice-management-table th,
.practice-management-table td {
    overflow-wrap: normal;
    word-break: normal;
}

.practice-management-table th:nth-child(1),
.practice-management-table td:nth-child(1),
.practice-management-table th:nth-child(2),
.practice-management-table td:nth-child(2),
.practice-management-table th:nth-child(3),
.practice-management-table td:nth-child(3),
.practice-management-table th:nth-child(7),
.practice-management-table td:nth-child(7) {
    white-space: nowrap;
}

.practice-management-table td:nth-child(8) {
    min-width: 125px;
}

.practice-management-table .actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.practice-management-table .actions form {
    margin: 0;
}



/* Global floating table action menu (Step 92.4r).
   Shared with every admin table that uses .zapp-action-menu.
   Keep form buttons and anchor items aligned identically. */
.practice-management-table td:nth-child(8) {
    min-width: 130px;
    width: 140px;
}

.zapp-action-menu {
    display: inline-block;
    vertical-align: middle;
}

.zapp-action-menu > summary.zapp-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-width: 112px;
    width: auto !important;
    padding: 9px 14px !important;
    background: #354861 !important;
    border: 1px solid #7a94b7 !important;
    border-radius: 7px;
    color: #f4f8ff !important;
    font-weight: 650;
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
}

.zapp-action-menu > summary::-webkit-details-marker { display: none; }
.zapp-action-menu > summary::after { content: "▾"; font-size: .85em; }
.zapp-action-menu[open] > summary::after { content: "▴"; }
.zapp-action-menu > summary:hover,
.zapp-action-menu[open] > summary.zapp-btn {
    background: #456181 !important;
}

.zapp-action-menu__items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px;
    background: #1b2737;
    border: 1px solid #8aa1bf;
    border-radius: 10px;
    box-shadow: 0 18px 44px rgba(0,0,0,.65);
}

.zapp-action-menu__items--floating {
    position: fixed !important;
    z-index: 10000;
    width: max-content;
    max-width: calc(100vw - 20px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.zapp-action-menu__items form {
    display: block;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    width: 100%;
}

/* Strong selectors deliberately override older page-local button styles. */
.zapp-action-menu__items a.zapp-action-menu__item,
.zapp-action-menu__items button.zapp-action-menu__item,
.zapp-action-menu__items form > button.zapp-action-menu__item {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    width: 100% !important;
    min-height: 44px;
    margin: 0 !important;
    padding: 10px 12px !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
    background: #304259 !important;
    color: #f0f5fc !important;
    font: inherit !important;
    font-size: .92rem !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    text-align: left !important;
    text-decoration: none !important;
    white-space: normal !important;
    cursor: pointer;
    box-sizing: border-box;
}

.zapp-action-menu__items .zapp-action-menu__item:hover,
.zapp-action-menu__items .zapp-action-menu__item:focus-visible {
    background: #46658b !important;
    border-color: #88a8d2 !important;
    color: #fff !important;
}

.zapp-action-menu__icon {
    display: block !important;
    flex: 0 0 18px !important;
    width: 18px !important;
    height: 18px !important;
    color: #a9d0ff;
}

.zapp-action-menu__item > span {
    flex: 1 1 auto;
    min-width: 0;
}

.zapp-action-menu__divider {
    border-top: 1px solid #62758d;
    margin: 6px 4px;
}

.zapp-action-menu__items .zapp-action-menu__item--warning,
.zapp-action-menu__items form > button.zapp-action-menu__item--warning {
    background: #514022 !important;
    border-color: #886a37 !important;
    color: #ffe1a9 !important;
}
.zapp-action-menu__items .zapp-action-menu__item--warning .zapp-action-menu__icon { color: #ffcf76; }
.zapp-action-menu__items .zapp-action-menu__item--warning:hover { background: #715321 !important; }

.zapp-action-menu__items .zapp-action-menu__item--neutral,
.zapp-action-menu__items form > button.zapp-action-menu__item--neutral {
    background: #2d4b43 !important;
    color: #c5f5df !important;
}
.zapp-action-menu__items .zapp-action-menu__item--neutral .zapp-action-menu__icon { color: #9be1bf; }

.zapp-action-menu__items .zapp-action-menu__item--danger,
.zapp-action-menu__items form > button.zapp-action-menu__item--danger {
    background: #592d3a !important;
    border-color: #a65567 !important;
    color: #ffd2d7 !important;
    font-weight: 700 !important;
}
.zapp-action-menu__items .zapp-action-menu__item--danger .zapp-action-menu__icon { color: #ff9eae; }
.zapp-action-menu__items .zapp-action-menu__item--danger:hover { background: #803849 !important; }

.zapp-action-menu > summary:focus-visible,
.zapp-action-menu__items .zapp-action-menu__item:focus-visible {
    outline: 3px solid var(--zapp-focus-ring) !important;
    outline-offset: 2px;
}

/* Step 92.4w — shared admin report table readability.
   Applied only to report tables, not forms or action tables. */
.zapp-report-table {
    width: 100%;
    border-collapse: collapse;
}
.zapp-report-table th,
.zapp-report-table td {
    vertical-align: top;
    overflow-wrap: normal;
    word-break: normal;
}
.zapp-report-table th {
    white-space: nowrap;
}
.zapp-report-table th.num,
.zapp-report-table td.num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.zapp-report-table th:nth-child(2),
.zapp-report-table td:nth-child(2) {
    min-width: 72px;
}
.scroll:has(> .zapp-report-table),
.table-wrap:has(> .zapp-report-table) {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
@media (max-width: 720px) {
    .zapp-report-table th,
    .zapp-report-table td {
        padding: 10px 12px;
    }
}

/* Step 92.4y: global Back placement and consistent module width. */
.zapp-universal-back { margin: 0 0 20px; }
.zapp-universal-back .zapp-btn { display: inline-flex; align-items: center; }

/* Step 92.4ab: reusable navigation tile alignment, opt-in only. */
.zapp-tile-grid { align-items: stretch; }
.zapp-tile-grid > .zapp-tile-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
}
.zapp-tile-card > .zapp-tile-action,
.zapp-tile-card > .zapp-tile-actions {
    margin-top: auto;
    align-self: flex-start;
}
.zapp-tile-card > .zapp-tile-action {
    max-width: 100%;
    white-space: normal;
    text-align: center;
}
.zapp-tile-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    width: 100%;
    padding-top: 16px;
}
.zapp-tile-actions > p { margin: 0 !important; max-width: 100%; }
.zapp-tile-actions .zapp-btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
}
@media (max-width: 600px) {
    .zapp-tile-grid > .zapp-tile-card { height: auto; }
}

/* Step 92.4ac — application-wide design-system foundation.
   These reusable tokens and component rules apply to every current or future
   template that loads zapp_ui.css. No route-specific selectors are used. */
/* Shared components have predictable dimensions across all modules. */
.zapp-card,
.zapp-btn,
.zapp-field,
.zapp-form-control,
.zapp-data-table,
.zapp-action-menu {
    box-sizing: border-box;
}

/* Cards use the shared radius token; keep the original card rule as the
   single source for background, border, padding and corner treatment. */

/* The container owns button spacing; avoid adding a second gap via margins. */
.zapp-actions > .zapp-btn + .zapp-btn,
.zapp-admin-actions > .zapp-btn + .zapp-btn,
.zapp-tile-actions .zapp-btn + .zapp-btn {
    margin-left: 0;
}

/* Generic shared wrappers for new screens and reusable modules. */
.zapp-page-container {
    width: min(100%, var(--zapp-content-width));
    margin-inline: auto;
    padding-inline: var(--zapp-space-5);
}

.zapp-stack {
    display: flex;
    flex-direction: column;
    gap: var(--zapp-space-4);
    min-width: 0;
}

.zapp-cluster {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--zapp-space-3);
    min-width: 0;
}

.zapp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: var(--zapp-space-4);
    align-items: stretch;
}

.zapp-grid > *,
.zapp-cluster > *,
.zapp-stack > * {
    min-width: 0;
}

/* Consistent keyboard focus on shared interactive controls. */
.zapp-action-menu > summary:focus-visible,
.zapp-btn:focus-visible,
.zapp-field:focus-visible,
.zapp-form-control:focus-visible {
    outline: 3px solid var(--zapp-focus-ring) !important;
    outline-offset: 2px;
}

/* Buttons retain the original 3px focus offset. */
a.zapp-btn:focus-visible,
button.zapp-btn:focus-visible,
input.zapp-btn:focus-visible {
    outline-offset: 3px;
}

@media (max-width: 600px) {
    .zapp-page-container {
        padding-inline: var(--zapp-space-3);
    }
}

@media (prefers-reduced-motion: reduce) {
    .zapp-btn,
    .zapp-action-menu,
    .zapp-action-menu * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Step 92.4ad — shared component consolidation.
   Standard component variants are opt-in to protect existing specialized UI.
   Future templates can use these without introducing page-local styles. */
.zapp-btn--small {
    min-height: 34px !important;
    padding: 6px 10px !important;
    font-size: .875rem !important;
}

.zapp-btn--full {
    width: 100% !important;
}

.zapp-card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--zapp-space-3);
    margin-bottom: var(--zapp-space-4);
}

.zapp-card__header > * {
    min-width: 0;
    margin-block: 0;
}

.zapp-card__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--zapp-space-3);
    margin-top: var(--zapp-space-5);
}

.zapp-form-group {
    display: flex;
    flex-direction: column;
    gap: var(--zapp-space-2);
    min-width: 0;
}

.zapp-form-group > label {
    font-weight: 600;
}

.zapp-form-group > .zapp-field,
.zapp-form-group > .zapp-form-control {
    width: 100%;
}

.zapp-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.zapp-table-scroll > .zapp-data-table {
    min-width: 600px;
}

.zapp-action-menu,
.zapp-table-scroll,
.zapp-card {
    max-width: 100%;
}

@media (max-width: 600px) {
    .zapp-card__header,
    .zapp-card__footer {
        gap: var(--zapp-space-2);
    }
}

/* Step 92.4ae: shared token and duplicate-declaration cleanup only.
   No page-specific selectors or route logic were changed. */

/* Step 92.4ai — shared legacy baseline.
   These rules replace identical declarations formerly repeated across templates.
   Component-specific styles remain in their existing shared classes. */
*,
*::before,
*::after {
    box-sizing: border-box;
}

a {
    color: #a7caff;
}

/* Step 92.4aj — shared legacy layout patterns.
   These selectors replace identical rules formerly repeated in templates.
   Keep them here so future pages use the same behavior automatically. */
.scroll,
.zapp-table-container {
    overflow-x: auto;
}

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

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

/* Step 92.4ak — shared status and notification surfaces.
   Common feedback patterns belong to the design system rather than individual pages.
   Keep these opt-in to avoid changing unrelated messages or specialized alerts. */
.notice {
    border-left: 3px solid #8caee2;
    padding: 12px;
    background: #303741;
    margin: 18px 0;
}

.flash {
    background: #334357;
    padding: 12px;
    border-radius: 8px;
}

/* Step 92.4am: shared form-page layout.
   Consolidated from five identical embedded style blocks.
   Scope prevents unintended changes in other ZAPP modules. */
body.zapp-forms-layout {
    background:#17191d;
    color:#f5f5f5;
    font-family:system-ui,Arial,sans-serif;
    margin:0;
}

body.zapp-forms-layout main {
    max-width:950px;
    margin:30px auto;
    padding:0 18px;
}

body.zapp-forms-layout .card {
    background:#262a31;
    border-radius:12px;
    padding:20px;
    margin:14px 0;
}

body.zapp-forms-layout input,
body.zapp-forms-layout textarea,
body.zapp-forms-layout select {
    display:block;
    width:100%;
    box-sizing:border-box;
    padding:10px;
    background:#17191d;
    color:white;
    border:1px solid #808a98;
    border-radius:6px;
    margin:7px 0 15px;
    font:inherit;
}

body.zapp-forms-layout input[type=checkbox] {
    display:inline;
    width:auto;
    margin-right:6px;
}

body.zapp-forms-layout button,
body.zapp-forms-layout .btn {
    display:inline-block;
    background:#3673bf;
    color:white;
    border:0;
    border-radius:7px;
    padding:10px 16px;
    text-decoration:none;
    cursor:pointer;
}

body.zapp-forms-layout label {
    display:block;
    margin-top:12px;
}

body.zapp-forms-layout .muted {
    color:#bfc6d0;
}

body.zapp-forms-layout table {
    width:100%;
    border-collapse:collapse;
}

body.zapp-forms-layout td,
body.zapp-forms-layout th {
    padding:10px;
    border-bottom:1px solid #555;
    text-align:left;
}

/* Shared layout for a group of independent form actions.
   Each form keeps its own endpoint and CSRF token. */
.zapp-action-group > form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.zapp-action-group > form > input[type="hidden"] {
    display: none;
}

.zapp-action-group button,
.zapp-action-group .btn {
    margin: 0;
    white-space: normal;
}

/* Step 92.4at — shared component composition.
   These classes build on the existing global tokens and component primitives.
   They are reusable by any current or future template, without route-specific CSS. */
.zapp-card__body {
    min-width: 0;
}

.zapp-card__body > :first-child {
    margin-top: 0;
}

.zapp-card__body > :last-child {
    margin-bottom: 0;
}

.zapp-card__footer > form,
.zapp-card__header > form,
.zapp-actions > form {
    margin: 0;
}

.zapp-card__footer > form,
.zapp-actions > form {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}

.zapp-form-row {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: var(--zapp-space-4);
}

.zapp-form-row > .zapp-form-group {
    flex: 1 1 220px;
}

.zapp-form-actions {
    margin-top: var(--zapp-space-5);
}

.zapp-form-actions > form {
    margin: 0;
}

.zapp-table-container {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.zapp-table-container > .zapp-data-table {
    width: 100%;
}

.zapp-table-empty {
    padding: var(--zapp-space-5);
    color: var(--zapp-muted);
    text-align: center;
}

@media (max-width: 600px) {
    .zapp-form-row {
        align-items: stretch;
    }

    .zapp-form-row > .zapp-form-group {
        flex-basis: 100%;
    }
}

/* Floating horizontal scrollbar for long, wide data tables. */
.zapp-floating-scrollbar {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 900;
    height: 18px;
    overflow-x: auto;
    overflow-y: hidden;
    background: var(--zapp-surface, #20252d);
    border: 1px solid var(--zapp-border, #59606b);
    border-radius: 4px 4px 0 0;
    box-sizing: border-box;
    display: none;
}

.zapp-floating-scrollbar[data-visible="true"] {
    display: block;
}

.zapp-floating-scrollbar__content {
    height: 1px;
    pointer-events: none;
}


/* Step 92.4ax — shared form-state standards.
   Semantic HTML attributes make these states reusable on existing and future
   forms without introducing route-specific selectors or JavaScript. */
.zapp-field:disabled,
.zapp-form-control:disabled,
.zapp-btn:disabled,
.zapp-field[aria-disabled="true"],
.zapp-form-control[aria-disabled="true"] {
    opacity: 0.6;
    cursor: not-allowed;
}

.zapp-field[aria-invalid="true"],
.zapp-form-control[aria-invalid="true"] {
    border-color: var(--zapp-danger);
}

.zapp-field[aria-invalid="true"]:focus-visible,
.zapp-form-control[aria-invalid="true"]:focus-visible {
    outline-color: var(--zapp-danger) !important;
}

.zapp-field[readonly],
.zapp-form-control[readonly] {
    background-color: var(--zapp-surface);
    cursor: default;
}

.zapp-form-help {
    color: var(--zapp-muted);
    font-size: 0.875rem;
    line-height: 1.4;
}

.zapp-form-error {
    color: #ffb3b9;
    font-size: 0.875rem;
    line-height: 1.4;
}

.zapp-form-group > .zapp-form-help,
.zapp-form-group > .zapp-form-error {
    margin-block: 0;
}

@media (prefers-reduced-motion: reduce) {
    .zapp-field,
    .zapp-form-control {
        transition-duration: 0.01ms !important;
    }
}

/* Step 92.4ay — reusable semantic form groups.
   Opt-in shared components: no route-specific styling or global overrides
   of custom action menus, checkbox widgets, or existing page layouts. */
.zapp-fieldset {
    min-width: 0;
    margin: 0;
    padding: var(--zapp-space-4);
    border: 1px solid var(--zapp-border);
    border-radius: var(--zapp-radius);
}

.zapp-fieldset > legend {
    max-width: 100%;
    padding-inline: var(--zapp-space-2);
    color: var(--zapp-text);
    font-weight: 600;
}

.zapp-choice-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--zapp-space-3);
    min-width: 0;
}

.zapp-choice {
    display: inline-flex;
    align-items: center;
    gap: var(--zapp-space-2);
    min-width: 0;
    cursor: pointer;
}

.zapp-choice > input[type="checkbox"],
.zapp-choice > input[type="radio"] {
    width: auto;
    min-width: 1rem;
    height: 1rem;
    margin: 0;
    flex: 0 0 auto;
    accent-color: var(--zapp-primary);
}

.zapp-choice:has(> input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}

.zapp-choice > input:focus-visible {
    outline: 3px solid var(--zapp-focus-ring);
    outline-offset: 3px;
}

.zapp-form-error[role="alert"] {
    display: block;
}

@media (max-width: 600px) {
    .zapp-choice-group {
        gap: var(--zapp-space-2);
    }
}

/* Step 92.4ba: Shared choice alignment, including form-layout legacy rules. */
.zapp-fieldset--plain {
    border: 0;
    padding: 0;
}

.zapp-fieldset--plain > legend {
    padding: 0;
    margin-bottom: var(--zapp-space-2);
    font-weight: 400;
}

label.zapp-choice {
    display: flex;
    align-items: center;
    gap: var(--zapp-space-2);
    margin-top: var(--zapp-space-2);
}

.zapp-form-question {
    margin-top: 12px;
}

.zapp-form-question__title {
    margin-bottom: var(--zapp-space-2);
}

/* Consolidated Forms layout rules; legacy behavior preserved. */
/* Existing builder layout rules, scoped to the shared Forms shell. */
body.zapp-forms-layout {
    background:#17191d;
    color:#f5f5f5;
    font:16px system-ui,sans-serif;
    margin:0;
}
body.zapp-forms-layout main {
    max-width:950px;
    margin:32px auto;
    padding:0 20px;
}
body.zapp-forms-layout .card {
    background:#25282e;
    border:1px solid #414750;
    border-radius:12px;
    padding:20px;
    margin:16px 0;
}
body.zapp-forms-layout label {
    display:block;
    margin:10px 0;
}
body.zapp-forms-layout input:not([type=checkbox]),
body.zapp-forms-layout textarea,
body.zapp-forms-layout select {
    box-sizing:border-box;
    width:100%;
    background:#17191d;
    color:white;
    border:1px solid #798393;
    border-radius:7px;
    padding:10px;
    margin-top:6px;
    font:inherit;
}
body.zapp-forms-layout input[type=checkbox] {
    margin-right:8px;
}
body.zapp-forms-layout button,
body.zapp-forms-layout .btn {
    display:inline-block;
    background:#3476c4;
    color:white;
    border:0;
    border-radius:7px;
    padding:10px 14px;
    cursor:pointer;
    text-decoration:none;
    margin:3px;
}
body.zapp-forms-layout button.secondary {
    background:#3d4654;
}
body.zapp-forms-layout button.danger {
    background:#914048;
}
body.zapp-forms-layout .row {
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
}
body.zapp-forms-layout .row>* {
    flex:1;
}
body.zapp-forms-layout .row button {
    flex:0 0 auto;
}
body.zapp-forms-layout .muted {
    color:#c3c9d2;
}
body.zapp-forms-layout .question {
    border-left:4px solid #4a88d0;
}
body.zapp-forms-layout .actions {
    display:flex;
    gap:5px;
    flex-wrap:wrap;
}

/* Existing reports layout rules, scoped to the shared Forms shell. */
body.zapp-forms-layout {
    margin: 0;
    background: #17191d;
    color: #f5f5f5;
}
body.zapp-forms-layout main {
    max-width: 1200px;
    margin: 32px auto;
    padding: 0 20px 40px;
}
body.zapp-forms-layout .card {
    background: #25282e;
    border: 1px solid #414750;
    border-radius: 12px;
    padding: 18px;
    margin: 16px 0;
}
body.zapp-forms-layout .stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
body.zapp-forms-layout .stats .card {
    flex: 1 1 150px;
}
body.zapp-forms-layout .metric {
    font-size: 28px;
    font-weight: 700;
    margin: 5px 0;
}
body.zapp-forms-layout .muted {
    color: #c0c5cf;
}
body.zapp-forms-layout table {
    width: 100%;
    border-collapse: collapse;
}
body.zapp-forms-layout th,
body.zapp-forms-layout td {
    padding: 10px;
    border-bottom: 1px solid #414750;
    text-align: left;
}
body.zapp-forms-layout th {
    white-space: nowrap;
}
body.zapp-forms-layout input,
body.zapp-forms-layout select {
    padding: 9px;
    border-radius: 7px;
    background: #17191d;
    color: white;
    border: 1px solid #798393;
    font: inherit;
}
body.zapp-forms-layout button,
body.zapp-forms-layout .button {
    display: inline-block;
    padding: 10px 14px;
    background: #3476c4;
    color: white;
    border: 0;
    border-radius: 8px;
    font: inherit;
    text-decoration: none;
    cursor: pointer;
}
body.zapp-forms-layout .filters {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}
body.zapp-forms-layout .filters label {
    display: grid;
    gap: 6px;
}

/* Existing settings layout rules, scoped to the shared Forms shell. */
body.zapp-forms-layout {
    background:#17191d;
    color:#f5f5f5;
    font-family:system-ui,Arial,sans-serif;
    margin:0;
}
body.zapp-forms-layout main {
    max-width:800px;
    margin:36px auto;
    padding:0 20px;
}
body.zapp-forms-layout .card {
    background:#25282e;
    border:1px solid #414750;
    border-radius:12px;
    padding:22px;
}
body.zapp-forms-layout button {
    background:#3476c4;
    color:white;
    padding:11px 18px;
    border:0;
    border-radius:8px;
    cursor:pointer;
}
body.zapp-forms-layout label {
    display:block;
    margin:15px 0;
}

/* Shared form-question components. */
.zapp-form-question {
    min-width: 0;
    margin-block: var(--zapp-space-4);
}

.zapp-form-question > label,
.zapp-form-question > legend {
    display: block;
    margin-bottom: var(--zapp-space-2);
}

.zapp-form-question .zapp-choice {
    display: flex;
    align-items: center;
    gap: var(--zapp-space-2);
    width: fit-content;
    max-width: 100%;
}

.zapp-form-question .zapp-choice > input[type="radio"],
.zapp-form-question .zapp-choice > input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    margin: 0;
}

.zapp-form-question input:not([type="radio"]):not([type="checkbox"]),
.zapp-form-question textarea,
.zapp-form-question select {
    max-width: 100%;
}

.zapp-form-answer {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.zapp-forms-layout .zapp-form-action-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--zapp-space-3);
}

.zapp-forms-layout .zapp-form-action-row > * {
    margin: 0;
}

/* Shared application foundation — consolidated from repeated template rules. */
:root {
    color-scheme: dark;
}

body {
    margin: 0;
    background: var(--zapp-bg);
    color: var(--zapp-text);
}

/* Reusable controls and layouts for present and future pages. */
.zapp-page-shell {
    width: min(100% - 36px, var(--zapp-content-width));
    margin-inline: auto;
}

.zapp-stack > * + * {
    margin-block-start: var(--zapp-space-4);
}

.zapp-inline-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--zapp-space-3);
}

.zapp-inline-actions > form {
    margin: 0;
}

.zapp-table-container,
.zapp-table-scroll {
    max-width: 100%;
    min-width: 0;
}

.zapp-table-container:focus-visible,
.zapp-table-scroll:focus-visible {
    outline: 2px solid var(--zapp-focus-ring);
    outline-offset: 2px;
}

@media (max-width: 700px) {
    .zapp-page-shell {
        width: min(100% - 24px, var(--zapp-content-width));
    }
}


/* Shared progressive-enhancement select: only opted-in selects are replaced. */
.zapp-select-enhanced {
    position: relative;
    display: block;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.zapp-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    min-height: 42px;
    padding: 10px 14px;
    background: var(--zapp-surface, #24272d);
    border: 1px solid var(--zapp-border, #758092);
    border-radius: 8px;
    color: var(--zapp-text, #fff);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.zapp-select-trigger::after {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    flex: 0 0 auto;
}

.zapp-select-trigger:focus-visible {
    outline: 3px solid var(--zapp-focus-ring, #9cc7ff);
    outline-offset: 2px;
}

.zapp-select-options {
    position: absolute;
    z-index: 1100;
    inset-inline: 0;
    top: calc(100% + 4px);
    max-height: min(45vh, 320px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--zapp-surface, #24272d);
    border: 1px solid var(--zapp-border, #758092);
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 12px 28px #0008;
}

.zapp-select-options[hidden] {
    display: none !important;
}

.zapp-select-option {
    display: block;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: var(--zapp-text, #fff);
    text-align: left;
    font: inherit;
    cursor: pointer;
}

.zapp-select-option:hover,
.zapp-select-option:focus-visible,
.zapp-select-option[aria-selected="true"] {
    background: #345b8b;
    color: #fff;
    outline: none;
}


/* Enhanced selects must not leave an interactive native control behind.
   display:none also prevents the operating system's separate option popup. */
.zapp-select-enhanced > select.zapp-select-native {
    display: none !important;
}

.zapp-select-enhanced > .zapp-select-options {
    box-sizing: border-box;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
}

/* Batch 3: shared visual patterns for navigation, audit entries and filters. */
.zapp-segmented-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:14px 0; }
.zapp-segmented-tabs a { display:inline-flex; align-items:center; justify-content:center; min-height:40px; padding:9px 13px; border:1px solid #536074; border-radius:8px; color:#d7e5ff; text-decoration:none; white-space:nowrap; background:#20242b; }
.zapp-segmented-tabs a:hover { background:#303b4c; }
.zapp-segmented-tabs a.active, .zapp-segmented-tabs a[aria-current="page"] { background:#354d73; border-color:#7097d0; color:#fff; font-weight:700; }
.zapp-audit-entry { padding:16px; margin:12px 0; background:#20242b; border:1px solid #414750; border-radius:10px; }
.zapp-audit-heading { display:flex; justify-content:space-between; align-items:baseline; flex-wrap:wrap; gap:8px 20px; }
.zapp-audit-actor { margin:8px 0; }
.zapp-audit-details { margin-top:10px; }
.zapp-audit-details summary { cursor:pointer; color:#a9cbff; font-weight:600; }
.zapp-audit-details pre { white-space:pre-wrap; overflow-wrap:anywhere; font-size:.88rem; color:#d4dfef; margin-bottom:0; }
.zapp-season-list { display:flex; flex-wrap:wrap; gap:12px; margin-top:18px; }
.zapp-season-item { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:12px; border:1px solid #414750; border-radius:10px; background:#20242b; }
.zapp-season-item.is-active { border-color:#7097d0; }
.zapp-season-item form { margin:0; }
.zapp-season-item button { margin:0; }
.zapp-page-actions { gap:12px; }
.zapp-filter-form { display:flex; flex-wrap:wrap; align-items:end; gap:12px 16px; }
.zapp-filter-form > label { margin:0; }
.zapp-filter-form .filter-controls { margin:0; }
.zapp-filter-form button { margin:0; }
.zapp-conversation-row { padding:14px 0; border-bottom:1px solid #414750; line-height:1.8; }
.zapp-conversation-row:last-child { border-bottom:0; }
.zapp-conversation-row form { display:inline-flex; margin-left:10px; }
.zapp-stat-grid { display:grid !important; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px; }
.zapp-stat-grid .card { min-width:0; margin:0; min-height:120px; display:flex; flex-direction:column; justify-content:center; gap:12px; }
.zapp-stat-grid .card strong { display:block; font-size:clamp(1.8rem,2.6vw,2.6rem); line-height:1.1; font-variant-numeric:tabular-nums; }
.zapp-stat-grid .card p { font-size:1rem; line-height:1.35; margin:0; }
.zapp-tile-card .zapp-tile-action { white-space:nowrap; max-width:100%; font-size:clamp(.78rem,1vw,.95rem); }
@media(max-width:600px) { .zapp-stat-grid { grid-template-columns:repeat(auto-fit,minmax(145px,1fr)); } .zapp-page-actions { width:100%; } .zapp-filter-form > label { flex:1 1 150px; } }


/* Batch 3 refinement: reusable alignment and audit display components. */
.zapp-tile-card--centered-action > .zapp-tile-action {
    align-self: center;
    text-align: center;
    margin-inline: auto;
}

.zapp-stat-grid--centered .card {
    align-items: center;
    text-align: center;
    padding: 20px 14px;
}

.zapp-report-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-block: 16px;
}

.zapp-report-actions > * {
    margin: 0;
}

.zapp-audit-changes {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.zapp-audit-change {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px 20px;
    padding: 10px 12px;
    border: 1px solid var(--zapp-border, #414750);
    border-radius: 8px;
}

.zapp-audit-change > strong {
    min-width: 125px;
}

.zapp-audit-values {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    overflow-wrap: anywhere;
}

.zapp-audit-description {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.zapp-conversation-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
}

.zapp-conversation-row form {
    margin: 0;
}

.zapp-conversation-row .zapp-btn {
    text-decoration: none;
}


/* Shared report KPI layout: use on all report statistic groups. */
.zapp-stat-grid,
body.zapp-forms-layout .zapp-stat-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 14px;
    align-items: stretch;
    margin-block: 18px;
}

.zapp-stat-grid > .card,
body.zapp-forms-layout .zapp-stat-grid > .card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 0;
    min-height: 150px;
    height: 100%;
    margin: 0;
    padding: 22px 16px;
    gap: 10px;
}

.zapp-stat-grid > .card > strong,
.zapp-stat-grid > .card > .number,
.zapp-stat-grid > .card > .metric,
body.zapp-forms-layout .zapp-stat-grid > .card > .metric {
    display: block;
    font-size: clamp(2rem, 3vw, 2.75rem);
    line-height: 1.15;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    margin: 0;
    overflow-wrap: anywhere;
}

.zapp-stat-grid > .card > .muted,
.zapp-stat-grid > .card > p,
body.zapp-forms-layout .zapp-stat-grid > .card > .muted {
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
    max-width: 100%;
}

.zapp-stat-grid > .card > .muted:first-child { order: 2; }
.zapp-stat-grid > .card > .number,
.zapp-stat-grid > .card > .metric { order: 1; }

@media (max-width: 420px) {
    .zapp-stat-grid,
    body.zapp-forms-layout .zapp-stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 145px), 1fr));
    }
}

/* Shared authentication layout. All authentication pages may use these classes. */
body.zapp-auth-page {
    box-sizing: border-box;
    padding: 24px 16px;
}
body.zapp-auth-page *,
body.zapp-auth-page *::before,
body.zapp-auth-page *::after {
    box-sizing: border-box;
}
.zapp-auth-page .login-card {
    width: min(420px, 100%);
    max-width: 100%;
    padding: clamp(24px, 5vw, 36px);
}
.zapp-auth-page .login-card form {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.zapp-auth-page .login-card form label {
    margin: 16px 0 8px;
}
.zapp-auth-page .login-card form input:not([type="hidden"]) {
    display: block;
    width: 100%;
    min-width: 0;
    margin: 0;
}
.zapp-auth-page .login-card form button[type="submit"] {
    align-self: flex-start;
    width: auto;
    margin-top: 20px;
}
.zapp-auth-register {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 0;
    color: #b8bbc2;
}
.zapp-auth-register .zapp-btn {
    margin: 0;
}

/* Shared administrative season-management components. */
.zapp-season-manager__heading h2 { margin: 0 0 6px; }
.zapp-season-manager__heading p { margin: 0 0 20px; }
.zapp-season-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.zapp-season-card { display: flex; flex-direction: column; gap: 18px; min-width: 0; padding: 20px; border: 1px solid var(--zapp-border, #414954); border-radius: 12px; background: var(--zapp-surface, #24272d); }
.zapp-season-card--active { border-color: #6b9ed9; }
.zapp-season-card__heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.zapp-season-card__year { font-size: 1.6rem; line-height: 1.2; }
.zapp-season-card__status { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 999px; font-size: .8rem; font-weight: 650; color: #c6e9d4; background: #22513c; }
.zapp-season-card__status--inactive { color: #d5dbe6; background: #3c4554; }
.zapp-season-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; margin-top: auto; }
.zapp-season-card__actions form { margin: 0; }
.zapp-season-manager__create { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--zapp-border, #414954); }
.zapp-season-manager__create h3 { margin: 0 0 12px; font-size: 1rem; }
.zapp-season-manager__create .zapp-form-action-row { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; }
.zapp-season-manager__create label { display: grid; gap: 6px; }
.zapp-season-manager__create input { width: 155px; max-width: 100%; }
.zapp-season-manager__create button { min-height: 42px; }


/* Shared inbox conversation cards, available to all messaging views. */
.zapp-conversation-list {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}

.zapp-conversation-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-width: 0;
    padding: 18px 20px;
    background: var(--zapp-surface, #25282e);
    border: 1px solid var(--zapp-border, #414a58);
    border-radius: 12px;
    transition: border-color 140ms ease, background-color 140ms ease;
}

.zapp-conversation-item:hover,
.zapp-conversation-item:focus-within {
    border-color: #729cd4;
    background: #292e38;
}

.zapp-conversation-item--unread {
    border-inline-start: 4px solid #78adf7;
}

.zapp-conversation-item__content {
    flex: 1 1 auto;
    min-width: 0;
}

.zapp-conversation-item__heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 7px;
}

.zapp-conversation-item__link {
    color: var(--zapp-text, #fff);
    font-weight: 700;
    font-size: 1.08rem;
    line-height: 1.4;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.zapp-conversation-item__link::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.zapp-conversation-item__link:focus-visible {
    outline: none;
}

.zapp-conversation-item:has(.zapp-conversation-item__link:focus-visible) {
    outline: 3px solid #9cc7ff;
    outline-offset: 2px;
}

.zapp-conversation-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 0 0 5px;
    color: #cbd2dc;
    font-size: .94rem;
}

.zapp-conversation-item__time {
    display: block;
    color: #b8c1cf;
    font-size: .86rem;
}

.zapp-conversation-item__unread {
    border-radius: 999px;
    padding: 3px 9px;
    background: #254b78;
    color: #e4f1ff;
    font-size: .77rem;
    font-weight: 700;
}

.zapp-conversation-item__actions {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    margin: 0;
}

.zapp-conversation-item__actions .zapp-btn {
    margin: 0;
}

@media (max-width: 520px) {
    .zapp-conversation-item {
        align-items: stretch;
        flex-direction: column;
        gap: 14px;
        padding: 16px;
    }

    .zapp-conversation-item__actions {
        align-self: flex-end;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zapp-conversation-item {
        transition: none;
    }
}


/* Global toast system: overlays without shifting page content. */
.zapp-toast-stack {
    position: fixed;
    top: max(16px, env(safe-area-inset-top));
    right: max(16px, env(safe-area-inset-right));
    z-index: 9999;
    width: min(390px, calc(100vw - 32px));
    display: grid;
    gap: 10px;
    pointer-events: none;
}
.zapp-toast {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: #252a33;
    color: #f5f8ff;
    border: 1px solid #67758a;
    border-left: 4px solid #6cafff;
    border-radius: 10px;
    box-shadow: 0 12px 32px #0009;
    pointer-events: auto;
    overflow-wrap: anywhere;
}
.zapp-toast--success { border-left-color: #6ad2a0; }
.zapp-toast--error { border-left-color: #f58b8b; }
.zapp-toast--warning { border-left-color: #e8bc69; }
.zapp-toast__message { flex: 1; min-width: 0; line-height: 1.5; }
.zapp-toast__close {
    flex: 0 0 auto;
    border: 0;
    padding: 0 4px;
    background: transparent;
    color: inherit;
    font: 24px/1 system-ui, sans-serif;
    cursor: pointer;
}
.zapp-toast__close:focus-visible { outline: 2px solid #a7caff; outline-offset: 3px; }

/* Ensure legacy flash containers do not occupy layout space after conversion. */
[hidden][aria-hidden="true"] { display: none !important; }

/* Compact, fully colored floating notifications. */
.zapp-toast-stack {
    top: max(82px, calc(env(safe-area-inset-top) + 12px));
    right: max(14px, env(safe-area-inset-right));
    width: min(310px, calc(100vw - 28px));
    gap: 8px;
}
.zapp-toast {
    align-items: center;
    gap: 10px;
    min-height: 0;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: .88rem;
    line-height: 1.35;
    box-shadow: 0 8px 24px #0007;
}
.zapp-toast--success {
    background: #17613f;
    border-color: #2c9667;
    color: #f4fff9;
}
.zapp-toast--error {
    background: #872b35;
    border-color: #d16b75;
    color: #fff8f8;
}
.zapp-toast--warning {
    background: #795318;
    border-color: #bd8b35;
    color: #fffaf0;
}
.zapp-toast--info {
    background: #24517c;
    border-color: #4c8bc5;
    color: #f5faff;
}
.zapp-toast__message {
    line-height: 1.35;
}
.zapp-toast__close,
.zapp-toast__close:hover,
.zapp-toast__close:focus {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    min-width: 22px;
    min-height: 22px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 5px;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font: 18px/1 system-ui, sans-serif;
}
.zapp-toast__close:hover {
    background: #ffffff24;
}
@media (max-width: 540px) {
    .zapp-toast-stack {
        top: max(74px, calc(env(safe-area-inset-top) + 12px));
    }
}


/* UX refinement: compact toasts sit closer to the top edge on all screens. */
.zapp-toast-stack {
    top: max(12px, env(safe-area-inset-top));
}

@media (max-width: 640px) {
    .zapp-toast-stack {
        top: max(12px, env(safe-area-inset-top));
    }
}


/* Consistent compact toast layout with a visual dismissal countdown. */
.zapp-toast-stack {
    top: max(8px, env(safe-area-inset-top)) !important;
    right: max(12px, env(safe-area-inset-right));
    width: min(300px, calc(100vw - 24px));
    z-index: 10000;
}
.zapp-toast {
    position: relative;
    padding: 12px 35px 15px 13px;
    display: flex;
    align-items: center;
    min-height: 0;
    overflow: hidden;
}
.zapp-toast__close {
    position: absolute;
    top: 8px;
    right: 8px;
}
.zapp-toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #0000002e;
    pointer-events: none;
}
.zapp-toast__progress-fill {
    width: 100%;
    height: 100%;
    background: #ffffffb8;
    transform-origin: left center;
    animation: zapp-toast-drain var(--zapp-toast-duration, 8000ms) linear forwards;
}
@keyframes zapp-toast-drain {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}
@media (prefers-reduced-motion: reduce) {
    .zapp-toast__progress-fill { animation: none; }
}

/* Toast dismissal is a transparent icon, never a global primary button. */
body .zapp-toast .zapp-toast__close,
body.zapp-forms-layout .zapp-toast .zapp-toast__close,
body .zapp-toast .zapp-toast__close:hover,
body.zapp-forms-layout .zapp-toast .zapp-toast__close:hover,
body .zapp-toast .zapp-toast__close:focus {
    appearance: none !important;
    display: grid !important;
    place-items: center !important;
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 4px !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
    color: inherit !important;
    font: 20px/1 system-ui, sans-serif !important;
    text-transform: none !important;
}
body .zapp-toast .zapp-toast__close:hover {
    background: #ffffff22 !important;
}

/* Reusable scrollable checkbox list: show complete rows at the viewport edge. */
.zapp-checkbox-list {
    max-height: 288px;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.zapp-checkbox-list > label {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    box-sizing: border-box;
    padding: 0 12px;
    margin: 0;
    line-height: 1.4;
    cursor: pointer;
}

.zapp-checkbox-list > label > input[type="checkbox"] {
    flex: 0 0 auto;
    margin: 0;
}

@media (max-width: 520px) {
    .zapp-checkbox-list {
        max-height: 240px;
    }
}


/* Application-wide typography and record layout.
   These opt-in heading classes are applied across module templates, and
   intentionally override older page-local font declarations. */
body main h1.zapp-page-heading,
body main h2.zapp-section-heading {
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif !important;
    font-style: normal;
    letter-spacing: normal;
    text-transform: none;
}

body main h1.zapp-page-heading {
    font-size: clamp(1.65rem, 2.4vw, 2rem);
    font-weight: 750;
    line-height: 1.25;
    margin: 0 0 20px;
}

body main h2.zapp-section-heading {
    font-size: clamp(1.2rem, 1.8vw, 1.45rem);
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 16px;
}

.zapp-page-actions {
    margin: 0 0 18px;
}

.zapp-notification-history {
    margin: 24px 0;
}

.zapp-record-list {
    display: grid;
    gap: 12px;
}

.zapp-record-card {
    min-width: 0;
    background: var(--zapp-surface);
    border: 1px solid var(--zapp-border);
    border-radius: var(--zapp-card-radius);
    padding: 18px 20px;
}

.zapp-record-card__title {
    margin: 0 0 8px;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.zapp-record-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 0 0 12px;
    color: var(--zapp-muted);
    font-size: .9rem;
    line-height: 1.5;
}

.zapp-record-card__body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.55;
}

@media (max-width: 600px) {
    .zapp-record-card {
        padding: 16px;
    }
}


/* Reusable centered navigation cards. Apply to dashboard and future module hubs. */
.zapp-tile-grid > .zapp-nav-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    height: 100%;
    min-height: 220px;
}

.zapp-tile-grid > .zapp-nav-card h2 {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.35;
}

.zapp-tile-grid > .zapp-nav-card p {
    margin: 0;
    max-width: 35ch;
    line-height: 1.55;
}

.zapp-tile-grid > .zapp-nav-card .zapp-tile-action {
    align-self: center;
    margin: auto auto 0;
    text-align: center;
    max-width: 100%;
    white-space: normal;
}

.zapp-tile-grid > .zapp-nav-card--planned {
    justify-content: flex-start;
    opacity: .72;
}

@media (max-width: 650px) {
    .zapp-tile-grid > .zapp-nav-card {
        min-height: 190px;
    }
}


/* Shared navigation tile action colors.
   Blue for standard module selectors; red for restricted/destructive actions.
   Scope this to tile action buttons so ordinary secondary controls are unchanged. */
body .zapp-tile-card a.zapp-tile-action:not(.zapp-btn--danger),
body .zapp-nav-card a.zapp-tile-action:not(.zapp-btn--danger),
body .zapp-tile-actions a.zapp-btn:not(.zapp-btn--danger) {
    background: #3476c4;
    border-color: #3476c4;
    color: #ffffff;
}

body .zapp-tile-card a.zapp-tile-action:not(.zapp-btn--danger):hover,
body .zapp-nav-card a.zapp-tile-action:not(.zapp-btn--danger):hover,
body .zapp-tile-actions a.zapp-btn:not(.zapp-btn--danger):hover {
    background: #4388d8;
    border-color: #4388d8;
    color: #ffffff;
}

body .zapp-tile-card a.zapp-tile-action.zapp-btn--danger,
body .zapp-nav-card a.zapp-tile-action.zapp-btn--danger,
body .zapp-tile-actions a.zapp-btn.zapp-btn--danger {
    background: #b73848;
    border-color: #b73848;
    color: #ffffff;
}

body .zapp-tile-card a.zapp-tile-action.zapp-btn--danger:hover,
body .zapp-nav-card a.zapp-tile-action.zapp-btn--danger:hover,
body .zapp-tile-actions a.zapp-btn.zapp-btn--danger:hover {
    background: #ce4657;
    border-color: #ce4657;
}


/* Performance request workflow: reusable administrative status cards. */
.zapp-booking-page {
    max-width: 1120px;
    margin: 28px auto;
    padding: 0 20px 60px;
}

.zapp-booking-page .card {
    background: #25282e;
    border: 1px solid #454b56;
    border-radius: 13px;
    padding: 22px;
    margin: 18px 0;
}

.zapp-booking-page textarea {
    display: block;
    width: 100%;
    min-height: 110px;
    padding: 12px;
    margin: 8px 0 16px;
    background: #17191d;
    color: #fff;
    border: 1px solid #8491a4;
    border-radius: 8px;
    box-sizing: border-box;
}

.zapp-request-filters,
.zapp-request-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0;
}

.zapp-request-filter--selected {
    background: #3476c4;
    border: 1px solid #3476c4;
    color: #fff;
}

.zapp-request-list {
    display: grid;
    gap: 16px;
}

.zapp-request-card {
    padding: 22px;
    border: 1px solid #8b6d36;
    border-left: 5px solid #c49b40;
    border-radius: 12px;
    background: #342d20;
}

.zapp-request-card--approved {
    background: #1c3429;
    border-color: #39815b;
}

.zapp-request-card--declined {
    background: #382429;
    border-color: #a94858;
}

.zapp-request-card__top {
    display: flex;
    flex-wrap: wrap;
    align-items: start;
    justify-content: space-between;
    gap: 12px;
}

.zapp-request-card__top h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.zapp-request-card a:not(.zapp-btn) {
    color: #c8e2ff;
    overflow-wrap: anywhere;
}

.zapp-request-status {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 999px;
    background: #846020;
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
}

.zapp-request-card--approved .zapp-request-status,
.zapp-request-status--approved {
    background: #287349;
}

.zapp-request-card--declined .zapp-request-status,
.zapp-request-status--declined {
    background: #a33145;
}

.zapp-request-notes {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.zapp-request-decline {
    background: #b73848;
    border-color: #b73848;
    color: #fff;
}

.zapp-booking-guidelines li {
    margin: 10px 0;
    line-height: 1.55;
}

.zapp-booking-acknowledge {
    display: flex;
    align-items: start;
    gap: 12px;
}

.zapp-booking-acknowledge input {
    flex: 0 0 auto;
    margin-top: 5px;
}

@media (max-width: 650px) {
    .zapp-booking-page {
        padding: 0 14px 40px;
    }
    .zapp-request-card {
        padding: 16px;
    }
}

/* Booking request pages use the same ZAPP type and control system as other modules. */
body:has(.zapp-booking-page),
body:has(.zapp-booking-confirmation) {
    font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.zapp-booking-page,
.zapp-booking-page button,
.zapp-booking-page input,
.zapp-booking-page select,
.zapp-booking-page textarea,
.zapp-booking-page a,
.zapp-booking-confirmation,
.zapp-booking-confirmation a {
    font-family: inherit;
}

.zapp-booking-page h1,
.zapp-booking-page h2,
.zapp-booking-confirmation h1 {
    font-family: inherit;
}

.zapp-booking-page button,
.zapp-booking-page a.zapp-btn,
.zapp-booking-confirmation a.zapp-btn {
    font: 650 0.95rem/1.25 system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 8px;
}

.zapp-booking-page button:not(.zapp-request-decline) {
    background: var(--zapp-primary);
    border: 1px solid var(--zapp-primary);
    color: #fff;
    cursor: pointer;
}

.zapp-booking-page button.zapp-request-decline {
    background: var(--zapp-danger);
    border: 1px solid var(--zapp-danger);
    color: #fff;
    cursor: pointer;
}

.zapp-booking-page button:hover,
.zapp-booking-page a.zapp-btn:hover {
    filter: brightness(1.12);
}

.zapp-booking-page .zapp-btn--secondary {
    background: var(--zapp-secondary) !important;
    border-color: #66768c !important;
    color: #fff;
}

.zapp-booking-page .zapp-request-filters a.zapp-request-filter--selected {
    background: var(--zapp-primary);
    border-color: var(--zapp-primary);
    color: #fff;
}

/* Participant experience: shared readable cards and generous touch targets. */
.zapp-participant-main {
    max-width: 1080px;
    margin: 32px auto 64px;
    padding: 0 20px;
}

.zapp-participant-main h1 {
    line-height: 1.2;
}

.zapp-participant-section {
    background: #25282e;
    border: 1px solid #454b56;
    border-radius: 13px;
    padding: 24px;
    margin: 20px 0;
}

.zapp-participant-section > h2 {
    font-size: 1.4rem;
    margin: 0 0 14px;
}

.zapp-participant-cards {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.zapp-participant-performance {
    background: #1d2026;
    border: 1px solid #4d5665;
    border-radius: 11px;
    padding: 20px;
}

.zapp-participant-performance h3 {
    font-size: 1.2rem;
    margin: 0 0 10px;
}

.zapp-participant-performance p {
    line-height: 1.5;
}

.zapp-participant-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
}

.zapp-participant-actions form {
    margin: 0;
}

.zapp-participant-actions button,
.zapp-participant-actions .zapp-btn {
    min-height: 44px;
    padding: 11px 16px;
    font: 600 1rem/1.3 system-ui, -apple-system, "Segoe UI", sans-serif;
    border-radius: 8px;
}

.zapp-participant-actions button:not(.zapp-btn--secondary) {
    background: #3476c4;
    color: #fff;
    border: 1px solid #3476c4;
}

.zapp-participant-status {
    display: inline-block;
    background: #3b4657;
    color: #fff;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: .9rem;
    font-weight: 650;
    margin: 2px 4px 2px 0;
}

.zapp-participant-status--registered {
    background: #246c46;
}

.zapp-participant-status--saved {
    background: #795d27;
}

.zapp-participant-status--unavailable {
    background: #923a48;
}

.zapp-participant-season {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.zapp-participant-season select {
    font: inherit;
    padding: 10px 12px;
    border-radius: 8px;
}

.zapp-performance-facts {
    display: grid;
    gap: 16px;
}

.zapp-performance-facts > div {
    border-bottom: 1px solid #414750;
    padding-bottom: 14px;
}

.zapp-performance-facts dt {
    color: #c1c6cf;
    font-size: .9rem;
    margin-bottom: 5px;
}

.zapp-performance-facts dd {
    font-size: 1.1rem;
    font-weight: 650;
    margin: 0;
}

.zapp-performance-description {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.zapp-attendee-list {
    columns: 2;
    column-gap: 30px;
    line-height: 2;
}

@media (max-width: 680px) {
    .zapp-participant-main {
        padding: 0 14px;
    }
    .zapp-participant-section {
        padding: 18px;
    }
    .zapp-participant-performance {
        padding: 16px;
    }
    .zapp-participant-actions > form,
    .zapp-participant-actions > .zapp-btn {
        width: 100%;
    }
    .zapp-participant-actions button {
        width: 100%;
    }
    .zapp-attendee-list {
        columns: 1;
    }
}

/* Shared admin group-editor layout. All colors and controls use ZAPP tokens/components. */
.zapp-group-page { max-width: var(--zapp-content-width); margin: 35px auto; padding: 0 20px; font-family: system-ui, Arial, sans-serif; color: var(--zapp-text); }
.zapp-group-page *, .zapp-group-page *::before, .zapp-group-page *::after { box-sizing: border-box; }
.zapp-group-section { margin: 18px 0; }
.zapp-group-field { display: block; margin: 12px 0 16px; font-weight: 600; }
.zapp-group-field > .zapp-form-control { display: block; width: 100%; max-width: 100%; margin-top: 7px; }
.zapp-group-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); gap: 10px; margin: 16px 0; }
.zapp-group-option { display: flex; align-items: flex-start; gap: 10px; padding: 13px; border: 1px solid var(--zapp-border); border-radius: var(--zapp-radius); background: var(--zapp-bg); cursor: pointer; overflow-wrap: anywhere; }
.zapp-group-option:hover { border-color: var(--zapp-primary); }
.zapp-group-option:has(input:checked) { border-color: var(--zapp-primary); background: color-mix(in srgb, var(--zapp-primary) 13%, var(--zapp-bg)); }
.zapp-group-option input[type=checkbox] { flex: 0 0 auto; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--zapp-primary); }
.zapp-group-section > form + form { margin-top: 12px; }
.zapp-group-page .zapp-section-heading { margin-top: 0; }
@media (max-width: 600px) { .zapp-group-page { margin: 20px auto; padding: 0 14px; } .zapp-group-section { padding: 16px; } }

/* Shared administrative form/list/dialog patterns. Reuse across modules. */
.zapp-form-stack { display: grid; gap: var(--zapp-space-4); }
.zapp-form-group { margin: 0; }
.zapp-choice-list { margin: 0; padding: 0; border: 1px solid var(--zapp-border); border-radius: var(--zapp-card-radius); min-width: 0; }
.zapp-choice-list legend { padding: 0 8px; font-weight: 700; }
.zapp-choice-list__body { display: grid; gap: 0; padding: 10px 16px; }
.zapp-choice-row { display: flex; align-items: flex-start; gap: 12px; padding: 14px 8px; border-bottom: 1px solid var(--zapp-border); cursor: pointer; font: inherit; }
.zapp-choice-row:last-child { border-bottom: 0; }
.zapp-choice-row input[type="checkbox"] { flex: none; width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--zapp-primary); }
.zapp-choice-row__content { display: grid; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.zapp-choice-row__detail { display: block; color: var(--zapp-muted); font-size: .9rem; font-weight: 400; }
.zapp-choice-row__detail > span { display: block; margin-top: 3px; }
.zapp-choice-row:has(input:checked) { background: color-mix(in srgb, var(--zapp-primary) 7%, transparent); }
.zapp-dialog { box-sizing: border-box; width: min(480px, calc(100% - 32px)); max-width: 100%; border: 1px solid var(--zapp-border); border-radius: var(--zapp-card-radius); padding: 24px; background: var(--zapp-surface); color: var(--zapp-text); font: inherit; }
.zapp-dialog::backdrop { background: #000a; }
.zapp-dialog__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 22px; }
.zapp-warning-text { color: #ffd28a; }
.zapp-page-shell { font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
.zapp-page-shell button, .zapp-page-shell input, .zapp-page-shell textarea, .zapp-page-shell select { font-family: inherit; }
.zapp-page-shell a:not(.zapp-btn) { color: #9dc9ff; }
@media (max-width: 600px) { .zapp-choice-list__body { padding: 8px; } .zapp-choice-row { padding: 12px 6px; } }

/* Shared calendar module: extends ZAPP tokens, buttons, cards and dialog. */
.zapp-calendar-page { font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif; }
.zapp-calendar-heading, .zapp-calendar-toolbar, .zapp-calendar-dialog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--zapp-space-3);
    flex-wrap: wrap;
}
.zapp-calendar-toolbar { justify-content: flex-start; margin: var(--zapp-space-4) 0; }
.zapp-calendar-toolbar h2 { margin: 0 auto 0 0; }
.zapp-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--zapp-space-1); }
.zapp-calendar-weekday { text-align: center; font-weight: 700; padding: var(--zapp-space-2) 0; color: var(--zapp-muted); }
.zapp-calendar-day { box-sizing: border-box; min-width: 0; min-height: 110px; padding: var(--zapp-space-2); border: 1px solid var(--zapp-border); border-radius: var(--zapp-radius); background: var(--zapp-surface); }
.zapp-calendar-day--empty { opacity: .25; }
.zapp-calendar-number { display: block; font-weight: 700; margin-bottom: var(--zapp-space-2); }
.zapp-calendar-event { display: block; width: 100%; margin: var(--zapp-space-1) 0; padding: var(--zapp-space-2); border: 1px solid var(--zapp-primary); border-radius: var(--zapp-radius); background: var(--zapp-secondary); color: var(--zapp-text); text-align: left; overflow-wrap: anywhere; cursor: pointer; font: inherit; font-size: .85rem; }
.zapp-calendar-event small { display: block; font-size: .75rem; margin-top: var(--zapp-space-1); }
.zapp-calendar-event--registered { background: color-mix(in srgb, #238357 55%, var(--zapp-surface)); border-color: #55bc8b; }
.zapp-calendar-event--waitlisted { background: color-mix(in srgb, #a87a28 45%, var(--zapp-surface)); border-color: #d8a74b; }
.zapp-calendar-event--queued { background: var(--zapp-secondary); border-color: var(--zapp-muted); }
.zapp-calendar-event:hover, .zapp-calendar-event:focus-visible { outline: 2px solid var(--zapp-primary-hover); outline-offset: 1px; }
.zapp-calendar-overlay:not([hidden]) { position: fixed; inset: 0; z-index: 1200; display: flex; align-items: center; justify-content: center; background: #000b; padding: var(--zapp-space-3); }
.zapp-calendar-dialog { width: min(650px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: 0 15px 60px #0007; }
.zapp-calendar-dialog h2 { margin: 0; }
.zapp-calendar-member { border: 1px solid var(--zapp-border); border-radius: var(--zapp-radius); padding: var(--zapp-space-3); margin: var(--zapp-space-3) 0; }
.zapp-calendar-member h3 { margin: 0 0 var(--zapp-space-2); }
.zapp-calendar-dialog p { overflow-wrap: anywhere; }
body.zapp-calendar-modal-open { overflow: hidden; }
@media (max-width: 650px) {
    .zapp-calendar-grid { gap: 2px; }
    .zapp-calendar-day { min-height: 76px; padding: 3px; }
    .zapp-calendar-number { font-size: .8rem; }
    .zapp-calendar-event { font-size: .7rem; padding: 4px 2px; }
    .zapp-calendar-weekday { font-size: .75rem; }
    .zapp-calendar-dialog { max-height: 96vh; padding: var(--zapp-space-3); }
}

/* Participant Help Center and reusable contextual help */
.zapp-help-actions {
    display: flex;
    justify-content: flex-end;
    margin: 8px 0 16px;
}
.zapp-help-dialog {
    width: min(580px, calc(100% - 32px));
    max-height: 85vh;
    overflow-y: auto;
}
.zapp-help-dialog h2 {
    margin-top: 0;
}
.zapp-help-steps,
.zapp-help-section ol {
    line-height: 1.65;
    padding-left: 24px;
}
.zapp-help-steps li,
.zapp-help-section li {
    margin-bottom: 10px;
}
.zapp-help-index {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 28px;
}
.zapp-help-section {
    scroll-margin-top: 24px;
}

/* Small, blue participant help icon — shared on all participant pages. */
.zapp-help-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 5px;
    color: var(--zapp-primary-hover, #4389dc);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 50%;
    cursor: pointer;
}
.zapp-help-icon-button svg {
    display: block;
    width: 23px;
    height: 23px;
}
.zapp-help-icon-button:hover {
    background: rgba(67, 137, 220, 0.12);
}
.zapp-help-icon-button:focus-visible {
    outline: 2px solid var(--zapp-primary-hover, #4389dc);
    outline-offset: 2px;
}

/* Participant help icons: override the generic Forms button rules. */
button.zapp-help-icon-button,
body.zapp-forms-layout button.zapp-help-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 5px;
    margin: 0;
    background: transparent;
    color: #4389dc;
    border: 0;
    border-radius: 50%;
    box-shadow: none;
    appearance: none;
    cursor: pointer;
}
button.zapp-help-icon-button:hover,
body.zapp-forms-layout button.zapp-help-icon-button:hover {
    background: rgba(67, 137, 220, 0.12);
}
button.zapp-help-icon-button svg {
    width: 23px;
    height: 23px;
    flex: 0 0 23px;
}
