/* MediVera TEST CRM — standalone pages typography V1 (22 Nov 2026).
   Applied after the existing Vite styles only on Login, Password Reset and
   User Onboarding. Scoped by existing page classes; not loaded in CRM modules,
   TEST POS, email templates or the Phlebo app. Brand colors are preserved. */

body.auth-page,
.password-reset-page,
body.onboarding-page {
    --mv-type-page: 22px;
    --mv-type-section: 18px;
    --mv-type-body: 15px;
    --mv-type-label: 15px;
    --mv-type-control: 16px;
    --mv-type-button: 15px;
    --mv-type-help: 14px;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: var(--mv-type-body);
    font-weight: 400;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Login (originally 11–14px labels/actions, a 31px form title and 42–66px hero). */
body.auth-page .auth-brand-content h1 {
    font-size: 28px !important;
    font-weight: 600 !important;
    line-height: 1.22;
    letter-spacing: -.02em;
}
body.auth-page .auth-heading h2 {
    font-size: var(--mv-type-page) !important;
    font-weight: 600 !important;
    line-height: 1.3;
    letter-spacing: -.01em;
}
body.auth-page :is(.auth-brand-content > p, .auth-heading p, .auth-feature) {
    font-size: var(--mv-type-body) !important;
    font-weight: 400 !important;
    line-height: 1.5;
}
body.auth-page :is(.auth-label, .form-check-label) {
    font-size: var(--mv-type-label) !important;
    font-weight: 500 !important;
    line-height: 1.45;
}
body.auth-page .auth-control {
    font-size: var(--mv-type-control) !important;
    font-weight: 400 !important;
    line-height: 1.45;
}
body.auth-page .auth-control::placeholder { font-size: 15px; }
body.auth-page .auth-submit-btn {
    font-size: var(--mv-type-button) !important;
    font-weight: 500 !important;
    line-height: 1.4;
}
body.auth-page :is(.auth-error, .auth-form-container .alert,
                   .auth-security-note, .auth-copyright, .auth-brand-footer) {
    font-size: var(--mv-type-help) !important;
    font-weight: 400 !important;
    line-height: 1.5;
}
body.auth-page .auth-badge {
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: .06em;
}
body.auth-page .auth-feature-check {
    font-size: 15px !important;
    font-weight: 600 !important;
}

/* Forgot/Reset Password (own standalone HTML files; not the guest layout). */
.password-reset-page .password-reset-heading h1 {
    font-size: var(--mv-type-page) !important;
    font-weight: 600 !important;
    line-height: 1.3;
}
.password-reset-page :is(.password-reset-heading p, .password-reset-rules,
                         .password-reset-rules li) {
    font-size: var(--mv-type-body) !important;
    font-weight: 400 !important;
    line-height: 1.5;
}
.password-reset-page .password-reset-field label {
    font-size: var(--mv-type-label) !important;
    font-weight: 500 !important;
    line-height: 1.45;
}
.password-reset-page .password-reset-field input {
    font-size: var(--mv-type-control) !important;
    font-weight: 400 !important;
    line-height: 1.45;
}
.password-reset-page :is(.password-reset-primary,
                         .password-reset-password-wrap button) {
    font-size: var(--mv-type-button) !important;
    font-weight: 500 !important;
    line-height: 1.4;
}
.password-reset-page :is(.password-reset-back, .password-reset-brand p,
                         .password-reset-success, .password-reset-error-box) {
    font-size: var(--mv-type-help) !important;
    font-weight: 400 !important;
    line-height: 1.5;
}
.password-reset-page .password-reset-rules strong {
    font-weight: 600 !important;
}
.password-reset-page .password-reset-password-wrap button {
    min-width: 70px;
}

/* Employee invitation, Firebase phone, KYC and password activation. */
body.onboarding-page .onboarding-card {
    font-size: var(--mv-type-body);
    font-weight: 400;
    line-height: 1.5;
}
body.onboarding-page .onboarding-card h1 {
    font-size: var(--mv-type-page) !important;
    font-weight: 600 !important;
    line-height: 1.3;
}
body.onboarding-page .onboarding-section h5 {
    font-size: var(--mv-type-section) !important;
    font-weight: 600 !important;
    line-height: 1.35;
}
body.onboarding-page :is(.onboarding-description, .onboarding-contact-box strong,
                         .onboarding-card p, .onboarding-card li) {
    font-size: var(--mv-type-body) !important;
    font-weight: 400 !important;
    line-height: 1.5;
}
body.onboarding-page .onboarding-card :is(.form-label, .form-check-label,
                                          label:not(.btn)) {
    font-size: var(--mv-type-label) !important;
    font-weight: 500 !important;
    line-height: 1.45;
}
body.onboarding-page .onboarding-card :is(.onboarding-control, .form-control,
                                          .form-select, .input-group-text) {
    font-size: var(--mv-type-control) !important;
    font-weight: 400 !important;
    line-height: 1.45;
}
body.onboarding-page .onboarding-card :is(.onboarding-primary-btn,
                                          .onboarding-secondary-btn,
                                          .onboarding-password-toggle,
                                          .onboarding-input-action,
                                          button.btn) {
    font-size: var(--mv-type-button) !important;
    font-weight: 500 !important;
    line-height: 1.4;
}
body.onboarding-page .onboarding-card :is(.form-text, .invalid-feedback,
                                          .onboarding-error,
                                          .onboarding-field-help,
                                          .onboarding-retained-file,
                                          .alert, small) {
    font-size: var(--mv-type-help) !important;
    font-weight: 400 !important;
    line-height: 1.5;
}
body.onboarding-page .onboarding-step,
body.onboarding-page .onboarding-contact-box span {
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.45;
    letter-spacing: .05em;
}
body.onboarding-page .onboarding-card :is(strong, b, .fw-bold,
                                          .fw-semibold, .fw-bolder) {
    font-weight: 600 !important;
}
body.onboarding-page .onboarding-dev-otp span {
    font-size: 20px !important;
    font-weight: 600 !important;
    letter-spacing: .15em;
}
body.onboarding-page .onboarding-card :is(.onboarding-description,
                                          .form-text, .onboarding-error,
                                          .invalid-feedback,
                                          .onboarding-retained-file) {
    overflow-wrap: anywhere;
}

/* Form fields remain legible on mobile (avoid iOS focus zoom), while titles
   and long forms have enough room even on a small phone. */
@media (max-width: 576px) {
    body.auth-page .auth-heading h2,
    .password-reset-page .password-reset-heading h1,
    body.onboarding-page .onboarding-card h1 {
        font-size: 20px !important;
    }
    body.onboarding-page .onboarding-section h5 {
        font-size: 17px !important;
    }
    body.auth-page .auth-control,
    .password-reset-page .password-reset-field input,
    body.onboarding-page .onboarding-card :is(.form-control, .form-select,
                                              .onboarding-control) {
        font-size: 16px !important;
    }
}

/* Existing login.css locks html/body to no-scroll. Larger readable fonts can
   otherwise clip the login form on narrow/short screens. Restore vertical
   scrolling only when the viewport is constrained. */
@media (max-width: 850px), (max-height: 720px) {
    html { height: auto !important; overflow-y: auto !important; }
    body.auth-page {
        height: auto !important;
        min-height: 100dvh;
        overflow-y: auto !important;
        overflow-x: hidden;
    }
    body.auth-page .auth-wrapper,
    body.auth-page .auth-form-panel {
        height: auto !important;
        min-height: 100dvh;
        overflow: visible !important;
    }
    body.auth-page .auth-brand-panel {
        height: auto !important;
        min-height: 100dvh;
        overflow-y: auto !important;
    }
}
