:root {
    --altair-ink: #203139;
    --altair-muted: #687980;
    --altair-blue: #4e7a8c;
    --altair-green: #55b065;
    --altair-gold: #f5cf82;
    --altair-paper: #f7f8f4;
    --altair-border: #dfe6e2;
    --altair-public-header-mobile: 64px;
    --altair-public-header-desktop: 72px;
}

html { overflow-x: hidden; }
html, body { min-height: 100%; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--altair-ink); background: var(--altair-paper); overflow-x: hidden; }
.content a:not(.btn), .btn-link { color: #376d7d; }
h1 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.1rem, 4.2vw, 3.7rem); line-height: 1.07; }
h1:focus { outline: none; }
.lead { font-size: clamp(1.1rem, 2vw, 1.35rem); line-height: 1.55; }
.content { box-sizing: border-box; max-width: 1180px; padding: 1.5rem 1rem 3rem; width: 100%; }
.btn-primary { --bs-btn-bg: var(--altair-blue); --bs-btn-border-color: var(--altair-blue); --bs-btn-hover-bg: #3e6777; --bs-btn-hover-border-color: #3e6777; }
.btn-success { --bs-btn-bg: var(--altair-green); --bs-btn-border-color: var(--altair-green); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--altair-green); box-shadow: 0 0 0 .2rem rgba(85,176,101,.18); }
.card, .info-card, .panel { border: 1px solid var(--altair-border); border-radius: 1rem; background: #fff; box-shadow: 0 .35rem 1.2rem rgba(31,49,57,.055); }
.info-card, .panel { padding: 1.35rem; }
.metric { display: flex; flex-direction: column; gap: .2rem; min-height: 130px; }
.metric strong { font-size: 2rem; color: var(--altair-blue); }
.eyebrow { color: #3f9b52; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: .78rem; }
.empty-state { padding: 2.5rem; text-align: center; border: 1px dashed #bdcbc5; border-radius: 1rem; color: var(--altair-muted); }
.status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: .25rem .65rem; font-size: .78rem; background: #eaf2ee; color: #315c3c; }
.status-pill.warning { background: #fff3d7; color: #7c5a12; }
.status-pill.muted { background: #edf0f1; color: #59666b; }
.list-card { padding: 1rem 1.1rem; border: 1px solid var(--altair-border); border-radius: .85rem; background: #fff; }
.chat-shell { display: grid; grid-template-columns: minmax(220px, 300px) 1fr; gap: 1rem; min-height: 65vh; }
.chat-messages { height: 52vh; overflow-y: auto; display: flex; flex-direction: column; gap: .75rem; padding: 1rem; background: #f8faf8; border-radius: .75rem; }
.message { max-width: 78%; padding: .7rem .9rem; border-radius: .85rem; background: #fff; border: 1px solid var(--altair-border); }
.message.mine { align-self: flex-end; background: #eaf4ed; }
.message small { color: var(--altair-muted); }
.valid.modified:not([type=checkbox]) { outline: 1px solid var(--altair-green); }
.invalid { outline: 1px solid #b32121; }
.validation-message { color: #b32121; }
#blazor-error-ui { color-scheme: light only; background: #fff3cd; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: .7rem 1.25rem; position: fixed; width: 100%; z-index: 1100; }
#blazor-error-ui .dismiss { align-items: center; background: transparent; border: 0; display: inline-flex; height: 44px; justify-content: center; position: absolute; right: .35rem; top: 50%; transform: translateY(-50%); width: 44px; }

.drawer-trigger,
.drawer-close {
    align-items: center;
    border-radius: .75rem;
    display: inline-flex;
    flex: 0 0 48px;
    height: 48px;
    justify-content: center;
    padding: 0;
    width: 48px;
}

.drawer-backdrop {
    background: rgba(15, 28, 34, .56);
    border: 0;
    height: 100dvh;
    inset: 0;
    opacity: 0;
    padding: 0;
    position: fixed;
    transition: opacity .2s ease;
    width: 100vw;
    z-index: 1000;
}

.drawer-backdrop.is-open {
    opacity: 1;
}

.drawer-panel {
    height: 100dvh;
    inset: 0 0 0 auto;
    position: fixed;
    transform: translateX(105%);
    transition: transform .2s ease;
    visibility: hidden;
    z-index: 1001;
}

.drawer-panel.is-open {
    transform: translateX(0);
    visibility: visible;
}

.drawer-panel[hidden],
.drawer-backdrop[hidden] {
    display: none;
}

body.drawer-open {
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .drawer-panel,
    .drawer-backdrop {
        transition: none;
    }
}

@media (max-width: 767.98px) {
    .content { padding: 1.25rem 1rem 2.5rem; }
    .chat-shell { grid-template-columns: 1fr; }
    .chat-messages { height: 45vh; }
    .message { max-width: 92%; }
}

@media (min-width: 768px) {
    .content { padding-inline: 1.5rem; }
}
