:root {
    --navy: #062c4b;
    --blue: #005b96;
    --blue-2: #0079b8;
    --cyan: #00a9ce;
    --cyan-soft: #e7f8fc;
    --ink: #16324a;
    --muted: #61788d;
    --line: #dce7ef;
    --surface: #ffffff;
    --canvas: #f4f8fb;
    --success: #168261;
    --warning: #b66a13;
    --danger: #b43f51;
    --radius: 18px;
    --shadow: 0 12px 34px rgba(5, 52, 88, .09);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); font-family: "Segoe UI Variable Text", "Aptos", "Segoe UI", Arial, sans-serif; }
body { overflow-x: hidden; }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { font-family: "Segoe UI Variable Display", "Aptos Display", "Segoe UI", sans-serif; margin-top: 0; color: var(--navy); letter-spacing: -.025em; }
h1[tabindex="-1"]:focus { outline: none; }
h1 { font-size: clamp(2rem, 3vw, 3rem); line-height: 1.08; }
h2 { font-size: clamp(1.35rem, 2vw, 1.8rem); }
h3 { font-size: 1.05rem; }
p { line-height: 1.65; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; padding: 28px 20px; background: linear-gradient(175deg, #062f50 0%, #05395f 54%, #00618d 100%); color: #fff; display: flex; flex-direction: column; z-index: 20; box-shadow: 10px 0 30px rgba(3, 35, 60, .08); }
.brand { color: #fff; display: flex; gap: 13px; align-items: center; text-decoration: none; padding: 0 8px 30px; }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px 15px 15px 5px; background: linear-gradient(145deg, var(--cyan), #32d3e8); color: var(--navy); font: 800 24px/1 "Segoe UI Variable Display", sans-serif; box-shadow: 0 8px 20px rgba(0, 191, 218, .25); }
.brand strong, .brand small { display: block; }
.brand strong { font: 700 18px/1.2 "Segoe UI Variable Display", sans-serif; letter-spacing: -.02em; }
.brand small { color: #a9dbe9; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; margin-top: 5px; }
.primary-nav { display: flex; flex-direction: column; gap: 5px; }
.nav-section { color: #78bed4; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; padding: 2px 12px 10px; }
.primary-nav a { color: #d9edf4; display: flex; align-items: center; gap: 12px; min-height: 45px; padding: 10px 13px; border-radius: 12px; text-decoration: none; font-size: 14px; transition: .18s ease; }
.primary-nav a span { color: #7ad7e8; width: 20px; text-align: center; font-size: 18px; }
.primary-nav a:hover { background: rgba(255,255,255,.07); color: #fff; transform: translateX(2px); }
.primary-nav a.active { background: linear-gradient(90deg, rgba(0, 174, 209, .28), rgba(255,255,255,.08)); color: #fff; box-shadow: inset 3px 0 0 #37d3e8; }
.sidebar-trust { margin-top: auto; display: flex; gap: 11px; align-items: center; padding: 15px; border: 1px solid rgba(155,224,238,.16); background: rgba(0,28,48,.18); border-radius: 14px; }
.sidebar-trust strong, .sidebar-trust small { display: block; }
.sidebar-trust strong { font-size: 12px; }
.sidebar-trust small { color: #9fcbd8; font-size: 10px; margin-top: 3px; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: #5fe5bd; box-shadow: 0 0 0 5px rgba(95,229,189,.12); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(95,229,189,0); } }

.workspace { grid-column: 2; min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 78px; padding: 0 38px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.92); backdrop-filter: blur(12px); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 15; }
.topbar-context span, .topbar-context strong { display: block; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-size: 9px; font-weight: 700; }
.topbar-context strong { color: var(--navy); font-size: 14px; margin-top: 3px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.language-control select, .mode-switch { height: 38px; background: #f5f9fc; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font-size: 12px; font-weight: 600; }
.mode-switch { display: flex; align-items: center; gap: 7px; }
.mode-switch:hover { border-color: #9ecdda; background: var(--cyan-soft); }
.mode-icon { color: var(--cyan); font-size: 16px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: white; background: linear-gradient(145deg, var(--blue), var(--cyan)); font-size: 11px; font-weight: 700; box-shadow: 0 4px 12px rgba(0,91,150,.22); }
.content { flex: 1; width: 100%; max-width: 1540px; margin: 0 auto; padding: 38px clamp(22px, 4vw, 56px) 54px; }
.demo-footer { padding: 18px 40px; color: #7c8e9e; font-size: 10px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; background: #fff; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.page-heading h1 { font-size: clamp(1.8rem, 2.7vw, 2.65rem); margin-bottom: 8px; }
.page-heading p { margin: 0; color: var(--muted); max-width: 700px; }
.kicker { color: var(--blue); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; display: block; margin-bottom: 10px; }
.demo-pill, .status-pill, .confidence { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 6px 10px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.demo-pill { background: #fff4df; color: #80520b; border: 1px solid #f3d7a7; }
.demo-environment-banner { min-height: 38px; padding: 8px 32px; display: flex; align-items: center; justify-content: center; gap: 12px; color: #68450a; background: #fff4df; border-bottom: 1px solid #f3d7a7; font-size: 11px; }
.demo-environment-banner span { color: #80520b; }
.status-pill { background: var(--cyan-soft); color: var(--blue); }
.status-pill::before { content: ""; width: 6px; height: 6px; background: var(--cyan); border-radius: 50%; }
.confidence.high { background: #e5f6ef; color: #167154; }
.confidence.medium { background: #fff3dd; color: #9b5a0a; }
.confidence.insufficient { background: #fae8eb; color: #9d3444; }

.surface, .card { background: var(--surface); border: 1px solid rgba(208,224,234,.9); border-radius: var(--radius); box-shadow: var(--shadow); }
.card { padding: 24px; }
.soft-card { background: #f8fbfd; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 17px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.split-main { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, .7fr); gap: 24px; }
.icon-tile { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: var(--blue); background: linear-gradient(145deg, #e6f7fc, #f1fbfd); font-size: 21px; }
.muted { color: var(--muted); }
.micro { font-size: 11px; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 20px 0; }

.btn { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; padding: 9px 17px; border: 1px solid transparent; text-decoration: none; font-weight: 700; font-size: 13px; transition: .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: linear-gradient(135deg, var(--blue), #007fb7); box-shadow: 0 8px 18px rgba(0,91,150,.18); }
.btn-primary:hover { color: #fff; box-shadow: 0 11px 24px rgba(0,91,150,.24); }
.btn-cyan { color: #043b55; background: linear-gradient(135deg, #38d3e5, #00b4d1); }
.btn-secondary { color: var(--blue); background: #fff; border-color: #b9d6e2; }
.btn-ghost { color: var(--muted); background: transparent; border-color: var(--line); }
.btn-danger { color: var(--danger); background: #fff6f7; border-color: #efc6cd; }
.btn:disabled { cursor: not-allowed; opacity: .55; transform: none; box-shadow: none; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.hero { position: relative; overflow: hidden; min-height: 390px; padding: clamp(36px, 5vw, 66px); background: radial-gradient(circle at 86% 20%, rgba(54,210,230,.2), transparent 24%), linear-gradient(120deg, #062f50 0%, #005c8f 60%, #0087aa 100%); border-radius: 26px; color: white; box-shadow: 0 22px 50px rgba(4,53,88,.2); }
.hero::after { content: ""; position: absolute; width: 320px; height: 320px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; right: -55px; bottom: -130px; box-shadow: 0 0 0 55px rgba(255,255,255,.035), 0 0 0 110px rgba(255,255,255,.025); }
.hero-content { max-width: 770px; position: relative; z-index: 2; }
.hero h1 { color: #fff; max-width: 700px; font-size: clamp(2.5rem, 5vw, 4.8rem); margin: 17px 0 20px; }
.hero p { color: #d4edf4; max-width: 680px; font-size: 17px; line-height: 1.7; }
.hero .button-row { margin-top: 30px; }
.private-badge { display: inline-flex; align-items: center; gap: 8px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #b9eff6; font-weight: 700; }
.private-badge::before { content: "◆"; color: #58e1d0; }
.hero-trust { position: absolute; right: 42px; top: 42px; width: 240px; padding: 18px; border: 1px solid rgba(255,255,255,.2); background: rgba(2,36,59,.38); backdrop-filter: blur(10px); border-radius: 16px; z-index: 2; }
.hero-trust span { display: flex; justify-content: space-between; color: #c9e8ef; font-size: 11px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.hero-trust span:last-child { border: 0; }
.hero-trust b { color: #65e4c1; }
.capabilities { margin-top: 22px; }
.capability-card { position: relative; min-height: 160px; }
.capability-card h3 { margin: 18px 0 7px; }
.capability-card p { font-size: 13px; color: var(--muted); margin: 0; }
.trust-panel { margin-top: 22px; padding: 28px; display: grid; grid-template-columns: .8fr 2fr; gap: 30px; align-items: center; background: linear-gradient(115deg, #fff, #f0fafc); }
.trust-list { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px; }
.trust-item { display: flex; align-items: center; gap: 10px; padding: 12px; background: rgba(255,255,255,.75); border: 1px solid #d7e9ef; border-radius: 11px; font-size: 12px; font-weight: 600; }
.trust-check { color: var(--success); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 17px; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field.full { grid-column: 1/-1; }
.field label { color: #36536b; font-weight: 700; font-size: 11px; }
.field input, .field select, .field textarea, .composer textarea { width: 100%; border: 1px solid #cfdde6; background: #fff; color: var(--ink); border-radius: 11px; padding: 11px 13px; outline: none; transition: .16s; }
.field textarea { min-height: 105px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .composer textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,169,206,.1); }
.check-field { display: flex; align-items: flex-start; gap: 9px; font-size: 12px; color: var(--muted); }
.check-field input { margin-top: 3px; accent-color: var(--blue); }
.validation-message { color: var(--danger); font-size: 11px; }
.progress-steps { display: flex; gap: 8px; margin-bottom: 24px; }
.step { flex: 1; height: 5px; border-radius: 5px; background: #dfe9ef; }
.step.active { background: linear-gradient(90deg, var(--blue), var(--cyan)); }

/* Give chat the full workspace viewport. The conversation scrolls while the composer remains
   at the bottom; on narrow screens the document resumes natural page scrolling. */
@media (min-width: 861px) {
    .app-shell:has(.chat-page) { height: 100dvh; min-height: 0; overflow: hidden; }
    .workspace:has(.chat-page) { height: 100dvh; min-height: 0; overflow: hidden; }
    .content:has(.chat-page) { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; padding-top: 24px; padding-bottom: 24px; }
}

.workspace:has(.chat-page) .demo-footer { display: none; }
.chat-page { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.chat-page > .page-heading { flex: 0 0 auto; margin-bottom: 18px; }
.chat-layout { display: grid; grid-template-columns: 250px minmax(0,1fr); flex: 1; min-height: 0; overflow: hidden; }
.conversation-rail { border-right: 1px solid var(--line); padding: 20px; background: #f9fbfd; min-height: 0; overflow-y: auto; }
.conversation-rail .btn { width: 100%; margin-bottom: 20px; }
.conversation-item { padding: 12px; border-radius: 11px; margin: 5px 0; cursor: pointer; }
.conversation-item:hover, .conversation-item.active { background: #eaf6fa; }
.conversation-item strong { display: block; font-size: 12px; color: var(--navy); }
.conversation-item small { color: var(--muted); font-size: 9px; }
.chat-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; background: #fff; }
.chat-head { flex: 0 0 auto; padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.chat-head h2 { font-size: 16px; margin: 0; }
.chat-head small { color: var(--muted); }
.messages { padding: 26px clamp(18px,4vw,50px); flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; scroll-behavior: smooth; }
.welcome-chat { max-width: 720px; margin: 24px auto; text-align: center; }
.welcome-orb { margin: 0 auto 18px; width: 66px; height: 66px; display: grid; place-items: center; border-radius: 24px 24px 24px 7px; color: white; font: 800 27px "Segoe UI Variable Display", sans-serif; background: linear-gradient(145deg, var(--blue), var(--cyan)); box-shadow: 0 12px 25px rgba(0,128,176,.2); }
.suggestions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 24px; text-align: left; }
.suggestion { border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 12px; padding: 13px; font-size: 12px; }
.suggestion:hover { border-color: #9dd7e4; background: #f4fbfd; }
.message { display: flex; gap: 12px; margin-bottom: 22px; max-width: 900px; }
.message.user { margin-left: auto; flex-direction: row-reverse; max-width: 680px; }
.message-avatar { flex: 0 0 34px; height: 34px; border-radius: 12px 12px 12px 4px; display: grid; place-items: center; font-weight: 800; font-size: 11px; background: #e3f7fb; color: var(--blue); }
.message.user .message-avatar { border-radius: 50%; background: var(--navy); color: #fff; }
.message-body { min-width: 0; }
.bubble { background: #f4f8fb; border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 15px 18px; line-height: 1.6; font-size: 13px; }
.message.user .bubble { background: linear-gradient(135deg, #075f93, #087aa7); color: white; border-color: transparent; border-radius: 16px 4px 16px 16px; }
.answer-section { border-left: 3px solid var(--cyan); padding: 11px 14px; margin: 11px 0; background: #fbfdfe; border-radius: 0 10px 10px 0; }
.answer-section h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 6px; color: var(--blue); }
.answer-section p { margin: 0; font-size: 13px; }
.answer-section.general { border-color: #87a6bb; }
.answer-section.required { border-color: #e3a443; }
.answer-section.adviser { border-color: #7b78c9; }
.citation-list { margin-top: 14px; }
.citation { display: flex; justify-content: space-between; gap: 15px; padding: 10px 12px; border: 1px solid #d6e9ef; background: var(--cyan-soft); border-radius: 10px; margin-top: 7px; font-size: 10px; }
.citation strong { color: var(--blue); }
.citation-score { color: var(--success); white-space: nowrap; }
.response-meta { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.message-actions { display: flex; gap: 5px; margin-top: 9px; flex-wrap: wrap; }
.message-actions button { background: transparent; color: var(--muted); border: 0; padding: 5px 7px; font-size: 10px; }
.message-actions button:hover { color: var(--blue); }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 14px 18px; background: #f4f8fb; border-radius: 4px 16px 16px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--cyan); animation: bounce 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 50% { transform: translateY(-5px); opacity: .5; } }
.thinking-box { display: flex; flex-direction: column; gap: 10px; min-width: 240px; background: #f4f8fb; border: 1px solid var(--line); border-radius: 4px 16px 16px 16px; padding: 15px 18px; }
.thinking-step { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); transition: color .2s ease; }
.thinking-step .step-marker { flex: 0 0 16px; width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid #c7dbe4; display: grid; place-items: center; font-size: 9px; color: transparent; transition: .2s ease; }
.thinking-step.done { color: var(--ink); }
.thinking-step.done .step-marker { background: var(--success); border-color: var(--success); color: #fff; }
.thinking-step.active { color: var(--blue); font-weight: 700; }
.thinking-step.active .step-marker { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(0,169,206,.15); animation: pulse 1.1s infinite; }
.composer-wrap { flex: 0 0 auto; position: relative; z-index: 2; border-top: 1px solid var(--line); padding: 18px clamp(18px,4vw,50px); background: #fff; box-shadow: 0 -8px 24px rgba(8,58,91,.04); }
.composer { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: end; gap: 10px; padding: 8px; border: 1px solid #c9dae4; border-radius: 16px; box-shadow: 0 5px 18px rgba(8,58,91,.07); }
.composer textarea { border: 0; box-shadow: none; min-height: 42px; max-height: 140px; resize: none; padding: 10px 5px; }
.composer textarea:focus { box-shadow: none; }
.icon-btn { width: 40px; height: 40px; border: 0; display: grid; place-items: center; border-radius: 11px; background: #f0f6f9; color: var(--blue); }
.send-btn { background: linear-gradient(145deg, var(--blue), var(--cyan)); color: #fff; }
.recording { background: #fee9ec; color: var(--danger); animation: pulse 1s infinite; }
.composer-note { color: var(--muted); text-align: center; font-size: 9px; margin-top: 8px; }

/* Tenant assistant chat occupies the complete workspace. Only the messages pane scrolls and the
   composer remains anchored to the bottom of the chat surface. */
@media (min-width: 861px) {
    .app-shell:has(.chat-layout-full),
    .workspace:has(.chat-layout-full) {
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
    }
    .content:has(.chat-layout-full) {
        display: flex;
        flex: 1;
        min-height: 0;
        max-width: none;
        overflow: hidden;
        padding: 18px;
    }
    .workspace:has(.chat-layout-full) .demo-footer { display: none; }
}
.chat-layout-full {
    width: 100%;
    height: 100%;
    min-height: 0;
}
.chat-main-full,
.messages-full { min-height: 0; }
.assistant-identity {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-bottom: 18px;
}
.assistant-identity.compact { margin: 0; }
.assistant-identity strong,
.assistant-identity small { display: block; }
.assistant-identity small { color: var(--muted); margin-top: 3px; }
.assistant-brand-avatar { background: linear-gradient(145deg, var(--blue), var(--cyan)); }
.conversation-list-scroll { min-height: 0; overflow-y: auto; }
.conversation-item {
    display: block;
    width: 100%;
    border: 0;
    text-align: left;
    background: transparent;
}
.chat-attribution {
    display: block;
    margin-top: auto;
    padding-top: 18px;
    color: var(--muted);
}
.composer-wrap-sticky .composer {
    grid-template-columns: minmax(0, 1fr) auto;
}

.metric { padding: 20px; }
.metric .metric-label { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; }
.metric strong { display: block; font: 700 28px "Segoe UI Variable Display", sans-serif; color: var(--navy); margin: 12px 0 4px; }
.metric small { color: var(--success); font-size: 10px; }
.metric-bar { height: 5px; border-radius: 5px; background: #e3ecf1; margin-top: 14px; overflow: hidden; }
.metric-bar span { display: block; height: 100%; background: linear-gradient(90deg,var(--blue),var(--cyan)); border-radius: inherit; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .1em; text-align: left; border-bottom: 1px solid var(--line); padding: 11px 13px; }
td { padding: 13px; border-bottom: 1px solid #edf2f5; font-size: 12px; vertical-align: top; }
tbody tr:hover { background: #f8fbfd; }

.timeline { position: relative; padding-left: 27px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 7px; bottom: 7px; width: 2px; background: #d9e7ed; }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-item::before { content: ""; position: absolute; left: -25px; top: 5px; width: 11px; height: 11px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px #e8f8fb; }
.timeline-item strong { font-size: 12px; color: var(--navy); }
.timeline-item p { margin: 4px 0; color: var(--muted); font-size: 11px; }
.checklist-item { display: flex; gap: 11px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #edf2f5; }
.checklist-item input { accent-color: var(--success); margin-top: 3px; }
.checklist-item label { font-size: 12px; font-weight: 600; }
.checklist-item small { display: block; font-size: 9px; color: var(--muted); margin-top: 4px; }

.notice { display: flex; align-items: flex-start; gap: 11px; padding: 14px 16px; border-radius: 12px; font-size: 12px; line-height: 1.5; }
.notice-info { color: #0b5c7a; background: #e9f8fc; border: 1px solid #c5e8f1; }
.notice-warning { color: #7c4b0a; background: #fff6e5; border: 1px solid #f1d9aa; }
.notice-danger { color: #8d3442; background: #fff0f2; border: 1px solid #efcbd1; }
.empty-state { text-align: center; padding: 45px 20px; color: var(--muted); }
.empty-state .icon-tile { margin: 0 auto 13px; }
.loading-page { min-height: 340px; display: grid; place-items: center; color: var(--muted); }
.spinner { width: 32px; height: 32px; border: 3px solid #dceaf0; border-top-color: var(--cyan); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; color: white; background: var(--navy); padding: 13px 18px; border-radius: 12px; box-shadow: var(--shadow); font-size: 12px; animation: slideUp .2s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } }

.demo-sequence { counter-reset: sequence; }
.demo-step { position: relative; display: grid; grid-template-columns: 76px 1fr; gap: 20px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.demo-time { color: var(--cyan); font: 700 17px "Segoe UI Variable Display", sans-serif; }
.demo-step h3 { margin-bottom: 6px; }
.prompt-code { padding: 10px 12px; background: #092f4a; color: #cbeef4; border-radius: 9px; font: 11px/1.5 Consolas, monospace; margin-top: 8px; }

@media (max-width: 1180px) {
    .grid-4 { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .hero-trust { display: none; }
    .split-main { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
    html, body, .app-shell, .workspace, .content { width: 100%; max-width: 100%; min-width: 0; }
    .app-shell { display: block; }
    .sidebar { position: static; width: 100%; max-width: 100%; height: auto; padding: 15px; }
    .brand { padding-bottom: 14px; }
    .primary-nav { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
    .primary-nav a { flex: 0 0 auto; }
    .nav-section, .sidebar-trust { display: none; }
    .workspace { min-height: auto; }
    .topbar { padding: 0 18px; }
    .topbar-context { display: none; }
    .content { padding: 24px 16px 40px; overflow: hidden; }
    .content:has(.chat-page) { padding: 18px 12px 0; overflow: visible; }
    .workspace:has(.chat-page) { min-height: 100dvh; }
    .chat-page { min-height: calc(100dvh - 78px); }
    .chat-page > .page-heading { margin-bottom: 16px; }
    .chat-layout { grid-template-columns: 1fr; }
    .conversation-rail { display: none; }
    .chat-main { min-height: calc(100dvh - 230px); overflow: visible; }
    .messages { min-height: 320px; overflow-y: visible; }
    .composer-wrap { position: sticky; bottom: 0; }
    .hero { width: 100%; max-width: 100%; padding: 35px 24px; min-height: 360px; }
    .hero-content { width: 100%; max-width: 100%; }
    .hero h1 { font-size: 2.7rem; }
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .trust-panel { grid-template-columns: 1fr; }
    .demo-footer { padding: 15px 18px; gap: 10px; flex-direction: column; }
}
@media (max-width: 600px) {
    .mode-switch { font-size: 0; width: 40px; padding: 0; }
    .mode-switch .mode-icon { font-size: 17px; margin: auto; }
    .grid-4, .trust-list, .form-grid, .suggestions { grid-template-columns: 1fr; }
    .field.full { grid-column: auto; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .chat-head { padding: 14px; }
    .messages { padding: 18px 13px; }
    .composer-wrap { padding: 12px; }
    .hero h1 { font-size: 2.2rem; }
}

#blazor-error-ui { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000; padding: 12px 20px; background: #fff1d6; color: #5d3d07; }

.signed-in-user { display: flex; flex-direction: column; align-items: flex-end; max-width: 220px; }
.signed-in-user span { color: var(--navy); font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.signed-in-user small { color: var(--muted); font-size: 10px; }
.logout-form, .access-denied form { margin: 0; }
.logout-button { min-height: 38px; padding: 7px 12px; }
.route-loading { min-height: 40vh; display: grid; place-items: center; color: var(--muted); font-weight: 600; }

.login-shell { min-height: 100vh; display: flex; flex-direction: column; position: relative; overflow: hidden; background:
    radial-gradient(circle at 8% 10%, rgba(0,169,206,.18), transparent 32%),
    radial-gradient(circle at 94% 88%, rgba(0,91,150,.15), transparent 30%),
    linear-gradient(145deg, #eef8fb 0%, #f8fbfd 48%, #edf4f8 100%); }
.login-shell::before { content: ""; position: fixed; width: 460px; height: 460px; border: 1px solid rgba(0,121,184,.12); border-radius: 50%; top: -250px; right: -100px; box-shadow: 0 0 0 70px rgba(0,121,184,.025), 0 0 0 140px rgba(0,121,184,.018); pointer-events: none; }
.login-brand { align-self: flex-start; margin: 32px 42px; display: flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; z-index: 1; }
.login-brand .brand-mark { box-shadow: 0 10px 24px rgba(0,91,150,.22); }
.login-brand > span:last-child { display: flex; flex-direction: column; }
.login-brand strong { font-size: 16px; letter-spacing: -.02em; }
.login-brand small { color: var(--muted); font-size: 10px; letter-spacing: .04em; }
.login-main { width: min(1080px, calc(100% - 40px)); margin: auto; z-index: 1; }
.login-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(380px, 1.1fr); border-radius: 24px; overflow: hidden; background: var(--surface); box-shadow: 0 28px 80px rgba(5,52,88,.16); border: 1px solid rgba(255,255,255,.8); }
.login-card { padding: 52px; }
.login-card h1 { margin: 10px 0 12px; }
.login-card .notice { margin: 16px 0; }
.login-form { margin-top: 28px; display: flex; flex-direction: column; gap: 17px; }
.login-form .field > span { color: #36536b; font-weight: 700; font-size: 11px; }
.remember-row { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; cursor: pointer; }
.remember-row input { accent-color: var(--blue); width: 16px; height: 16px; }
.login-submit { width: 100%; margin-top: 3px; }
.login-demo-card { padding: 50px; color: #eaf8ff; background:
    radial-gradient(circle at 100% 0%, rgba(0,202,225,.24), transparent 35%),
    linear-gradient(155deg, #063354 0%, #07537a 55%, #00749c 100%); }
.login-demo-card h2 { color: #fff; margin: 18px 0 8px; }
.login-demo-card > p { color: #c9e8f3; margin-bottom: 24px; }
.access-pill { display: inline-flex; align-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 999px; padding: 7px 11px; background: rgba(255,255,255,.1); color: #eaf8ff; font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.login-security-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid rgba(255,255,255,.14); }
.login-security-item { display: flex; flex-direction: column; gap: 5px; padding: 18px 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.login-security-item strong { color: #fff; font-size: 12px; }
.login-security-item small { max-width: 46ch; color: #b9dce9; font-size: 10px; line-height: 1.55; }
.login-trust { display: flex; align-items: center; gap: 12px; margin-top: 24px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.14); }
.login-trust div { display: flex; flex-direction: column; }
.login-trust strong { color: #fff; font-size: 12px; }
.login-trust small { color: #b9dce9; font-size: 10px; }
.login-footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px 42px; color: var(--muted); font-size: 10px; z-index: 1; }
.access-denied { max-width: 680px; margin: 80px auto; text-align: center; }
.access-denied .icon-tile { margin: 0 auto 18px; }
.access-denied .button-row { justify-content: center; margin-top: 24px; }

@media (max-width: 900px) {
    .login-grid { grid-template-columns: 1fr; }
    .login-demo-card { padding: 36px; }
}

@media (max-width: 600px) {
    .login-brand { margin: 22px; }
    .login-main { width: min(100% - 24px, 540px); }
    .login-card, .login-demo-card { padding: 28px 24px; }
    .login-footer { padding: 20px 24px; flex-direction: column; }
    .signed-in-user { display: none; }
}

.support-session-banner {
    align-items: center;
    background: #fff4d6;
    border-bottom: 1px solid #e6bd52;
    color: #4f3900;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    padding: 10px 24px;
}

.support-session-banner div {
    display: grid;
    gap: 2px;
}

.support-session-banner span {
    font-size: .82rem;
}

.tenant-switcher select {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--navy);
    font: inherit;
    max-width: 190px;
    padding: 7px 9px;
}
