/* ============================================================
   ROYAL SWIMMING ACADEMY — MEMBER PORTAL DESIGN SYSTEM
   Tokens + components. Layered on top of Bootstrap 5.3.
   ------------------------------------------------------------
   Brand:  purple #2e3192 · yellow #f8b800 · pink #f40064
   ============================================================ */

:root {
    /* --- Brand: royal blue (logo #2e3192) — token names kept as --rsa-purple-* to avoid churn --- */
    --rsa-purple-50:  #f3f3f9;
    --rsa-purple-100: #e0e0ef;
    --rsa-purple-200: #bcbddc;
    --rsa-purple-300: #9698c8;
    --rsa-purple-400: #686bb0;
    --rsa-purple-500: #474a9f;
    --rsa-purple-600: #2e3192;
    --rsa-purple-700: #262878;
    --rsa-purple-800: #1e205f;
    --rsa-purple-900: #151642;

    /* --- Brand: yellow --- */
    --rsa-yellow-50:  #fffaeb;
    --rsa-yellow-100: #fdf0c7;
    --rsa-yellow-200: #fbe291;
    --rsa-yellow-400: #fac52e;
    --rsa-yellow-500: #f8b800;
    --rsa-yellow-600: #d09800;
    --rsa-yellow-700: #966d00;

    /* --- Brand: pink --- */
    --rsa-pink-50:  #ffeef4;
    --rsa-pink-100: #ffd6e4;
    --rsa-pink-200: #ffadc9;
    --rsa-pink-400: #ff3d86;
    --rsa-pink-500: #f40064;
    --rsa-pink-600: #cc0054;
    --rsa-pink-700: #9e0041;

    /* --- Neutrals --- */
    --rsa-white:    #ffffff;
    --rsa-gray-50:  #f8f8fb;
    --rsa-gray-100: #f1f0f6;
    --rsa-gray-200: #e5e3ed;
    --rsa-gray-300: #d3d0de;
    --rsa-gray-400: #a3a0b3;
    --rsa-gray-500: #6f6c81;
    --rsa-gray-600: #514e63;
    --rsa-gray-700: #3a3849;
    --rsa-gray-800: #262433;
    --rsa-gray-900: #16141f;

    /* --- Status --- */
    --rsa-success:    #12855f;
    --rsa-success-bg: #e4f6ef;
    --rsa-warning:    #b07b00;
    --rsa-warning-bg: var(--rsa-yellow-50);
    --rsa-danger:     var(--rsa-pink-600);
    --rsa-danger-bg:  var(--rsa-pink-50);
    --rsa-info:       var(--rsa-purple-600);
    --rsa-info-bg:    var(--rsa-purple-50);

    /* --- Surfaces --- */
    --rsa-page-bg:   #f3f4fa;
    --rsa-surface:   #ffffff;
    --rsa-line:      var(--rsa-gray-200);
    --rsa-line-soft: var(--rsa-gray-100);

    /* --- Type --- */
    --rsa-font: 'Inter', 'Aptos', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
    --rsa-font-display: 'Outfit', 'Inter', 'Aptos Display', 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif;
    /* references, event codes, account numbers — same humanist face, just
       weighted and pill-boxed; no monospace anywhere by request */
    --rsa-font-mono: var(--rsa-font);

    /* --- Shape --- */
    --rsa-radius-sm: 8px;
    --rsa-radius:    12px;
    --rsa-radius-lg: 16px;
    --rsa-radius-xl: 22px;

    /* --- Elevation (blue-tinted, not grey) --- */
    --rsa-shadow-xs: 0 1px 2px rgba(46, 49, 146, .05);
    --rsa-shadow-sm: 0 1px 3px rgba(46, 49, 146, .07), 0 1px 2px rgba(46, 49, 146, .05);
    --rsa-shadow-md: 0 6px 16px -6px rgba(46, 49, 146, .16), 0 2px 6px -2px rgba(46, 49, 146, .07);
    --rsa-shadow-lg: 0 18px 38px -14px rgba(46, 49, 146, .26), 0 6px 14px -8px rgba(46, 49, 146, .12);

    --rsa-ring: 0 0 0 3px rgba(46, 49, 146, .16);

    /* --- Motion --- */
    --rsa-fast: 140ms cubic-bezier(.4, 0, .2, 1);
    --rsa-base: 220ms cubic-bezier(.4, 0, .2, 1);

    /* --- Shell metrics --- */
    --rsa-sidebar-w: 264px;
    --rsa-topbar-h:  64px;

    /* --- Bootstrap remap --- */
    --bs-primary: #2e3192;
    --bs-primary-rgb: 47, 16, 110;
    --bs-link-color: #2e3192;
    --bs-link-color-rgb: 47, 16, 110;
    --bs-link-hover-color: #1e205f;
    --bs-body-color: #3a3849;
    --bs-body-color-rgb: 58, 56, 73;
    --bs-body-bg: #f3f4fa;
    --bs-border-color: #e5e3ed;
    --bs-secondary-color: #6f6c81;
    --bs-emphasis-color: #16141f;
    --bs-border-radius: 12px;
    --bs-border-radius-sm: 8px;
    --bs-border-radius-lg: 16px;
    --bs-focus-ring-color: rgba(46, 49, 146, .2);
}

/* ============================================================
   BASE
   ============================================================ */

html, body {
    font-family: var(--rsa-font);
    color: var(--rsa-gray-700);
    background: var(--rsa-page-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--rsa-font-display);
    color: var(--rsa-gray-900);
    font-weight: 650;
    letter-spacing: -.015em;
}

a { color: var(--rsa-purple-600); text-decoration: none; }
a:hover { color: var(--rsa-purple-800); }

code, .font-mono {
    font-family: var(--rsa-font);
    font-size: .8125em;
    font-weight: 600;
    letter-spacing: .015em;
    font-variant-numeric: tabular-nums;
    color: var(--rsa-purple-700);
    background: var(--rsa-purple-50);
    border: 1px solid var(--rsa-purple-100);
    border-radius: 6px;
    padding: .1em .45em;
}

/* Identity strings (emails, names-as-data): body face, just weighted —
   an email in monospace reads like a dev tool, not a person. */
.ident {
    font-weight: 600;
    color: var(--rsa-gray-800);
    letter-spacing: -.005em;
    overflow-wrap: anywhere;
}

::selection { background: var(--rsa-purple-100); color: var(--rsa-purple-800); }

:focus-visible {
    outline: 2px solid var(--rsa-purple-500);
    outline-offset: 2px;
}

/* ============================================================
   BUTTONS (Bootstrap overrides + brand variants)
   ============================================================ */

.btn {
    --bs-btn-border-radius: var(--rsa-radius-sm);
    font-weight: 550;
    letter-spacing: -.005em;
    transition: background var(--rsa-fast), border-color var(--rsa-fast),
                color var(--rsa-fast), box-shadow var(--rsa-fast), transform var(--rsa-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
}
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn-primary,
.btn-brand {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--rsa-purple-600);
    --bs-btn-border-color: var(--rsa-purple-600);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--rsa-purple-700);
    --bs-btn-hover-border-color: var(--rsa-purple-700);
    --bs-btn-active-bg: var(--rsa-purple-800);
    --bs-btn-active-border-color: var(--rsa-purple-800);
    --bs-btn-disabled-bg: var(--rsa-purple-600);
    --bs-btn-disabled-border-color: var(--rsa-purple-600);
    color: #fff;
    background: var(--rsa-purple-600);
    border: 1px solid var(--rsa-purple-600);
}
.btn-primary:disabled, .btn-brand:disabled,
.btn-primary.disabled, .btn-brand.disabled {
    color: #fff;
    background: var(--rsa-purple-600);
    border-color: var(--rsa-purple-600);
    opacity: .45;
}
.btn-pink:disabled { color: #fff; opacity: .45; }
.btn-sunshine:disabled { color: var(--rsa-purple-800); opacity: .5; }
.btn-primary:hover, .btn-brand:hover {
    background: var(--rsa-purple-700);
    border-color: var(--rsa-purple-700);
    color: #fff;
    box-shadow: 0 6px 16px -6px rgba(46, 49, 146, .45);
}

/* Fills brand blue with white text on hover, focus and press — the same pattern as the danger and
   success outlines below. It used to hover to a pale tint with dark text, but a stale rule in
   app.css painted the background solid blue underneath, leaving dark-blue text on blue. */
.btn-outline-primary {
    --bs-btn-color: var(--rsa-purple-600);
    --bs-btn-border-color: var(--rsa-purple-200);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--rsa-purple-600);
    --bs-btn-hover-border-color: var(--rsa-purple-600);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--rsa-purple-700);
    --bs-btn-active-border-color: var(--rsa-purple-700);
}

.btn-outline-secondary {
    --bs-btn-color: var(--rsa-gray-600);
    --bs-btn-border-color: var(--rsa-gray-300);
    --bs-btn-hover-color: var(--rsa-gray-800);
    --bs-btn-hover-bg: var(--rsa-gray-100);
    --bs-btn-hover-border-color: var(--rsa-gray-400);
    --bs-btn-active-bg: var(--rsa-gray-200);
    background: #fff;
}

.btn-pink {
    color: #fff;
    background: var(--rsa-pink-500);
    border: 1px solid var(--rsa-pink-500);
}
.btn-pink:hover {
    color: #fff;
    background: var(--rsa-pink-600);
    border-color: var(--rsa-pink-600);
    box-shadow: 0 6px 16px -6px rgba(244, 0, 100, .45);
}

.btn-sunshine {
    color: var(--rsa-purple-800);
    background: var(--rsa-yellow-500);
    border: 1px solid var(--rsa-yellow-500);
    font-weight: 650;
}
.btn-sunshine:hover {
    color: var(--rsa-purple-900);
    background: var(--rsa-yellow-400);
    border-color: var(--rsa-yellow-400);
    box-shadow: 0 6px 16px -6px rgba(248, 184, 0, .55);
}

.btn-soft {
    color: var(--rsa-purple-700);
    background: var(--rsa-purple-50);
    border: 1px solid var(--rsa-purple-100);
}
.btn-soft:hover {
    color: var(--rsa-purple-800);
    background: var(--rsa-purple-100);
    border-color: var(--rsa-purple-200);
}

.btn-quiet {
    color: var(--rsa-gray-600);
    background: transparent;
    border: 1px solid transparent;
}
.btn-quiet:hover { color: var(--rsa-gray-900); background: var(--rsa-gray-100); }

.btn-outline-danger {
    --bs-btn-color: var(--rsa-pink-600);
    --bs-btn-border-color: var(--rsa-pink-200);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--rsa-pink-500);
    --bs-btn-hover-border-color: var(--rsa-pink-500);
}
.btn-outline-success {
    --bs-btn-color: var(--rsa-success);
    --bs-btn-border-color: #9fdcc6;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--rsa-success);
    --bs-btn-hover-border-color: var(--rsa-success);
}

.btn-lg { --bs-btn-border-radius: var(--rsa-radius); font-size: 1rem; padding: .8rem 1.5rem; }
.btn-sm { --bs-btn-border-radius: 7px; font-size: .8125rem; }

/* ============================================================
   FORMS
   ============================================================ */

.form-label {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--rsa-gray-700);
    margin-bottom: .3rem;
    letter-spacing: .005em;
}
.form-control, .form-select {
    border-color: var(--rsa-gray-300);
    border-radius: var(--rsa-radius-sm);
    padding: .55rem .75rem;
    color: var(--rsa-gray-800);
    background-color: #fff;
    transition: border-color var(--rsa-fast), box-shadow var(--rsa-fast);
}
.form-control::placeholder { color: var(--rsa-gray-400); }
.form-control:focus, .form-select:focus {
    border-color: var(--rsa-purple-400);
    box-shadow: var(--rsa-ring);
}
.form-control:disabled, .form-control[readonly] {
    background: var(--rsa-gray-100);
    color: var(--rsa-gray-500);
}
.form-text { color: var(--rsa-gray-500); font-size: .78125rem; }
.form-check-input { border-color: var(--rsa-gray-400); }
.form-check-input:checked {
    background-color: var(--rsa-purple-600);
    border-color: var(--rsa-purple-600);
}
.form-check-input:focus { border-color: var(--rsa-purple-400); box-shadow: var(--rsa-ring); }
.validation-message, .field-validation-error { color: var(--rsa-pink-600); font-size: .8125rem; }
.invalid { outline: none; border-color: var(--rsa-pink-500) !important; }
.valid.modified:not([type=checkbox]) { outline: none; border-color: #52c39d !important; }

/* Checkbox / radio rows that read as tappable tiles */
.check-tile {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .55rem .7rem;
    border: 1px solid var(--rsa-line);
    border-radius: var(--rsa-radius-sm);
    background: #fff;
    cursor: pointer;
    transition: border-color var(--rsa-fast), background var(--rsa-fast);
    margin: 0;
}
.check-tile:hover { border-color: var(--rsa-purple-300); background: var(--rsa-purple-50); }
.check-tile:has(input:checked) {
    border-color: var(--rsa-purple-400);
    background: var(--rsa-purple-50);
    box-shadow: inset 0 0 0 1px var(--rsa-purple-300);
}
.check-tile input { margin-top: .15rem; flex-shrink: 0; }
.check-tile__text { font-size: .8125rem; line-height: 1.35; min-width: 0; }

/* ============================================================
   PAGE HEADER
   ============================================================ */

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.page-head__eyebrow {
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--rsa-purple-400);
    margin-bottom: .3rem;
}
.page-head__title {
    font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2rem);
    font-weight: 700;
    color: var(--rsa-gray-900);
    margin: 0;
    line-height: 1.15;
}
.page-head__sub {
    color: var(--rsa-gray-500);
    font-size: .875rem;
    margin: .35rem 0 0;
    max-width: 62ch;
}
.page-head__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .8125rem;
    font-weight: 550;
    color: var(--rsa-gray-500);
    margin-bottom: .75rem;
}
.back-link:hover { color: var(--rsa-purple-600); }

/* ============================================================
   PANELS (cards)
   ============================================================ */

.panel {
    background: var(--rsa-surface);
    border: 1px solid var(--rsa-line);
    border-radius: var(--rsa-radius-lg);
    box-shadow: var(--rsa-shadow-sm);
    overflow: hidden;
}
.panel + .panel { margin-top: 1.25rem; }
.panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--rsa-line-soft);
    background: linear-gradient(180deg, #fff 0%, var(--rsa-gray-50) 100%);
}
.panel__title {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin: 0;
    font-size: .9375rem;
    font-weight: 650;
    color: var(--rsa-gray-800);
}
.panel__title i { color: var(--rsa-purple-500); font-size: 1rem; }
.panel__sub { font-size: .78125rem; color: var(--rsa-gray-500); margin: .15rem 0 0; }
.panel__body { padding: 1.25rem; }
.panel__body--tight { padding: .75rem 1.25rem; }
.panel__body--flush { padding: 0; }
.panel__foot {
    padding: .9rem 1.25rem;
    border-top: 1px solid var(--rsa-line-soft);
    background: var(--rsa-gray-50);
}
.panel--accent { border-top: 3px solid var(--rsa-purple-600); }
.panel--success { border-color: #9fdcc6; }
.panel--pink { border-color: var(--rsa-pink-200); }

/* Bootstrap .card kept in sync so untouched markup still looks right */
.card {
    border: 1px solid var(--rsa-line);
    border-radius: var(--rsa-radius-lg);
    box-shadow: var(--rsa-shadow-sm);
}
.card-header {
    background: linear-gradient(180deg, #fff 0%, var(--rsa-gray-50) 100%);
    border-bottom: 1px solid var(--rsa-line-soft);
    font-weight: 650;
    color: var(--rsa-gray-800);
}

/* ============================================================
   STAT TILES
   ============================================================ */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-tile {
    position: relative;
    display: block;
    background: var(--rsa-surface);
    border: 1px solid var(--rsa-line);
    border-radius: var(--rsa-radius-lg);
    padding: 1.15rem 1.25rem;
    box-shadow: var(--rsa-shadow-xs);
    overflow: hidden;
    transition: transform var(--rsa-base), box-shadow var(--rsa-base), border-color var(--rsa-base);
    color: inherit;
}
.stat-tile::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--tile-accent, var(--rsa-purple-600));
}
a.stat-tile:hover, .stat-tile--interactive:hover {
    transform: translateY(-2px);
    box-shadow: var(--rsa-shadow-md);
    border-color: var(--rsa-purple-200);
    color: inherit;
}
.stat-tile__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    margin-bottom: .55rem;
}
.stat-tile__label {
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--rsa-gray-500);
}
.stat-tile__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    background: var(--tile-soft, var(--rsa-purple-50));
    color: var(--tile-accent, var(--rsa-purple-600));
    flex-shrink: 0;
}
.stat-tile__value {
    font-family: var(--rsa-font-display);
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.02em;
    color: var(--tile-accent, var(--rsa-purple-600));
}
.stat-tile__value--sm { font-size: 1.375rem; }
.stat-tile__meta { font-size: .78125rem; color: var(--rsa-gray-500); margin-top: .3rem; }

.stat-tile--purple { --tile-accent: var(--rsa-purple-600); --tile-soft: var(--rsa-purple-50); }
.stat-tile--pink   { --tile-accent: var(--rsa-pink-500);   --tile-soft: var(--rsa-pink-50); }
.stat-tile--yellow { --tile-accent: var(--rsa-yellow-600); --tile-soft: var(--rsa-yellow-50); }
.stat-tile--green  { --tile-accent: var(--rsa-success);    --tile-soft: var(--rsa-success-bg); }
.stat-tile--gray   { --tile-accent: var(--rsa-gray-500);   --tile-soft: var(--rsa-gray-100); }

/* ============================================================
   CHIPS / BADGES
   ============================================================ */

.chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .6rem;
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 650;
    letter-spacing: .02em;
    line-height: 1.5;
    white-space: nowrap;
    background: var(--rsa-gray-100);
    color: var(--rsa-gray-600);
    border: 1px solid transparent;
}
.chip i { font-size: .8125rem; }
.chip--purple { background: var(--rsa-purple-50);  color: var(--rsa-purple-700); border-color: var(--rsa-purple-100); }
.chip--pink   { background: var(--rsa-pink-50);    color: var(--rsa-pink-700);   border-color: var(--rsa-pink-100); }
.chip--yellow { background: var(--rsa-yellow-50);  color: #8a6500;               border-color: var(--rsa-yellow-100); }
.chip--green  { background: var(--rsa-success-bg); color: #0b6349;               border-color: #b9e6d5; }
.chip--gray   { background: var(--rsa-gray-100);   color: var(--rsa-gray-600);   border-color: var(--rsa-gray-200); }
.chip--outline{ background: #fff; color: var(--rsa-gray-600); border-color: var(--rsa-line); }
.chip--dot::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* Bootstrap badge remap so untouched markup stays on-brand */
.badge.bg-primary   { background: var(--rsa-purple-600) !important; }
.badge.bg-secondary { background: var(--rsa-gray-500) !important; }
.badge.bg-success   { background: var(--rsa-success) !important; }
.badge.bg-warning   { background: var(--rsa-yellow-500) !important; color: var(--rsa-purple-800) !important; }
.badge.bg-danger    { background: var(--rsa-pink-500) !important; }
.badge.bg-info      { background: var(--rsa-purple-100) !important; color: var(--rsa-purple-700) !important; }

/* ============================================================
   AVATARS
   ============================================================ */

.avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: .875rem;
    letter-spacing: .02em;
    background: var(--rsa-purple-100);
    color: var(--rsa-purple-700);
    flex-shrink: 0;
    text-transform: uppercase;
}
.avatar--lg { width: 64px; height: 64px; font-size: 1.375rem; }
.avatar--xl { width: 76px; height: 76px; font-size: 1.625rem; }
.avatar--swimmer  { background: var(--rsa-purple-100); color: var(--rsa-purple-700); }
.avatar--official { background: var(--rsa-yellow-100); color: #8a6500; }
.avatar--pink     { background: var(--rsa-pink-100);   color: var(--rsa-pink-700); }
.avatar--ring { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--rsa-purple-100); }

/* ============================================================
   REGISTRATION CARDS
   ============================================================ */

.reg-card {
    border: 1px solid var(--rsa-line);
    border-radius: var(--rsa-radius);
    overflow: hidden;
    background: #fff;
    transition: box-shadow var(--rsa-base), border-color var(--rsa-base);
}
.reg-card + .reg-card { margin-top: 1rem; }
.reg-card:hover { box-shadow: var(--rsa-shadow-md); border-color: var(--rsa-purple-200); }
.reg-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .85rem;
    padding: .9rem 1rem;
    background: linear-gradient(135deg, var(--rsa-purple-50) 0%, #fff 65%);
    border-bottom: 1px solid var(--rsa-line-soft);
}
.reg-card__date {
    display: grid;
    place-items: center;
    align-content: center;
    min-width: 54px;
    padding: .35rem .4rem;
    border-radius: 10px;
    background: var(--rsa-purple-600);
    color: #fff;
    line-height: 1.05;
    flex-shrink: 0;
}
.reg-card__date .m { font-size: .625rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.reg-card__date .d { font-size: 1.25rem; font-weight: 700; }
.reg-card__main { flex: 1 1 220px; min-width: 0; }
.reg-card__name { font-weight: 650; color: var(--rsa-gray-900); font-size: .9375rem; }
.reg-card__meta { font-size: .78125rem; color: var(--rsa-gray-500); margin-top: .15rem; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.reg-card__status { display: flex; flex-direction: column; align-items: flex-end; gap: .3rem; }
.reg-card__body { padding: .35rem 1rem 1rem; }

.line-item {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem 0;
    border-top: 1px solid var(--rsa-line-soft);
}
.line-item__name { font-weight: 600; color: var(--rsa-gray-800); font-size: .875rem; }
.line-item__meta { font-size: .78125rem; color: var(--rsa-gray-500); margin-top: .15rem; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.line-item__amount { text-align: right; font-size: .875rem; white-space: nowrap; }
.line-item__amount strong { color: var(--rsa-gray-900); }
.line-item__sub { font-size: .75rem; color: var(--rsa-gray-500); }

/* Totals block */
.totals {
    border-top: 1px solid var(--rsa-line);
    margin-top: .5rem;
    padding-top: .75rem;
}
.totals__row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: .8125rem;
    padding: .18rem 0;
    color: var(--rsa-gray-600);
}
.totals__row strong { color: var(--rsa-gray-800); font-weight: 600; white-space: nowrap; }
.totals__row span:first-child { min-width: 0; }
.totals__grand {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    white-space: nowrap;
    margin-top: .6rem;
    padding-top: .7rem;
    border-top: 1px dashed var(--rsa-gray-300);
    font-family: var(--rsa-font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rsa-purple-700);
}

.money-due    { color: var(--rsa-pink-600); font-weight: 650; }
.money-credit { color: var(--rsa-success);  font-weight: 650; }
.money-flat   { color: var(--rsa-gray-500); }

/* ============================================================
   MEMBER CARDS
   ============================================================ */

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.member-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem;
    border: 1px solid var(--rsa-line);
    border-radius: var(--rsa-radius-lg);
    background: #fff;
    box-shadow: var(--rsa-shadow-xs);
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: transform var(--rsa-base), box-shadow var(--rsa-base), border-color var(--rsa-base);
}
.member-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--rsa-shadow-md);
    border-color: var(--rsa-purple-200);
}
.member-card__body { flex: 1; min-width: 0; }
.member-card__chips { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }
.member-card__name {
    font-weight: 650;
    color: var(--rsa-gray-900);
    font-size: .9375rem;
    overflow: hidden;
    text-overflow: ellipsis;
}
.member-card__meta { font-size: .78125rem; color: var(--rsa-gray-500); margin-top: .1rem; }
.member-card__quals { font-size: .75rem; color: var(--rsa-gray-500); margin-top: .5rem; line-height: 1.4; }

/* Add-member call-to-action tile */
.add-tile {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: 1.1rem;
    border: 1.5px dashed var(--rsa-purple-200);
    border-radius: var(--rsa-radius-lg);
    background: var(--rsa-purple-50);
    color: var(--rsa-purple-700);
    transition: border-color var(--rsa-base), background var(--rsa-base), transform var(--rsa-base);
}
.add-tile:hover {
    border-color: var(--rsa-purple-400);
    background: var(--rsa-purple-100);
    color: var(--rsa-purple-800);
    transform: translateY(-2px);
}
.add-tile__icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: #fff;
    color: var(--rsa-purple-600);
    font-size: 1.125rem;
    flex-shrink: 0;
}
.add-tile__title { font-weight: 650; font-size: .9375rem; }
.add-tile__sub { font-size: .78125rem; opacity: .8; }

/* Pick list used on the registration builder */
.pick-card {
    border: 1px solid var(--rsa-line);
    border-radius: var(--rsa-radius);
    background: #fff;
    padding: .9rem;
    height: 100%;
    transition: border-color var(--rsa-base), box-shadow var(--rsa-base);
}
.pick-card:hover { border-color: var(--rsa-purple-200); box-shadow: var(--rsa-shadow-sm); }
.pick-card--on { border-color: var(--rsa-purple-300); box-shadow: inset 0 0 0 1px var(--rsa-purple-200); background: #fdfcff; }
.pick-card__head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.pick-editor {
    margin-top: .75rem;
    padding: .85rem;
    border-radius: var(--rsa-radius-sm);
    background: var(--rsa-purple-50);
    border: 1px solid var(--rsa-purple-100);
}
.pick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: .4rem .75rem;
}

/* ============================================================
   ACTIVITY / LEDGER LIST
   ============================================================ */

.activity { list-style: none; margin: 0; padding: 0; }
.activity__row {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: .85rem 1.25rem;
    border-bottom: 1px solid var(--rsa-line-soft);
    transition: background var(--rsa-fast);
}
.activity__row:last-child { border-bottom: none; }
.activity__row:hover { background: var(--rsa-gray-50); }
.activity__icon {
    width: 32px; height: 32px;
    border-radius: 10px;
    display: grid; place-items: center;
    font-size: .875rem;
    flex-shrink: 0;
    background: var(--rsa-gray-100);
    color: var(--rsa-gray-500);
}
.activity__icon--charge { background: var(--rsa-pink-50);    color: var(--rsa-pink-600); }
.activity__icon--credit { background: var(--rsa-success-bg); color: var(--rsa-success); }
.activity__icon--note   { background: var(--rsa-purple-50);  color: var(--rsa-purple-600); }
.activity__main { flex: 1; min-width: 0; }
.activity__title { font-size: .875rem; color: var(--rsa-gray-800); font-weight: 550; }
.activity__meta { font-size: .75rem; color: var(--rsa-gray-500); margin-top: .1rem; }
.activity__amount { font-size: .9375rem; font-weight: 650; white-space: nowrap; }

/* ============================================================
   TABLES
   ============================================================ */

.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
    color: var(--rsa-gray-700);
}
.table > thead th {
    background: var(--rsa-gray-50);
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--rsa-gray-500);
    border-bottom: 1px solid var(--rsa-line);
    white-space: nowrap;
}
.table > :not(caption) > * > * { padding: .7rem .85rem; }
.table > tbody > tr { border-color: var(--rsa-line-soft); }
.table-hover > tbody > tr:hover > * { background: var(--rsa-gray-50); }

/* ============================================================
   ALERTS / NOTICES
   ============================================================ */

.notice {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .9rem 1.1rem;
    border-radius: var(--rsa-radius);
    font-size: .875rem;
    border: 1px solid transparent;
    margin-bottom: 1.25rem;
}
.notice i { font-size: 1.05rem; line-height: 1.4; flex-shrink: 0; }
.notice__body { min-width: 0; flex: 1; }
.notice__title { font-weight: 650; }
.notice--info    { background: var(--rsa-purple-50);  color: var(--rsa-purple-800); border-color: var(--rsa-purple-100); }
.notice--info i  { color: var(--rsa-purple-500); }
.notice--success { background: var(--rsa-success-bg); color: #0b6349; border-color: #b9e6d5; }
.notice--success i { color: var(--rsa-success); }
.notice--warning { background: var(--rsa-yellow-50);  color: #7a5a00; border-color: var(--rsa-yellow-100); }
.notice--warning i { color: var(--rsa-yellow-600); }
.notice--danger  { background: var(--rsa-pink-50);    color: var(--rsa-pink-700); border-color: var(--rsa-pink-100); }
.notice--danger i { color: var(--rsa-pink-500); }

.alert { border-radius: var(--rsa-radius); border-width: 1px; font-size: .875rem; }
.alert-success { background: var(--rsa-success-bg); color: #0b6349; border-color: #b9e6d5; }
.alert-danger  { background: var(--rsa-pink-50);    color: var(--rsa-pink-700); border-color: var(--rsa-pink-100); }
.alert-warning { background: var(--rsa-yellow-50);  color: #7a5a00; border-color: var(--rsa-yellow-100); }
.alert-info    { background: var(--rsa-purple-50);  color: var(--rsa-purple-800); border-color: var(--rsa-purple-100); }

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty {
    text-align: center;
    padding: 3rem 1.5rem;
}
.empty__icon {
    width: 64px; height: 64px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 1.625rem;
    background: var(--rsa-purple-50);
    color: var(--rsa-purple-400);
}
.empty__title { font-size: 1rem; font-weight: 650; color: var(--rsa-gray-700); margin-bottom: .35rem; }
.empty__text { font-size: .875rem; color: var(--rsa-gray-500); max-width: 42ch; margin: 0 auto 1.25rem; }

/* ============================================================
   LOADING
   ============================================================ */

.loading-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    padding: 4rem 1rem;
    color: var(--rsa-gray-500);
    font-size: .875rem;
}
.loading-ring {
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 3px solid var(--rsa-purple-100);
    border-top-color: var(--rsa-purple-600);
    animation: rsa-spin .8s linear infinite;
}
@keyframes rsa-spin { to { transform: rotate(360deg); } }

.skeleton {
    border-radius: var(--rsa-radius);
    background: linear-gradient(90deg, var(--rsa-gray-100) 25%, var(--rsa-gray-200) 37%, var(--rsa-gray-100) 63%);
    background-size: 400% 100%;
    animation: rsa-shimmer 1.4s ease infinite;
}
@keyframes rsa-shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ============================================================
   MISC
   ============================================================ */

.section-label {
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--rsa-gray-400);
    margin-bottom: .5rem;
}
.divider-soft { height: 1px; background: var(--rsa-line-soft); margin: 1rem 0; border: 0; }

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1rem 1.5rem;
}
.detail-item { display: flex; align-items: flex-start; gap: .7rem; min-width: 0; }
.detail-item__icon {
    width: 34px; height: 34px;
    border-radius: 10px;
    display: grid; place-items: center;
    background: var(--rsa-purple-50);
    color: var(--rsa-purple-500);
    flex-shrink: 0;
    font-size: .9375rem;
}
.detail-item__label {
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--rsa-gray-400);
}
.detail-item__value { font-size: .875rem; color: var(--rsa-gray-800); word-break: break-word; }

.fade-in { animation: rsa-fade-up .3s ease-out both; }
@keyframes rsa-fade-up {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* ============================================================
   UPLOADS
   ============================================================ */

.upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .25rem;
    padding: 1.5rem 1rem;
    border: 1.5px dashed var(--rsa-gray-300);
    border-radius: var(--rsa-radius);
    background: var(--rsa-gray-50);
    cursor: pointer;
    text-align: center;
    transition: border-color var(--rsa-fast), background var(--rsa-fast);
}
.upload-zone:hover { border-color: var(--rsa-purple-300); background: var(--rsa-purple-50); }
.upload-zone__icon { font-size: 1.6rem; color: var(--rsa-purple-400); }
.upload-zone__text { font-size: .875rem; font-weight: 600; color: var(--rsa-gray-700); }
.upload-zone__hint { font-size: .75rem; color: var(--rsa-gray-500); }
.upload-zone__input {
    margin-top: .75rem;
    max-width: 100%;
    font-size: .8125rem;
    color: var(--rsa-gray-600);
}

.upload-current {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .75rem .9rem;
    border-radius: var(--rsa-radius-sm);
    background: var(--rsa-success-bg);
    border: 1px solid #b9e6d5;
    margin-bottom: 1rem;
}
.upload-current__icon { color: var(--rsa-success); font-size: 1.15rem; }
.upload-current__body { min-width: 0; font-size: .875rem; }

/* ============================================================
   STICKY FORM ACTIONS
   ============================================================ */

.form-actions {
    position: sticky;
    bottom: env(safe-area-inset-bottom, 0px);
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
    margin-top: 1.5rem;
    padding: .85rem 1rem;
    border: 1px solid var(--rsa-line);
    border-radius: var(--rsa-radius-lg);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: saturate(1.6) blur(10px);
    -webkit-backdrop-filter: saturate(1.6) blur(10px);
    box-shadow: var(--rsa-shadow-md);
}

/* ============================================================
   RESULT / OUTCOME CARDS (payment landing pages)
   ============================================================ */

.result-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 1.75rem;
}
.result-icon--success { background: var(--rsa-success-bg); color: var(--rsa-success); }
.result-icon--warning { background: var(--rsa-yellow-50);  color: var(--rsa-yellow-600); }
.result-icon--danger  { background: var(--rsa-pink-50);    color: var(--rsa-pink-500); }
.result-ref {
    display: inline-block;
    margin: .25rem 0 1rem;
    padding: .35rem .8rem;
    border-radius: 999px;
    background: var(--rsa-purple-50);
    border: 1px solid var(--rsa-purple-100);
    font-family: var(--rsa-font);
    font-weight: 600;
    font-size: .8125rem;
    letter-spacing: .015em;
    font-variant-numeric: tabular-nums;
    color: var(--rsa-purple-700);
}
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }

/* ============================================================
   MOTION (Montego-style entrance layer)
   Everything respects the prefers-reduced-motion block above.
   ============================================================ */

@keyframes rsa-rise {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes rsa-pop {
    0%   { transform: scale(.6); opacity: 0; }
    60%  { transform: scale(1.06); opacity: 1; }
    100% { transform: scale(1); opacity: 1; }
}

/* Page content rises in on every navigation */
.shell__content > * { animation: rsa-rise .35s cubic-bezier(.2, .7, .3, 1) both; }
.shell__content > *:nth-child(2) { animation-delay: .05s; }
.shell__content > *:nth-child(3) { animation-delay: .1s; }
.shell__content > *:nth-child(4) { animation-delay: .15s; }
.shell__content > *:nth-child(n+5) { animation-delay: .2s; }

/* Stat tiles pop in left-to-right */
.stat-grid > * { animation: rsa-rise .4s cubic-bezier(.2, .7, .3, 1) both; }
.stat-grid > *:nth-child(1) { animation-delay: .08s; }
.stat-grid > *:nth-child(2) { animation-delay: .14s; }
.stat-grid > *:nth-child(3) { animation-delay: .2s; }
.stat-grid > *:nth-child(n+4) { animation-delay: .26s; }

/* List rows stagger softly */
.activity__row,
.member-grid > *,
.reg-card { animation: rsa-rise .32s ease-out both; }
.activity__row:nth-child(1), .member-grid > *:nth-child(1) { animation-delay: .03s; }
.activity__row:nth-child(2), .member-grid > *:nth-child(2) { animation-delay: .06s; }
.activity__row:nth-child(3), .member-grid > *:nth-child(3) { animation-delay: .09s; }
.activity__row:nth-child(4), .member-grid > *:nth-child(4) { animation-delay: .12s; }
.activity__row:nth-child(5), .member-grid > *:nth-child(5) { animation-delay: .15s; }
.activity__row:nth-child(n+6), .member-grid > *:nth-child(n+6) { animation-delay: .18s; }

/* Chips that confirm something (Uploaded, Paid) get a little pop */
.chip--green { animation: rsa-pop .3s ease-out both; }

/* Sidebar nav links cascade on first paint */
.shell__nav .nav-link { animation: rsa-rise .3s ease-out both; }
.shell__nav .nav-link:nth-of-type(1) { animation-delay: .05s; }
.shell__nav .nav-link:nth-of-type(2) { animation-delay: .09s; }
.shell__nav .nav-link:nth-of-type(3) { animation-delay: .13s; }
.shell__nav .nav-link:nth-of-type(4) { animation-delay: .17s; }
.shell__nav .nav-link:nth-of-type(n+5) { animation-delay: .21s; }

/* ============================================================
   PROGRESS (upload flow)
   ============================================================ */

.progress {
    --bs-progress-bg: var(--rsa-purple-100);
    --bs-progress-bar-bg: var(--rsa-purple-600);
    height: 8px;
    border-radius: 999px;
    background: var(--rsa-purple-100);
}
.progress-bar { background-color: var(--rsa-purple-600); }
.progress-bar-striped {
    background-image: linear-gradient(45deg,
        rgba(255, 255, 255, .2) 25%, transparent 25%, transparent 50%,
        rgba(255, 255, 255, .2) 50%, rgba(255, 255, 255, .2) 75%, transparent 75%, transparent);
}

/* ============================================================
   SCROLLBARS + LAST POLISH
   ============================================================ */

html {
    scrollbar-width: thin;
    scrollbar-color: var(--rsa-gray-300) transparent;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--rsa-gray-300);
    border-radius: 999px;
    border: 2px solid var(--rsa-page-bg);
}
::-webkit-scrollbar-thumb:hover { background: var(--rsa-gray-400); }

.shell__sidebar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .28) transparent;
}
.shell__sidebar::-webkit-scrollbar { width: 6px; }
.shell__sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .24);
    border: 0;
}

/* Chips that act as links feel tappable */
a.chip { transition: box-shadow var(--rsa-fast), border-color var(--rsa-fast), transform var(--rsa-fast); }
a.chip:hover { box-shadow: var(--rsa-shadow-xs); transform: translateY(-1px); }

/* Spinner inherits brand color when used bare */
.spinner-border { --bs-spinner-border-width: .18em; color: var(--rsa-purple-500); }
.btn .spinner-border { color: inherit; }

/* ============================================================
   READABILITY & FUN LAYER (beyond the Montego reference)
   ============================================================ */

/* Money and dates line up everywhere */
.money-due, .money-credit, .money-flat,
.activity__amount, .line-item__amount, .totals,
.stat-tile__value, .reg-card__date {
    font-variant-numeric: tabular-nums;
}

/* Registration cards wear their payment state on the left edge */
.reg-card--due     { border-left: 4px solid var(--rsa-pink-500); }
.reg-card--paid    { border-left: 4px solid var(--rsa-success); }
.reg-card--partial { border-left: 4px solid var(--rsa-yellow-500); }
.reg-card--muted   { border-left: 4px solid var(--rsa-gray-300); }

/* Month separators for long ledgers */
.activity__month {
    position: sticky;
    top: var(--rsa-topbar-h);
    z-index: 5;
    padding: .45rem 1.25rem;
    background: var(--rsa-gray-50);
    border-top: 1px solid var(--rsa-line-soft);
    border-bottom: 1px solid var(--rsa-line-soft);
    font-size: .6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--rsa-gray-500);
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-variant-numeric: tabular-nums;
}
.activity__month span:last-child { letter-spacing: 0; text-transform: none; font-weight: 600; }

/* One-tap copy for banking details */
.copy-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}
.copy-btn {
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    border: 1px solid var(--rsa-line);
    background: #fff;
    color: var(--rsa-gray-500);
    font-size: .78125rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--rsa-fast), color var(--rsa-fast), border-color var(--rsa-fast);
}
.copy-btn:hover { background: var(--rsa-purple-50); color: var(--rsa-purple-600); border-color: var(--rsa-purple-200); }
.copy-btn.copied {
    background: var(--rsa-success-bg);
    color: var(--rsa-success);
    border-color: #9fdcc6;
}
.copy-btn.copied i::before { content: "\f26e"; } /* bi-check2 */

/* Celebration burst — pure CSS, used on "paid / settled" moments */
.confetti {
    position: relative;
    display: inline-block;
}
.confetti::before, .confetti::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    pointer-events: none;
    opacity: 0;
    animation: rsa-confetti 1.1s ease-out .25s;
}
.confetti::before {
    background: var(--rsa-pink-500);
    box-shadow:
        -46px -34px 0 var(--rsa-yellow-500),
        42px -46px 0 var(--rsa-purple-400),
        -60px 8px 0 var(--rsa-purple-300),
        54px 2px 0 var(--rsa-pink-400),
        -22px -58px 0 var(--rsa-success),
        20px -62px 0 var(--rsa-yellow-400);
}
.confetti::after {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--rsa-yellow-500);
    box-shadow:
        -38px -50px 0 var(--rsa-pink-400),
        50px -28px 0 var(--rsa-yellow-400),
        -56px -12px 0 var(--rsa-success),
        60px -14px 0 var(--rsa-purple-300),
        -8px -66px 0 var(--rsa-pink-500),
        34px -56px 0 var(--rsa-purple-400);
    animation-delay: .35s;
}
@keyframes rsa-confetti {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(.3) rotate(0deg); }
    12%  { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -120%) scale(1.15) rotate(140deg); }
}

/* Skeleton building blocks (loading that keeps the page's shape) */
.sk { display: block; border-radius: var(--rsa-radius-sm); }
.sk--text  { height: 12px; }
.sk--title { height: 26px; width: 240px; max-width: 60%; }
.sk--chip  { height: 22px; width: 90px; border-radius: 999px; }
.sk--tile  { height: 108px; border-radius: var(--rsa-radius-lg); }
.sk--row   { height: 64px; border-radius: 0; }
.sk--card  { height: 96px; border-radius: var(--rsa-radius-lg); }
.sk--avatar { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; }
.sk-stack > * + * { margin-top: .6rem; }

/* Mobile action bar — keeps total + primary action in thumb reach */
.mobile-bar {
    display: none;
}
@media (max-width: 1199.98px) {
    .mobile-bar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 800;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .75rem;
        padding: .65rem clamp(1rem, 3vw, 2rem) calc(.65rem + env(safe-area-inset-bottom, 0px));
        background: rgba(255, 255, 255, .94);
        backdrop-filter: saturate(1.6) blur(12px);
        -webkit-backdrop-filter: saturate(1.6) blur(12px);
        border-top: 1px solid var(--rsa-line);
        box-shadow: 0 -8px 24px -12px rgba(46, 49, 146, .25);
        animation: rsa-bar-up .3s cubic-bezier(.2, .7, .3, 1) both;
    }
    /* stop page content hiding behind the bar */
    .has-mobile-bar { padding-bottom: 84px; }
}
@keyframes rsa-bar-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.mobile-bar__label { font-size: .6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--rsa-gray-400); }
.mobile-bar__total {
    font-family: var(--rsa-font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--rsa-purple-700);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* info variant for result icons (check-your-email style pages) */
.result-icon--info { background: var(--rsa-purple-50); color: var(--rsa-purple-500); }


/* ============================================================
   NEXT-BEST-ACTION HERO (dashboard)
   One card that answers "what should I do right now?"
   ============================================================ */

.action-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.4rem 1.5rem 1.7rem;
    margin-bottom: 1.5rem;
    border-radius: var(--rsa-radius-lg);
    color: #fff;
    overflow: hidden;
    box-shadow: var(--rsa-shadow-md);
    background:
        radial-gradient(90% 140% at 100% 0%, rgba(244, 0, 100, .30) 0%, transparent 55%),
        linear-gradient(135deg, var(--rsa-purple-600) 0%, var(--rsa-purple-800) 100%);
}
.action-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 30px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 28'%3E%3Cpath d='M0 14 Q15 4 30 14 T60 14 T90 14 T120 14 V28 H0 Z' fill='rgba(255,255,255,.10)'/%3E%3C/svg%3E") repeat-x left bottom / 240px 30px;
    animation: rsa-wave 16s linear infinite;
    pointer-events: none;
}
@keyframes rsa-wave { to { background-position-x: 240px; } }

.action-hero__body { position: relative; z-index: 1; flex: 1 1 300px; min-width: 0; }
.action-hero__label {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--rsa-yellow-400);
    margin-bottom: .3rem;
}
.action-hero__title {
    font-family: var(--rsa-font-display);
    font-size: clamp(1.25rem, 1.1rem + .7vw, 1.625rem);
    font-weight: 700;
    letter-spacing: -.01em;
    color: #fff;
    margin: 0 0 .25rem;
}
.action-hero__text { font-size: .875rem; color: rgba(255, 255, 255, .78); margin: 0; max-width: 56ch; }
.action-hero__cta {
    position: relative;
    z-index: 1;
    background: #fff;
    color: var(--rsa-purple-700);
    border: 0;
    font-weight: 700;
    flex-shrink: 0;
}
.action-hero__cta:hover {
    background: var(--rsa-yellow-400);
    color: var(--rsa-purple-900);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5);
}
.action-hero--calm {
    background:
        radial-gradient(90% 140% at 100% 0%, rgba(248, 184, 0, .22) 0%, transparent 55%),
        linear-gradient(135deg, var(--rsa-purple-700) 0%, var(--rsa-purple-900) 100%);
}

/* ============================================================
   COUNTDOWN RING (next event)
   ============================================================ */

.count-ring {
    --p: 50;
    position: relative;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: conic-gradient(var(--rsa-yellow-500) calc(var(--p) * 1%), var(--rsa-yellow-100) 0);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.count-ring::before {
    content: '';
    position: absolute;
    inset: 6px;
    background: var(--rsa-surface);
    border-radius: 50%;
}
.count-ring__num {
    position: relative;
    font-family: var(--rsa-font-display);
    font-weight: 700;
    font-size: 1.125rem;
    line-height: 1.05;
    color: var(--rsa-gray-900);
    font-variant-numeric: tabular-nums;
}
.count-ring__unit {
    position: relative;
    font-size: .5rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--rsa-gray-500);
}

/* ============================================================
   WATER TOUCHES
   ============================================================ */

/* empty-state icons ripple like a drop in a pool */
.empty__icon { position: relative; }
.empty__icon::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid var(--rsa-purple-200);
    opacity: 0;
    animation: rsa-ripple 2.8s ease-out infinite;
    pointer-events: none;
}
@keyframes rsa-ripple {
    0%   { opacity: .55; transform: scale(.82); }
    70%  { opacity: 0;   transform: scale(1.28); }
    100% { opacity: 0;   transform: scale(1.28); }
}

/* ============================================================
   PRINT (pay page, ledger — parents keep records)
   ============================================================ */

@media print {
    .shell__sidebar, .shell__topbar, .shell__overlay, .shell__foot,
    .shell__burger, .mobile-bar, .form-actions,
    .action-hero, .btn, .back-link, .page-head__actions,
    .upload-zone, .copy-btn, #blazor-error-ui { display: none !important; }

    .shell__main { margin-left: 0 !important; }
    .shell__content { max-width: none !important; padding: 0 !important; }

    body, .shell { background: #fff !important; }
    .panel, .reg-card, .stat-tile {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        break-inside: avoid;
    }
    .activity__row, .line-item { break-inside: avoid; }
    .activity__month { position: static !important; }
    .pay-layout, .reg-layout { display: block !important; }
    .pay-layout > * + *, .reg-layout > * + * { margin-top: 1rem; }

    a { color: inherit !important; text-decoration: none !important; }
}


/* ============================================================
   TOASTS — transient confirmations (errors stay inline)
   ============================================================ */

.toast-pop {
    position: fixed;
    top: calc(var(--rsa-topbar-h) + 1rem);
    right: 1rem;
    z-index: 1300;
    display: flex;
    align-items: center;
    gap: .6rem;
    max-width: min(92vw, 380px);
    padding: .75rem 1rem;
    border-radius: var(--rsa-radius);
    font-size: .875rem;
    font-weight: 550;
    background: var(--rsa-gray-900);
    color: #fff;
    box-shadow: var(--rsa-shadow-lg);
    animation: rsa-toast-in .28s cubic-bezier(.2, .7, .3, 1) both;
}
.toast-pop i { font-size: 1.05rem; flex-shrink: 0; }
.toast-pop--success i { color: #4ade80; }
.toast-pop--warning i { color: var(--rsa-yellow-400); }
.toast-pop--info i    { color: var(--rsa-purple-300); }
@keyframes rsa-toast-in {
    from { opacity: 0; transform: translateY(-10px) scale(.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ============================================================
   FIRST-RUN CHECKLIST (new accounts on the dashboard)
   ============================================================ */

.starter {
    margin-bottom: 1.5rem;
    border: 1px solid var(--rsa-purple-100);
    border-radius: var(--rsa-radius-lg);
    background:
        radial-gradient(80% 120% at 100% 0%, rgba(248, 184, 0, .10) 0%, transparent 55%),
        linear-gradient(135deg, var(--rsa-purple-50) 0%, #fff 55%);
    box-shadow: var(--rsa-shadow-sm);
    overflow: hidden;
}
.starter__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: 1.1rem 1.25rem .6rem;
}
.starter__title {
    font-family: var(--rsa-font-display);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--rsa-gray-900);
    margin: 0;
}
.starter__sub { font-size: .8125rem; color: var(--rsa-gray-500); margin: .15rem 0 0; }
.starter__steps { padding: .4rem .75rem 1rem; display: grid; gap: .25rem; }
.starter__step {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .6rem .6rem;
    border-radius: var(--rsa-radius-sm);
    color: inherit;
    transition: background var(--rsa-fast);
}
a.starter__step:hover { background: rgba(255, 255, 255, .8); color: inherit; }
.starter__dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: .8125rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 2px solid var(--rsa-gray-300);
    background: #fff;
    color: var(--rsa-gray-400);
}
.starter__step--done .starter__dot {
    border-color: var(--rsa-success);
    background: var(--rsa-success);
    color: #fff;
}
.starter__step--now .starter__dot {
    border-color: var(--rsa-purple-600);
    color: var(--rsa-purple-700);
    box-shadow: 0 0 0 4px rgba(46, 49, 146, .15);
    animation: rsa-pulse 2.2s ease-in-out infinite;
}
@keyframes rsa-pulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(46, 49, 146, .15); }
    50%      { box-shadow: 0 0 0 7px rgba(46, 49, 146, .07); }
}
.starter__text { flex: 1; min-width: 0; }
.starter__name { font-size: .875rem; font-weight: 650; color: var(--rsa-gray-800); }
.starter__step--done .starter__name { color: var(--rsa-gray-500); text-decoration: line-through; text-decoration-thickness: 1px; }
.starter__hint { font-size: .78125rem; color: var(--rsa-gray-500); }
.starter__go { color: var(--rsa-gray-400); flex-shrink: 0; }
.starter__step--now .starter__go { color: var(--rsa-purple-600); }

/* ============================================================
   SHARED PAGE SCAFFOLDS (registration, pay, fundraisers)
   Promoted from page-scoped style blocks: the fundraiser pages
   reuse these layouts, so they must exist globally.
   ============================================================ */

    .reg-layout { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
    @media (min-width: 1200px) {
        .reg-layout { grid-template-columns: minmax(0, 1fr) 340px; }
        .reg-layout__aside { position: sticky; top: calc(var(--rsa-topbar-h) + 1rem); }
    }
    .reg-layout__main > .panel:first-child { margin-top: 0; }

    .event-card {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 1.1rem;
        border: 1px solid var(--rsa-line);
        border-radius: var(--rsa-radius-lg);
        background: #fff;
        box-shadow: var(--rsa-shadow-xs);
        color: inherit;
        transition: transform var(--rsa-base), box-shadow var(--rsa-base), border-color var(--rsa-base);
    }
    .event-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--rsa-shadow-md);
        border-color: var(--rsa-purple-200);
        color: inherit;
    }
    .event-card__date {
        display: grid;
        place-items: center;
        align-content: center;
        min-width: 54px;
        padding: .4rem;
        border-radius: 10px;
        background: var(--rsa-purple-600);
        color: #fff;
        line-height: 1.05;
        flex-shrink: 0;
    }
    .event-card__date .m { font-size: .625rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
    .event-card__date .d { font-size: 1.25rem; font-weight: 700; }
    .event-card__body { flex: 1; min-width: 0; }
    .event-card__name { display: block; font-weight: 650; color: var(--rsa-gray-900); }
    .event-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: .35rem; font-size: .78125rem; color: var(--rsa-gray-500); }
    .event-card__go { color: var(--rsa-gray-400); flex-shrink: 0; }

    .pay-layout { display: grid; grid-template-columns: 1fr; gap: 1.25rem; align-items: start; }
    @media (min-width: 1100px) {
        .pay-layout { grid-template-columns: minmax(0, 1fr) 340px; }
        .pay-layout__aside { position: sticky; top: calc(var(--rsa-topbar-h) + 1rem); }
    }
    .pay-layout__main > .panel:first-child,
    .pay-layout__aside > .panel:first-child { margin-top: 0; }
    .pay-layout__aside > * + * { margin-top: 1.25rem; }

    .pay-amount {
        font-family: var(--rsa-font-display);
        font-size: 1.75rem;
        font-weight: 700;
        line-height: 1.05;
        letter-spacing: -.02em;
        color: var(--rsa-purple-700);
    }
    .pay-amount--xl { font-size: 2.5rem; }

    .pay-hero { position: relative; overflow: hidden; }
    .pay-hero__stripe {
        height: 5px;
        background: linear-gradient(90deg, var(--rsa-purple-600) 0%, var(--rsa-pink-500) 60%, var(--rsa-yellow-500) 100%);
    }
    .pay-hero__badge {
        position: absolute;
        top: 1rem;
        right: 1rem;
        padding: .2rem .6rem;
        border-radius: 999px;
        background: var(--rsa-purple-50);
        color: var(--rsa-purple-700);
        font-size: .6875rem;
        font-weight: 700;
        letter-spacing: .04em;
    }
    .pay-hero__title { font-size: 1.375rem; font-weight: 700; color: var(--rsa-purple-700); margin: 0 0 .2rem; }
    .pay-marks {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: .75rem;
        flex-wrap: wrap;
        margin-top: 1rem;
        opacity: .9;
    }

    .bank-grid { display: grid; gap: .1rem; }
    .bank-grid__row {
        display: flex;
        justify-content: space-between;
        gap: 1rem;
        padding: .5rem 0;
        border-bottom: 1px solid var(--rsa-line-soft);
        font-size: .875rem;
    }
    .bank-grid__row:last-child { border-bottom: 0; }
    .bank-grid__row span { color: var(--rsa-gray-500); }
    .bank-grid__row strong { color: var(--rsa-gray-800); text-align: right; word-break: break-word; }
