/* ══════════════════════════════════════════════════════════════════════
   Account pages — 2026 look
   Builds on the shared account card in account-2026.css (§16) for the
   remaining Account views:
     - status cards: AccountCreated, ValidationRequired, AccountDisabled,
       NotEligible, OrganizationDisabled and Shared/Error
     - forms: SignUp (+ its terms dialogs), ResetPassword
     - dialogs: _EnterPhoneNumber, CustomerSpecific/*/_SignupInfo
     - the stand-alone PrivacyPolicy article (Layout = "")
   Requires valid8-brand.css (from _Layout, or linked by the page).
   See docs/BRANDING-2026.md §92.
   ══════════════════════════════════════════════════════════════════════ */

/* ── status cards (centred "done" card from account-2026.css) ────────── */
.v8-acct-icon.is-warn {
    background: var(--v8-warn-soft);
    color: var(--v8-warn-text);
    border: 1px solid var(--v8-warn);
}

.v8-acct-icon.is-danger {
    background: var(--v8-danger);
    color: #FFFFFF;
}

.v8-acct-icon.is-info {
    background: var(--v8-info-soft);
    color: var(--v8-info-text);
    border: 1px solid var(--v8-info);
}

.v8-acct-card.is-done .v8-acct-text {
    max-width: 46ch;
    margin-left: auto;
    margin-right: auto;
}

.v8-acct-card.is-done.is-danger-top {
    border-top: 4px solid var(--v8-danger);
}

.v8-acct-card.is-done.is-warn-top {
    border-top: 4px solid var(--v8-warn);
}

.v8-acct .v8-btn {
    min-width: 120px;
}

.v8-acct .v8-btn[hidden] {
    display: none;
}

.v8-acct-idline {
    display: inline-flex;
    gap: 8px;
    align-items: baseline;
    padding: 8px 12px;
    background: var(--v8-surface-2);
    border: 1px solid var(--v8-border);
    font-size: 12.5px;
    color: var(--v8-text-3);
}

.v8-acct-idline code {
    font-family: var(--v8-font-mono);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--v8-text);
    background: none;
    padding: 0;
    word-break: break-all;
}

.v8-acct-details {
    width: 100%;
    text-align: left;
    border: 1px solid var(--v8-border);
    background: var(--v8-surface-2);
    font-size: 13px;
    color: var(--v8-text-2);
}

.v8-acct-details summary {
    padding: 10px 14px;
    cursor: pointer;
    font-family: var(--v8-font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--v8-text-3);
}

.v8-acct-details p {
    margin: 0;
    padding: 0 14px 12px;
    line-height: 1.55;
}

/* ── forms: sections, two-column grid, roles, terms ──────────────────── */
.v8-acct-card.is-signup {
    max-width: 760px;
}

.v8-acct-org {
    margin-top: 2px;
    font-size: 14px;
    font-weight: 600;
    color: var(--v8-text-2);
}

.v8-acct-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 18px;
    border-top: 1px solid var(--v8-border);
}

.v8-acct-section-title {
    margin: 0;
    font-family: var(--v8-font-mono);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--v8-text-3);
}

.v8-acct-grid2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 18px;
}

.v8-acct-grid2 > .is-full {
    grid-column: 1 / -1;
}

.v8-acct-field input[type="email"],
.v8-acct-field input[type="password"] {
    height: var(--v8-control-h);
}

.v8-acct-field .form-control[readonly] {
    background: var(--v8-surface-2);
    color: var(--v8-text-2);
}

/* the legacy error blocks are .invalid-feedback toggled by script; account-2026
   colours them, the field gets a red border while one is showing */
.v8-acct-field:has(> .invalid-feedback[style*="block"]) .form-control,
.v8-acct-field:has(.invalid-feedback[style*="block"]) .form-control {
    border-color: var(--v8-danger);
}

/* role picker: one bordered tile per role, behaves like a radio (updateForm) */
.v8-acct-roles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    border: 1px solid var(--v8-border);
}

.v8-acct-roles .v8-acct-check {
    margin: 0;
    padding: 14px 16px;
    font-size: 14.5px;
    cursor: pointer;
    border-right: 1px solid var(--v8-border);
}

.v8-acct-roles .v8-acct-check:last-child {
    border-right: none;
}

.v8-acct-roles .v8-acct-check:hover {
    background: var(--v8-surface-2);
}

.v8-acct-roles .v8-acct-check:has(input:checked) {
    background: var(--v8-info-soft);
}

/* custom.css sizes .ck1-input at 1em with a 5px radius */
.v8-acct-check input.ck1-input,
.v8-acct-check input.rememberme {
    width: 20px;
    height: 20px;
    margin: 0;
    border-radius: 0;
    position: static;
}

/* password rules checklist */
.v8-pw-rules {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.v8-pw-rules li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    background: var(--v8-surface-3);
    color: var(--v8-text-2);
    font-size: 12px;
    font-weight: 600;
}

.v8-pw-rules li::before {
    content: '';
    width: 8px;
    height: 8px;
    border: 1px solid var(--v8-text-3);
}

.v8-pw-rules li.is-ok {
    background: var(--v8-ok-soft);
    color: var(--v8-ok-text);
}

.v8-pw-rules li.is-ok::before {
    background: var(--v8-ok);
    border-color: var(--v8-ok);
}

/* terms box with the acceptance checkbox */
.v8-acct-terms {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px 18px;
    background: var(--v8-surface-2);
    border: 1px solid var(--v8-border);
}

.v8-acct-terms-title {
    margin: 0;
    font-family: var(--v8-font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--v8-text);
}

.v8-acct-terms .v8-acct-check {
    align-items: flex-start;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--v8-text-2);
}

.v8-acct-terms .v8-acct-check input {
    margin-top: 1px;
}

.v8-acct-terms a.v8-acct-link,
.v8-page .v8-acct-terms a.v8-acct-link {
    color: var(--v8-text) !important;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ── dialogs on this batch ───────────────────────────────────────────── */
/* long question labels (customer sign-up forms) read as text, not as the
   mono uppercase eyebrow labels .v8-modal gives every <label> */
.v8-modal .v8-signup-q,
.v8-modal .modal-body label.v8-signup-q {
    display: block;
    font-family: var(--v8-font-body);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.45;
    color: var(--v8-text);
    margin: 0 0 8px;
}

.v8-modal .v8-signup-lede {
    margin: 0 0 16px;
}

.v8-modal .v8-signup-form {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* HRAI / NgenSurvey1: question text sits in a bare .mb-3 div */
.v8-modal .v8-signup-form .mb-3:not(:has(.row)):not(:has(input)) {
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.45;
    color: var(--v8-text);
    margin-bottom: 8px !important;
}

.v8-modal .v8-signup-form .mb-3:has(.row) {
    margin-bottom: 16px !important;
}

.v8-modal .v8-signup-form .k-textbox,
.v8-modal .v8-signup-form .k-multiselect {
    margin-top: 8px;
}

.v8-modal .v8-signup-form .k-multiselect:first-child {
    margin-top: 0;
}

.v8-modal .v8-signup-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px 18px;
}

.v8-modal .v8-signup-grid > .is-half { grid-column: span 3; }
.v8-modal .v8-signup-grid > .is-third { grid-column: span 2; }
.v8-modal .v8-signup-grid > .is-full { grid-column: 1 / -1; }

.v8-modal .v8-signup-grid input[type="text"],
.v8-modal .v8-signup-grid input[type="tel"],
.v8-modal .v8-signup-grid input[type="date"] {
    width: 100%;
    height: var(--v8-control-h);
    padding: 0 14px;
    border: 1px solid var(--v8-border-strong);
    border-radius: 0;
    background: var(--v8-surface);
    color: var(--v8-text);
    font-family: var(--v8-font-body);
    font-size: 14px;
}

.v8-modal .v8-signup-grid input:focus {
    outline: none;
    border-color: var(--v8-ink);
}

.v8-modal .v8-signup-required {
    color: var(--v8-danger-text, var(--v8-danger));
    font-size: 12.5px;
    font-weight: 600;
}

/* phone number dialog: field + inline button rows */
.v8-modal .v8-phone-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.v8-modal .v8-phone-row .form-control {
    flex: 1 1 auto;
    min-width: 0;
    height: var(--v8-control-h);
}

.v8-modal .v8-phone-row .form-control.is-code {
    font-family: var(--v8-font-mono);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.25em;
}

.v8-modal .v8-phone-step {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 16px;
    margin-top: 16px;
    border-top: 1px solid var(--v8-border);
}

.v8-modal .v8-phone-text {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.55;
    color: var(--v8-text-2);
}

.v8-modal .v8-phone-text code {
    font-family: var(--v8-font-mono);
    font-size: 12.5px;
    color: var(--v8-text);
    background: var(--v8-surface-3);
    padding: 1px 5px;
}

/* ── terms of use dialogs (SignUp) ───────────────────────────────────── */
.v8-terms-modal .modal-body {
    background: var(--v8-surface);
    padding: 24px 32px 28px;
}

.v8-terms {
    max-width: 72ch;
    margin: 0 auto;
    font-family: var(--v8-font-body);
    font-size: 14px;
    line-height: 1.65;
    color: var(--v8-text-2);
}

.v8-terms h4 {
    margin: 0 0 6px;
    font-family: var(--v8-font-display);
    font-size: 26px;
    font-weight: 600;
    line-height: 1.15;
    color: var(--v8-text);
    text-align: left;
}

.v8-terms p {
    margin: 0 0 12px;
    text-align: left;
}

.v8-terms strong,
.v8-terms b {
    font-weight: 700;
    color: var(--v8-text);
}

.v8-terms pre {
    margin: 16px 0 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: var(--v8-font-body);
    font-size: 14px;
    line-height: 1.65;
    color: var(--v8-text-2);
    background: none;
    border: none;
    padding: 0;
    tab-size: 4;
}

/* the French text (and the English footer) is pasted Word markup with inline
   fonts and colours (33pt purple headings, grey Times paragraphs); flatten it
   onto the article type so both languages read the same, light and dark */
.v8-terms .MsoNormal,
.v8-terms p.MsoNormal {
    margin: 0 0 12px !important;
    text-align: left !important;
    line-height: 1.65 !important;
}

.v8-terms span,
.v8-terms .MsoNormal span,
.v8-terms .MsoNormal b span {
    font-family: inherit !important;
    font-size: inherit !important;
    color: inherit !important;
    background: transparent !important;
    line-height: inherit !important;
}

.v8-terms .MsoNormal b,
.v8-terms .MsoNormal strong {
    color: var(--v8-text);
}

/* Word headings: section titles were 28pt / 20.5pt spans */
.v8-terms .MsoNormal span[style*="28.0pt"],
.v8-terms .MsoNormal span[style*="20.5pt"] {
    display: block;
    margin-top: 12px;
    font-family: var(--v8-font-display) !important;
    font-weight: 600;
    font-size: 19px !important;
    line-height: 1.3 !important;
    color: var(--v8-text) !important;
}

.v8-terms .MsoNormal span[style*="20.5pt"] {
    font-size: 16px !important;
}

.v8-terms > .MsoNormal:first-child b span,
.v8-terms .v8-terms-title {
    display: block;
    font-family: var(--v8-font-display) !important;
    font-size: 26px !important;
    line-height: 1.15 !important;
    color: var(--v8-text) !important;
}

.v8-terms a {
    color: var(--v8-info-text) !important;
    text-decoration: underline;
}

/* ── privacy policy (stand-alone page, Layout = "") ──────────────────── */
body.v8-legal-body {
    margin: 0;
    background: var(--v8-bg);
    color: var(--v8-text);
    font-family: var(--v8-font-body);
    -webkit-font-smoothing: antialiased;
}

.v8-legal-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 68px;
    padding: 0 28px;
    background: var(--v8-surface);
    border-bottom: 1px solid var(--v8-border);
}

.v8-legal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--v8-text);
    text-decoration: none;
}

.v8-legal-mark {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--v8-ink);
    color: var(--v8-on-ink);
}

.v8-legal-word {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.v8-legal-word b {
    font-family: var(--v8-font-display);
    font-size: 20px;
    font-weight: 700;
}

.v8-legal-word small {
    font-size: 11px;
    color: var(--v8-text-2);
}

.v8-legal {
    max-width: 820px;
    margin: 0 auto;
    padding: 48px 40px 64px;
}

.v8-legal-head {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.v8-legal-title {
    margin: 0;
    font-family: var(--v8-font-display);
    font-size: 40px;
    font-weight: 600;
    line-height: 1.05;
    letter-spacing: -0.015em;
    color: var(--v8-text);
}

.v8-legal-lede {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--v8-text-2);
}

.v8-legal-article {
    background: var(--v8-surface);
    border: 1px solid var(--v8-border);
    padding: 12px 40px 32px;
}

.v8-legal-article section {
    padding: 24px 0 4px;
    border-bottom: 1px solid var(--v8-border);
}

.v8-legal-article section:last-child {
    border-bottom: none;
}

.v8-legal-article h2 {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin: 0 0 12px;
    font-family: var(--v8-font-display);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    color: var(--v8-text);
}

.v8-legal-num {
    font-family: var(--v8-font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--v8-accent);
    min-width: 22px;
}

.v8-legal-article h3 {
    margin: 16px 0 6px;
    font-size: 14.5px;
    font-weight: 700;
    color: var(--v8-text);
}

.v8-legal-article p,
.v8-legal-article li {
    font-size: 15px;
    line-height: 1.7;
    color: var(--v8-text-2);
}

.v8-legal-article p {
    margin: 0 0 12px;
}

.v8-legal-article ul {
    margin: 0 0 14px;
    padding-left: 20px;
}

.v8-legal-article li::marker {
    color: var(--v8-text-3);
}

.v8-legal-article strong {
    color: var(--v8-text);
}

.v8-legal-article a {
    color: var(--v8-info-text);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.v8-legal-foot {
    margin-top: 20px;
    font-family: var(--v8-font-mono);
    font-size: 11.5px;
    letter-spacing: 0.04em;
    color: var(--v8-text-3);
}

/* ── narrow ──────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .v8-acct-grid2,
    .v8-modal .v8-signup-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .v8-modal .v8-signup-grid > .is-half,
    .v8-modal .v8-signup-grid > .is-third {
        grid-column: 1 / -1;
    }

    .v8-acct-roles .v8-acct-check {
        border-right: none;
        border-bottom: 1px solid var(--v8-border);
    }

    .v8-acct-roles .v8-acct-check:last-child {
        border-bottom: none;
    }

    .v8-modal .v8-phone-row {
        flex-direction: column;
        align-items: stretch;
    }

    .v8-terms-modal .modal-body {
        padding: 18px 18px 22px;
    }

    .v8-legal {
        padding: 24px 16px 40px;
    }

    .v8-legal-top {
        padding: 0 16px;
    }

    .v8-legal-title {
        font-size: 30px;
    }

    .v8-legal-article {
        padding: 4px 18px 20px;
    }
}
