/* Company portal — brand-specific overrides (loads after Shared.UI customer-portal + form CSS) */

:root {
    --brand-500: #005caa;
    --brand-600: #004a8a;
    --header: #001a41;
    --header-mid: #003a7a;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.cp-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
}

/* ── Hero ─────────────────────────────────────────── */

.cp-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: var(--header);
}

.cp-hero__backdrop-wrap {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.cp-hero__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    pointer-events: none;
    z-index: 0;
}

.cp-hero__content {
    position: relative;
    z-index: 1;
    margin: 0 auto;
    max-width: 48rem;
    padding: 2.5rem 1rem 8rem;
    text-align: center;
    /* Reserve title + subtitle space so late font/image metrics do not shove the login card. */
    min-height: 12.5rem;
}

.cp-hero--app .cp-hero__content {
    /* Documents/app pages also reserve subtitle + role pill slots. */
    min-height: 15.5rem;
}

.cp-hero__logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    height: 2.5rem;
    min-height: 2.5rem;
}

.cp-hero__logo-slot {
    display: block;
    width: 9rem;
    height: 2.5rem;
    flex-shrink: 0;
}

.cp-hero__logo {
    display: block;
    width: 100%;
    height: 100%;
    aspect-ratio: 144 / 40;
    object-fit: contain;
    object-position: center;
    filter: brightness(0) invert(1);
}

.cp-hero__divider {
    display: block;
    width: 1px;
    height: 2.25rem;
    background: rgba(255, 255, 255, 0.8);
}

.cp-hero__title {
    margin: 1.75rem 0 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
    color: #fff;
    min-height: 2.4em; /* reserve up to two lines when application context updates */
}

.cp-hero__title:focus {
    outline: none;
}

.cp-hero__meta {
    margin-top: 0.5rem;
}

.cp-hero__subtitle {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.4;
    color: rgba(219, 234, 254, 0.85);
    min-height: 1.4em;
}

.cp-hero__subtitle--empty {
    visibility: hidden;
}

.cp-hero__role-slot {
    margin-top: 1rem;
    min-height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-hero__role-pill {
    margin: 0;
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.15);
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(6px);
}

@media (min-width: 640px) {
    .cp-hero__content {
        padding-top: 3rem;
        min-height: 13.5rem;
    }

    .cp-hero--app .cp-hero__content {
        min-height: 16.5rem;
    }

    .cp-hero__logos {
        height: 2.75rem;
        min-height: 2.75rem;
        gap: 1.5rem;
    }

    .cp-hero__logo-slot {
        width: 10rem;
        height: 2.75rem;
    }

    .cp-hero__title {
        font-size: 1.875rem;
    }
}

/* Login/auth — override Shared.UI customer-portal orange defaults with company brand tokens */

.cp-login-main {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 36rem;
    margin: -6rem auto 0;
    padding: 0 1rem 2.5rem;
    flex: 1;
}

.cp-login-card {
    background: #fff;
    border-radius: 1.5rem;
    padding: 1.75rem 1.25rem;
    box-shadow: 0 20px 50px rgba(0, 26, 65, 0.16);
}

@media (min-width: 640px) {
    .cp-login-card {
        padding: 2.25rem 2rem;
    }
}

.cp-app-main {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 56rem;
    margin: -6rem auto 0;
    padding: 0 1rem 2.5rem;
    flex: 1;
}

.cp-app-card {
    background: #fff;
    border-radius: 1.5rem;
    padding: 1.75rem 1.25rem;
    box-shadow: 0 20px 50px rgba(0, 26, 65, 0.16);
    /* Keep footer from jumping when page body swaps loader → documents content. */
    min-height: 28rem;
}

@media (min-width: 640px) {
    .cp-app-card {
        padding: 2rem 2rem;
        min-height: 32rem;
    }
}

.cp-app-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    min-height: 2.75rem;
}

.cp-app-toolbar__leading {
    display: flex;
    align-items: center;
    min-width: 0;
}

.cp-app-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cp-app-list a {
    text-decoration: none;
    color: inherit;
}

.cp-section-title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}

.cp-section-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.cp-role-banner {
    border-radius: 1rem;
    border: 1px solid color-mix(in srgb, var(--brand-500, #005caa) 25%, transparent);
    background: color-mix(in srgb, var(--brand-500, #005caa) 5%, #fff);
    padding: 0.75rem 1rem;
}

.cp-brand-callout {
    border-radius: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--brand-500, #005caa) 25%, transparent);
    background: color-mix(in srgb, var(--brand-500, #005caa) 5%, #fff);
    padding: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #334155;
    min-height: 4.5rem;
}

.cp-brand-callout--compact {
    padding: 0.5rem 0.75rem;
    min-height: 2.5rem;
}

/* Company portal pages inherit per-company colors instead of Shared.UI orange defaults. */
.cp-page,
.cp-loader-shell {
    --rz-primary: var(--brand-500) !important;
    --rz-secondary: var(--header-mid) !important;
    --su-primary: var(--brand-500);
    --su-secondary: var(--header-mid);
    --su-orange: var(--brand-500);
    --su-orange-dark: var(--brand-600);
    --cp-brand: var(--brand-500);
}

.cp-page .su-btn.rz-button.rz-primary.rz-variant-flat {
    background-color: var(--brand-500) !important;
    border-color: var(--brand-500) !important;
}

.cp-page .su-btn.rz-button.rz-primary.rz-variant-flat:hover:not(:disabled):not(.rz-state-disabled) {
    background-color: var(--brand-600) !important;
    border-color: var(--brand-600) !important;
    filter: none;
}

.cp-page .su-btn.rz-button.rz-secondary.rz-variant-outlined {
    color: var(--header-mid) !important;
    border-color: var(--header-mid) !important;
}

.cp-page .su-btn.rz-button.rz-secondary.rz-variant-outlined:hover:not(:disabled):not(.rz-state-disabled) {
    background-color: color-mix(in srgb, var(--header-mid) 8%, transparent) !important;
}

.cp-page button.su-btn--primary:not(.rz-button),
.cp-page a.su-btn--primary:not(.rz-button) {
    background-color: var(--brand-500);
    border-color: var(--brand-500);
}

.cp-page button.su-btn--secondary:not(.rz-button),
.cp-page a.su-btn--secondary:not(.rz-button) {
    color: var(--header-mid);
    border-color: var(--header-mid);
}

.cp-role-banner__title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}

.cp-role-banner__hint {
    margin: 0.125rem 0 0;
    font-size: 0.75rem;
    color: #475569;
}

.cp-app-item {
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    padding: 1rem;
    background: #fff;
}

.cp-app-item__link {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    transition: color 0.15s ease;
}

.cp-app-item__link:hover {
    color: var(--brand-500, #005caa);
}

.cp-app-item__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.cp-app-item__heading {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}

.cp-app-item__meta {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #64748b;
}

.cp-app-item__status {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.cp-app-item__continue {
    flex-shrink: 0;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--brand-500, #005caa) 10%, #fff);
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--brand-500, #005caa);
}

.cp-app-item__footer {
    margin-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    padding-top: 0.75rem;
}

.cp-app-item__passport-link {
    font-size: 0.75rem;
    font-weight: 500;
    color: #64748b;
}

.cp-app-item__passport-link:hover {
    color: var(--brand-500, #005caa);
    text-decoration: underline;
}

.cp-support-footer {
    margin-top: auto;
    border-top: 1px solid #e2e8f0;
    background: #eef3f8;
    text-align: center;
    font-size: 0.875rem;
    color: #475569;
    min-height: 3.75rem;
}

.cp-support-footer a {
    color: var(--brand-500, #005caa);
    text-decoration: none;
    font-weight: 500;
}

.cp-support-footer a:hover {
    text-decoration: underline;
    color: var(--brand-600, #004a8a);
}

.cp-support-footer svg,
.cp-support-footer .blazicon {
    width: 1rem !important;
    height: 1rem !important;
    flex-shrink: 0;
}

.cp-login-intro {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #64748b;
}

.cp-login-form {
    margin-top: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cp-login-form .cp-login-submit {
    width: 100%;
    min-height: 3rem;
}

.cp-login-form .cp-login-submit__btn.su-btn,
.cp-login-form .cp-login-submit__btn.rz-button {
    width: 100%;
    min-height: 3rem;
    box-sizing: border-box;
    justify-content: center;
}

.cp-login-form .cp-login-submit__btn .su-btn__text {
    font-weight: 600;
}

.cp-field-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.cp-field-icon {
    display: flex;
    height: 2.5rem;
    width: 2.5rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    margin-top: 0.125rem;
    border-radius: 9999px;
    background: color-mix(in srgb, var(--brand-500) 12%, transparent);
    color: var(--brand-500);
}

.cp-field-icon svg,
.cp-field-icon .blazicon {
    width: 1.25rem;
    height: 1.25rem;
    display: block;
}

.cp-field-label {
    display: block;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.cp-field-help {
    margin: 0.125rem 0 0;
    font-size: 0.75rem;
    line-height: 1.4;
    color: #64748b;
}

.cp-required {
    color: #f43f5e;
}

.cp-input {
    display: block;
    width: 100%;
    margin-top: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 0.8rem 0.95rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cp-input::placeholder {
    color: #94a3b8;
}

.cp-input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 18%, transparent);
}

.cp-actions-row {
    display: flex;
    justify-content: flex-end;
}

.cp-link {
    color: var(--brand-500);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.cp-link:hover {
    text-decoration: underline;
    color: var(--brand-600);
}

.cp-btn-primary {
    display: inline-flex;
    width: 100%;
    min-height: 3rem;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
    border-radius: 0.75rem;
    background: var(--brand-500);
    padding: 0.85rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.cp-btn-primary svg,
.cp-btn-primary .blazicon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.cp-btn-primary:hover:not(:disabled) {
    background: var(--brand-600);
}

.cp-btn-primary:focus-visible {
    outline: 2px solid var(--brand-500);
    outline-offset: 2px;
}

.cp-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.cp-alert-error {
    margin-top: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #fecdd3;
    background: #fff1f2;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #9f1239;
}

.cp-alert-success {
    margin-top: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #a7f3d0;
    background: #ecfdf5;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #065f46;
}

.cp-back-row {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.cp-passport-dropzone {
    position: relative;
    margin-top: 0.75rem;
    overflow: hidden;
    border-radius: 1rem;
    border: 2px dashed #e2e8f0;
    background: rgba(248, 250, 252, 0.8);
    padding: 2rem 1rem;
    text-align: center;
}

.cp-passport-dropzone--filled {
    border-color: color-mix(in srgb, var(--brand-500) 35%, #e2e8f0);
    background: color-mix(in srgb, var(--brand-500) 6%, #fff);
}

.cp-passport-dropzone--invalid {
    border-color: #f43f5e;
    background: #fff1f2;
}

.cp-passport-dropzone__input {
    position: absolute;
    inset: 0;
    z-index: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.cp-passport-dropzone__content {
    pointer-events: none;
}

.cp-passport-dropzone__icon {
    display: inline-flex;
    height: 2.5rem;
    width: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #64748b;
}

.cp-passport-dropzone__icon svg,
.cp-passport-dropzone__icon .blazicon {
    width: 1.25rem;
    height: 1.25rem;
}

.cp-passport-dropzone__title {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.cp-passport-dropzone__hint {
    margin: 0.125rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.cp-passport-dropzone__filename {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand-500);
}

.cp-passport-upload-note {
    margin: 0.5rem 0 0;
    text-align: center;
    font-size: 0.75rem;
    color: #64748b;
}

.cp-passport-upload-resume {
    margin-top: 0.75rem;
    text-align: center;
}

.cp-passport-alt-link {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
}

.cp-passport-alt-link:hover:not(:disabled) {
    color: var(--brand-500);
    text-decoration: underline;
}

.cp-passport-alt-link:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cp-passport-review-grid,
.su-passport-review-grid {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .cp-passport-review-grid,
    .su-passport-review-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.cp-passport-review-label {
    display: block;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
}

.cp-passport-review-input {
    margin-top: 0.25rem;
}

.cp-passport-review-hint {
    margin: 0.25rem 0 0;
    font-size: 0.75rem;
    color: #64748b;
}

.cp-passport-review-actions {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-top: 1.5rem;
}

.cp-passport-review-reupload {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    min-width: 0;
}

.cp-passport-review-reupload__text {
    margin: 0;
    max-width: 36rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: #64748b;
}

.cp-passport-review-actions__primary {
    width: 100%;
}

.cp-passport-review-actions__confirm,
.cp-passport-review-actions__secondary {
    width: 100%;
    min-height: 3rem;
    justify-content: center;
}

.cp-passport-review-actions__confirm .su-btn__text,
.cp-passport-review-actions__secondary .su-btn__text {
    font-weight: 600;
}

.cp-app-toolbar .su-btn {
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .cp-passport-review-actions {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
        gap: 1.5rem;
    }

    .cp-passport-review-reupload {
        flex: 1 1 auto;
        align-items: flex-start;
        max-width: 36rem;
    }

    .cp-passport-review-actions__primary {
        flex: 0 0 auto;
        width: auto;
        margin-left: auto;
    }

    .cp-passport-review-actions__confirm,
    .cp-passport-review-actions__secondary {
        width: auto;
        min-width: 12rem;
    }
}

.cp-passport-reading-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.45);
    padding: 1rem;
}

.cp-passport-reading-overlay__card {
    width: min(100%, 20rem);
    border-radius: 1rem;
    background: #fff;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.cp-passport-reading-overlay__spinner {
    margin: 0 auto;
    height: 2.5rem;
    width: 2.5rem;
    animation: cp-spin 1s linear infinite;
    color: var(--brand-500);
}

.cp-passport-reading-overlay__title {
    margin: 1rem 0 0;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
}

.cp-passport-reading-overlay__hint {
    margin: 0.375rem 0 0;
    font-size: 0.8125rem;
    color: #64748b;
}

/* Company portal form — passport review and shared field chrome */
.company-portal-form .su-field,
.company-portal-form .su-searchable-select {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    min-width: 0;
}

.company-portal-form .su-field__label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
    color: #1e293b;
}

.company-portal-form .su-field__required,
.company-portal-form .su-required,
.company-portal-form .su-option-row__badge--required {
    background: var(--xpat-orange-light, #fff4f0);
    color: var(--xpat-orange-dark, #d94a1c);
}

.company-portal-form .su-field__hint {
    margin: 0;
    font-size: 0.75rem;
    color: #64748b;
}

.company-portal-form .cp-form-input,
.company-portal-form .form-input,
.company-portal-docs .form-input {
    display: block;
    width: 100%;
    min-height: 2.75rem;
    margin: 0;
    padding: 0.65rem 0.95rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #0f172a;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.company-portal-form button.su-searchable-select__trigger,
.company-portal-form .su-searchable-select__trigger {
    width: 100%;
    min-height: 2.75rem;
    margin: 0;
    padding: 0.65rem 0.95rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #0f172a;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.company-portal-form .cp-form-input:disabled,
.company-portal-form .form-input:disabled,
.company-portal-docs .form-input:disabled,
.company-portal-form .su-searchable-select--disabled .su-searchable-select__trigger {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

.company-portal-form .cp-form-input:focus,
.company-portal-form .su-searchable-select--open .su-searchable-select__trigger,
.company-portal-form .su-searchable-select__trigger:focus,
.company-portal-form .su-searchable-select__trigger:focus-visible {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500) 18%, transparent);
}

.company-portal-form .su-searchable-select__value,
.company-portal-form .su-searchable-select__placeholder {
    font-size: 0.875rem;
}

.company-portal-form .su-searchable-select__item--selected {
    background: color-mix(in srgb, var(--brand-500) 12%, #fff);
    color: var(--header-mid);
}

.company-portal-form .su-searchable-select__item:hover {
    background: color-mix(in srgb, var(--brand-500) 8%, #fff);
    color: var(--header-mid);
}

/* Radzen dropdown panels (if any remain) */
.rz-dropdown-items-wrapper.su-scrollbar {
    max-height: 14rem;
}

/* Material icon font is not loaded in Company Portal hosts; hide Radzen glyph placeholders. */
.cp-page .rz-button .rzi,
.cp-page .rz-datepicker-trigger .rzi,
.cp-page .rz-dropdown-trigger .rzi {
    display: none;
}

.cp-page .su-btn__icon,
.cp-page .su-btn__icon svg,
.cp-page .su-btn__icon .blazicon {
    display: inline-flex;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* ── Page & boot loaders ──────────────────────────── */

.cp-page-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.35rem;
    min-height: 16rem;
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
}

.cp-page-loader__visual {
    width: 100%;
    display: flex;
    justify-content: center;
}

.cp-loader-monitor {
    position: relative;
    width: 16rem;
    height: 12rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-loader-monitor__device {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 10rem;
    height: 10rem;
}

.cp-loader-monitor__device svg,
.cp-loader-monitor__frame,
svg.cp-loader-monitor__frame {
    width: 10rem !important;
    height: 10rem !important;
    min-width: 10rem;
    min-height: 10rem;
    color: #cbd5e1;
    stroke-width: 1.35;
}

.cp-loader-monitor__mark {
    position: absolute;
    top: 42%;
    left: 50%;
    width: 2.75rem;
    height: 2.75rem;
    transform: translate(-50%, -50%);
    object-fit: contain;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease;
}

.cp-loader-monitor__mark--visible {
    opacity: 1;
    visibility: visible;
}

.cp-loader-monitor__dot {
    position: absolute;
    border-radius: 50%;
    background: var(--header-mid, #003a7a);
}

.cp-loader-monitor__dash {
    position: absolute;
    height: 0.22rem;
    border-radius: 999px;
    background: #cbd5e1;
}

.cp-page-loader__copy {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 22rem;
}

.cp-page-loader__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.35;
    color: var(--header-mid, #003a7a);
}

.cp-page-loader__subtitle {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #64748b;
}

.cp-loader-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.cp-loader-steps__dot {
    width: 0.95rem;
    height: 0.45rem;
    border-radius: 8px;
    background: #cbd5e1;
}

.cp-loader-steps__dot--active {
    width: 1.15rem;
    background: var(--header-mid, #003a7a);
}

/* Boot splash — full-page branded shell before Blazor loads */

.cp-loader-shell {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: hidden;
    background: #fafbfc;
}

.cp-loader-shell--boot {
    z-index: 10000;
}

#portal-boot-loader[hidden],
#cp-boot-loader[hidden],
#cp-boot-loader.is-done {
    display: none !important;
}

.cp-loader-shell__backdrop,
.cp-loader-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.cp-loader-shell__backdrop {
    object-fit: cover;
}

.cp-loader-shell__content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    width: 100%;
    max-width: 36rem;
    padding: 2rem 1rem;
}

.cp-loader-shell__logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    height: 2.75rem;
}

.cp-logo-brand {
    display: block;
    height: 2.75rem;
    width: 9.5rem;
    max-width: 11rem;
    flex-shrink: 0;
    background-color: var(--header-mid, #003a7a);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-mode: alpha;
    mask-mode: alpha;
}

.cp-logo-brand--company {
    width: 10.5rem;
}

.cp-loader-company-logo {
    display: block;
    height: 2.75rem;
    width: auto;
    max-width: 11rem;
    object-fit: contain;
}

.cp-loader-shell__divider {
    display: block;
    width: 1px;
    height: 2.25rem;
    background: color-mix(in srgb, var(--header-mid, #003a7a) 30%, #cbd5e1);
}

.cp-loader-shell__card {
    width: 100%;
    background: #fff;
    border-radius: 1.5rem;
    padding: 2.5rem 1.5rem 2rem;
    box-shadow: 0 20px 50px rgba(0, 26, 65, 0.12);
}

.cp-page-loader--embedded {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.35rem;
    min-height: auto;
    padding: 0;
    text-align: center;
}

.cp-boot-loader {
    gap: 1.35rem;
}

.cp-boot-loader__copy {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 22rem;
}

.cp-boot-loader__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.35;
    color: var(--header-mid, #003a7a);
}

.cp-boot-loader__subtitle {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #64748b;
}

/* ── Document checklist (Company Portal uploads) ───── */

.company-portal-docs--loading .cp-docs-loading-panel {
    min-height: 18rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-portal-docs .cp-checklist-section {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #fff;
}

.company-portal-docs .cp-checklist-section--static {
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    background: #fff;
    overflow: hidden;
}

.company-portal-docs .cp-checklist-section__header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    background: var(--header-mid, #003a7a);
    color: #fff;
    list-style: none;
    user-select: none;
}

.company-portal-docs .cp-checklist-section__header--static {
    cursor: default;
    justify-content: space-between;
}

.company-portal-docs .cp-checklist-section__title {
    flex: 1;
    font-weight: 600;
    font-size: 0.9375rem;
}

.company-portal-docs .cp-checklist-section__count {
    font-size: 0.8125rem;
    opacity: 0.9;
    white-space: nowrap;
}

.company-portal-docs .cp-checklist-section__body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.company-portal-docs .cp-doc-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 0.625rem;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.company-portal-docs .cp-doc-card:hover {
    border-color: color-mix(in srgb, var(--brand-500) 35%, #e2e8f0);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.company-portal-docs .cp-doc-card__main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

@media (min-width: 640px) {
    .company-portal-docs .cp-doc-card__main {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }
}

.company-portal-docs .cp-doc-card__actions {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.company-portal-docs .cp-doc-card__actions .su-btn.rz-button {
    min-height: 2.25rem;
    padding-inline: 0.85rem;
}

.company-portal-docs .cp-doc-card__title {
    margin: 0;
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--header-mid, #003a7a);
}

.company-portal-docs .cp-doc-card__desc {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: #64748b;
}

.company-portal-docs .cp-doc-card__badge {
    font-size: 0.75rem;
    font-weight: 600;
}

.company-portal-docs .cp-doc-card__badge--reupload {
    color: #b45309;
}

.company-portal-docs .cp-doc-upload-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0;
    min-height: 2.25rem;
    padding: 0.45rem 0.85rem;
    border: 1px solid var(--brand-500);
    border-radius: 10px;
    background: var(--brand-500);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.company-portal-docs .cp-doc-upload-btn:hover:not(.cp-doc-upload-btn--disabled) {
    background: var(--brand-600);
    border-color: var(--brand-600);
}

.company-portal-docs .cp-doc-upload-btn--disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.company-portal-docs .cp-doc-upload-btn__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: pointer;
}

.company-portal-docs .cp-doc-card__footer {
    border-top: 1px solid transparent;
    background: #f1f5f9;
    padding: 0 1.25rem;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.2s ease, opacity 0.2s ease, padding 0.2s ease, border-color 0.2s ease;
}

.company-portal-docs .cp-doc-card:hover .cp-doc-card__footer,
.company-portal-docs .cp-doc-card__footer.is-visible {
    max-height: 7rem;
    opacity: 1;
    padding: 0.75rem 1.25rem;
    border-top-color: #e2e8f0;
}

.company-portal-docs .cp-doc-card__footer-status {
    display: inline-block;
    margin-bottom: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.company-portal-docs .cp-doc-card__footer-status.cp-doc-status--complete {
    background: #10b981;
    color: #fff;
}

.company-portal-docs .cp-doc-card__footer-status.cp-doc-status--pending {
    background: #475569;
    color: #fff;
}

.company-portal-docs .cp-doc-card__footer-text {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: #64748b;
}

.company-portal-docs .cp-doc-card__footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
}

.company-portal-docs .cp-doc-card__footer-download-btn.su-btn.rz-button {
    min-height: 2rem;
    padding-inline: 0.75rem;
    font-size: 0.8125rem;
}

.company-portal-docs .cp-doc-status--complete {
    border-left: 4px solid #10b981;
}

.company-portal-docs .cp-doc-status--pending {
    border-left: 4px solid var(--header-mid, #003a7a);
}
