:root {
    --navy-950: #0b1734;
    --navy-900: #102247;
    --navy-800: #183365;
    --blue-600: #245fce;
    --blue-500: #3478e5;
    --blue-100: #e8f0ff;
    --slate-900: #172033;
    --slate-700: #455168;
    --slate-500: #6b7588;
    --slate-300: #cdd4df;
    --slate-200: #dfe4ec;
    --slate-100: #edf1f6;
    --slate-50: #f6f8fb;
    --white: #ffffff;
    --green-700: #14724c;
    --green-100: #ddf5e8;
    --amber-700: #8a5707;
    --amber-100: #fff1cf;
    --red-700: #ad2635;
    --red-100: #fde7ea;
    --shadow: 0 12px 30px rgba(15, 31, 62, 0.08);
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--slate-900);
    background: var(--slate-50);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

button,
input {
    font: inherit;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0.5rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

h2 {
    margin-bottom: 0.6rem;
    font-size: 1.25rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h3 {
    margin-bottom: 0.4rem;
}

.site-header {
    position: sticky;
    z-index: 10;
    top: 0;
    display: grid;
    grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
    align-items: center;
    min-height: 76px;
    padding: 0 4vw;
    border-bottom: 1px solid var(--slate-200);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: fit-content;
    color: var(--navy-950);
    text-decoration: none;
}

.brand > span:last-child {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand strong {
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.brand small {
    margin-top: 0.2rem;
    color: var(--slate-500);
    font-size: 0.72rem;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    color: var(--white);
    background: linear-gradient(145deg, var(--blue-500), var(--navy-800));
    box-shadow: 0 7px 18px rgba(36, 95, 206, 0.25);
    font-weight: 800;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    color: var(--slate-700);
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
}

.nav-link:hover,
.nav-link--active {
    color: var(--navy-900);
    background: var(--blue-100);
}

.account-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.8rem;
}

.account-menu form {
    margin: 0;
}

.account-name {
    max-width: 180px;
    overflow: hidden;
    color: var(--slate-700);
    font-size: 0.86rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.page-shell {
    width: min(1180px, calc(100% - 2.5rem));
    margin: 0 auto;
    padding: 3.5rem 0 5rem;
}

.page-shell--narrow {
    width: min(850px, calc(100% - 2.5rem));
}

.page-heading {
    margin-bottom: 2rem;
}

.page-heading--split {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
}

.page-summary {
    max-width: 690px;
    margin-bottom: 0;
    color: var(--slate-500);
    font-size: 1.02rem;
}

.eyebrow {
    margin-bottom: 0.5rem;
    color: var(--blue-600);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.eyebrow--light {
    color: #9cc0ff;
}

.muted {
    color: var(--slate-500);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.65rem 1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.button:focus-visible,
.nav-link:focus-visible,
.action-card:focus-visible,
input:focus-visible,
.selection-checkbox:focus-visible {
    outline: 3px solid rgba(52, 120, 229, 0.3);
    outline-offset: 2px;
}

.button:disabled {
    opacity: 0.48;
    cursor: not-allowed;
}

.button--disabled {
    opacity: 0.62;
    cursor: not-allowed;
}

.button--primary {
    color: var(--white);
    background: var(--blue-600);
    box-shadow: 0 7px 18px rgba(36, 95, 206, 0.2);
}

.button--primary:hover:not(:disabled) {
    background: #1d51b2;
    box-shadow: 0 9px 22px rgba(36, 95, 206, 0.27);
}

.button--secondary {
    color: var(--navy-900);
    border-color: var(--slate-300);
    background: var(--white);
}

.button--secondary:hover:not(:disabled),
.button--quiet:hover:not(:disabled) {
    background: var(--slate-100);
}

.button--quiet {
    color: var(--slate-700);
    border-color: var(--slate-200);
    background: transparent;
}

.button--small {
    min-height: 34px;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
}

.button--wide {
    width: 100%;
}

.button--danger {
    color: var(--red-700);
    border-color: #efb9c0;
    background: var(--red-100);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.metric-card,
.panel {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
}

.metric-card {
    display: flex;
    flex-direction: column;
    min-height: 160px;
    padding: 1.4rem;
}

.metric-label {
    color: var(--slate-700);
    font-size: 0.82rem;
    font-weight: 750;
}

.metric-value {
    margin: auto 0 0.15rem;
    color: var(--navy-900);
    font-size: 2.35rem;
    line-height: 1;
}

.metric-note {
    color: var(--slate-500);
    font-size: 0.78rem;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 1rem;
}

.panel {
    padding: 1.5rem;
}

.panel--large {
    min-height: 330px;
}

.panel-heading,
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--slate-200);
}

.panel-heading h2,
.toolbar h2 {
    margin-bottom: 0;
}

.panel-heading .eyebrow {
    margin-bottom: 0.25rem;
}

.text-link,
.breadcrumb a {
    color: var(--blue-600);
    font-weight: 750;
    text-decoration: none;
}

.text-link:hover,
.breadcrumb a:hover {
    text-decoration: underline;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 230px;
    padding: 1.5rem;
    text-align: center;
}

.empty-state--roomy {
    min-height: 340px;
}

.empty-state--compact {
    min-height: 130px;
}

.empty-state p {
    max-width: 510px;
    color: var(--slate-500);
}

.empty-icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 1rem;
    border-radius: 16px;
    color: var(--blue-600);
    background: var(--blue-100);
    font-size: 1.4rem;
    font-weight: 800;
}

.step-list,
.health-list {
    margin: 1.3rem 0 0;
    padding: 0;
    list-style: none;
}

.step-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0;
    color: var(--slate-700);
    border-bottom: 1px solid var(--slate-100);
    font-size: 0.9rem;
}

.step-list li:last-child {
    border-bottom: 0;
}

.step-list span {
    display: inline-grid;
    flex: 0 0 28px;
    place-items: center;
    height: 28px;
    border-radius: 50%;
    color: var(--blue-600);
    background: var(--blue-100);
    font-size: 0.75rem;
    font-weight: 800;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    color: var(--slate-700);
    background: var(--slate-100);
    font-size: 0.75rem;
    font-weight: 750;
    white-space: nowrap;
}

.status-pill--ok {
    color: var(--green-700);
    background: var(--green-100);
}

.search-placeholder {
    color: var(--slate-500);
    font-size: 0.87rem;
}

.breadcrumb {
    display: flex;
    gap: 0.55rem;
    margin-bottom: 2rem;
    color: var(--slate-500);
    font-size: 0.82rem;
}

.upload-panel {
    padding: 1.25rem;
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 360px;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed var(--slate-300);
    border-radius: var(--radius-md);
    background: var(--slate-50);
    text-align: center;
    transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.upload-dropzone--active {
    border-color: var(--blue-500);
    background: var(--blue-100);
    box-shadow: inset 0 0 0 1px var(--blue-500);
}

.upload-dropzone p {
    max-width: 520px;
    color: var(--slate-500);
}

.upload-icon {
    display: inline-grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin-bottom: 1rem;
    border-radius: 18px;
    color: var(--green-700);
    background: var(--green-100);
    font-size: 0.74rem;
    font-weight: 850;
}

.file-input {
    width: min(520px, 100%);
    margin-top: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-sm);
    color: var(--slate-700);
    background: var(--white);
}

.file-input::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.45rem 0.7rem;
    border: 0;
    border-radius: 6px;
    color: var(--navy-900);
    background: var(--blue-100);
    font-weight: 750;
    cursor: pointer;
}

.upload-drop-hint {
    margin-top: 0.75rem;
    color: var(--slate-500);
    font-size: 0.8rem;
}

.upload-selection {
    padding: 1.1rem;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    background: var(--white);
}

.upload-selection__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--slate-200);
}

.upload-selection__heading h2,
.upload-selection__heading .eyebrow {
    margin-bottom: 0;
}

.selected-file-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 390px;
    margin: 0;
    padding: 0.85rem 0;
    overflow-y: auto;
    list-style: none;
}

.selected-file {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    min-height: 56px;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    background: var(--slate-50);
}

.selected-file--invalid {
    border-color: #efb9c0;
    background: var(--red-100);
}

.selected-file__order {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: var(--blue-600);
    background: var(--blue-100);
    font-size: 0.76rem;
    font-weight: 850;
}

.selected-file__copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.selected-file__copy strong {
    overflow: hidden;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.selected-file__copy small {
    color: var(--slate-500);
    font-size: 0.74rem;
}

.file-state {
    color: var(--slate-500);
    font-size: 0.75rem;
    font-weight: 750;
    white-space: nowrap;
}

.file-state--error {
    color: var(--red-700);
}

.selection-summary {
    margin: 0;
    color: var(--slate-500);
    font-size: 0.8rem;
    font-weight: 650;
}

.upload-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.data-table th,
.data-table td {
    padding: 0.95rem 0.8rem;
    border-bottom: 1px solid var(--slate-200);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--slate-500);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: var(--slate-50);
}

.filename-cell {
    max-width: 280px;
    overflow: hidden;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-action {
    text-align: right !important;
    white-space: nowrap;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.status-pill--large {
    min-height: 36px;
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
}

.status-pill--running {
    color: var(--amber-700);
    background: var(--amber-100);
}

.status-pill--error {
    color: var(--red-700);
    background: var(--red-100);
}

.job-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.job-actions form {
    margin: 0;
}

.processing-notice {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid #b9cdf1;
    border-radius: var(--radius-md);
    color: var(--navy-900);
    background: var(--blue-100);
}

.processing-notice span {
    color: var(--slate-700);
    font-size: 0.88rem;
}

.job-error {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin: 0 0 1rem;
}

.detail-section {
    margin-bottom: 1rem;
}

.excel-worker-status {
    margin-top: 1rem;
}


.metadata-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    margin: 1rem 0 0;
}

.metadata-grid div {
    min-width: 0;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--slate-100);
}

.metadata-grid dt {
    color: var(--slate-500);
    font-size: 0.74rem;
    font-weight: 750;
}

.metadata-grid dd {
    margin: 0.3rem 0 0;
    font-weight: 700;
}

.break-long-text {
    overflow-wrap: anywhere;
}

.notice {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.9rem 1rem;
    border-radius: var(--radius-sm);
    color: var(--slate-700);
    background: var(--blue-100);
    font-size: 0.86rem;
}

.notice--stacked {
    flex-direction: column;
    gap: 0.2rem;
}

.notice code {
    font-weight: 750;
}

.document-toolbar > div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.queue-summary {
    color: var(--slate-500);
    font-size: 0.82rem;
}

.batch-results-form {
    margin-top: 1rem;
}

.batch-download-panel {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto;
    gap: 0.85rem 1.5rem;
    margin-bottom: 0.75rem;
    padding: 1.1rem;
    border: 1px solid #b9cdf1;
    border-radius: var(--radius-md);
    background: var(--blue-100);
}

.batch-download-panel__copy h2 {
    margin-bottom: 0.25rem;
}

.batch-download-panel__copy p:last-child {
    max-width: 650px;
    margin-bottom: 0;
    color: var(--slate-700);
    font-size: 0.84rem;
}

.batch-download-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
}

.folder-support-note,
.folder-privacy-note,
.batch-save-status {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--slate-700);
    font-size: 0.78rem;
}

.folder-privacy-note {
    color: var(--green-700);
}

.batch-save-status {
    min-height: 1.2em;
    font-weight: 700;
}

.batch-save-status--error,
.status-detail--error {
    color: var(--red-700) !important;
}

.status-detail--saved {
    color: var(--green-700) !important;
}

.pagination {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1.25rem;
}

.selection-cell {
    width: 44px;
    padding-right: 0.2rem !important;
    text-align: center !important;
}

.selection-checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--blue-600);
    cursor: pointer;
}

.selection-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

.job-status-cell {
    min-width: 190px;
}

.status-detail {
    display: block;
    max-width: 240px;
    margin-top: 0.3rem;
    color: var(--slate-500);
    font-size: 0.72rem;
    line-height: 1.3;
}

.table-action-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}


.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.maintenance-banner {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    gap: 0.65rem;
    margin: 0.25rem -2rem 0;
    padding: 0.65rem 1rem;
    color: #7a2d00;
    background: #fff0d8;
    border-top: 1px solid #f3c27e;
}

.admin-user-create {
    margin-bottom: 1rem;
}

.admin-user-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem 1rem;
}

.admin-user-form > label:not(.toggle-field) {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--slate-700);
    font-size: 0.8rem;
    font-weight: 750;
}

.admin-user-form input[type="text"],
.admin-user-form input[type="email"],
.admin-user-form input[type="password"],
.admin-user-form input:not([type]) {
    width: 100%;
    min-height: 44px;
    padding: 0 0.75rem;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-sm);
    background: var(--white);
}

.admin-user-form small {
    color: var(--slate-500);
    font-weight: 500;
}

.role-selector {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin: 0;
    padding: 0.9rem;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
}

.role-selector legend {
    padding: 0 0.3rem;
    color: var(--slate-700);
    font-size: 0.8rem;
    font-weight: 750;
}

.role-selector label,
.toggle-field {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--slate-700);
    font-size: 0.8rem;
    font-weight: 700;
}

.toggle-field,
.admin-form-actions {
    grid-column: 1 / -1;
}

.admin-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.admin-user-list {
    display: grid;
    gap: 0.8rem;
    margin-top: 1rem;
}

.admin-user-card {
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    background: var(--white);
}

.admin-user-card summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    cursor: pointer;
}

.admin-user-card summary strong,
.admin-user-card summary small {
    display: block;
}

.admin-user-card summary small {
    margin-top: 0.2rem;
    color: var(--slate-500);
}

.admin-user-card .admin-user-form {
    padding: 1.1rem;
    border-top: 1px solid var(--slate-200);
}

.maintenance-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-sm);
    resize: vertical;
}

.action-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    min-height: 120px;
    padding: 1.35rem;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    background: var(--white);
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: border 120ms ease, transform 120ms ease;
}

.action-card:hover {
    transform: translateY(-2px);
    border-color: #9ab8eb;
}

.action-card-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: var(--blue-600);
    background: var(--blue-100);
    font-size: 1.25rem;
    font-weight: 800;
}

.action-card strong,
.action-card small {
    display: block;
}

.action-card small {
    margin-top: 0.25rem;
    color: var(--slate-500);
}

.action-arrow {
    color: var(--blue-600);
    font-size: 1.2rem;
}

.definition-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 1.25rem 0 0;
}

.definition-grid div {
    padding: 0.5rem 1.25rem;
    border-right: 1px solid var(--slate-200);
}

.definition-grid div:first-child {
    padding-left: 0;
}

.definition-grid div:last-child {
    border-right: 0;
}

.definition-grid dt {
    color: var(--slate-500);
    font-size: 0.76rem;
}

.definition-grid dd {
    margin: 0.3rem 0 0;
    font-weight: 750;
}

.health-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-700);
    font-size: 0.85rem;
}

.health-list li:last-child {
    border-bottom: 0;
}

.health-list strong {
    color: var(--slate-900);
    text-align: right;
}

.login-page {
    overflow: hidden;
    background: var(--white);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(400px, 0.9fr) 1.1fr;
    min-height: 100vh;
}

.login-intro {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(2rem, 6vw, 5rem);
    color: var(--white);
    background:
            radial-gradient(circle at 85% 15%, rgba(71, 133, 241, 0.4), transparent 31%),
            linear-gradient(145deg, var(--navy-950), var(--navy-800));
}

.brand--light {
    color: var(--white);
}

.brand--light small {
    color: #b7c7e4;
}

.login-intro h1 {
    max-width: 570px;
    font-size: clamp(2.7rem, 5vw, 4.6rem);
}

.login-intro > div > p:not(.eyebrow) {
    max-width: 560px;
    color: #c4d2e9;
    font-size: 1.05rem;
}

.login-security {
    margin-bottom: 0;
    color: #9fafca;
    font-size: 0.78rem;
}

.login-panel {
    display: grid;
    place-items: center;
    padding: 2rem;
}

.login-form-wrap {
    width: min(420px, 100%);
}

.login-form-wrap h2 {
    margin-bottom: 0.35rem;
    font-size: 1.75rem;
}

.stack-form {
    display: flex;
    flex-direction: column;
    margin-top: 1.8rem;
}

.stack-form label {
    margin: 0 0 0.4rem;
    color: var(--slate-700);
    font-size: 0.82rem;
    font-weight: 750;
}

.stack-form input {
    width: 100%;
    height: 48px;
    margin-bottom: 1rem;
    padding: 0 0.85rem;
    border: 1px solid var(--slate-300);
    border-radius: var(--radius-sm);
    color: var(--slate-900);
    background: var(--white);
}

.stack-form input:focus {
    border-color: var(--blue-500);
}

.stack-form .button {
    margin-top: 0.5rem;
}

.alert {
    margin-top: 1.2rem;
    padding: 0.8rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
}

.alert--error {
    color: var(--red-700);
    background: var(--red-100);
}

.alert--success {
    color: var(--green-700);
    background: var(--green-100);
}

.alert--maintenance {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    color: var(--amber-700);
    background: var(--amber-100);
}

@media (max-width: 900px) {
    .site-header {
        grid-template-columns: 1fr auto;
    }

    .main-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: center;
        padding: 0.35rem 0 0.65rem;
    }

    .account-name {
        display: none;
    }

    .metric-grid,
    .definition-grid,
    .metadata-grid {
        grid-template-columns: 1fr;
    }

    .definition-grid div,
    .definition-grid div:first-child {
        padding: 0.75rem 0;
        border-right: 0;
        border-bottom: 1px solid var(--slate-200);
    }

    .definition-grid div:last-child {
        border-bottom: 0;
    }

    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-intro {
        display: none;
    }
}

@media (max-width: 720px) {
    .site-header {
        padding: 0.75rem 1rem 0;
    }

    .brand small {
        display: none;
    }

    .page-shell,
    .page-shell--narrow {
        width: min(100% - 1.25rem, 1180px);
        padding-top: 2rem;
    }

    .page-heading--split,
    .job-actions,
    .toolbar,
    .notice,
    .upload-actions,
    .upload-selection__heading,
    .batch-download-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .batch-download-panel {
        grid-template-columns: 1fr;
    }

    .batch-download-actions,
    .folder-support-note,
    .folder-privacy-note,
    .batch-save-status {
        grid-column: 1;
    }

    .selected-file {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .selected-file .file-state {
        grid-column: 2;
        white-space: normal;
    }

    .content-grid,
    .admin-grid,
    .admin-user-form {
        grid-template-columns: 1fr;
    }

    .maintenance-banner {
        flex-direction: column;
        margin-inline: -1rem;
        text-align: center;
    }

    .metric-grid {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }

    .panel,
    .metric-card {
        border-radius: var(--radius-md);
    }

    .main-nav {
        justify-content: flex-start;
        overflow-x: auto;
    }

    .nav-link {
        white-space: nowrap;
    }
}
