/* =============================================================
   Auth + Public Chrome Redesign — phase 6
   Loaded site-wide (alongside auth-style.css for legacy fallback).
   Public navbar / footer styles are global; form-card styles are
   scoped under #signin_section so they don't leak into marketing
   pages or the legacy register form (which still ships under
   .signin_form_wrap from auth-style.css until phase 7).
   ============================================================= */

/* ---- Tokens ----
   Mirrors portal_redesign.css so the auth pages and the portal share one
   type system and palette. Auth pages don't load portal_redesign.css, so
   the tokens are duplicated here. The post-phase-5 contrast bump on
   --auth-text-muted (#637381 → #6B7280, ~3.34:1 → ~4.83:1 against white)
   carries over from the portal so all secondary text passes WCAG AA. */
:root {
    --auth-navy:           #00345C;        /* brand navy (Artboard.jpg) */
    --auth-navy-mid:       #162D4E;        /* slightly darker hover companion */
    --auth-teal:           #0195ba;        /* portal --accent */
    --auth-teal-light:     #E6F7FB;        /* portal --accent-light */
    --auth-cyan:           #00B0DC;        /* portal --accent-mid */
    --auth-surface:        #F5F7FA;        /* slightly closer to brand #EAEAEA */
    --auth-white:          #FFFFFF;
    --auth-border:         #E2E8F0;        /* portal --border */
    --auth-border-strong:  #CBD5E0;        /* darker border for inputs */
    --auth-text:           #0D1B2A;        /* portal --text-primary */
    --auth-text-secondary: #4A5568;        /* portal --text-secondary */
    --auth-text-muted:     #6B7280;        /* portal --text-muted, AA on white */
    --auth-success:        #0E9E6E;
    --auth-success-bg:     #E8F7F3;
    --auth-danger:         #C94040;
    --auth-danger-bg:      #FCEAEA;
    --auth-warn:           #D97B00;
    --auth-warn-bg:        #FEF6E7;
    --auth-radius:         10px;           /* portal --radius */
    --auth-radius-lg:      14px;           /* portal --radius-lg */
    --auth-nav-h:          84px;
    --auth-focus-ring:     0 0 0 3px rgba(0,148,186,0.35);
    --auth-card-shadow:    0 1px 2px rgba(11,31,58,0.04), 0 12px 32px rgba(11,31,58,0.10);
    --auth-font-sans:      'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --auth-font-serif:     Georgia, 'Times New Roman', serif;
}

/* ---- Sitewide public-side type defaults ----
   Scoped to body.public-redesign so this never leaks into the
   logged-in portal (body.portal-redesign) which has its own type
   system. Headings get Georgia normal; everything else inherits
   Poppins medium. */
body.public-redesign {
    font-family: var(--auth-font-sans) !important;
    font-weight: 500;
}
body.public-redesign p,
body.public-redesign li,
body.public-redesign a,
body.public-redesign span,
body.public-redesign button,
body.public-redesign input,
body.public-redesign select,
body.public-redesign textarea,
body.public-redesign label {
    font-family: var(--auth-font-sans) !important;
}
body.public-redesign h1,
body.public-redesign h2,
body.public-redesign h3,
body.public-redesign h4,
body.public-redesign h5,
body.public-redesign h6 {
    font-family: var(--auth-font-serif) !important;
    font-weight: 400;
}

/* ---- Skip link ---- */
.public-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--auth-navy);
    color: #fff;
    padding: 10px 16px;
    z-index: 200;
    border-radius: 0 0 var(--auth-radius) 0;
    font-family: var(--auth-font-sans);
    font-size: 13px;
    text-decoration: none;
}
.public-skip-link:focus {
    left: 0;
    outline: none;
    box-shadow: var(--auth-focus-ring);
}

/* ---- Public navbar ----
   Inner wrapper mirrors the landing hero container (max-width 1180,
   24px side padding) so the logo and nav items line up with the hero
   text column. The outer .public-nav keeps the full-width background
   and bottom border. */
.public-nav {
    background: #eaeaea;
    border-bottom: 1px solid var(--auth-border);
    height: var(--auth-nav-h);
    position: sticky;
    top: 0;
    z-index: 50;
    font-family: var(--auth-font-sans) !important;
    padding: 0 24px;
}
.public-nav,
.public-nav a,
.public-nav button { font-family: var(--auth-font-sans) !important; }
.public-nav-inner {
    max-width: 1180px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.public-nav-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--auth-navy);
    line-height: 0;
    flex-shrink: 0;
}
.public-nav-logo svg { display: block; }
.public-nav-logo:focus-visible {
    outline: none;
    box-shadow: var(--auth-focus-ring);
    border-radius: 4px;
}
.public-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}
.public-nav-links a {
    color: var(--auth-text-muted);
    text-decoration: none;
    font-size: 14px;
    font-family: var(--auth-font-sans);
    transition: color 0.15s;
}
.public-nav-links a:hover { color: var(--auth-navy); }
.public-nav-links a:focus-visible {
    outline: none;
    box-shadow: var(--auth-focus-ring);
    border-radius: 4px;
}
.public-nav-cta {
    background: var(--auth-navy);
    color: var(--auth-white) !important;
    padding: 8px 20px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 500;
    transition: background 0.15s;
}
.public-nav-cta:hover { background: var(--auth-navy-mid); color: var(--auth-white) !important; }
.public-nav-login {
    color: var(--auth-navy) !important;
    font-size: 14px;
    font-weight: 500;
}
.public-nav-login:hover { color: var(--auth-teal) !important; }

.public-nav-burger {
    display: none;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    justify-content: space-between;
    flex-shrink: 0;
}
.public-nav-burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--auth-navy);
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}
.public-nav-burger:focus-visible {
    outline: none;
    box-shadow: var(--auth-focus-ring);
    border-radius: 4px;
}

/* ---- Page wrap ----
   Marketing pages keep their own padding; auth pages center the form-card.
   The body class on auth pages is set per-template via the wrapper id,
   so we scope the centering rules to #signin_section instead of body. */
.public-main-wrap { min-height: calc(100vh - var(--auth-nav-h) - 280px); }

/* ---- Auth page (shared signin / register / thank-you) ---- */
#signin_section.auth-redesign {
    background: var(--auth-surface);
    padding: 56px 24px 80px;
    min-height: calc(100vh - var(--auth-nav-h) - 280px);
    font-family: var(--auth-font-sans);
    color: var(--auth-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#signin_section .auth-form-wrap {
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
}

#signin_section .form-card {
    background: var(--auth-white);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-lg);
    box-shadow: var(--auth-card-shadow);
    padding: 44px 48px;
}

#signin_section .card-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}
#signin_section .card-logo svg { width: 56px; height: 56px; }

#signin_section .card-title {
    font-family: var(--auth-font-serif) !important;
    font-size: 26px !important;
    font-weight: 400 !important;
    text-align: center;
    color: var(--auth-navy) !important;
    margin: 0 0 6px !important;
    line-height: 1.25 !important;
    letter-spacing: -0.01em;
}
#signin_section .card-subtitle {
    font-size: 13.5px;
    color: var(--auth-text-secondary);
    text-align: center;
    margin: 0 0 26px;
    line-height: 1.55;
}

/* ---- Form fields (auth scope) ---- */
#signin_section .form-section { margin: 0; }
#signin_section .form-section + .form-section {
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--auth-border);
}

#signin_section .field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}
#signin_section .field-group:last-child { margin-bottom: 0; }

#signin_section label {
    font-size: 13px;
    font-weight: 500;
    color: var(--auth-text);
    display: flex;
    align-items: center;
    gap: 3px;
    margin: 0;
    letter-spacing: 0.005em;
}
#signin_section label .req { color: var(--auth-danger); line-height: 1; }

#signin_section input[type=text],
#signin_section input[type=email],
#signin_section input[type=tel],
#signin_section input[type=password],
#signin_section input[type=number] {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--auth-border-strong);
    border-radius: var(--auth-radius);
    font-family: var(--auth-font-sans);
    font-size: 14px;
    color: var(--auth-text);
    background: var(--auth-white);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
    appearance: none;
    box-shadow: none;
    height: auto;
    line-height: 1.5;
}
#signin_section input:hover {
    border-color: #94A3B8;
}
#signin_section input:focus {
    border-color: var(--auth-teal);
    box-shadow: 0 0 0 3px rgba(0,148,186,0.18);
}
#signin_section input::placeholder { color: #94A3B8; }
#signin_section input.is-invalid {
    border-color: var(--auth-danger);
    box-shadow: 0 0 0 3px rgba(201,64,64,0.18);
}
#signin_section input.is-valid {
    border-color: var(--auth-success);
}
#signin_section input:-webkit-autofill {
    /* prevent Chrome's yellow autofill bg over our white card */
    -webkit-box-shadow: 0 0 0 1000px var(--auth-white) inset;
    -webkit-text-fill-color: var(--auth-text);
    caret-color: var(--auth-text);
}

/* ---- Password reveal (legacy markup pattern) ----
   js/auth.js binds to #show_pass1_signup which is wrapped in
   .show_input_field > .btn. We reuse that markup so the legacy
   show/hide handler keeps working, and absolutely-position the
   eye icon over the input. */
#signin_section .pw-wrap { position: relative; }
#signin_section .pw-wrap input { padding-right: 40px; }

#signin_section .show_input_field {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#signin_section .show_input_field .btn {
    width: 40px !important;
    height: 100%;
    padding: 0 !important;
    margin: 0;
    background: none !important;
    border: none !important;
    color: var(--auth-text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
    min-width: 0 !important;
    line-height: 1;
}
#signin_section .show_input_field .btn:hover { color: var(--auth-navy); }
#signin_section .show_input_field .btn input[type="checkbox"] { display: none; }
#signin_section .show_input_field .btn i.fa-eye {
    font-size: 15px;
    color: inherit;
    background: transparent !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    border-radius: 0 !important;
}
#signin_section .show_input_field .btn.active i.fa-eye:after {
    content: "";
    width: 1px;
    height: 22px;
    position: absolute;
    background-color: currentColor;
    transform: rotate(45deg);
    top: -4px;
    left: 50%;
    margin-left: -1px;
}

/* ---- Remember-me checkbox ---- */
#signin_section .checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 10px;
}
#signin_section .checkbox-row input[type=checkbox] {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--auth-teal);
    flex-shrink: 0;
    cursor: pointer;
}
#signin_section .checkbox-row label {
    font-size: 13px;
    color: var(--auth-text-secondary);
    cursor: pointer;
    font-weight: 400;
}

/* ---- Submit button ---- */
#signin_section .submit-btn {
    width: 100%;
    background: var(--auth-navy);
    color: var(--auth-white);
    border: none;
    border-radius: var(--auth-radius);
    padding: 13px 20px;
    font-family: var(--auth-font-sans);
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s, transform 0.05s;
    margin-top: 22px;
    line-height: 1.2;
    text-align: left;
    letter-spacing: 0.01em;
    box-shadow: 0 1px 2px rgba(11,31,58,0.12);
}
#signin_section .submit-btn:hover { background: var(--auth-navy-mid); color: var(--auth-white); }
#signin_section .submit-btn:active { transform: translateY(1px); }
#signin_section .submit-btn:disabled {
    background: #A0AEBA;
    cursor: not-allowed;
    box-shadow: none;
}
#signin_section .submit-btn:focus-visible {
    outline: none;
    box-shadow: var(--auth-focus-ring), 0 1px 2px rgba(11,31,58,0.12);
}
#signin_section .submit-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    flex-shrink: 0;
    opacity: 0.9;
}
/* swallow any FA spinner the legacy processFormBtn() might re-inject */
#signin_section .submit-btn i.fa,
#signin_section .submit-btn i.fas,
#signin_section .submit-btn i.fa-spin {
    color: currentColor !important;
    background: transparent !important;
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    margin-left: 6px;
}

/* ---- Bottom links ---- */
#signin_section .login-link {
    text-align: center;
    font-size: 13px;
    color: var(--auth-text-secondary);
    margin: 18px 0 0;
    line-height: 1.5;
}
#signin_section .login-link + .login-link { margin-top: 8px; }
#signin_section .login-link a,
#signin_section .login-link .forgot_muted,
#signin_section .login-link .login_muted {
    color: var(--auth-teal);
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
}
#signin_section .login-link a:hover,
#signin_section .login-link .forgot_muted:hover,
#signin_section .login-link .login_muted:hover {
    text-decoration: underline;
}

/* ---- Alerts (rendered into .pagemsg via .alert.alert-*) ---- */
#signin_section .pagemsg { margin: 0 0 14px; }
#signin_section .pagemsg:empty { margin: 0; }
#signin_section .pagemsg .alert {
    display: block;
    border: 1px solid transparent;
    border-radius: var(--auth-radius);
    padding: 11px 14px;
    font-size: 13px;
    line-height: 1.55;
    margin: 0 0 8px;
}
#signin_section .pagemsg .alert:last-child { margin-bottom: 0; }
#signin_section .pagemsg .alert-danger {
    background: var(--auth-danger-bg);
    border-color: rgba(201,64,64,0.25);
    color: #7a2727;
}
#signin_section .pagemsg .alert-success {
    background: var(--auth-success-bg);
    border-color: rgba(14,158,110,0.25);
    color: #0a6b4b;
}
#signin_section .pagemsg .alert-info {
    background: var(--auth-teal-light);
    border-color: rgba(0,148,186,0.25);
    color: #005a73;
}
#signin_section .pagemsg .alert-warning {
    background: var(--auth-warn-bg);
    border-color: rgba(217,123,0,0.25);
    color: #7A4A00;
}

/* invalid-feedback used by reset-password validation */
#signin_section .invalid-feedback {
    display: none;
    font-size: 11.5px;
    color: var(--auth-danger);
    margin-top: 3px;
}
#signin_section input.is-invalid + .invalid-feedback,
#signin_section input.is-invalid ~ .invalid-feedback { display: block; }

/* ---- Responsive ---- */
@media (max-width: 720px) {
    .public-nav { padding: 0 20px; }
    .public-nav-logo svg { width: 160px; height: auto; }
    .public-nav-burger { display: flex; }
    .public-nav-links {
        position: absolute;
        top: var(--auth-nav-h);
        left: 0;
        right: 0;
        background: var(--auth-white);
        border-bottom: 1px solid var(--auth-border);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 20px 16px;
        display: none;
        box-shadow: 0 6px 16px rgba(0,52,92,0.08);
    }
    .public-nav-links.is-open { display: flex; }
    .public-nav-links a {
        padding: 10px 4px;
        border-bottom: 1px solid var(--auth-border);
    }
    .public-nav-links a:last-child { border-bottom: none; }
    .public-nav-cta {
        text-align: center;
        margin-top: 8px;
    }

    #signin_section.auth-redesign { padding: 32px 16px 56px; }
    #signin_section .form-card { padding: 28px 22px; }
}

@media (max-width: 420px) {
    #signin_section .form-card { padding: 24px 18px; border-radius: 12px; }
    #signin_section .card-title { font-size: 20px !important; }
}

/* ---- Public footer ---- */
.public-footer {
    background: var(--auth-navy);
    color: rgba(255,255,255,0.7);
    font-family: var(--auth-font-sans);
}
.public-footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding: 48px;
    max-width: 1280px;
    margin: 0 auto;
}
.public-footer-brand svg { display: block; margin-bottom: 12px; }
.public-footer-brand p {
    font-size: 12.5px;
    line-height: 1.7;
    margin: 0;
    max-width: 240px;
    color: rgba(255,255,255,0.65);
}
.public-footer-col h4 {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: var(--auth-white) !important;
    margin: 0 0 12px !important;
    font-family: var(--auth-font-serif) !important;
    line-height: 1.4;
}
.public-footer-col h4.public-footer-h4-spaced { margin-top: 14px !important; }
.public-footer-col a {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    margin-bottom: 8px;
    transition: color 0.15s;
}
.public-footer-col a:hover { color: var(--auth-white); }
.public-footer-col a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.55);
    border-radius: 3px;
}

.public-footer-bottom {
    background: rgba(0,0,0,0.2);
    padding: 14px 48px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    font-size: 12px;
    color: rgba(255,255,255,0.45);
}

@media (max-width: 900px) {
    .public-footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
        padding: 40px 32px;
    }
    .public-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
    .public-footer-inner {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 32px 20px;
    }
    .public-footer-bottom { padding: 14px 20px; flex-direction: column; gap: 4px; }
}

/* ---- Burger toggle JS ----
   Lives in this file as a CSS-driven open/close state via .is-open;
   the toggle handler is added inline at the bottom of header.php
   (kept tiny — no separate JS file for one button). */

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .public-nav-links,
    .public-nav-cta,
    .public-nav-login,
    #signin_section .submit-btn,
    #signin_section input,
    .public-footer-col a {
        transition: none !important;
    }
}

/* =============================================================
   Phase 7 — Signup form
   register.php is a longer, multi-section form (role select →
   conditional sections → shared credentials), so it needs a wider
   form-card and components the login form didn't:
   - role select with inline description
   - section labels + horizontal rules between sections
   - 2-up field rows that collapse on mobile
   - styled native <select>
   - location input with leading pin icon (Google Places autocomplete)
   - license / verification notice cards
   The phase 6 base above (form-card, field-group, pw-wrap, submit-btn,
   alerts, login-link) is reused as-is.
   ============================================================= */

/* ---- Wider card for the multi-section form ---- */
#signin_section .auth-form-wrap--wide { max-width: 560px; }

/* ---- Section label (small uppercase eyebrow above each block) ---- */
#signin_section .section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--auth-teal);
    margin: 0 0 14px;
}

/* ---- 2-up field row (collapses to 1-up on narrow screens) ---- */
#signin_section .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}
#signin_section .field-row:last-child { margin-bottom: 0; }
#signin_section .field-row .field-group { margin-bottom: 0; }

/* ---- Native <select> styling
   Same chrome as inputs, plus a chevron rendered as a background SVG.
   The legacy form sprinkled .selectpicker on most selects — the rewrite
   drops that class so the native styled select renders directly. */
#signin_section select {
    width: 100%;
    padding: 11px 38px 11px 14px;
    border: 1px solid var(--auth-border-strong);
    border-radius: var(--auth-radius);
    font-family: var(--auth-font-sans);
    font-size: 14px;
    color: var(--auth-text);
    background-color: var(--auth-white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    cursor: pointer;
    height: auto;
    line-height: 1.5;
}
#signin_section select:hover { border-color: #94A3B8; }
#signin_section select:focus {
    border-color: var(--auth-teal);
    box-shadow: 0 0 0 3px rgba(0,148,186,0.18);
}
#signin_section select:disabled,
#signin_section select[disabled] {
    background-color: #F5F7FA;
    color: var(--auth-text-muted);
    cursor: not-allowed;
}

/* ---- Role select (styled with the navy border to read as the form's anchor) ---- */
#signin_section .role-select-wrap select {
    font-weight: 500;
    border-color: var(--auth-navy);
}

/* ---- Optional / required label hints ---- */
#signin_section label .opt {
    font-size: 11px;
    color: var(--auth-text-muted);
    font-weight: 400;
    margin-left: 2px;
    letter-spacing: 0;
}

/* ---- Inline help text under a field ---- */
#signin_section .hint {
    font-size: 11.5px;
    color: var(--auth-text-muted);
    margin-top: 4px;
    line-height: 1.5;
}

/* ---- Location input with leading pin icon
   Google Places Autocomplete is bound to the inner <input>. The icon is
   absolutely positioned and pointer-events:none so clicks fall through.
   The Google-injected .pac-container dropdown floats above the form;
   we just style its font to match. */
#signin_section .location-input-wrap { position: relative; }
#signin_section .location-input-wrap > svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    stroke: var(--auth-text-muted);
    fill: none;
    pointer-events: none;
}
#signin_section .location-input-wrap input { padding-left: 36px; }
.pac-container {
    font-family: var(--auth-font-sans);
    border-radius: var(--auth-radius);
    box-shadow: 0 6px 20px rgba(11,31,58,0.12);
    border: 1px solid var(--auth-border);
    margin-top: 4px;
    z-index: 9999;
}
.pac-item { font-size: 13px; padding: 8px 12px; cursor: pointer; }
.pac-item:hover { background: var(--auth-surface); }
.pac-item-query { font-weight: 500; color: var(--auth-text); }

/* ---- License block (dimmed when "I don't have a license" is checked) ---- */
#signin_section .license-block { transition: opacity 0.2s; }
#signin_section .license-block.is-dimmed {
    opacity: 0.45;
    pointer-events: none;
}
#signin_section .no-license-notice {
    display: none;
    background: var(--auth-warn-bg);
    border: 1px solid rgba(217,123,0,0.25);
    border-radius: var(--auth-radius);
    padding: 12px 14px;
    font-size: 12.5px;
    color: #7A4A00;
    margin-top: 10px;
    line-height: 1.55;
}
#signin_section .no-license-notice.is-visible { display: block; }

/* ---- Role-aware verification notice (cyan info card with icon) ---- */
#signin_section .verification-notice {
    background: var(--auth-teal-light);
    border: 1px solid rgba(0,148,186,0.25);
    border-radius: var(--auth-radius);
    padding: 12px 14px;
    font-size: 12.5px;
    color: #005a73;
    line-height: 1.55;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
#signin_section .verification-notice svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    margin-top: 1px;
    stroke: var(--auth-teal);
    fill: none;
}

/* ---- Terms checkbox: needs to wrap multi-line with the inline link ---- */
#signin_section .checkbox-row.terms {
    align-items: flex-start;
    margin: 4px 0 0;
}
#signin_section .checkbox-row.terms input[type=checkbox] { margin-top: 3px; }
#signin_section .checkbox-row.terms label {
    line-height: 1.55;
    color: var(--auth-text-secondary);
}
#signin_section .checkbox-row.terms label a {
    color: var(--auth-teal);
    font-weight: 500;
    text-decoration: none;
}
#signin_section .checkbox-row.terms label a:hover { text-decoration: underline; }

/* ---- Submit-row spacing when nested in a section after the terms ---- */
#signin_section .submit-row { margin-top: 18px; }
#signin_section .submit-row .submit-btn { margin-top: 0; }

/* ---- SweetAlert2 re-skin (public side)
   The portal redesign re-skins swal2 under .portal-redesign (see
   portal/css/portal_redesign.css ~line 2822). Auth pages get .public-redesign
   on <body> instead, so the same overrides need a public-side mirror —
   without it the register form fires Swal.fire() validation toasts that
   render with library defaults on top of the redesigned form-card. !important
   on button colours is needed because callers can pass confirmButtonColor /
   cancelButtonColor as inline style="" which always beats class CSS. */
.public-redesign .swal2-container { z-index: 1100; }
.public-redesign .swal2-container.swal2-backdrop-show {
    background: rgba(11,31,58,0.5);
}
.public-redesign .swal2-popup {
    font-family: var(--auth-font-sans);
    border-radius: 16px;
    padding: 0 0 22px;
    width: 460px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    color: var(--auth-text-secondary);
}
.public-redesign .swal2-title {
    font-family: var(--auth-font-sans);
    font-size: 17px;
    font-weight: 600;
    color: var(--auth-text);
    padding: 18px 28px 4px;
    text-align: left;
    line-height: 1.35;
}
.public-redesign .swal2-html-container,
.public-redesign .swal2-popup .swal2-html-container {
    font-size: 13.5px;
    color: var(--auth-text-secondary);
    margin: 4px 28px 0;
    text-align: left;
    line-height: 1.55;
}
/* Strip bootstrap alert chrome inside Swal — the popup itself already is the alert. */
.public-redesign .swal2-popup .swal2-html-container .alert,
.public-redesign .swal2-popup .swal2-html-container .alert-danger,
.public-redesign .swal2-popup .swal2-html-container .alert-success {
    background: none !important;
    border: none !important;
    color: inherit !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Icon — recolor to brand and tighten so it doesn't dominate the panel. */
.public-redesign .swal2-icon {
    margin: 22px auto 0;
    transform: scale(0.7);
    transform-origin: center;
}
.public-redesign .swal2-icon.swal2-success { border-color: var(--auth-success); color: var(--auth-success); }
.public-redesign .swal2-icon.swal2-success [class^="swal2-success-line"] { background-color: var(--auth-success); }
.public-redesign .swal2-icon.swal2-success .swal2-success-ring { border-color: rgba(14,158,110,0.3); }
.public-redesign .swal2-icon.swal2-error { border-color: var(--auth-danger); color: var(--auth-danger); }
.public-redesign .swal2-icon.swal2-error [class^="swal2-x-mark-line"] { background-color: var(--auth-danger); }
.public-redesign .swal2-icon.swal2-warning { border-color: var(--auth-warn); color: var(--auth-warn); }
.public-redesign .swal2-icon.swal2-info { border-color: var(--auth-teal); color: var(--auth-teal); }
.public-redesign .swal2-icon.swal2-question { border-color: var(--auth-teal); color: var(--auth-teal); }

/* Action row — keep buttons aligned with body padding, use design-system btns. */
.public-redesign .swal2-actions {
    margin-top: 18px;
    padding: 0 24px;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.public-redesign .swal2-actions:not(.swal2-loading) .swal2-styled:hover {
    background-image: none;
}
.public-redesign .swal2-styled {
    margin: 0 !important;
    padding: 9px 18px !important;
    border-radius: 8px !important;
    font-family: var(--auth-font-sans);
    font-size: 13.5px !important;
    font-weight: 500 !important;
    box-shadow: none !important;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.public-redesign .swal2-styled.swal2-confirm {
    background: var(--auth-navy) !important;
    color: #fff !important;
    border: none !important;
}
.public-redesign .swal2-styled.swal2-confirm:hover { background: var(--auth-navy-mid) !important; }
.public-redesign .swal2-styled.swal2-cancel {
    background: var(--auth-surface) !important;
    color: var(--auth-text-secondary) !important;
    border: 1px solid var(--auth-border) !important;
}
.public-redesign .swal2-styled.swal2-cancel:hover { background: var(--auth-border) !important; }
.public-redesign .swal2-styled.swal2-deny {
    background: var(--auth-danger) !important;
    color: #fff !important;
    border: none !important;
}
.public-redesign .swal2-styled:focus-visible {
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(0,148,186,0.25) !important;
}

.public-redesign .swal2-close {
    font-size: 26px !important;
    color: var(--auth-text-muted) !important;
    margin: 8px 8px 0 !important;
}
.public-redesign .swal2-close:hover { color: var(--auth-text) !important; }

/* ---- Responsive: collapse 2-up rows on narrow screens ---- */
@media (max-width: 560px) {
    #signin_section .field-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    #signin_section .field-row .field-group { margin-bottom: 16px; }
    #signin_section .field-row .field-group:last-child { margin-bottom: 0; }
}

/* ---- Thank-you / register-success card variant
   register-thank-you.php uses the same form-card chrome but renders a
   centered icon + headline + body copy + a primary CTA back to login. */
#signin_section .success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--auth-success-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}
#signin_section .success-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--auth-success);
    fill: none;
}
#signin_section .success-body {
    font-size: 13.5px;
    color: var(--auth-text-secondary);
    text-align: center;
    line-height: 1.7;
    max-width: 420px;
    margin: 0 auto 18px;
}
#signin_section .success-body p { margin: 0 0 10px; }
#signin_section .success-body p:last-child { margin-bottom: 0; }
#signin_section .verify-license-note {
    background: var(--auth-warn-bg);
    border: 1px solid rgba(217,123,0,0.25);
    border-radius: var(--auth-radius);
    padding: 12px 14px;
    font-size: 12.5px;
    color: #7A4A00;
    line-height: 1.55;
    text-align: left;
    margin: 16px 0 0;
}
