/* VIP Data: small additions on top of CoreUI 5 (vendor/coreui-5.10.0). */
:root { --vip-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mono { font-family: var(--vip-mono); font-size: .875em; }
.num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.icon { width: 1rem; height: 1rem; fill: currentColor; vertical-align: -.125em; }
.icon-lg { width: 1.25rem; height: 1.25rem; }
.sidebar .nav-icon { fill: currentColor; }
.sidebar-brand small { font-size: .75rem; }

/* Environment indicator: compact, always visible, coloured by kind. */
.env-strip { height: 4px; }
.env-indicator { display: inline-flex; align-items: center; gap: .5rem; border-radius: var(--cui-border-radius);
  padding: .2rem .6rem; font-size: .8125rem; text-decoration: none; white-space: nowrap; max-width: 60vw; overflow: hidden; }
.env-indicator .env-kind { font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.env-indicator .env-db { overflow: hidden; text-overflow: ellipsis; }
.env-indicator:focus-visible { outline: 3px solid var(--cui-focus-ring-color, #000); outline-offset: 2px; }
.env-kind-production .env-indicator { box-shadow: 0 0 0 2px rgba(var(--cui-danger-rgb), .35); }
.env-select { max-width: 14rem; }
@media (max-width: 575.98px) { .env-indicator .env-db { display: none; } .env-select { max-width: 8rem; } }

.worker-state .dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .4rem; background: var(--cui-danger); }
.worker-state.on .dot { background: var(--cui-success); }

/* Page header */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .75rem; margin-bottom: 1rem; }
.page-head h1 { font-size: 1.4rem; margin: 0; }
.page-head .lead-sub { color: var(--cui-secondary-color); font-size: .875rem; margin: .25rem 0 0; }

/* Steps of the enrichment flow */
.steps { display: flex; flex-wrap: wrap; gap: .25rem; list-style: none; padding: 0; margin: 0 0 1rem; font-size: .8125rem; }
.steps li { padding: .25rem .65rem; border-radius: 1rem; background: var(--cui-tertiary-bg); color: var(--cui-secondary-color); }
.steps li.active { background: var(--cui-primary); color: #fff; }
.steps li.done { background: var(--cui-success-bg-subtle); color: var(--cui-success-text-emphasis); }

/* Data preview: scrolls inside its card, never stretches the page. */
.preview-scroll { overflow: auto; max-height: 22rem; border: 1px solid var(--cui-border-color); border-radius: var(--cui-border-radius); }
.preview-table { font-size: .8125rem; margin: 0; white-space: nowrap; }
.preview-table th, .preview-table td { max-width: 16rem; overflow: hidden; text-overflow: ellipsis; padding: .3rem .5rem; }
.preview-table thead th { position: sticky; top: 0; background: var(--cui-tertiary-bg); z-index: 1; }
.preview-table .rownum { position: sticky; left: 0; background: var(--cui-body-bg); color: var(--cui-secondary-color); }
.preview-table thead .rownum { background: var(--cui-tertiary-bg); z-index: 2; }
.preview-table th.role-in { background: var(--cui-primary-bg-subtle); }
.preview-table th .role { display: block; font-weight: 500; font-size: .7rem; color: var(--cui-primary-text-emphasis); }
.preview-table th.out, .preview-table td.out { background: var(--cui-success-bg-subtle); color: var(--cui-success-text-emphasis); }

/* Compact aligned form grids */
.map-grid { display: grid; grid-template-columns: minmax(9rem, 13rem) minmax(0, 1fr); gap: .5rem .75rem; align-items: start; }
.map-grid > label { padding-top: .3rem; font-size: .875rem; font-weight: 500; }
@media (max-width: 575.98px) { .map-grid { grid-template-columns: 1fr; } .map-grid > label { padding-top: 0; } }
.form-text { font-size: .78rem; }
.fields-table td, .fields-table th { vertical-align: middle; font-size: .8125rem; }
.fields-table .form-control, .fields-table .form-select { min-width: 9rem; }
.fields-table tr.on { background: var(--cui-primary-bg-subtle); }
.fields-table .policy-idle .form-select { opacity: .55; }
.checklist { max-height: 14rem; overflow: auto; border: 1px solid var(--cui-border-color); border-radius: var(--cui-border-radius); padding: .25rem .5rem; }
.checklist .form-check { margin: .15rem 0; }

/* Logs and command lines */
pre.log { background: #11161d; color: #d7dee7; padding: .75rem; border-radius: var(--cui-border-radius); max-height: 32rem; overflow: auto;
  font-size: .78rem; white-space: pre-wrap; word-break: break-word; margin: 0; }
pre.log .ops { color: #7fb3ff; }
pre.log .err { color: #ff8a8a; }
pre.cmdline { background: var(--cui-tertiary-bg); padding: .6rem .75rem; border-radius: var(--cui-border-radius); white-space: pre-wrap;
  word-break: break-all; font-size: .8rem; margin: 0; }
pre.errorbox { background: var(--cui-danger-bg-subtle); color: var(--cui-danger-text-emphasis); padding: .6rem; border-radius: var(--cui-border-radius); white-space: pre-wrap; }

/* Progress: indeterminate animation when a command reports nothing measurable */
.progress.indeterminate .progress-bar { width: 30% !important; animation: vip-indet 1.4s infinite ease-in-out; }
@keyframes vip-indet { 0% { margin-left: -30%; } 100% { margin-left: 100%; } }
@media (prefers-reduced-motion: reduce) { .progress.indeterminate .progress-bar { animation: none; width: 100% !important; opacity: .4; } }

.stat .stat-value { font-size: 1.5rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .stat-label { font-size: .78rem; color: var(--cui-secondary-color); }
.kv { display: grid; grid-template-columns: minmax(7rem, 11rem) minmax(0, 1fr); gap: .35rem .75rem; margin: 0; font-size: .875rem; }
.kv dt { font-weight: 500; color: var(--cui-secondary-color); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 575.98px) { .kv { grid-template-columns: 1fr; } .kv dd { margin-bottom: .4rem; } }
.cmd-card { text-decoration: none; color: inherit; transition: box-shadow .15s; }
.cmd-card:hover, .cmd-card:focus-visible { box-shadow: 0 0 0 .2rem rgba(var(--cui-primary-rgb), .25); }
.confirm-phrase { background: var(--cui-warning-bg-subtle); padding: .05rem .3rem; border-radius: .2rem; }
.empty-state { color: var(--cui-secondary-color); padding: 1rem 0; text-align: center; }
.downloads .list-group-item { display: flex; align-items: center; gap: .75rem; }
.downloads .list-group-item .meta { margin-left: auto; font-size: .78rem; color: var(--cui-secondary-color); white-space: nowrap; }
.table-sm td, .table-sm th { font-size: .8125rem; }
.login-card { max-width: 26rem; width: 100%; }
/* Layout from the CoreUI admin template: content beside the fixed sidebar. */
.wrapper { width: 100%; padding-inline: var(--cui-sidebar-occupy-start, 0) var(--cui-sidebar-occupy-end, 0); will-change: auto; transition: padding .15s; }
@media (prefers-reduced-motion: reduce) { .wrapper { transition: none; } }
