/* ============================================================================
 * sv-portal.css
 *
 * Shared design system for the Life Saver Swim PARENT PORTAL (the customer-
 * facing /sv flow): sv.php, swim_book.php, sv_buy.php, sv_schedule.php,
 * sv_reschedule.php, sv_lessons.php, sv_account.php, swim-cv.php.
 *
 * Keeps the Life Saver Swim brand (navy #004e89 + cyan accent #1aaee0) — this
 * is NOT the internal cyan CRM ui-theme. Modernizes cards/buttons/inputs/slot
 * tiles/messages and adds proper mobile breakpoints.
 *
 * Linked on each portal page AFTER its inline <style>, scoped to body.sv-portal
 * so it wins the cascade and cannot leak to non-portal pages.
 *
 * CRITICAL — never resize/hide the CardConnect tokenizer iframe
 * (#cc_iframe_card_token, .card-frame-wrapper) or the hidden #card_token
 * field; the tokenizer is rendered borderless so its fields sit flush inside
 * the surrounding Payment card. Never change .slot-grid / .pkg-grid
 * grid-template-columns.
 * ============================================================================ */

body.sv-portal {
    color-scheme: light;
    --sv-primary:        #004e89;
    --sv-primary-deep:   #003a6b;
    --sv-accent:         #1aaee0;
    --sv-accent-deep:    #1591bd;
    --sv-bg:             #f5f8fb;
    --sv-card:           #ffffff;
    --sv-text:           #1f3242;
    --sv-text-soft:      #5b6b7c;
    --sv-muted:          #8aa0b2;
    --sv-border:         #e2eaf1;
    --sv-border-strong:  #cfdde9;
    --sv-success-soft:   #e8f5e9;
    --sv-success:        #2e7d32;
    --sv-error-soft:     #fdecea;
    --sv-error:          #b71c1c;
    --sv-warning-soft:   #fff8e1;
    --sv-warning:        #8a6d3b;
    --sv-radius:         14px;
    --sv-radius-sm:      9px;
    --sv-shadow:         0 2px 10px rgba(0, 78, 137, .06), 0 1px 3px rgba(0, 78, 137, .05);
    --sv-shadow-pop:     0 8px 28px rgba(0, 78, 137, .12);
    --sv-font:           -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, "Helvetica Neue", sans-serif;
}

/* ---------- Shell ------------------------------------------------------- */
body.sv-portal {
    background: var(--sv-bg) !important;
    color: var(--sv-text);
    font-family: var(--sv-font);
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}
body.sv-portal .sv-container,
body.sv-portal .sb-container,
body.sv-portal .main-container {
    padding-left: 16px;
    padding-right: 16px;
}

/* ---------- Brand bar / header ----------------------------------------- */
body.sv-portal .sv-brandbar,
body.sv-portal .company-header {
    text-align: center;
}
body.sv-portal .sv-brandbar .org-name,
body.sv-portal .company-header h1,
body.sv-portal .company-header .company-name {
    color: var(--sv-primary) !important;
    font-weight: 700;
    letter-spacing: -.01em;
}
body.sv-portal .sv-brandbar img,
body.sv-portal .company-logo {
    max-height: 64px;
    width: auto;
}

/* ---------- Cards ------------------------------------------------------- */
body.sv-portal .sv-card,
body.sv-portal .sb-card,
body.sv-portal .sv-login-card,
body.sv-portal .booking-card,
body.sv-portal .student-card,
body.sv-portal .add-child-card,
body.sv-portal .purchase-card,
body.sv-portal .pkg-card,
body.sv-portal .summary-card,
body.sv-portal .info-section {
    background: var(--sv-card) !important;
    border: 1px solid var(--sv-border) !important;
    border-radius: var(--sv-radius) !important;
    box-shadow: var(--sv-shadow) !important;
}

/* Headings */
body.sv-portal h1,
body.sv-portal h2,
body.sv-portal h3,
body.sv-portal .greeting,
body.sv-portal .student-name-header {
    color: var(--sv-text);
    letter-spacing: -.01em;
}
body.sv-portal .muted,
body.sv-portal .sv-empty,
body.sv-portal .empty,
body.sv-portal .text-muted,
body.sv-portal .info-label {
    color: var(--sv-text-soft) !important;
}

/* ---------- Buttons ----------------------------------------------------- */
body.sv-portal .btn-primary,
body.sv-portal .pay-btn,
body.sv-portal .payment-btn {
    background: var(--sv-primary) !important;
    border-color: var(--sv-primary) !important;
    color: #fff !important;
    border-radius: var(--sv-radius-sm) !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    transition: background .15s ease, transform .05s ease;
}
body.sv-portal .btn-primary:hover,
body.sv-portal .pay-btn:hover,
body.sv-portal .payment-btn:hover {
    background: var(--sv-primary-deep) !important;
    border-color: var(--sv-primary-deep) !important;
    color: #fff !important;
}
body.sv-portal .btn-primary:active,
body.sv-portal .pay-btn:active { transform: translateY(1px); }
body.sv-portal .btn-primary:disabled,
body.sv-portal .pay-btn:disabled,
body.sv-portal .payment-btn:disabled {
    opacity: .5 !important;
    cursor: not-allowed;
}
/* Accent (secondary) actions */
body.sv-portal .btn-outline-primary {
    color: var(--sv-primary) !important;
    border-color: var(--sv-primary) !important;
    border-radius: var(--sv-radius-sm) !important;
    font-weight: 600 !important;
}
body.sv-portal .btn-outline-primary:hover {
    background: var(--sv-primary) !important;
    color: #fff !important;
}
body.sv-portal .btn-outline-secondary,
body.sv-portal .btn-outline-danger {
    border-radius: var(--sv-radius-sm) !important;
    font-weight: 600 !important;
}
/* Buy / add actions — soften Bootstrap green into the brand-friendly success */
body.sv-portal .btn-success {
    background: var(--sv-success) !important;
    border-color: var(--sv-success) !important;
    color: #fff !important;
    border-radius: var(--sv-radius-sm) !important;
    font-weight: 600 !important;
}
body.sv-portal .btn-success:hover {
    background: #256528 !important;
    border-color: #256528 !important;
}
/* Link-style buttons */
body.sv-portal .btn-link,
body.sv-portal .sv-resend {
    color: var(--sv-primary) !important;
    text-decoration: none;
    font-weight: 600;
}
body.sv-portal .btn-link:hover,
body.sv-portal .sv-resend:hover { color: var(--sv-primary-deep) !important; text-decoration: underline; }
body.sv-portal .sv-resend:disabled {
    color: var(--sv-text-soft) !important;
    cursor: default;
    text-decoration: none;
    opacity: 0.7;
}

/* ---------- Inputs ------------------------------------------------------ */
body.sv-portal .form-control,
body.sv-portal .form-select,
body.sv-portal .sv-code-input,
body.sv-portal .sv-intake-input,
body.sv-portal input[type="text"],
body.sv-portal input[type="tel"],
body.sv-portal input[type="email"],
body.sv-portal textarea {
    color-scheme: light;
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid var(--sv-border-strong) !important;
    border-radius: var(--sv-radius-sm) !important;
    color: var(--sv-text) !important;
    background: var(--sv-card) !important;
    -webkit-text-fill-color: var(--sv-text);
    transition: border-color .15s ease, box-shadow .15s ease;
}
body.sv-portal .form-control:focus,
body.sv-portal .form-select:focus,
body.sv-portal .sv-code-input:focus,
body.sv-portal .sv-intake-input:focus {
    border-color: var(--sv-accent) !important;
    box-shadow: 0 0 0 3px rgba(26, 174, 224, .18) !important;
    outline: none !important;
}
body.sv-portal label,
body.sv-portal .form-label {
    color: var(--sv-text) !important;
    font-weight: 600;
}

/* ---------- Message banners -------------------------------------------- */
body.sv-portal .sv-msg,
body.sv-portal .sb-msg {
    border-radius: var(--sv-radius-sm) !important;
    border-left-width: 4px !important;
    border-left-style: solid !important;
}
body.sv-portal .sv-msg.error,
body.sv-portal .sb-msg.error,
body.sv-portal .payment-alert {
    background: var(--sv-error-soft) !important;
    color: var(--sv-error) !important;
    border-color: var(--sv-error) !important;
}
body.sv-portal .sv-msg.success,
body.sv-portal .sb-msg.success,
body.sv-portal .success-message,
body.sv-portal .fresh-booking-message {
    background: var(--sv-success-soft) !important;
    color: var(--sv-success) !important;
    border-color: var(--sv-success) !important;
}
body.sv-portal .sv-msg.warning,
body.sv-portal .sb-msg.warning {
    background: var(--sv-warning-soft) !important;
    color: var(--sv-warning) !important;
    border-color: var(--sv-warning) !important;
}
body.sv-portal .sv-msg.info,
body.sv-portal .sb-msg.info {
    background: #e8f6fc !important;
    color: #0b2b46 !important;
    border-color: #1aaee0 !important;
}
body.sv-portal .sv-msg.info a {
    color: var(--sv-primary) !important;
    font-weight: 700;
}
body.sv-portal .sv-bought-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
body.sv-portal .sv-bought-banner .sv-bought-text { flex: 1 1 220px; }
body.sv-portal .sv-bought-banner .btn { flex: 0 0 auto; }

/* ---------- Booked confirmation hero (post-booking, sv.php) ------------- */
body.sv-portal .sv-booked-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    margin-bottom: 16px;
    border-radius: var(--sv-radius);
    background: linear-gradient(135deg, #0e7490 0%, #15803d 100%);
    color: #fff;
    box-shadow: 0 10px 26px rgba(14, 116, 144, .32);
    animation: sv-booked-pop .35s ease-out;
}
@keyframes sv-booked-pop {
    0%   { transform: scale(.96); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
body.sv-portal .sv-booked-icon {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .22);
    border: 2px solid rgba(255, 255, 255, .65);
    font-size: 1.4rem;
    color: #fff;
}
body.sv-portal .sv-booked-body { min-width: 0; }
body.sv-portal .sv-booked-body h2 {
    margin: 0 0 4px;
    font-size: 1.35rem;
    font-weight: 850;
    color: #fff;
    line-height: 1.2;
}
body.sv-portal .sv-booked-detail {
    margin: 0 0 4px;
    font-size: .95rem;
    font-weight: 600;
    color: #eafcf3;
    line-height: 1.45;
}
body.sv-portal .sv-booked-detail strong { color: #fff; font-weight: 800; }
body.sv-portal .sv-booked-sub {
    margin: 0;
    font-size: .85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .82);
}
@media (max-width: 520px) {
    body.sv-portal .sv-booked-hero { padding: 16px; gap: 12px; }
    body.sv-portal .sv-booked-icon { width: 44px; height: 44px; font-size: 1.15rem; }
    body.sv-portal .sv-booked-body h2 { font-size: 1.18rem; }
}

/* ---------- Sibling back-to-back nudge (post-booking, sv.php) ----------- */
body.sv-portal .sv-b2b-nudge {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    border-radius: var(--sv-radius-sm);
    border: 1px solid #f0d69a;
    border-left: 4px solid #e6a817;
    background: #fff6e5;
    color: #5c4400;
}
body.sv-portal .sv-b2b-nudge-icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffe9bf;
    color: #b07c00;
    font-size: 1.05rem;
}
body.sv-portal .sv-b2b-nudge-body { flex: 1 1 240px; font-size: .93rem; line-height: 1.45; }
body.sv-portal .sv-b2b-nudge-cta { flex: 0 0 auto; white-space: nowrap; }

/* ---------- Action alert (mirrors the s_customer "needs action" strip) --- */
body.sv-portal .sv-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: var(--sv-radius);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--sv-alert-edge, #f0d69a);
    border-left: 5px solid var(--sv-alert-accent, #e6a817);
    background: var(--sv-alert-bg, #fff6e5);
    color: var(--sv-text);
    box-shadow: var(--sv-shadow);
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}
body.sv-portal a.sv-alert:hover {
    transform: translateY(-2px);
    box-shadow: var(--sv-shadow-pop);
    text-decoration: none;
    color: var(--sv-text);
}
body.sv-portal .sv-alert--warning {
    --sv-alert-bg: #fff6e5;
    --sv-alert-edge: #f0d69a;
    --sv-alert-accent: #e6a817;
}
body.sv-portal .sv-alert--danger {
    --sv-alert-bg: #fdecec;
    --sv-alert-edge: #f2b8b8;
    --sv-alert-accent: #dc2626;
}
body.sv-portal .sv-alert-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #fff;
    background: var(--sv-alert-accent, #e6a817);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
body.sv-portal .sv-alert-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}
body.sv-portal .sv-alert-title {
    font-weight: 800;
    font-size: 0.92rem;
    line-height: 1.25;
    color: var(--sv-text);
}
body.sv-portal .sv-alert-sub {
    font-size: 0.8rem;
    color: var(--sv-text-soft);
    margin-top: 3px;
    line-height: 1.35;
}
body.sv-portal .sv-alert-cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--sv-alert-accent, #e6a817);
    white-space: nowrap;
}
@media (max-width: 520px) {
    body.sv-portal .sv-alert { flex-wrap: wrap; }
    body.sv-portal .sv-alert-cta { width: 100%; justify-content: flex-end; }
}

/* ---------- Portal announcements ("the board") ------------------------- */
body.sv-portal .sv-announcements {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 22px;
}
body.sv-portal .sv-announcement {
    position: relative;
    overflow: hidden;
    display: flex;
    gap: 15px;
    padding: 18px 20px 20px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--sv-primary, #004e89) 0%, var(--sv-accent-deep, #1591bd) 62%, var(--sv-accent, #1aaee0) 100%);
    box-shadow: 0 14px 34px rgba(0, 78, 137, .28);
    animation: sv-ann-in .45s cubic-bezier(.16, 1, .3, 1) both;
}
/* Soft light sweep + a large watermark bullhorn for depth. */
body.sv-portal .sv-announcement::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(120% 140% at 100% 0%, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 45%),
        radial-gradient(90% 120% at 0% 100%, rgba(0, 0, 0, .10) 0%, rgba(0, 0, 0, 0) 50%);
    pointer-events: none;
}
body.sv-portal .sv-announcement::after {
    content: "\f0a1"; /* fa-bullhorn */
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", sans-serif;
    font-weight: 900;
    position: absolute;
    right: -14px;
    bottom: -22px;
    font-size: 6.5rem;
    color: rgba(255, 255, 255, .08);
    transform: rotate(-12deg);
    pointer-events: none;
}
@keyframes sv-ann-in {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
body.sv-portal .sv-announcement-icon {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
    color: #fff;
    font-size: 1.25rem;
    animation: sv-ann-ring 2.6s ease-in-out infinite;
}
@keyframes sv-ann-ring {
    0%, 92%, 100% { transform: rotate(0); }
    94% { transform: rotate(-11deg); }
    96% { transform: rotate(9deg); }
    98% { transform: rotate(-6deg); }
}
body.sv-portal .sv-announcement-body { position: relative; z-index: 1; min-width: 0; }
body.sv-portal .sv-announcement-kicker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .82);
    margin-bottom: 5px;
}
body.sv-portal .sv-announcement-kicker::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, .7);
    animation: sv-ann-pulse 1.8s ease-out infinite;
}
@keyframes sv-ann-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(255, 255, 255, .55); }
    70%  { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
body.sv-portal .sv-announcement-title {
    font-weight: 800;
    font-size: 1.12rem;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.25;
}
body.sv-portal .sv-announcement-text {
    color: rgba(255, 255, 255, .92);
    font-size: 0.95rem;
    line-height: 1.5;
}
@media (prefers-reduced-motion: reduce) {
    body.sv-portal .sv-announcement,
    body.sv-portal .sv-announcement-icon,
    body.sv-portal .sv-announcement-kicker::before {
        animation: none;
    }
}

/* ---------- "Action needed" task card (portal-first onboarding) --------- */
body.sv-portal .sv-tasks { margin-bottom: 20px; }
body.sv-portal .sv-task-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px 18px;
    border-radius: var(--sv-radius);
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, var(--sv-primary, #004e89) 0%, var(--sv-accent, #1aaee0) 100%);
    box-shadow: var(--sv-shadow-pop);
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}
body.sv-portal .sv-task-hero:hover {
    transform: translateY(-2px);
    color: #fff;
    text-decoration: none;
}
body.sv-portal .sv-task-hero.is-critical {
    background: linear-gradient(135deg, #b45309 0%, #e6a817 100%);
}
body.sv-portal .sv-task-hero-icon {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
body.sv-portal .sv-task-hero-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}
body.sv-portal .sv-task-hero-kicker {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.85;
}
body.sv-portal .sv-task-hero-title {
    font-weight: 800;
    font-size: 1.05rem;
    line-height: 1.25;
    margin-top: 2px;
}
body.sv-portal .sv-task-hero-sub {
    font-size: 0.82rem;
    opacity: 0.92;
    margin-top: 3px;
    line-height: 1.35;
}
body.sv-portal .sv-task-hero-cta {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-weight: 800;
    font-size: 0.88rem;
    padding: 9px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--sv-text, #0b2b46);
    white-space: nowrap;
}
body.sv-portal .sv-task-list {
    margin-top: 8px;
    border: 1px solid var(--sv-border, #dbe7f0);
    border-radius: var(--sv-radius);
    background: var(--sv-card, #fff);
    box-shadow: var(--sv-shadow);
    overflow: hidden;
}
body.sv-portal .sv-task-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    text-decoration: none;
    color: var(--sv-text);
    border-top: 1px solid var(--sv-border, #dbe7f0);
    transition: background 0.12s ease;
}
body.sv-portal .sv-task-row:first-child { border-top: 0; }
body.sv-portal .sv-task-row:hover {
    background: rgba(26, 174, 224, 0.06);
    color: var(--sv-text);
    text-decoration: none;
}
body.sv-portal .sv-task-row-num {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--sv-primary, #004e89);
    background: rgba(0, 78, 137, 0.1);
}
body.sv-portal .sv-task-row-label {
    flex: 1 1 auto;
    font-weight: 700;
    font-size: 0.88rem;
    min-width: 0;
}
body.sv-portal .sv-task-row-go {
    flex: 0 0 auto;
    color: var(--sv-text-soft);
    font-size: 0.8rem;
}
@media (max-width: 520px) {
    body.sv-portal .sv-task-hero { flex-wrap: wrap; }
    body.sv-portal .sv-task-hero-cta { width: 100%; justify-content: center; }
}

/* ---------- Slot / selection tiles (NOT the grid containers) ----------- */
body.sv-portal .slot-btn,
body.sv-portal .slot-tile,
body.sv-portal .fb-tile,
body.sv-portal .dropin-tile,
body.sv-portal .lt-tile,
body.sv-portal .loc-tile {
    background: var(--sv-card) !important;
    border: 1px solid var(--sv-border-strong) !important;
    border-radius: var(--sv-radius-sm) !important;
    color: var(--sv-text) !important;
    transition: border-color .15s ease, background .15s ease, transform .08s ease, box-shadow .15s ease;
}
body.sv-portal .slot-btn:hover,
body.sv-portal .slot-tile:hover,
body.sv-portal .fb-tile:hover,
body.sv-portal .dropin-tile:hover,
body.sv-portal .lt-tile:hover,
body.sv-portal .loc-tile:hover {
    border-color: var(--sv-accent) !important;
    box-shadow: 0 2px 8px rgba(26, 174, 224, .14) !important;
    transform: translateY(-1px);
}
body.sv-portal .slot-tile.selected,
body.sv-portal .slot-btn.selected,
body.sv-portal .fb-tile.active,
body.sv-portal .dropin-tile.selected,
body.sv-portal .lt-tile.selected,
body.sv-portal .loc-tile.selected {
    background: var(--sv-primary) !important;
    border-color: var(--sv-primary) !important;
    color: #fff !important;
}
body.sv-portal .slot-tile.selected *,
body.sv-portal .fb-tile.active *,
body.sv-portal .dropin-tile.selected *,
body.sv-portal .slot-btn.selected * { color: #fff !important; }
body.sv-portal .slot-day,
body.sv-portal .slot-day-head {
    color: var(--sv-primary) !important;
    font-weight: 700;
}

/* ---------- Pills / badges --------------------------------------------- */
body.sv-portal .sv-balance-amt,
body.sv-portal .balance-pill {
    background: var(--sv-accent) !important;
    color: #fff !important;
    border-radius: 999px !important;
    font-weight: 700;
}
body.sv-portal .pkg-price,
body.sv-portal .price-row .price {
    color: var(--sv-success) !important;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
body.sv-portal .status-badge {
    border-radius: 999px !important;
    font-weight: 600;
}
body.sv-portal .status-confirmed {
    background: var(--sv-success-soft) !important;
    color: var(--sv-success) !important;
}
body.sv-portal .status-pending {
    background: var(--sv-warning-soft) !important;
    color: var(--sv-warning) !important;
}

/* ---------- Package radio cards (sv_buy) ------------------------------- */
body.sv-portal .pkg-card {
    cursor: pointer;
}
body.sv-portal .pkg-card:hover {
    border-color: var(--sv-accent) !important;
    box-shadow: 0 2px 8px rgba(26, 174, 224, .14) !important;
}
body.sv-portal .pkg-card.selected,
body.sv-portal .pkg-radio:checked + .pkg-card {
    border-color: var(--sv-primary) !important;
    box-shadow: 0 0 0 2px var(--sv-primary) !important;
}

/* ---------- swim-cv.php — unify Tailwind-blue palette onto the brand ---- */
body.sv-portal .booking-card,
body.sv-portal .schedule-highlight,
body.sv-portal .price-breakdown {
    border-color: var(--sv-border) !important;
}
body.sv-portal .info-label { color: var(--sv-text-soft) !important; }
body.sv-portal .info-value { color: var(--sv-text) !important; }
body.sv-portal .schedule-highlight,
body.sv-portal .info-section .info-section-title,
body.sv-portal .student-name-header {
    color: var(--sv-primary) !important;
}
/* swim-cv amber payment CTA -> brand navy (consistent with the rest) */
body.sv-portal .payment-btn {
    background: var(--sv-primary) !important;
    border-color: var(--sv-primary) !important;
}
body.sv-portal .payment-btn:hover {
    background: var(--sv-primary-deep) !important;
}
body.sv-portal a { color: var(--sv-primary); }
body.sv-portal a:hover { color: var(--sv-primary-deep); }
/* Filled navy CTAs that happen to be <a> — do not inherit the link color. */
body.sv-portal a.continue-btn,
body.sv-portal a.continue-btn:hover,
body.sv-portal a.continue-btn:focus,
body.sv-portal a.continue-btn:visited {
    color: #fff;
}

/* ---------- CardConnect tokenizer iframe — chrome only, NEVER resize --- */
body.sv-portal .card-frame-wrapper {
    border-radius: var(--sv-radius-sm);
    overflow: hidden;
}
/* Render the tokenizer borderless so its fields sit flush inside the Payment
   card (no nested "iframe box"). This only touches the border — width/height/
   display of #cc_iframe_card_token stay untouched, and #card_token is never
   styled — the payment flow depends on those staying as-is. */
body.sv-portal .card-frame-wrapper iframe,
body.sv-portal #cc_iframe_card_token {
    border: none !important;
    border-radius: 0 !important;
}

/* ---------- Mobile ------------------------------------------------------ */
@media (max-width: 768px) {
    body.sv-portal .sv-container,
    body.sv-portal .sb-container,
    body.sv-portal .main-container { padding-left: 12px; padding-right: 12px; }
    body.sv-portal .sv-card,
    body.sv-portal .sb-card,
    body.sv-portal .booking-card { border-radius: var(--sv-radius-sm) !important; }
}
@media (max-width: 480px) {
    body.sv-portal .btn-primary,
    body.sv-portal .btn-success,
    body.sv-portal .pay-btn,
    body.sv-portal .payment-btn { width: 100%; }
    body.sv-portal .sv-cta-row { flex-direction: column; }
    body.sv-portal .sv-cta-row > * { width: 100%; }
    /* Account page: every button (Save / Remove / Restore / Add child) is a
       full-width tap target, and inline Remove/Restore forms stack. */
    body.sv-portal .student-card .btn,
    body.sv-portal .add-child-card .btn { width: 100%; }
    body.sv-portal .student-card form[style*="inline"] { display: block !important; }
    body.sv-portal .student-card form[style*="inline"] + form[style*="inline"] { margin-top: 8px; }
}

/* ============================================================================
 * sv.php HOME — immersive, mobile-first parent-portal home (login + dashboard)
 *
 * Scoped to .sv-home / .sv-home-login / .sv-home-dash so the sibling portal
 * pages (swim_book.php, sv_schedule.php, sv_buy.php, sv_account.php,
 * swim-cv.php) keep the shared card/button/input rules above and are NOT
 * affected by anything in this block. Brand colors come from the dynamic
 * --sv-primary / --sv-accent variables set inline by sv.php per organization.
 * ==========================================================================*/
body.sv-portal.sv-home {
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
}
body.sv-portal.sv-home a,
body.sv-portal.sv-home button { -webkit-tap-highlight-color: transparent; }

/* Login/dashboard step visibility (moved out of sv.php inline styles) */
body.sv-portal .sv-step { display: none; }
body.sv-portal .sv-step.active { display: block; }

/* Message + pill spacing (moved out of sv.php inline styles) */
body.sv-portal .sv-home .sv-msg { padding: 10px 14px; margin-bottom: 14px; font-size: .92rem; }
body.sv-portal .sv-code-input { letter-spacing: 14px; text-align: center; font-size: 1.5rem; font-weight: 700; }
body.sv-portal .sv-balance-amt { padding: 4px 12px; font-size: .95rem; }

/* Prevent iOS zoom: 16px inputs across the home surfaces */
body.sv-portal.sv-home .form-control,
body.sv-portal.sv-home .sv-code-input { font-size: 16px; padding: 13px 14px; }
body.sv-portal.sv-home .btn-primary.w-100,
body.sv-portal.sv-home .btn.w-100 { min-height: 48px; padding: 13px; }

/* ---------- Error state ------------------------------------------------- */
body.sv-portal .sv-home-error { max-width: 480px; margin: 0 auto; padding: 64px 20px; }

/* =====================  LOGIN (logged out)  ============================= */
body.sv-portal.sv-home-login {
    background: linear-gradient(158deg, var(--sv-primary-deep) 0%, var(--sv-primary) 52%, var(--sv-accent-deep) 128%) !important;
    color: #fff;
    position: relative;
}
/* Ambient water light — soft drifting blobs (decorative) */
.sv-atmos { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.sv-atmos-wave {
    position: absolute; border-radius: 50%; filter: blur(38px);
    will-change: transform;
}
.sv-atmos-wave--1 { width: 340px; height: 340px; left: -90px;  top: 6%;   background: var(--sv-accent);      opacity: .34; animation: sv-drift 15s ease-in-out infinite; }
.sv-atmos-wave--2 { width: 260px; height: 260px; right: -70px; top: 30%;  background: #ffffff;               opacity: .14; animation: sv-drift 19s ease-in-out infinite reverse; }
.sv-atmos-wave--3 { width: 380px; height: 380px; left: 18%;    bottom: -140px; background: var(--sv-accent-deep); opacity: .30; animation: sv-drift 22s ease-in-out infinite; }

.sv-login-shell {
    position: relative; z-index: 1;
    min-height: 100vh; min-height: 100dvh;
    display: flex; align-items: center; justify-content: center;
    padding: calc(env(safe-area-inset-top) + 56px) 20px calc(env(safe-area-inset-bottom) + 34px);
}
.sv-login-back {
    position: absolute;
    top: calc(env(safe-area-inset-top) + 12px);
    left: 16px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    text-decoration: none;
    font-weight: 650;
    font-size: .9rem;
    padding: 8px 14px 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.26);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0,0,0,.16);
}
.sv-login-back:hover,
.sv-login-back:focus {
    color: #fff;
    background: rgba(255,255,255,.24);
    text-decoration: none;
}
.sv-login-inner { width: 100%; max-width: 420px; animation: sv-rise .6s ease both; }

.sv-brand-hero { text-align: center; margin-bottom: 26px; color: #fff; }
.sv-brand-logo {
    max-height: 220px; max-width: min(280px, 82%); width: auto;
    margin: 0 auto 18px; display: block;
    filter: drop-shadow(0 12px 28px rgba(0,0,0,.32));
}
.sv-brand-monogram {
    display: inline-flex; align-items: center; justify-content: center;
    width: 168px; height: 168px; margin: 0 auto 18px; border-radius: 42px;
    background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.30);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
    font-size: 4.4rem; font-weight: 800; color: #fff;
}
.sv-brand-name {
    font-size: 1.95rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.08;
    text-shadow: 0 2px 16px rgba(0,0,0,.28);
}
.sv-brand-suffix {
    margin-top: 7px; font-size: .82rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .16em; color: rgba(255,255,255,.82);
}

/* Login card sits on the atmosphere; shared .sv-login-card gives it card chrome */
body.sv-portal.sv-home-login .sv-login-card {
    padding: 26px 24px;
    box-shadow: var(--sv-shadow-pop) !important;
    animation: sv-rise .6s .05s ease both;
}
body.sv-portal.sv-home-login .sv-login-card h1 {
    font-size: 1.35rem; color: var(--sv-primary) !important; font-weight: 800; margin: 0 0 4px;
}
body.sv-portal.sv-home-login .sv-login-card .subtitle {
    color: var(--sv-text-soft); margin-bottom: 20px; font-size: .95rem;
}
body.sv-portal.sv-home-login .sv-signed-out-note {
    color: var(--sv-text-soft); margin: 0 0 18px; font-size: .95rem;
}
body.sv-portal.sv-home-login .sv-preview-banner { position: relative; z-index: 1; }

/* =====================  DASHBOARD (logged in)  ========================== */
body.sv-portal.sv-home-dash {
    background: var(--sv-bg) !important;
    padding-bottom: calc(86px + env(safe-area-inset-bottom));
}

.sv-hero {
    position: relative; overflow: hidden;
    background: linear-gradient(155deg, var(--sv-primary) 0%, var(--sv-primary-deep) 100%);
    color: #fff;
    padding: calc(env(safe-area-inset-top) + 20px) 18px 28px;
    border-radius: 0 0 26px 26px;
    box-shadow: 0 12px 30px rgba(0,78,137,.18);
}
.sv-hero::after {
    content: ""; position: absolute; right: -50px; top: -60px;
    width: 200px; height: 200px; border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.sv-hero-inner { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; animation: sv-rise .5s ease both; }
.sv-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.sv-brand-mini { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .95rem; color: #fff; min-width: 0; }
.sv-brand-mini img { height: 30px; width: auto; }
.sv-brand-mini span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv-hero-links { display: flex; gap: 6px; flex: 0 0 auto; }
.sv-hero-links a {
    display: inline-flex; align-items: center; gap: 6px;
    color: #fff !important; text-decoration: none;
    background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.22);
    padding: 7px 12px; border-radius: 999px; font-size: .8rem; font-weight: 600; min-height: 36px;
    transition: background .15s ease;
}
.sv-hero-links a:hover { background: rgba(255,255,255,.26); color: #fff !important; }
.sv-hero-greeting {
    font-size: 1.65rem; font-weight: 800; letter-spacing: -.02em; color: #fff !important; margin: 0;
}
.sv-hero-welcome { margin: 6px 0 0; font-size: .95rem; color: rgba(255,255,255,.86); max-width: 48ch; }

.sv-dash { max-width: 640px; margin: 0 auto; padding: 18px 16px 4px; }
.sv-dash > * { animation: sv-rise .5s ease both; }

/* Upcoming lesson tiles — horizontal scroll strip */
.sv-upcoming-section { margin-bottom: 20px; min-width: 0; }
.sv-lesson-scroller { position: relative; min-width: 0; width: 100%; }
.sv-lesson-strip {
    display: flex; gap: 12px;
    width: 100%; min-width: 0; max-width: 100%;
    overflow-x: auto; overflow-y: hidden;
    padding: 2px 2px 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}
.sv-lesson-strip::-webkit-scrollbar { height: 0; }
.sv-lesson-strip { scrollbar-width: none; }
@media (min-width: 769px) {
    .sv-lesson-strip {
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 78, 137, .35) transparent;
        padding-bottom: 14px;
    }
    .sv-lesson-strip::-webkit-scrollbar { height: 8px; }
    .sv-lesson-strip::-webkit-scrollbar-track { background: transparent; }
    .sv-lesson-strip::-webkit-scrollbar-thumb {
        background: rgba(0, 78, 137, .28);
        border-radius: 999px;
    }
}
.sv-lesson-scroll-btn {
    display: none;
    position: absolute; top: 50%; transform: translateY(-60%);
    z-index: 2;
    width: 36px; height: 36px; padding: 0;
    border: 1px solid var(--sv-border);
    border-radius: 999px;
    background: #fff;
    color: var(--sv-primary);
    box-shadow: var(--sv-shadow);
    cursor: pointer;
}
.sv-lesson-scroll-btn.is-prev { left: -6px; }
.sv-lesson-scroll-btn.is-next { right: -6px; }
.sv-lesson-scroll-btn:hover { background: #f2fbff; border-color: var(--sv-accent); }
@media (min-width: 769px) {
    .sv-lesson-scroll-btn { display: inline-flex; align-items: center; justify-content: center; }
    .sv-lesson-scroll-btn[hidden] { display: none !important; }
}
.sv-lesson-tile {
    scroll-snap-align: start; flex: 0 0 auto;
    width: min(78vw, 260px);
    background: var(--sv-card); border: 1px solid var(--sv-border);
    border-radius: 16px; box-shadow: var(--sv-shadow);
    padding: 16px 16px 14px; text-decoration: none !important;
    color: inherit !important; position: relative; overflow: hidden;
    transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
    display: flex; flex-direction: column; gap: 2px; min-height: 148px;
}
.sv-lesson-tile:hover {
    border-color: var(--sv-accent) !important;
    box-shadow: var(--sv-shadow-pop);
    transform: translateY(-2px);
    color: inherit !important;
}
.sv-lesson-tile:active { transform: scale(.98); }
.sv-lesson-tile.is-next {
    border-top: 4px solid var(--sv-accent);
    box-shadow: var(--sv-shadow-pop);
    width: min(84vw, 280px);
}
.sv-lesson-tile-badge {
    position: absolute; top: 12px; right: 12px;
    font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em;
    color: #fff; background: var(--sv-accent); border-radius: 999px; padding: 3px 8px;
}
.sv-lesson-tile-day {
    font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
    color: var(--sv-accent-deep); margin-bottom: 2px; padding-right: 48px;
}
.sv-lesson-tile-time {
    font-size: 1.35rem; font-weight: 800; color: var(--sv-primary);
    letter-spacing: -.02em; line-height: 1.15;
}
.sv-lesson-tile-name {
    margin-top: 8px; font-size: 1rem; font-weight: 700; color: var(--sv-text);
    line-height: 1.25;
}
.sv-lesson-tile-loc,
.sv-lesson-tile-who {
    display: flex; align-items: center; gap: 6px;
    font-size: .82rem; font-weight: 600; color: var(--sv-text-soft); margin-top: 4px;
}
.sv-lesson-tile-loc i,
.sv-lesson-tile-who i { color: var(--sv-accent-deep); width: 12px; text-align: center; }
.sv-lesson-tile-pay {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .02em;
    background: rgba(15, 118, 110, .12);
    color: #0f766e;
}
.sv-lesson-tile-pay.is-unpaid {
    background: #fde68a;
    color: #78350f;
}
.sv-lesson-tile-pay.is-failed,
.sv-lesson-tile-pay.is-retry {
    background: #fee2e2;
    color: #7f1d1d;
}
.sv-lesson-tile.is-pay-failed {
    border-color: #fecaca;
}

/* Empty upcoming state (reuses next-card shell) */
.sv-next-card {
    background: var(--sv-card); border: 1px solid var(--sv-border);
    border-radius: 18px; box-shadow: var(--sv-shadow);
    padding: 22px; position: relative; overflow: hidden;
}
.sv-next-card--empty { text-align: center; }
.sv-next-card--empty .sv-next-empty-icon { font-size: 2rem; color: var(--sv-accent); margin-bottom: 6px; }
.sv-next-card--empty .sv-next-date { color: var(--sv-text); font-size: 1.15rem; font-weight: 800; }

/* Section wrapper */
.sv-section { margin-bottom: 18px; }
.sv-section > h2,
.sv-section-head h2 {
    font-size: 1rem; font-weight: 800; color: var(--sv-text) !important; letter-spacing: -.01em;
    margin: 0 2px 10px; display: flex; align-items: center; gap: 8px;
}
.sv-section-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    margin: 0 2px 10px;
}
.sv-section-head h2 { margin: 0; }
.sv-section > h2 i,
.sv-section-head h2 i { color: var(--sv-accent-deep); }
.sv-view-all {
    flex: 0 0 auto;
    font-size: .85rem; font-weight: 800; color: var(--sv-primary) !important;
    text-decoration: none; white-space: nowrap;
}
.sv-view-all:hover { text-decoration: underline; }

/* View-all upcoming list + manage-lesson actions */
.sv-lessons-title {
    font-size: 1.4rem; color: var(--sv-primary); font-weight: 800; margin: 0;
}
.sv-lessons-lead {
    font-size: .92rem; color: var(--sv-text-soft); margin: 0 2px 12px;
}
.sv-lessons-list {
    display: flex; flex-direction: column; gap: 10px;
}
.sv-lesson-pick {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--sv-card); border: 1px solid var(--sv-border);
    border-radius: 16px; box-shadow: var(--sv-shadow);
    padding: 14px 16px; text-decoration: none !important; color: inherit !important;
}
.sv-lesson-pick:hover {
    border-color: var(--sv-accent) !important;
    box-shadow: var(--sv-shadow-pop);
    color: inherit !important;
}
.sv-lesson-pick.is-next { border-top: 4px solid var(--sv-accent); }
.sv-lesson-pick.is-pay-failed { border-color: #fecaca; }
.sv-lesson-pick-main { min-width: 0; flex: 1 1 auto; }
.sv-lesson-pick-meta {
    display: flex; flex-direction: column; align-items: flex-end; gap: 8px;
    flex: 0 0 auto;
}
.sv-lesson-pick-meta .sv-lesson-tile-badge { position: static; }
.sv-lesson-pick-go { color: var(--sv-muted); font-size: .85rem; }
.sv-lesson-manage {
    padding: 20px 18px;
    margin-bottom: 16px;
}
body.sv-portal .sv-container > .sv-card { padding: 20px 18px; margin-bottom: 16px; }
body.sv-portal .sv-container > .sv-msg { padding: 10px 14px; margin-bottom: 14px; }
.sv-lesson-manage-when {
    font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em;
    color: var(--sv-accent-deep); margin-top: 8px;
}
.sv-lesson-manage-time {
    font-size: 1.45rem; font-weight: 800; color: var(--sv-primary);
    letter-spacing: -.02em; line-height: 1.15;
}
.sv-lesson-manage-type {
    margin-top: 8px; font-size: 1.05rem; font-weight: 700; color: var(--sv-text);
}
.sv-lesson-manage-hint {
    margin: 14px 0 0; font-size: .88rem; color: var(--sv-text-soft);
}
.sv-lesson-back {
    display: inline-flex; align-items: center;
    font-size: .85rem; font-weight: 700; color: var(--sv-primary) !important;
    text-decoration: none;
}
.sv-lesson-back:hover { text-decoration: underline; }
.sv-lesson-actions {
    display: flex; flex-direction: column; gap: 8px; margin-top: 16px;
}
.sv-lesson-actions .btn,
.sv-lesson-actions form,
.sv-lesson-actions .sv-cancel-details { width: 100%; }
.sv-lesson-actions form .btn { width: 100%; }
.sv-cancel-details > .sv-cancel-summary {
    list-style: none;
    cursor: pointer;
    text-align: center;
}
.sv-cancel-details > .sv-cancel-summary::-webkit-details-marker,
.sv-cancel-details > .sv-cancel-summary::marker { display: none; content: ''; }
.sv-cancel-summary-open { display: none; }
.sv-cancel-details[open] > .sv-cancel-summary {
    color: var(--sv-text-soft);
    border-color: var(--sv-border-strong);
    background: var(--sv-card);
}
.sv-cancel-details[open] > .sv-cancel-summary:hover {
    color: var(--sv-text);
    background: var(--sv-bg);
}
.sv-cancel-details[open] .sv-cancel-summary-closed { display: none; }
.sv-cancel-details[open] .sv-cancel-summary-open { display: inline; }
.sv-cancel-details[open] > .sv-cancel-form { margin-top: 10px; }
.sv-cancel-note-label {
    display: block;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sv-text-soft);
    margin: 4px 0 6px;
}
.sv-cancel-note-label span { font-weight: 600; text-transform: none; letter-spacing: 0; }
.sv-cancel-note {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid var(--sv-border-strong);
    border-radius: var(--sv-radius-sm);
    background: var(--sv-card);
    color: var(--sv-text);
    font: inherit;
    resize: vertical;
    min-height: 72px;
}
.sv-cancel-note:focus {
    outline: none;
    border-color: var(--sv-accent);
    box-shadow: 0 0 0 3px rgba(26, 174, 224, .18);
}

/* Credit chips — horizontal scroll strip */
.sv-credit-strip {
    display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 8px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.sv-credit-strip::-webkit-scrollbar { height: 0; }
.sv-credit-chip {
    scroll-snap-align: start; flex: 0 0 auto; min-width: 156px;
    background: var(--sv-card); border: 1px solid var(--sv-border);
    border-radius: 16px; box-shadow: var(--sv-shadow); padding: 14px 16px;
}
.sv-credit-chip .amt { font-size: 1.7rem; font-weight: 800; color: var(--sv-primary); line-height: 1; }
.sv-credit-chip .amt span { font-size: .78rem; font-weight: 700; color: var(--sv-text-soft); margin-left: 4px; }
.sv-credit-chip .lt { margin-top: 7px; font-size: .9rem; font-weight: 700; color: var(--sv-text); }
.sv-credit-chip .who { font-size: .8rem; color: var(--sv-text-soft); }
.sv-credit-chip .exp { margin-top: 6px; font-size: .72rem; font-weight: 600; color: var(--sv-error); }

/* Generic list card (children + remaining upcoming) */
.sv-list-card {
    background: var(--sv-card); border: 1px solid var(--sv-border);
    border-radius: 16px; box-shadow: var(--sv-shadow); overflow: hidden;
}
.sv-row {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px; border-bottom: 1px solid var(--sv-border);
}
.sv-row:last-child { border-bottom: none; }
.sv-row .who { min-width: 0; }
.sv-row .who strong { color: var(--sv-text); }
.sv-row .who .muted { color: var(--sv-text-soft) !important; font-size: .88rem; }
.sv-row .who .small { font-size: .82rem; }
.sv-row-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.sv-row a.edit { font-weight: 700; font-size: .85rem; white-space: nowrap; color: var(--sv-primary) !important; text-decoration: none; }
.sv-row a.edit:hover { text-decoration: underline; }
/* Earned skill badges under each swimmer (parent celebration; pills link to
   the /sv/progress badge case when rendered as an anchor) */
.sv-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; text-decoration: none; }
a.sv-badges:hover .sv-badge { border-color: var(--sv-primary); }
.sv-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 999px;
    background: #ecfeff; border: 1px solid var(--sv-primary);
    color: #0e7490; font-size: .74rem; font-weight: 700; line-height: 1;
    position: relative; overflow: hidden;
}
.sv-badge i { font-size: .72rem; }
/* Subtle shine sweeping across earned pills so the badge case feels alive */
.sv-badge::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: -60%;
    width: 40%; pointer-events: none;
    background: linear-gradient(105deg, transparent 0%, rgba(255,255,255,.8) 50%, transparent 100%);
    animation: svBadgeShine 5.5s ease-in-out infinite;
}
@keyframes svBadgeShine {
    0%, 70% { left: -60%; }
    88%, 100% { left: 120%; }
}
@media (prefers-reduced-motion: reduce) {
    .sv-badge::after { animation: none; display: none; }
}
.sv-list-card .sv-empty { text-align: center; padding: 22px 16px; }
.sv-list-card .sv-empty p { color: var(--sv-text-soft); margin-bottom: 12px; }

/* Sticky bottom nav */
.sv-bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    display: flex; justify-content: space-around; gap: 2px;
    background: rgba(255,255,255,.92);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--sv-border);
    padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
    box-shadow: 0 -6px 20px rgba(0,78,137,.08);
}
.sv-bottom-nav a {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 4px; border-radius: 12px; text-decoration: none;
    color: var(--sv-text-soft) !important; font-size: .7rem; font-weight: 700;
    min-height: 52px; justify-content: center;
    transition: background .15s ease, color .15s ease, transform .06s ease;
}
.sv-bottom-nav a i { font-size: 1.15rem; }
.sv-bottom-nav a:hover { color: var(--sv-primary) !important; background: var(--sv-bg); }
.sv-bottom-nav a:active { transform: scale(.94); }
.sv-bottom-nav a.is-primary { color: var(--sv-primary) !important; }

/* Disabled nav item (e.g. Schedule before a package is bought) */
.sv-bottom-nav .is-disabled {
    flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 6px 4px; border-radius: 12px; text-decoration: none;
    color: var(--sv-text-soft) !important; font-size: .7rem; font-weight: 700;
    min-height: 52px; justify-content: center;
    opacity: .45; cursor: not-allowed; pointer-events: none;
}
.sv-bottom-nav .is-disabled i { font-size: 1.15rem; }

/* Disabled schedule CTA (buttons rendered as spans) */
body.sv-portal .btn-primary.disabled,
body.sv-portal .btn.disabled {
    opacity: .5; cursor: not-allowed; pointer-events: none;
    box-shadow: none;
}

/* ---------- Motion --------------------------------------------------- */
@keyframes sv-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes sv-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(22px, -26px) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
    .sv-login-inner, .sv-login-card, .sv-hero-inner, .sv-dash > *, .sv-atmos-wave,
    .sv-setup-welcome-inner, .sv-setup-card,
    .sv-busy-icon, .sv-busy-ripple { animation: none !important; }
}

/* ---------- Busy overlay (payment / next-step wait) -------------------- */
body.sv-portal.is-sv-busy { overflow: hidden; }
body.sv-portal .sv-busy {
    position: fixed; inset: 0; z-index: 4000;
    display: flex; align-items: center; justify-content: center;
    padding: 24px 16px;
    background: linear-gradient(180deg, #003a6b 0%, #004e89 42%, #0a6fa0 100%);
    cursor: wait;
}
body.sv-portal .sv-busy[hidden] { display: none !important; }
body.sv-portal .sv-busy-atmos {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
body.sv-portal .sv-busy-card {
    position: relative; z-index: 1;
    width: min(100%, 360px);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 18px 50px rgba(0, 20, 40, .28);
    padding: 32px 26px 28px;
    text-align: center;
}
body.sv-portal .sv-busy-icon {
    position: relative;
    width: 72px; height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sv-primary) 0%, var(--sv-accent) 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.7rem;
    animation: sv-busy-bob 1.8s ease-in-out infinite;
}
body.sv-portal .sv-busy-ripple {
    position: absolute; inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(26, 174, 224, .45);
    animation: sv-busy-ripple 1.8s ease-out infinite;
}
body.sv-portal .sv-busy-ripple--2 { animation-delay: .6s; }
body.sv-portal .sv-busy-title {
    font-size: 1.15rem; font-weight: 800; color: var(--sv-primary);
    margin-bottom: 6px; letter-spacing: -.01em;
}
body.sv-portal .sv-busy-sub {
    font-size: .9rem; color: var(--sv-text-soft); line-height: 1.45;
}
body.sv-portal .is-sv-busy-locked { pointer-events: none; opacity: .7; }
@keyframes sv-busy-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-5px); }
}
@keyframes sv-busy-ripple {
    0%   { transform: scale(.85); opacity: .7; }
    100% { transform: scale(1.35); opacity: 0; }
}

/* ---------- Home breakpoints ---------------------------------------- */
@media (max-width: 380px) {
    .sv-hero-links a span { display: none; }
    .sv-hero-links a { padding: 8px 11px; }
    .sv-hero-greeting { font-size: 1.45rem; }
}
@media (min-width: 900px) {
    /* Desktop: float the action bar as a centered pill instead of edge-to-edge */
    .sv-bottom-nav { max-width: 560px; margin: 0 auto; border: 1px solid var(--sv-border); border-radius: 18px; bottom: 18px; }
    body.sv-portal.sv-home-dash { padding-bottom: 104px; }
    .sv-lesson-tile,
    .sv-lesson-tile.is-next { width: 240px; }
    .sv-next-card { padding: 26px; }
}

/* ============================================================================
 * sv_account.php SETUP WIZARD — first-login welcome / contact / child
 * Scoped to body.sv-setup so the regular account page is unchanged.
 * ==========================================================================*/
body.sv-portal.sv-setup {
    -webkit-tap-highlight-color: transparent;
    overflow-x: hidden;
    min-height: 100vh;
    min-height: 100dvh;
}
body.sv-portal.sv-setup-welcome {
    background: linear-gradient(158deg, var(--sv-primary-deep) 0%, var(--sv-primary) 52%, var(--sv-accent-deep) 128%) !important;
    color: #fff;
}
.sv-setup-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    padding: calc(env(safe-area-inset-top) + 10px) 12px calc(env(safe-area-inset-bottom) + 16px);
    display: flex;
    flex-direction: column;
}
.sv-setup-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}
.sv-setup-progress-label {
    display: block;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--sv-muted);
    margin-bottom: 6px;
}
body.sv-portal.sv-setup-welcome .sv-setup-progress-label { color: rgba(255,255,255,.78); }
.sv-setup-dots { display: flex; gap: 6px; }
.sv-setup-dots span {
    width: 22px; height: 6px; border-radius: 99px;
    background: var(--sv-border);
}
.sv-setup-dots span.is-current { background: var(--sv-accent); }
.sv-setup-dots span.is-done { background: var(--sv-primary); }
body.sv-portal.sv-setup-welcome .sv-setup-dots span { background: rgba(255,255,255,.28); }
body.sv-portal.sv-setup-welcome .sv-setup-dots span.is-current,
body.sv-portal.sv-setup-welcome .sv-setup-dots span.is-done { background: #fff; }
.sv-setup-signout {
    font-size: .82rem; font-weight: 700;
    color: var(--sv-text-soft) !important;
    text-decoration: none;
    padding: 8px 10px;
    min-height: 44px;
    display: inline-flex; align-items: center;
}
body.sv-portal.sv-setup-welcome .sv-setup-signout { color: rgba(255,255,255,.88) !important; }

.sv-setup-welcome-inner {
    position: relative; z-index: 1;
    flex: 1;
    display: flex; flex-direction: column; justify-content: center;
    animation: sv-rise .55s ease both;
}
.sv-setup-brand { text-align: center; margin-bottom: 12px; color: #fff; }
.sv-setup-brand .sv-brand-logo { max-height: 52px; margin-bottom: 8px; }
.sv-setup-brand .sv-brand-monogram { width: 56px; height: 56px; font-size: 1.6rem; margin-bottom: 8px; }
.sv-setup-brand .sv-brand-name { font-size: 1.35rem; }

.sv-setup-card {
    background: var(--sv-card);
    border: 1px solid var(--sv-border);
    border-radius: var(--sv-radius);
    box-shadow: var(--sv-shadow-pop);
    padding: 16px 14px 14px;
    color: var(--sv-text);
}
.sv-setup-card h1 {
    font-size: 1.2rem; font-weight: 800; color: var(--sv-primary);
    margin: 0 0 4px; letter-spacing: -.02em;
}
.sv-setup-lead {
    color: var(--sv-text-soft); font-size: .9rem; margin: 0 0 12px; line-height: 1.4;
}
.sv-setup-art { text-align: center; margin: 0 0 8px; }
.sv-setup-art svg { width: 100%; max-width: 220px; height: auto; }

.sv-setup-chips {
    list-style: none; padding: 0; margin: 0 0 14px;
    display: flex; flex-wrap: wrap; gap: 6px;
}
.sv-setup-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 12px; border-radius: 99px;
    background: #e8f6fc; color: var(--sv-primary);
    font-size: .8rem; font-weight: 700;
}
.sv-setup-chip i { color: var(--sv-accent); }

.sv-setup-start,
body.sv-portal.sv-setup .btn.w-100,
body.sv-portal.sv-setup .sv-setup-cta .btn {
    min-height: 48px; padding: 13px; font-weight: 700;
}

.sv-setup-main { flex: 1; animation: sv-rise .4s ease both; }
.sv-setup-form { display: flex; flex-direction: column; gap: 10px; }
.sv-setup-form > input[type="hidden"] { display: none; }
.sv-setup-field label {
    display: block; font-size: .82rem; font-weight: 700;
    color: var(--sv-text); margin-bottom: 4px;
}
body.sv-portal.sv-setup .form-control,
body.sv-portal.sv-setup .form-select {
    font-size: 16px; padding: 11px 12px; min-height: 44px;
}
body.sv-portal.sv-setup textarea.form-control { min-height: 72px; }
.sv-setup-radios { display: flex; flex-direction: column; gap: 4px; }
.sv-setup-medical-box { margin-top: 10px; }
.sv-setup-radio,
.sv-setup-check {
    display: flex; align-items: flex-start; gap: 10px;
    font-weight: 500 !important; color: var(--sv-text) !important;
    margin: 0; padding: 6px 0; min-height: 40px;
}
.sv-setup-radio input,
.sv-setup-check input {
    width: 20px; height: 20px; margin-top: 2px; flex: 0 0 auto;
}
body.sv-portal.sv-setup .sv-setup-check a {
    color: var(--sv-accent);
    font-weight: 700;
    text-decoration: underline;
}

.sv-setup-cta {
    position: sticky;
    bottom: 0;
    margin: 6px -14px -14px;
    padding: 12px 14px calc(8px + env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(255,255,255,0) 0%, var(--sv-card) 28%);
}
.sv-setup-choice {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}
.sv-setup-choice .sv-setup-cta { margin-top: 0; }
.sv-setup-back {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: .9rem;
    font-weight: 700;
    color: var(--sv-text-soft);
    text-decoration: none;
    min-height: 44px;
    line-height: 44px;
}
.sv-setup-back:hover { color: var(--sv-primary); }
.sv-setup-subhead {
    font-size: 1rem; font-weight: 800; color: var(--sv-primary);
    margin: 8px 0 0;
}
.sv-setup-kids {
    list-style: none; padding: 0; margin: 0 0 18px;
    display: flex; flex-direction: column; gap: 8px;
}
.sv-setup-kid {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 12px 14px;
    background: #e8f6fc;
    border-radius: var(--sv-radius-sm);
}
.sv-setup-kid-info { min-width: 0; }
.sv-setup-kid-info strong { display: block; font-size: .95rem; color: var(--sv-primary); }
.sv-setup-kid-info span { font-size: .78rem; color: var(--sv-text-soft); }
.sv-setup-kid-remove {
    border: 0; background: none; color: var(--sv-error);
    font-size: .8rem; font-weight: 700; padding: 8px 6px; min-height: 44px;
}
body.sv-portal.sv-setup .sv-msg { margin-bottom: 12px; position: relative; z-index: 1; }

@media (min-width: 600px) {
    .sv-setup-cta { position: static; margin: 4px 0 0; padding: 4px 0 0; background: none; }
}

@media (min-width: 768px) {
    .sv-setup-shell {
        max-width: 720px;
        padding: calc(env(safe-area-inset-top) + 28px) 28px calc(env(safe-area-inset-bottom) + 36px);
    }
    .sv-setup-top { margin-bottom: 20px; }
    .sv-setup-brand { margin-bottom: 20px; }
    .sv-setup-brand .sv-brand-logo { max-height: 72px; }
    .sv-setup-brand .sv-brand-name { font-size: 1.7rem; }
    .sv-setup-card { padding: 32px 36px 28px; }
    .sv-setup-card h1 { font-size: 1.55rem; }
    .sv-setup-lead { font-size: 1rem; margin-bottom: 20px; }
    .sv-setup-art svg { max-width: 260px; }
    .sv-setup-form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px 18px;
    }
    .sv-setup-form > .sv-setup-field:has(textarea),
    .sv-setup-form > .sv-setup-field:has(.sv-setup-radios),
    .sv-setup-form > .sv-setup-field:has(.sv-setup-check),
    .sv-setup-form > .sv-setup-subhead,
    .sv-setup-form > .sv-setup-cta,
    .sv-setup-form > .btn,
    .sv-setup-form > h2 {
        grid-column: 1 / -1;
    }
    body.sv-portal.sv-setup .form-control,
    body.sv-portal.sv-setup .form-select {
        padding: 13px 14px; min-height: 48px;
    }
}

/* ============================================================================
 * sv_buy.php FTUE — one-line booking hint
 * ==========================================================================*/
body.sv-portal .sv-buy-guide-line {
    margin: 0 0 16px;
    color: var(--sv-text-soft);
    font-size: .95rem;
    line-height: 1.45;
}
body.sv-portal #sv-packages { scroll-margin-top: 16px; }

/* ---------- Foundations-only FTUE (single SKU, cart prefilled) ---------- */
body.sv-portal.sv-buy-foundations-only {
    padding-bottom: 24px !important;
}
body.sv-portal.sv-buy-foundations-only .sv-container {
    max-width: 720px;
}
body.sv-portal .sv-buy-foundations-hero {
    border: 2px solid var(--sv-accent);
    background: #f2fbff;
}
body.sv-portal .sv-buy-foundations-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 99px;
    background: #fff;
    color: var(--sv-primary);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    border: 1px solid var(--sv-border-strong);
    margin-bottom: 10px;
}
body.sv-portal .sv-buy-foundations-hero h2 {
    font-size: 1.28rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0 0 8px;
}
body.sv-portal .sv-buy-foundations-lead {
    margin: 0;
    color: var(--sv-text-soft);
    font-size: .95rem;
    line-height: 1.45;
}
body.sv-portal .sv-buy-foundations-benefits,
body.sv-portal .sv-buy-foundations-facts,
body.sv-portal .sv-buy-foundations-steps,
body.sv-portal .sv-buy-foundations-lines {
    list-style: none;
    padding: 0;
    margin: 0;
}
body.sv-portal .sv-buy-foundations-benefits li,
body.sv-portal .sv-buy-foundations-facts li {
    display: flex;
    gap: 10px;
    padding: 7px 0;
    align-items: flex-start;
    color: var(--sv-text);
    font-size: .94rem;
    line-height: 1.45;
}
body.sv-portal .sv-buy-foundations-benefits li i,
body.sv-portal .sv-buy-foundations-facts li i {
    color: var(--sv-accent);
    margin-top: 3px;
    width: 1.1em;
    text-align: center;
    flex: 0 0 auto;
}
body.sv-portal .sv-buy-foundations-pkg-name {
    font-weight: 800;
    color: var(--sv-primary);
    font-size: 1.05rem;
    margin: 0 0 6px;
}
body.sv-portal .sv-buy-foundations-desc {
    margin: 0 0 12px;
    color: var(--sv-text-soft);
    font-size: .92rem;
    line-height: 1.45;
    white-space: pre-line;
}
body.sv-portal .sv-buy-foundations-facts li em {
    font-style: normal;
    color: var(--sv-text-soft);
    font-size: .85rem;
    margin-left: 6px;
}
body.sv-portal .sv-buy-foundations-steps li {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    align-items: flex-start;
    color: var(--sv-text);
    font-size: .94rem;
}
body.sv-portal .sv-buy-foundations-steps .sn {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #eaf6fb;
    color: var(--sv-primary);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
}
body.sv-portal .sv-buy-foundations-lines li {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--sv-border);
}
body.sv-portal .sv-buy-foundations-lines li:last-child {
    border-bottom: none;
}
body.sv-portal .sv-buy-foundations-lines .info {
    min-width: 0;
}
body.sv-portal .sv-buy-foundations-lines .info strong {
    display: block;
    color: var(--sv-primary);
    font-size: .95rem;
    line-height: 1.3;
}
body.sv-portal .sv-buy-foundations-lines .info span {
    display: block;
    color: var(--sv-text-soft);
    font-size: .82rem;
    margin-top: 2px;
}
body.sv-portal .sv-buy-foundations-lines .price {
    font-weight: 700;
    color: var(--sv-success);
    white-space: nowrap;
    font-size: .95rem;
}
body.sv-portal .sv-buy-foundations-total {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin: 8px 0 16px;
    padding-top: 12px;
    border-top: 1px solid var(--sv-border);
}
body.sv-portal .sv-buy-foundations-total span {
    font-weight: 700;
    color: var(--sv-text-soft);
    font-size: .9rem;
}
body.sv-portal .sv-buy-foundations-total strong {
    font-weight: 800;
    color: var(--sv-primary);
    font-size: 1.35rem;
}
body.sv-portal .sv-buy-foundations-empty {
    margin: 0 0 14px;
    color: var(--sv-text-soft);
}
body.sv-portal .sv-buy-foundations-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 13px 16px;
    border: none;
    border-radius: var(--sv-radius-sm);
    background: var(--sv-primary);
    color: #fff !important;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 6px 16px rgba(0, 78, 137, .18);
}
body.sv-portal .sv-buy-foundations-cta:hover {
    background: var(--sv-primary-deep);
    color: #fff !important;
}
body.sv-portal .sv-buy-foundations-cta--outline {
    background: #fff;
    color: var(--sv-primary) !important;
    border: 1px solid var(--sv-border-strong);
    box-shadow: none;
}
body.sv-portal .sv-buy-foundations-cta--outline:hover {
    background: #f2fbff;
    color: var(--sv-primary) !important;
}

/* Parent / kid profile avatars */
.swim-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 50%;
    background: #d7e6ef;
    color: #0b2b46;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}
.swim-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.swim-avatar--sm { width: 24px; height: 24px; font-size: 10px; }
.swim-avatar--md { width: 36px; height: 36px; font-size: 13px; }
.swim-avatar--lg { width: 56px; height: 56px; font-size: 18px; }
.swim-avatar--xl { width: 96px; height: 96px; font-size: 32px; }
.swim-avatar-upload {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 10px;
    position: relative;
    line-height: 1.15;
}
.swim-avatar--empty {
    border: 2px dashed #7aa8c4;
    background: #eef6fb;
    color: #004e89;
}
.swim-avatar--empty .swim-avatar-cam {
    width: 46%;
    height: 46%;
}
/* Positions the camera badge on the placeholder circle (avatar clips overflow) */
.swim-avatar-wrap {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
}
.swim-avatar-upload-hint {
    font-size: 11px;
    font-weight: 800;
    color: #004e89;
    white-space: nowrap;
}
.swim-avatar-badge {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #004e89;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
}
.swim-avatar-badge .swim-avatar-cam { width: 11px; height: 11px; }
.swim-avatar-upload:has(.swim-avatar--sm) .swim-avatar-badge {
    width: 14px;
    height: 14px;
    right: -3px;
    bottom: -3px;
}
.swim-avatar-upload:has(.swim-avatar--sm) .swim-avatar-badge .swim-avatar-cam {
    width: 8px;
    height: 8px;
}
.swim-avatar-upload:has(.swim-avatar--lg) .swim-avatar-badge {
    width: 22px;
    height: 22px;
    right: 0;
    bottom: 0;
}
.swim-avatar-upload:has(.swim-avatar--lg) .swim-avatar-badge .swim-avatar-cam {
    width: 13px;
    height: 13px;
}
.swim-avatar-upload:has(.swim-avatar--xl) .swim-avatar-badge {
    width: 30px;
    height: 30px;
    right: 2px;
    bottom: 2px;
}
.swim-avatar-upload:has(.swim-avatar--xl) .swim-avatar-badge .swim-avatar-cam {
    width: 17px;
    height: 17px;
}
.swim-avatar-upload:hover .swim-avatar,
.swim-avatar-upload:focus-visible .swim-avatar {
    box-shadow: 0 0 0 3px rgba(0, 78, 137, .25);
}
.swim-avatar-upload--empty:hover .swim-avatar--empty,
.swim-avatar-upload--empty:focus-visible .swim-avatar--empty {
    background: #dff2fb;
    border-color: #004e89;
}
.swim-avatar-upload.is-uploading { opacity: .55; pointer-events: none; }
.sv-hero-greeting-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.sv-hero-greeting-row .sv-hero-greeting { margin: 0; }
.sv-hero .swim-avatar {
    background: rgba(255,255,255,.22);
    color: #fff;
    box-shadow: 0 0 0 2px rgba(255,255,255,.35);
}
.sv-hero .swim-avatar--empty {
    background: rgba(255,255,255,.16);
    border-color: rgba(255,255,255,.85);
    color: #fff;
    box-shadow: none;
}
.sv-hero .swim-avatar-upload-hint { color: #fff; }
.sv-hero .swim-avatar-badge {
    background: #fff;
    color: #004e89;
    box-shadow: 0 0 0 2px rgba(0,78,137,.35);
}
.sv-row { gap: 12px; }
.sv-row .who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sv-lesson-tile-who { display: flex; align-items: center; gap: 6px; }
.student-card h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sv-setup-kid { display: flex; align-items: center; gap: 10px; }
.sv-child-tiles { display: flex; flex-wrap: wrap; gap: 8px; }
.sv-child-tile {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 12px; border: 1px solid var(--sv-border);
    border-radius: 999px; text-decoration: none; color: inherit;
    background: #fff; font-weight: 600; font-size: .9rem;
    cursor: pointer; font-family: inherit;
}
.sv-child-tile.is-active {
    border-color: var(--sv-primary);
    background: #f2fbff;
    color: var(--sv-primary);
}

/* ---------------------------------------------------------------------------
   Immersive location cards (helpers/sv_location_cards.php)
   Shared by sv_schedule.php ("Our locations" filter cards) and sv.php
   ("Know before you go" dashboard section): photo + live map, address,
   parking / what-to-bring notes, Google + Apple Maps buttons. The
   [data-toggle-href] / .is-off / .sv-loc-toggle bits only fire on the
   schedule page, where cards double as the location filter.
--------------------------------------------------------------------------- */
body.sv-portal .sv-loc-know-title { color: var(--sv-primary); font-size: 1.15rem; margin: 0 0 14px; font-weight: 700; }
body.sv-portal .sv-loc-know-title i { color: var(--sv-accent); margin-right: 8px; }

/* ---------------------------------------------------------------------------
   Org-wide "what to bring" checklist card (helpers/swim_what_to_bring.php).
   Shown on the post-book hero (sv.php) and the lesson page (sv_lessons.php).
--------------------------------------------------------------------------- */
body.sv-portal .sv-bring-card { border: 2px solid #cfe3f0; border-radius: 16px; padding: 16px 18px; background: #fbfeff; }
body.sv-portal .sv-bring-card.is-compact { margin-top: 14px; }
body.sv-portal .sv-bring-head { display: flex; align-items: center; gap: 8px; color: var(--sv-primary); font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
body.sv-portal .sv-bring-head i { color: var(--sv-accent); }
body.sv-portal .sv-bring-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
body.sv-portal .sv-bring-list li { display: flex; align-items: flex-start; gap: 10px; font-size: .95rem; color: #33475b; line-height: 1.4; }
body.sv-portal .sv-bring-list li i { flex: 0 0 auto; margin-top: 3px; width: 18px; text-align: center; color: var(--sv-accent); }
body.sv-portal .sv-loc-hint { margin: -6px 0 14px; color: #5b6b7c; font-size: .88rem; font-weight: 600; }
body.sv-portal .sv-loc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; align-items: start; }
body.sv-portal .sv-loc-block { border: 2px solid #cfe3f0; border-radius: 16px; padding: 16px; background: #fbfeff; transition: opacity .15s, border-color .15s, box-shadow .15s; }
body.sv-portal .sv-loc-block[data-toggle-href] { cursor: pointer; }
body.sv-portal .sv-loc-block[data-toggle-href]:hover { border-color: var(--sv-accent); box-shadow: 0 4px 14px rgba(0,78,137,.10); }
body.sv-portal .sv-loc-block.is-off { opacity: .55; border-style: dashed; background: #f6f8fa; }
body.sv-portal .sv-loc-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; border: 1.5px solid #cfe3f0; background: #fff; color: var(--sv-primary); font-weight: 750; font-size: .82rem; text-decoration: none; white-space: nowrap; transition: border-color .12s, background .12s; }
body.sv-portal .sv-loc-toggle:hover { border-color: var(--sv-accent); background: #f2fafd; color: var(--sv-primary); }
body.sv-portal .sv-loc-toggle.is-on { border-color: var(--sv-primary); background: var(--sv-primary); color: #fff; }
body.sv-portal .sv-loc-block-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
body.sv-portal .sv-loc-headline { min-width: 0; }
body.sv-portal .sv-loc-title { display: block; font-size: 1.2rem; font-weight: 800; color: var(--sv-primary); line-height: 1.2; }
body.sv-portal .sv-loc-address { display: block; color: #33475b; font-size: .9rem; font-weight: 600; margin-top: 4px; }
body.sv-portal .sv-loc-address i { color: var(--sv-accent); margin-right: 6px; }
body.sv-portal .sv-loc-media-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
body.sv-portal .sv-loc-media-row.is-single { grid-template-columns: 1fr; }
body.sv-portal .sv-loc-photo img { width: 100%; height: 230px; object-fit: cover; border-radius: 12px; display: block; }
body.sv-portal .sv-loc-map iframe { width: 100%; height: 230px; border: 0; border-radius: 12px; display: block; }
body.sv-portal .sv-loc-media-row.is-single .sv-loc-map iframe { height: 260px; }
body.sv-portal .sv-loc-directions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
body.sv-portal .sv-loc-dir-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; border: 1.5px solid #cfe3f0; background: #fff; color: var(--sv-primary); font-weight: 700; font-size: .84rem; text-decoration: none; }
body.sv-portal .sv-loc-dir-btn:hover { border-color: var(--sv-primary); background: #e8f6fc; color: var(--sv-primary); }
body.sv-portal .sv-loc-notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
body.sv-portal .sv-loc-notes li { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: #33475b; line-height: 1.45; }
body.sv-portal .sv-loc-notes li i { flex: 0 0 auto; margin-top: 3px; width: 18px; text-align: center; color: var(--sv-accent); }
body.sv-portal .sv-loc-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--sv-loc-color, var(--sv-accent)); flex: 0 0 auto; }
@media (max-width: 720px) {
    body.sv-portal .sv-loc-media-row { grid-template-columns: 1fr; }
    body.sv-portal .sv-loc-photo img { height: 180px; }
    body.sv-portal .sv-loc-map iframe,
    body.sv-portal .sv-loc-media-row.is-single .sv-loc-map iframe { height: 200px; }
}

/* ==========================================================================
 * Pool safety pitch (fence_interest question) — co-branded Life Saver Pool
 * Fence block rendered by includes/sv_intake_fields.php. Shared here because
 * the question appears on every page that renders intake fields (/sv/intake,
 * /sv/enroll, /sv/forms review). Bleeds to the card edges via negative
 * margins that match the 24px .sv-card padding.
 * ==========================================================================*/
body.sv-portal .sv-fence-q { margin: -24px -24px 18px; }
body.sv-portal .sv-fence-hero { position: relative; }
body.sv-portal .sv-fence-hero-photo { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px 14px 0 0; }
body.sv-portal .sv-fence-hero::after { content: ''; position: absolute; inset: 40% 0 0 0; background: linear-gradient(180deg, rgba(3,32,54,0) 0%, rgba(3,32,54,.72) 100%); border-radius: 0; pointer-events: none; }
body.sv-portal .sv-fence-partner-flag { position: absolute; left: 14px; bottom: 12px; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 8px 12px 10px; background: rgba(255,255,255,.96); border-radius: 12px; box-shadow: 0 6px 20px rgba(3,32,54,.28); }
body.sv-portal .sv-fence-partner-flag small { font-weight: 800; font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: #33566f; }
body.sv-portal .sv-fence-logo { display: block; height: 48px; width: auto; max-width: min(220px, 62vw); }
body.sv-portal .sv-fence-stat-banner { display: flex; align-items: center; gap: 18px; background: linear-gradient(135deg, #032036 0%, #075985 100%); color: #fff; padding: 20px 22px; }
body.sv-portal .sv-fence-stat-num { font-size: 3.4rem; font-weight: 900; line-height: 1; color: #4fd1ff; letter-spacing: -.02em; flex: 0 0 auto; text-shadow: 0 2px 12px rgba(79,209,255,.35); }
body.sv-portal .sv-fence-stat-text { font-size: .98rem; font-weight: 600; color: rgba(255,255,255,.94); }
body.sv-portal .sv-fence-body { padding: 18px 24px 0; }
body.sv-portal .sv-fence-partner-line { color: #33566f; font-size: .92rem; margin: 0 0 12px; }
@media (max-width: 480px) {
    body.sv-portal .sv-fence-stat-num { font-size: 2.7rem; }
    body.sv-portal .sv-fence-stat-banner { padding: 16px 18px; gap: 14px; }
    body.sv-portal .sv-fence-logo { height: 40px; }
    body.sv-portal .sv-fence-partner-flag { left: 10px; bottom: 10px; padding: 6px 10px 8px; }
}
body.sv-portal .sv-fence-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
body.sv-portal .sv-fence-opt { display: flex; align-items: center; gap: 12px; border: 2px solid #cfe0ec; border-radius: 12px; padding: 14px; margin: 0; cursor: pointer; font-weight: 600; color: #0b2b46; transition: border-color .15s ease, background .15s ease; }
body.sv-portal .sv-fence-opt:hover { border-color: var(--sv-accent, #1aaee0); }
body.sv-portal .sv-fence-opt input { accent-color: var(--sv-primary, #004e89); width: 18px; height: 18px; flex: 0 0 auto; margin: 0; }
body.sv-portal .sv-fence-opt:has(input:checked) { border-color: var(--sv-primary, #004e89); background: #eaf6fb; }

/* Where they swim — household chips before the Pool safety fence questions */
body.sv-portal .sv-places-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 10px 0 16px; }
body.sv-portal .sv-places-chip { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 10px 14px; border: 2px solid #cfe0ec; border-radius: 999px; background: #fff; cursor: pointer; font-weight: 700; color: #0b2b46; transition: border-color .15s ease, background .15s ease; }
body.sv-portal .sv-places-chip:hover { border-color: var(--sv-accent, #1aaee0); }
body.sv-portal .sv-places-chip input { accent-color: var(--sv-primary, #004e89); width: 16px; height: 16px; margin: 0; }
body.sv-portal .sv-places-chip:has(input:checked) { border-color: var(--sv-primary, #004e89); background: #eaf6fb; }
body.sv-portal .sv-places-chip.is-none { border-style: dashed; font-weight: 600; color: #33566f; }
body.sv-portal .sv-places-custom-label { color: #64748b; font-size: .88rem; font-weight: 600; margin: 0 0 8px; }
body.sv-portal .sv-places-custom-list { display: flex; flex-direction: column; gap: 8px; }
body.sv-portal .sv-places-custom-row { display: flex; gap: 8px; align-items: center; }
body.sv-portal .sv-places-custom-row .sv-intake-input { flex: 1; }
body.sv-portal .sv-places-custom-remove { border: none; background: #f1f5f9; color: #33566f; width: 36px; height: 36px; border-radius: 10px; font-size: 1.2rem; line-height: 1; cursor: pointer; }
body.sv-portal .sv-places-custom-add { display: flex; gap: 8px; margin-top: 8px; }
body.sv-portal .sv-places-custom-add .sv-intake-input { flex: 1; }
body.sv-portal .sv-places-custom-btn { border: 2px solid #cfe0ec; background: #fff; color: var(--sv-primary, #004e89); border-radius: 10px; padding: 8px 14px; font-weight: 800; cursor: pointer; }
body.sv-portal .sv-place-fences { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
body.sv-portal .sv-place-fence-row { border: 1px solid #d7e6ef; border-radius: 12px; padding: 12px 14px; background: #f8fbfd; }
body.sv-portal .sv-place-fence-name { font-weight: 800; color: #0b2b46; margin-bottom: 8px; }
body.sv-portal .sv-place-fence-opts { display: flex; flex-wrap: wrap; gap: 8px; }
body.sv-portal .sv-place-fence-opt { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 8px 12px; border: 2px solid #cfe0ec; border-radius: 10px; background: #fff; cursor: pointer; font-weight: 600; color: #0b2b46; }
body.sv-portal .sv-place-fence-opt:has(input:checked) { border-color: var(--sv-primary, #004e89); background: #eaf6fb; }
body.sv-portal .sv-place-fence-opt input { accent-color: var(--sv-primary, #004e89); margin: 0; }

/* Per-unfenced-place follow-up cards (text a number / forward it yourself) */
body.sv-portal .sv-followups { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
body.sv-portal .sv-fu-card { border: 1px solid #d7e6ef; border-radius: 14px; padding: 14px; background: #f8fbfd; }
body.sv-portal .sv-fu-card[hidden] { display: none; }
body.sv-portal .sv-fu-card-name { font-weight: 800; color: #0b2b46; font-size: .95rem; }
body.sv-portal .sv-fu-card-q { color: #33566f; font-size: .9rem; margin: 2px 0 10px; }
body.sv-portal .sv-fu-opts { display: flex; flex-direction: column; gap: 8px; }
body.sv-portal .sv-fu-opt { display: flex; align-items: center; gap: 10px; border: 2px solid #cfe0ec; border-radius: 12px; padding: 11px 13px; margin: 0; cursor: pointer; font-weight: 600; color: #0b2b46; background: #fff; transition: border-color .15s ease, background .15s ease; }
body.sv-portal .sv-fu-opt:hover { border-color: var(--sv-accent, #1aaee0); }
body.sv-portal .sv-fu-opt input { accent-color: var(--sv-primary, #004e89); width: 18px; height: 18px; flex: 0 0 auto; margin: 0; }
body.sv-portal .sv-fu-opt:has(input:checked) { border-color: var(--sv-primary, #004e89); background: #eaf6fb; }
body.sv-portal .sv-fu-home-note { margin: 10px 0 0; color: #33566f; font-size: .88rem; font-weight: 600; }
body.sv-portal .sv-fu-home-note[hidden] { display: none; }
body.sv-portal .sv-fu-phone { margin-top: 10px; }
body.sv-portal .sv-fu-phone[hidden], body.sv-portal .sv-fu-share[hidden] { display: none; }
body.sv-portal .sv-fu-phone-label { display: block; font-weight: 700; color: #0b2b46; font-size: .82rem; margin: 0 0 6px; }
body.sv-portal .sv-fu-phone-input,
body.sv-portal .sv-fu-phone .sv-intake-input {
    width: 100%;
    color-scheme: light;
    background: #fff !important;
    color: #0b2b46 !important;
    border: 2px solid #cfe0ec;
    border-radius: 12px;
    padding: 12px 14px;
    font: inherit;
    font-size: 1rem;
    -webkit-text-fill-color: #0b2b46;
}
body.sv-portal .sv-fu-phone-input::placeholder { color: #94a3b8; -webkit-text-fill-color: #94a3b8; }
body.sv-portal .sv-fu-phone-input:focus {
    outline: none;
    border-color: var(--sv-primary, #004e89);
    box-shadow: 0 0 0 3px rgba(0,78,137,.12);
}
body.sv-portal .sv-fu-share { margin-top: 10px; }
body.sv-portal .sv-fu-share-label { color: #0b2b46; font-size: .85rem; font-weight: 800; margin: 0 0 8px; }
body.sv-portal .sv-fu-share-box {
    border: 2px solid #cfe0ec;
    border-radius: 12px;
    background: #fff;
    padding: 12px 14px;
}
body.sv-portal .sv-fu-share-msg { margin: 0 0 12px; color: #0b2b46; font-size: .92rem; line-height: 1.45; }
body.sv-portal .sv-fu-share-copy {
    display: flex; align-items: center; justify-content: center; width: 100%;
    border: none; background: var(--sv-primary, #004e89); color: #fff;
    border-radius: 10px; padding: 12px 14px; font-weight: 800; font-size: .95rem; cursor: pointer;
}
body.sv-portal .sv-fu-share-copy.is-done { background: #146c43; }
body.sv-portal .sv-fu-share-sms {
    display: flex; align-items: center; justify-content: center; margin-top: 8px;
    border: 2px solid #cfe0ec; background: #fff; color: var(--sv-primary, #004e89);
    border-radius: 10px; padding: 10px 14px; font-weight: 800; text-decoration: none;
}
body.sv-portal .sv-fu-empty { color: #146c43; font-weight: 600; font-size: .9rem; margin-top: 4px; }
body.sv-portal .sv-fu-empty[hidden] { display: none; }

/* Amazon affiliate gear shop — Buy tab, checkout upsell, /sv/gear */
body.sv-portal .sv-gear-card {
    background: var(--sv-card, #fff);
    border: 1px solid var(--sv-border, #e2eaf1);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    padding: 20px 22px;
    margin: 16px 0 20px;
}
body.sv-portal .sv-gear-card.is-compact { padding: 16px 18px; margin: 14px 0; }
body.sv-portal .sv-gear-head h2 {
    color: var(--sv-primary, #004e89);
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 6px;
}
body.sv-portal .sv-gear-head h2 i { margin-right: 8px; }
body.sv-portal .sv-gear-intro {
    color: var(--sv-text-soft, #5b6b7c);
    font-size: .92rem;
    line-height: 1.45;
    margin: 0 0 12px;
}
body.sv-portal .sv-gear-age {
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sv-primary, #004e89);
    margin: 12px 0 6px;
}
body.sv-portal .sv-gear-list {
    list-style: none;
    margin: 0 0 10px;
    padding: 0;
}
body.sv-portal .sv-gear-list li { border-bottom: 1px solid var(--sv-border, #e2eaf1); }
body.sv-portal .sv-gear-list li:last-child { border-bottom: 0; }
body.sv-portal .sv-gear-list a {
    display: block;
    padding: 8px 0;
    color: var(--sv-text, #1f3242);
    text-decoration: none;
}
body.sv-portal .sv-gear-list a:hover .sv-gear-name { color: var(--sv-accent-deep, #1591bd); }
body.sv-portal .sv-gear-name { display: block; font-weight: 700; }
body.sv-portal .sv-gear-note { display: block; font-size: .85rem; color: var(--sv-text-soft, #5b6b7c); }
body.sv-portal .sv-gear-actions { margin-top: 8px; }
body.sv-portal .sv-gear-amazon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--sv-primary, #004e89);
    text-decoration: none;
    border: 1px solid var(--sv-border-strong, #cfdde9);
    border-radius: 10px;
    padding: 10px 14px;
    background: #fff;
}
body.sv-portal .sv-gear-amazon:hover { border-color: var(--sv-primary, #004e89); }
body.sv-portal .sv-gear-legal {
    margin: 12px 0 0;
    font-size: .75rem;
    color: var(--sv-muted, #8aa0b2);
    line-height: 1.4;
}
body.sv-portal .sv-gear-continue { margin-top: 8px; }
body.sv-portal .sv-gear-continue .continue-btn {
    display: block;
    width: 100%;
    background: var(--sv-primary, #004e89);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px 18px;
    font-weight: 800;
}
body.sv-portal .sv-gear-skip {
    display: block;
    width: 100%;
    margin-top: 8px;
    background: transparent;
    border: none;
    color: var(--sv-text-soft, #5b6b7c);
    font-weight: 650;
    padding: 10px;
}

/* Card-on-file PCI / authorization note (register, checkout, Account cards). */
body.sv-portal .card-on-file-note {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f3f8fc;
    border: 1px solid #cfe0ec;
    border-radius: 10px;
    font-size: 0.88rem;
    color: #33566f;
    line-height: 1.45;
}
body.sv-portal .card-on-file-note strong { color: #0b2b46; }
