/* Cosmix Hub — SAP Fiori–inspired enterprise theme (ABOVE-SAP for Cosmix niche) */
:root {
    --sap-brand: #0a6ed1;
    --sap-brand-hover: #0854a0;
    --sap-brand-press: #074888;
    --sap-brand-light: #ebf5fe;
    --sap-shell: #354a5f;
    --sap-shell-hover: #2c3d4f;
    --sap-shell-active: #0a6ed1;
    --sap-shell-text: #d1e0ee;
    --sap-shell-text-active: #ffffff;
    --sap-bg: #f5f6f7;
    --sap-surface: #ffffff;
    --sap-border: #d9d9d9;
    --sap-border-light: #e5e5e5;
    --sap-text: #32363a;
    --sap-text-secondary: #6a6d70;
    --sap-success: #107e3e;
    --sap-success-bg: #f1fdf6;
    --sap-warning: #e9730c;
    --sap-warning-bg: #fff8f2;
    --sap-error: #bb0000;
    --sap-error-bg: #ffebeb;
    --sap-info: #0a6ed1;
    --sap-info-bg: #ebf5fe;
    --sap-elevation-1: 0 0 0 1px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.08);
    --sap-elevation-2: 0 0 0 1px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.12);
    --sap-radius: 0.5rem;
    --sap-radius-sm: 0.25rem;
    --sap-font: "72", "72full", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --sap-sidebar-width: 16.5rem;
    --sap-topbar-height: 3.25rem;
}

html, body {
    font-family: var(--sap-font);
    font-size: 0.875rem;
    color: var(--sap-text);
    background-color: var(--sap-bg);
    line-height: 1.5;
}

a, .btn-link {
    color: var(--sap-brand);
}

a:hover {
    color: var(--sap-brand-hover);
}

.btn-primary {
    color: #fff;
    background-color: var(--sap-brand);
    border-color: var(--sap-brand);
    border-radius: var(--sap-radius-sm);
    font-weight: 600;
    padding: 0.4rem 1rem;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--sap-brand-hover);
    border-color: var(--sap-brand-hover);
}

.btn-outline-secondary {
    border-color: var(--sap-border);
    color: var(--sap-text);
    border-radius: var(--sap-radius-sm);
}

.btn-outline-secondary:hover {
    background: var(--sap-brand-light);
    border-color: var(--sap-brand);
    color: var(--sap-brand);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.125rem rgba(10, 110, 209, 0.35);
}

.content {
    padding-top: 1.25rem;
    padding-bottom: 2rem;
    max-width: 1400px;
}

h1, .page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sap-text);
    letter-spacing: -0.01em;
    margin-bottom: 0.25rem;
}

h1:focus {
    outline: none;
}

.page-subtitle {
    color: var(--sap-text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

/* KPI / Fiori-style cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: var(--sap-surface);
    border-radius: var(--sap-radius);
    box-shadow: var(--sap-elevation-1);
    padding: 1rem 1.125rem;
    border-left: 4px solid var(--sap-brand);
    transition: box-shadow 0.15s ease;
}

.kpi-card:hover {
    box-shadow: var(--sap-elevation-2);
}

.kpi-card.kpi-warning {
    border-left-color: var(--sap-warning);
}

.kpi-card.kpi-info {
    border-left-color: var(--sap-info);
}

.kpi-card.kpi-success {
    border-left-color: var(--sap-success);
}

.kpi-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--sap-text-secondary);
    margin-bottom: 0.35rem;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--sap-text);
    line-height: 1.2;
}

.kpi-hint {
    font-size: 0.75rem;
    color: var(--sap-text-secondary);
    margin-top: 0.35rem;
}

/* Status chips */
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.65rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
}

.status-chip::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: currentColor;
}

.status-chip-success {
    background: var(--sap-success-bg);
    color: var(--sap-success);
}

.status-chip-warning {
    background: var(--sap-warning-bg);
    color: var(--sap-warning);
}

.status-chip-info {
    background: var(--sap-info-bg);
    color: var(--sap-info);
}

.status-chip-neutral {
    background: #f0f0f0;
    color: var(--sap-text-secondary);
}

.status-chip-error {
    background: var(--sap-error-bg);
    color: var(--sap-error);
}

/* Surface panels */
.panel {
    background: var(--sap-surface);
    border-radius: var(--sap-radius);
    box-shadow: var(--sap-elevation-1);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.panel-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--sap-text);
}

.sop-callout {
    background: var(--sap-brand-light);
    border: 1px solid #b3d4f5;
    border-left: 4px solid var(--sap-brand);
    border-radius: var(--sap-radius);
    padding: 1rem 1.25rem;
    color: var(--sap-text);
}

.sop-callout strong {
    color: var(--sap-brand-press);
}

/* Tables — enterprise density */
.table {
    background: var(--sap-surface);
    border-radius: var(--sap-radius);
    overflow: hidden;
    box-shadow: var(--sap-elevation-1);
    --bs-table-striped-bg: #fafafa;
}

.table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--sap-text-secondary);
    font-weight: 700;
    border-bottom-width: 1px;
    background: #fafbfc;
}

.form-control, .form-select {
    border-color: var(--sap-border);
    border-radius: var(--sap-radius-sm);
}

.form-control:focus {
    border-color: var(--sap-brand);
}

.card {
    border: none;
    border-radius: var(--sap-radius);
    box-shadow: var(--sap-elevation-1);
}

.alert {
    border-radius: var(--sap-radius);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--sap-success);
}

.invalid {
    outline: 1px solid var(--sap-error);
}

.validation-message {
    color: var(--sap-error);
}

.blazor-error-boundary {
    background: var(--sap-error);
    padding: 1rem 1.25rem;
    color: white;
    border-radius: var(--sap-radius);
}

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

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

/* Login polish */
.login-card {
    border: none;
    box-shadow: var(--sap-elevation-2);
    border-radius: var(--sap-radius);
}

.login-card .brand-bar {
    height: 4px;
    background: var(--sap-brand);
    border-radius: var(--sap-radius) var(--sap-radius) 0 0;
}

/* ===== Cosmix Hub P1 — light grey + soft dark grey / teal accents ===== */
:root {
    --bg-deep: #e4e6ea;
    --bg-navy: #f0f1f3;
    --bg-panel: #ffffff;
    --bg-card: #ffffff;
    --bg-elev: #eef0f3;
    --bg-hover: #e2e5ea;
    --border: #c5cad3;
    --border-soft: #dde1e6;
    --teal: #14b8a6;
    --teal-dim: rgba(20,184,166,.15);
    --teal-bright: #0f766e;
    --gold: #d4a017;
    --gold-bright: #b8860b;
    --gold-dim: rgba(212,160,23,.18);
    --blue: #0a6ed1;
    --blue-bright: #0854a0;
    --text: #2f343c;
    --text-muted: #5c6570;
    --text-dim: #7a8490;
    --danger: #ef4444;
    --warn: #f59e0b;
    --ok: #22c55e;
    --purple: #7c3aed;

    --sap-brand: #14b8a6;
    --sap-brand-hover: #0d9488;
    --sap-brand-press: #0f766e;
    --sap-brand-light: rgba(20,184,166,.12);
    --sap-shell: #5c6570;
    --sap-shell-hover: #4b5563;
    --sap-shell-active: #14b8a6;
    --sap-shell-text: #e8eaed;
    --sap-shell-text-active: #ffffff;
    --sap-bg: #f0f1f3;
    --sap-surface: #ffffff;
    --sap-border: #c5cad3;
    --sap-border-light: #dde1e6;
    --sap-text: #2f343c;
    --sap-text-secondary: #5c6570;
    --sap-success: #22c55e;
    --sap-success-bg: rgba(34,197,94,.12);
    --sap-warning: #f59e0b;
    --sap-warning-bg: rgba(245,158,11,.12);
    --sap-error: #ef4444;
    --sap-error-bg: rgba(239,68,68,.12);
    --sap-info: #0a6ed1;
    --sap-info-bg: rgba(10,110,209,.12);
    --sap-elevation-1: 0 0 0 1px #c5cad3, 0 2px 8px rgba(47,52,60,.08);
    --sap-elevation-2: 0 0 0 1px #c5cad3, 0 8px 24px rgba(47,52,60,.12);
}

html, body {
    background-color: var(--bg-navy);
    color: var(--text);
}

.btn-primary {
    background: linear-gradient(135deg, var(--teal), #0d9488);
    border-color: transparent;
    color: #042f2e;
}
.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--teal-bright), var(--teal));
    border-color: transparent;
    color: #042f2e;
}
.btn-outline-secondary {
    border-color: var(--border);
    color: var(--text-muted);
    background: transparent;
}
.btn-outline-secondary:hover {
    background: var(--teal-dim);
    border-color: var(--teal);
    color: var(--teal-bright);
}
.table {
    --bs-table-bg: var(--bg-card);
    --bs-table-color: var(--text);
    --bs-table-striped-bg: rgba(47,52,60,.04);
    --bs-table-striped-color: var(--text);
    --bs-table-hover-bg: rgba(20,184,166,.06);
    --bs-table-hover-color: var(--text);
    --bs-table-border-color: var(--border-soft);
    color: var(--text);
}
.table thead th {
    background: var(--bg-elev);
    color: var(--text-dim);
    border-bottom: 1px solid var(--border);
}
.form-control, .form-select {
    background: var(--bg-deep);
    border-color: var(--border);
    color: var(--text);
}
.form-control:focus, .form-select:focus {
    background: var(--bg-deep);
    border-color: var(--teal);
    color: var(--text);
    box-shadow: 0 0 0 0.125rem rgba(20,184,166,.35);
}
.form-label, .page-title, h1 { color: var(--text); }
.page-subtitle, .text-muted { color: var(--text-muted) !important; }
.card, .panel { background: var(--bg-card); color: var(--text); }
.alert-success { background: var(--sap-success-bg); border-color: rgba(34,197,94,.35); color: #15803d; }
.alert-danger { background: var(--sap-error-bg); border-color: rgba(239,68,68,.4); color: #b91c1c; }
.badge.bg-secondary { background: #c5cad3 !important; color: var(--text); }
.badge.bg-primary { background: var(--teal) !important; color: #042f2e; }
pre { color: var(--text-muted); }

.pill {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 20px;
    font-size: 11px; font-weight: 600; border: 1px solid var(--border); background: var(--bg-card); color: var(--text-muted);
}
.pill.live { border-color: rgba(34,197,94,.4); color: var(--ok); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.avatar-za {
    width: 34px; height: 34px; border-radius: 50%;
    background: linear-gradient(135deg, var(--gold), #b8860b);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #1a1200;
}

.hub-kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.hub-kpi {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    padding: 16px 18px; position: relative; overflow: hidden;
}
.hub-kpi::before {
    content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--teal), var(--blue));
}
.hub-kpi.gold::before { background: linear-gradient(90deg, var(--gold), var(--gold-bright)); }
.hub-kpi.warn::before { background: linear-gradient(90deg, var(--warn), #fbbf24); }
.hub-kpi .label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .8px; }
.hub-kpi .value { font-size: 28px; font-weight: 700; margin-top: 6px; letter-spacing: -.5px; color: var(--text); }
.hub-kpi .sub { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

.hub-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
    box-shadow: 0 4px 16px rgba(47,52,60,.08);
}
.hub-card-hd {
    display: flex; align-items: center; gap: 10px; padding: 14px 18px;
    border-bottom: 1px solid var(--border-soft); font-size: 14px; font-weight: 600; color: var(--text);
}
.hub-card-bd { padding: 16px 18px; }
.hub-chip {
    display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 6px;
    font-size: 11px; font-weight: 600;
}
.hub-chip-teal { background: var(--teal-dim); color: var(--teal-bright); border: 1px solid rgba(20,184,166,.3); }
.hub-chip-gold { background: var(--gold-dim); color: var(--gold-bright); border: 1px solid rgba(212,160,23,.35); }
.hub-chip-blue { background: rgba(10,110,209,.18); color: var(--blue-bright); border: 1px solid rgba(10,110,209,.35); }
.hub-chip-ok { background: rgba(34,197,94,.15); color: #15803d; border: 1px solid rgba(34,197,94,.35); }
.hub-chip-warn { background: rgba(245,158,11,.15); color: #b45309; border: 1px solid rgba(245,158,11,.35); }
.hub-chip-danger { background: rgba(239,68,68,.15); color: #b91c1c; border: 1px solid rgba(239,68,68,.35); }
tr.delay-late, .delay-late { background: rgba(239,68,68,.14); }
tr.delay-risk, .delay-risk { background: rgba(245,158,11,.2); }
.hub-chip-purple { background: rgba(167,139,250,.15); color: var(--purple); border: 1px solid rgba(167,139,250,.35); }

.assistant-dock { position: fixed; right: 16px; bottom: 16px; z-index: 40; max-width: min(380px, calc(100vw - 24px)); }
.assistant-launch { background: #0a6ed1; color: #fff; border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 700; box-shadow: 0 8px 24px rgba(10,110,209,.35); }
.assistant-panel { background: var(--bg-card, #fff); border: 1px solid var(--border, #d9e2ec); border-radius: 12px; padding: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.18); }
.assistant-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.assistant-log { max-height: 180px; overflow: auto; }
.assistant-answer { white-space: pre-wrap; font-family: inherit; font-size: 13px; margin: 0; }
.btn-teal {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px;
    font-size: 12px; font-weight: 600; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--teal), #0d9488); color: #042f2e;
}
.btn-teal:disabled { opacity: .5; cursor: not-allowed; }
.btn-gold {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px;
    font-size: 12px; font-weight: 600; border: none; cursor: pointer;
    background: linear-gradient(135deg, var(--gold), #b8860b); color: #1a1200;
}
.btn-ghost {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    background: transparent; border: 1px solid var(--border); color: var(--text-muted);
}
.hub-thread {
    padding: 12px 14px; border-bottom: 1px solid var(--border-soft); cursor: pointer; color: inherit; text-decoration: none; display: block;
}
.hub-thread:hover { background: rgba(20,184,166,.06); color: inherit; }
.hub-thread.active {
    background: rgba(20,184,166,.12); border-left: 3px solid var(--teal);
    box-shadow: 0 0 0 2px var(--teal), 0 0 20px rgba(20,184,166,.3);
}
.file-icon {
    width: 40px; height: 48px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 800; color: #fff; flex-shrink: 0;
}
.file-pdf { background: linear-gradient(180deg, #ef4444, #b91c1c); }
.file-dwg { background: linear-gradient(180deg, #0a6ed1, #0854a0); }
.file-spec { background: linear-gradient(180deg, var(--teal), #0d9488); }
.store-card {
    flex: 1; padding: 20px; border-radius: 12px; border: 2px solid var(--border);
    background: var(--bg-card); cursor: pointer; min-width: 240px;
}
.store-card.selected {
    border-color: var(--teal);
    background: linear-gradient(180deg, rgba(20,184,166,.12), var(--bg-card));
    box-shadow: 0 0 24px rgba(20,184,166,.2);
}
.contradiction {
    background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4);
    border-radius: 8px; padding: 10px 14px; margin: 6px 0;
}
.compare-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare-col { padding: 12px; border-radius: 8px; background: var(--bg-elev); border: 1px solid var(--border); }
.compare-col.bad { border-color: rgba(239,68,68,.5); background: rgba(239,68,68,.08); }
.hub-progress { height: 8px; background: var(--bg-deep); border-radius: 4px; overflow: hidden; margin: 10px 0; }
.hub-progress > div { height: 100%; background: linear-gradient(90deg, var(--teal), var(--blue)); border-radius: 4px; }
.margin-bar { height: 28px; background: var(--bg-deep); border-radius: 6px; overflow: hidden; display: flex; position: relative; }
.margin-bar .fill { height: 100%; }
.margin-bar .marker { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--gold); }
.otp-boxes { display: flex; gap: 8px; }
.otp-box {
    width: 42px; height: 48px; border: 2px solid var(--teal); border-radius: 8px;
    background: var(--bg-deep); display: flex; align-items: center; justify-content: center;
    font-size: 22px; font-weight: 700; color: var(--teal-bright);
}
.pipeline {
    display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px;
}
.pipeline a {
    font-size: 11px; padding: 4px 8px; border-radius: 6px; text-decoration: none;
    border: 1px solid var(--border); color: var(--text-dim); background: var(--bg-elev);
}
.pipeline a.active { border-color: var(--teal); color: var(--teal-bright); background: var(--teal-dim); }
.hub-modal-backdrop {
    position: fixed; inset: 0; background: rgba(47,52,60,.45); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center; z-index: 80;
}
.hub-modal {
    background: var(--bg-panel); border: 1px solid var(--border); border-radius: 14px;
    box-shadow: 0 16px 40px rgba(47,52,60,.18); width: min(560px, 92vw); overflow: hidden;
}
.drawing-canvas {
    background: var(--bg-elev); border: 1px solid var(--border); border-radius: 8px;
    min-height: 280px; padding: 18px; color: var(--text-muted); position: relative;
}
.login-card { background: var(--bg-card); color: var(--text); }
.login-card .brand-bar { background: linear-gradient(90deg, var(--teal), var(--gold)); }
.user-chip { background: var(--teal-dim); color: var(--teal-bright); }

/* —— Screen help (every screen) —— */
.screen-help-fab {
    position: fixed; right: 18px; bottom: 22px; z-index: 90;
    width: 44px; height: 44px; border-radius: 50%;
    border: 1px solid var(--teal); background: linear-gradient(180deg, var(--teal), #0f766e);
    color: #fff; font-size: 20px; font-weight: 800; cursor: pointer;
    box-shadow: 0 8px 24px rgba(20,184,166,.35);
}
.screen-help-fab:hover { transform: translateY(-1px); filter: brightness(1.08); }
.mobile-shell .screen-help-fab { bottom: 72px; }
.screen-help-backdrop {
    position: fixed; inset: 0; background: rgba(47,52,60,.35); z-index: 95;
}
.screen-help-drawer {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 96;
    width: min(420px, 94vw); background: var(--bg-panel);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 24px rgba(47,52,60,.12);
    display: flex; flex-direction: column;
}
.screen-help-hd {
    display: flex; justify-content: space-between; align-items: flex-start;
    padding: 16px 18px; border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(20,184,166,.1), transparent);
}
.screen-help-kicker { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--teal-bright); }
.screen-help-title { font-size: 1.15rem; margin: 4px 0 0; }
.screen-help-close { border: none; background: transparent; font-size: 18px; cursor: pointer; color: var(--text-dim); }
.screen-help-bd { padding: 14px 18px 28px; overflow: auto; flex: 1; }
.screen-help-section { margin-bottom: 16px; }
.screen-help-section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-dim); margin-bottom: 6px; }
.screen-help-note { font-size: 13px; color: var(--gold-bright); margin-top: 4px; }
.screen-help-steps { list-style: none; padding: 0; margin: 0; }
.screen-help-steps li {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13.5px;
}
.screen-help-steps .step-num {
    flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
    background: var(--teal-dim); color: var(--teal-bright);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700;
}
.screen-help-mistakes { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-muted); }
.screen-help-mistakes li { margin-bottom: 4px; }

.guided-tour-banner {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px;
    padding: 10px 14px; margin-bottom: 14px; border-radius: 10px;
    border: 1px solid rgba(20,184,166,.35); background: rgba(20,184,166,.08);
}
.guided-tour-text { font-size: 13.5px; max-width: 720px; }

.pipeline-wrap { margin-bottom: 14px; }
.pipeline-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 6px; }
.pipeline-step-label { font-size: 13px; font-weight: 600; color: var(--text); }
.pipeline-hint { font-size: 12px; }
.pipeline a.done { border-color: rgba(20,184,166,.35); color: var(--teal-bright); }
.pipeline .pipe-idx { opacity: .7; margin-right: 2px; }

.empty-state {
    text-align: center; padding: 36px 20px; border-radius: 12px;
    border: 1px dashed var(--border); background: var(--bg-elev);
}

.progress-pie {
    width: 132px; height: 132px; border-radius: 50%; flex: 0 0 auto;
    box-shadow: inset 0 0 0 14px #fff;
}
.progress-pie-sm { width: 72px; height: 72px; box-shadow: inset 0 0 0 8px #fff; }
.stage-bar { height: 8px; background: #e5e7eb; border-radius: 99px; overflow: hidden; }
.stage-bar-fill { height: 100%; background: #0a6ed1; border-radius: 99px; }
.timeline-row { display: grid; grid-template-columns: minmax(140px, 220px) 1fr auto; gap: 8px; align-items: center; margin-bottom: 6px; }
.timeline-label { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.timeline-track { position: relative; height: 18px; background: #eef2f6; border-radius: 6px; }
.timeline-bar { position: absolute; top: 3px; height: 12px; border-radius: 4px; background: #0a6ed1; min-width: 4px; }
.timeline-bar.late { background: #dc2626; }
.empty-state h3 { font-size: 1.05rem; margin-bottom: 6px; }
.empty-state p { color: var(--text-muted); font-size: 14px; max-width: 420px; margin: 0 auto 14px; }
.ocr-deps-callout {
    border: 1px solid rgba(234,179,8,.45); background: rgba(234,179,8,.1);
    border-radius: 8px; padding: 10px 12px; margin: 8px 0; font-size: 13px;
}
.pill.live { border-color: rgba(20,184,166,.5); color: var(--teal-bright); }

.notify-bell {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}
.notify-count {
    min-width: 1.25rem;
    padding: 0 6px;
    border-radius: 999px;
    background: #0f766e;
    color: #fff;
    font-size: 12px;
    line-height: 1.3rem;
    text-align: center;
}
.live-camera-preview {
    width: 100%;
    max-height: 240px;
    background: #111;
    border-radius: 8px;
    border: 1px solid #dde1e6;
}

.task-page .form-control,
.task-page .form-select,
.task-page .btn-teal,
.task-page .btn-ghost {
    min-height: 44px;
}
.task-mic {
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 999px;
    border: 0;
    background: #0a6ed1;
    color: #fff;
    font-weight: 700;
}
.task-mic.listening,
.task-mic.recording { background: #bb0000; }
.task-summary {
    display: grid;
    gap: 0.35rem 1rem;
}
@media (min-width: 720px) {
    .task-summary { grid-template-columns: 8rem 1fr; }
}
.task-summary dt { font-weight: 700; margin: 0; }
.task-summary dd { margin: 0; }
.task-pick {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.task-pick label { min-height: 44px; display: flex; align-items: center; gap: 0.5rem; }

.cosmix-letterhead-screen { margin: 0 0 1rem; }
.cosmix-letterhead-screen img,
.cosmix-letterhead-print img {
    display: block;
    width: 100%;
    max-width: 920px;
    height: auto;
    background: #fff;
}
.cosmix-letterhead-rule {
    height: 2px;
    max-width: 920px;
    margin: 0.35rem 0 0.2rem;
    background: #C00000;
}
.cosmix-letterhead-services {
    margin: 0;
    max-width: 920px;
    text-align: center;
    font-size: 0.62rem;
    line-height: 1.35;
    color: #111;
}
.cosmix-letterhead-mark { color: #BF1800; }
.cosmix-letterhead-print { display: none; }
.native-letterhead .cosmix-letterhead-screen { display: none !important; }

@media print {
    .sidebar, .top-row, #blazor-error-ui, .btn, .btn-teal, .btn-ghost, .btn-primary, button, .no-print {
        display: none !important;
    }
    .page { display: block !important; background: #fff; }
    .cosmix-letterhead-screen { display: none !important; }
    .cosmix-letterhead-print { display: block !important; }
    .cosmix-letterhead-print .cosmix-letterhead-head {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: #fff;
    }
    .cosmix-letterhead-print .cosmix-letterhead-foot {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
    }
    .cosmix-letterhead-print img,
    .cosmix-letterhead-print .cosmix-letterhead-rule,
    .cosmix-letterhead-print .cosmix-letterhead-services { max-width: none; }
    .content { padding-top: 42mm; padding-bottom: 24mm; }
}

.customer-app {
    max-width: 32rem;
    margin: 0 auto;
    min-height: 100vh;
    padding: 1rem 1rem 2rem;
    background: var(--sap-bg);
    color: var(--sap-text);
    font-family: var(--sap-font);
}
.customer-app header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.customer-brand { font-size: 1.25rem; font-weight: 700; color: var(--sap-shell); text-decoration: none; }
.customer-app h1 { font-size: 1.5rem; margin: 0 0 .5rem; }
.customer-app h2 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
.customer-card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    background: var(--sap-surface);
    border: 1px solid var(--sap-border);
    border-radius: var(--sap-radius);
    padding: 1rem;
    margin: .75rem 0;
}
.customer-link { text-decoration: none; color: inherit; }
.customer-muted { color: var(--sap-text-secondary); }
.customer-note { background: var(--sap-info-bg); border-radius: var(--sap-radius-sm); padding: .75rem; }
.customer-app label { display: block; margin-top: .5rem; }
.customer-app .form-control { width: 100%; min-height: 44px; margin: .25rem 0 .75rem; }
.customer-app .btn-teal, .customer-app button { min-height: 44px; }
.customer-app ul { margin: 0; padding-left: 1.1rem; }
