html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

:root {
    --hsm-navy: #102a4c;
    --hsm-blue: #2563eb;
    --hsm-surface: #f5f7fb;
    --app-positive-color: #2563eb;
    --app-negative-color: #e50000;
}

/* Import review notices use the existing blue/plum palette with readable text. */
.document-import-page .import-review-scroll { container-type: inline-size; margin-bottom: .75rem; }
.document-import-page :is(.import-review-table, .hybrid-review-table) { font-size: .84rem; }
.document-import-page :is(.import-review-table, .hybrid-review-table) :is(th, td) { vertical-align: middle; padding: .5rem .4rem; }
.document-import-page :is(.import-review-table, .hybrid-review-table) th { background: #f5f7fb; color: #374c70; font-weight: 600; }
.document-import-page .hybrid-review-table :is(input, select) { font-size: inherit; min-width: 0; }
.document-import-page .review-description { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; line-height: 1.35; }
.document-import-page .review-money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.document-import-page .review-select { white-space: nowrap; }
.document-import-page .review-select input { vertical-align: middle; accent-color: #165fbd; }
.document-import-page .review-expander { border: 0; background: transparent; color: #23497b; padding: .15rem .3rem; font-size: 1.2rem; line-height: 1; margin-right: .2rem; min-width: 1.5rem; }
.document-import-page .review-expander:focus-visible { outline: 2px solid #165fbd; outline-offset: 2px; border-radius: .2rem; }
.document-import-page .review-status { display: inline-flex; align-items: center; gap: .3rem; border-radius: 1rem; padding: .3rem .5rem; font-size: .78rem; line-height: 1.25; }
.document-import-page .review-status > span { font-weight: 800; }
.document-import-page .review-status-ready { color: #124f98; background: #edf4fe; }
.document-import-page .review-status-pending { color: #45536b; background: #f0f3f7; }
.document-import-page .review-status-required { color: #9a2537; background: #fff0f2; }
.document-import-page .review-needs-action { box-shadow: inset 3px 0 #c23f52; }
.document-import-page .review-action { font-size: .78rem; width: 100%; white-space: normal; line-height: 1.25; min-height: 2rem; }
.document-import-page .import-review-notes > td { padding-top: 0; border-top: 0; }
.document-import-page .review-detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr); gap: 1rem; padding: 1rem; background: #f7f9fc; border: 1px solid #d9e2ef; border-radius: .5rem; width: calc(100cqw - 1rem); max-width: 100%; overflow-wrap: anywhere; font-size: .84rem; }
.document-import-page .review-detail-grid > div { min-width: 0; }
.document-import-page .review-detail-grid p { margin-bottom: .4rem; }
.document-import-page .review-detail-required { background: #fff9fa; border-color: #efc4ca; }
.document-import-page .review-detail-actions { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.document-import-page .review-blocked { color: #9a2537; font-size: .85rem; }
.document-import-page .review-footer { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-top: .75rem; border-top: 1px solid #dce3ed; font-size: .85rem; }
@container (max-width: 850px) { .document-import-page .review-detail-grid { grid-template-columns: minmax(0, 1fr); gap: .65rem; } }
@media (max-width: 640px) { .document-import-page .review-footer { align-items: stretch; flex-direction: column; } }

.import-advisory-text {
    color: #224367;
}

.document-import-page .alert-warning {
    --bs-alert-color: #224367;
    --bs-alert-bg: #edf4fc;
    --bs-alert-border-color: #a9c3df;
    --bs-alert-link-color: #173b66;
}

.document-import-page .alert-info {
    --bs-alert-color: #224367;
    --bs-alert-bg: #edf4fc;
    --bs-alert-border-color: #a9c3df;
}

.document-import-page .text-warning {
    color: #224367 !important;
}

.document-import-page .form-select.classification-pending-field {
    border-color: #6b86ad;
    box-shadow: 0 0 0 1px rgb(73 108 156 / 14%);
}

.document-import-page .form-select.classification-pending-field:focus {
    border-color: #496c9c;
    box-shadow: 0 0 0 .2rem rgb(73 108 156 / 20%);
}

.classification-progress-overlay {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: color-mix(in srgb, var(--bs-body-bg, #fff) 42%, transparent);
}

.classification-progress-popup {
    width: min(100%, 26rem);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    padding: 1.25rem 1.5rem;
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-radius: 1rem;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #212529);
    box-shadow: 0 .5rem 2rem rgba(45, 65, 95, .16);
    overflow-wrap: anywhere;
}

.form-select.classification-pending-field {
    border-color: #6b86ad;
    box-shadow: 0 0 0 1px rgba(73, 108, 156, .18), 0 0 9px rgba(73, 108, 156, .18);
}

.form-select.classification-pending-field:focus {
    border-color: #6b86ad;
    box-shadow: 0 0 0 .2rem rgba(73, 108, 156, .22);
}

.compact-data-table { font-size: .92rem; }

.subtle-striped-table tbody tr:nth-child(even):not(.deleted-entry):not(.table-warning):not(.table-secondary):not(.import-review-attention):not(.import-review-notes) {
    --bs-table-bg: color-mix(in srgb, var(--bs-body-color) 2%, var(--bs-body-bg));
}

.subtle-striped-table tbody tr:not(.deleted-entry):not(.table-warning):not(.table-secondary):not(.import-review-attention):not(.import-review-notes):hover {
    --bs-table-bg: color-mix(in srgb, var(--bs-body-color) 4%, var(--bs-body-bg));
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.auth-shell {
    min-height: calc(100vh - 7rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 0;
}

.auth-card, .dashboard-card {
    width: 100%;
    max-width: 34rem;
    padding: 2rem;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    background: #fff;
    box-shadow: 0 0.4rem 1.5rem rgba(0, 0, 0, 0.06);
}

.dashboard-card {
    max-width: 42rem;
}

.auth-card h1 {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.auth-footer {
    margin: 1.5rem 0 0;
    text-align: center;
}

.auth-loading {
    max-width: 32rem;
    margin: 4rem auto;
    padding: 1rem;
    text-align: center;
}

.text-length-limit-message {
    margin-top: 0.25rem;
    color: var(--app-positive-color);
    font-size: 0.8rem;
}

.text-length-limit-message[hidden] {
    display: none;
}

@media (max-width: 640px) {
    .auth-card, .dashboard-card {
        padding: 1.25rem;
    }
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid var(--app-negative-color);
}

.validation-message {
    color: var(--app-negative-color);
    font-size: 12px;
}

.blazor-error-boundary {
    background: #fff1f2;
    border: 1px solid #e8bdc5;
    padding: 1rem;
    color: #842434;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* HomeSafeMoney institutional identity. */
body { background: var(--hsm-surface); }
.hsm-brand { display: inline-block; max-width: 100%; line-height: 0; vertical-align: middle; }
.hsm-brand img { display: block; width: 100%; height: auto; object-fit: contain; }
.hsm-brand-principal { width: min(100%, 24rem); }
.hsm-brand-sidebar { width: 12.5rem; }
.hsm-brand-header { width: 11.25rem; }
.hsm-brand-compact { width: 7rem; }
.brand-heading, .auth-loading { color: var(--hsm-navy); }
.auth-card .brand-heading { display: flex; justify-content: center; margin: 0 0 1.25rem; }
.auth-card .brand-heading + p { text-align: center; margin-bottom: 1.5rem; }
@media (max-width: 640px) {
    .hsm-brand-header { width: 10.5rem; }
}
@media (max-width: 480px) { .hsm-brand-principal { width: 10.5rem; } }
.btn-primary {
    --bs-btn-bg: var(--hsm-navy);
    --bs-btn-border-color: var(--hsm-navy);
    --bs-btn-hover-bg: #1c4575;
    --bs-btn-hover-border-color: #1c4575;
    --bs-btn-active-bg: #173b66;
    --bs-btn-active-border-color: #173b66;
    --bs-btn-disabled-bg: var(--hsm-navy);
    --bs-btn-disabled-border-color: var(--hsm-navy);
    background-color: var(--bs-btn-bg);
    border-color: var(--bs-btn-border-color);
}
.btn-outline-primary {
    --bs-btn-color: #1d4ed8;
    --bs-btn-border-color: #1d4ed8;
    --bs-btn-hover-bg: #1d4ed8;
    --bs-btn-hover-border-color: #1d4ed8;
    --bs-btn-active-bg: #1d4ed8;
    --bs-btn-active-border-color: #1d4ed8;
}
.alert-warning, .alert-info, .alert-success {
    --bs-alert-color: #224367;
    --bs-alert-bg: #edf4fc;
    --bs-alert-border-color: #a9c3df;
    --bs-alert-link-color: #173b66;
}
.alert-danger {
    --bs-alert-color: #842434;
    --bs-alert-bg: #fff1f2;
    --bs-alert-border-color: #e8bdc5;
}
