:root {
  --bg: #f4f6f4;
  --panel: #ffffff;
  --panel-soft: #f8faf8;
  --text: #18211d;
  --muted: #708078;
  --line: #e3e9e5;
  --green: #1d6b4f;
  --green-dark: #14513c;
  --green-soft: #e8f4ee;
  --amber: #a66b19;
  --amber-soft: #fff4dc;
  --red: #b44343;
  --red-soft: #fceaea;
  --blue: #376b9b;
  --blue-soft: #eaf2fa;
  --shadow: 0 1px 2px rgba(18, 46, 34, .04), 0 8px 28px rgba(18, 46, 34, .045);
  --radius: 16px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }

.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 246px; padding: 22px 16px 16px; background: #10271e; color: #dbe8e1; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 0 7px 25px; }
.brand-mark { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 11px; background: #d9eee4; color: #174c39; font-weight: 800; font-size: 13px; letter-spacing: -.4px; }
.brand strong, .brand small { display: block; }
.brand strong { color: #fff; font-size: 14px; white-space: nowrap; }
.brand small { margin-top: 3px; color: #88a399; font-size: 11px; }
.nav { display: grid; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 0 13px; border-radius: 10px; color: #9db3aa; font-weight: 600; transition: .15s ease; }
.nav a:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav a.active { background: #255d47; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.04); }
.nav-icon { width: 19px; color: #a9c0b6; text-align: center; font-size: 17px; font-weight: 500; }
.sidebar-footer { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 14px 8px 3px; border-top: 1px solid rgba(255,255,255,.1); }
.operator-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #39735b; color: #fff; font-weight: 700; }
.operator-name { min-width: 0; flex: 1; }
.operator-name strong, .operator-name small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operator-name strong { font-size: 12px; color: #fff; }.operator-name small { color: #88a399; font-size: 10px; margin-top: 2px; }
.logout { width: 28px; height: 28px; display: grid; place-items: center; color: #92a89f; border-radius: 7px; }.logout:hover { background: rgba(255,255,255,.07); color: #fff; }

.main-shell { min-height: 100vh; margin-left: 246px; }
.page { max-width: 1580px; margin: 0 auto; padding: 38px 42px 60px; }
.mobile-header, .menu-scrim { display: none; }
.page-heading { margin: 0 0 25px; }
.page-heading h1 { margin: 2px 0 7px; font-size: 30px; line-height: 1.15; letter-spacing: -.8px; }
.page-heading > p:last-child, .page-heading > div > p:last-child { margin: 0; color: var(--muted); font-size: 14px; }
.eyebrow { margin: 0; color: var(--green); font-weight: 750; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }
.split-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; margin: -10px 0 18px; color: var(--muted); font-size: 12px; }.breadcrumbs a:hover { color: var(--green); }
.heading-actions { display: flex; gap: 8px; }
.identity { display: flex; align-items: center; gap: 15px; }

.segmented { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); white-space: nowrap; box-shadow: 0 1px 2px rgba(0,0,0,.02); }
.segmented a { padding: 8px 12px; border-radius: 7px; color: var(--muted); font-size: 12px; font-weight: 650; }
.segmented a.active { background: var(--green-soft); color: var(--green-dark); }

.metric-grid { display: grid; gap: 14px; margin-bottom: 17px; }.metric-grid.three { grid-template-columns: repeat(3, 1fr); }.metric-grid.four { grid-template-columns: repeat(4, 1fr); }.metric-grid.five { grid-template-columns: 1.35fr repeat(4, 1fr); }
.metric-card { min-width: 0; min-height: 125px; padding: 20px 21px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.metric-card.accent { border-color: #bbd8cb; background: linear-gradient(145deg, #fff, #f1f8f4); }
.metric-card.danger-card { background: var(--red-soft); border-color: #f3c7c7; }
.metric-card strong { display: block; margin: 12px 0 5px; font-size: 27px; line-height: 1; letter-spacing: -.7px; white-space: nowrap; }
.metric-card small { color: var(--muted); font-size: 11px; }
.metric-label { display: flex; justify-content: space-between; align-items: center; color: #586860; font-size: 12px; font-weight: 650; }
.metric-icon { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 7px; background: var(--green-soft); color: var(--green); }
.metric-unit { font-size: 15px; color: var(--muted); font-weight: 600; }
.compact-metrics .metric-card { min-height: 105px; padding: 17px 19px; }.compact-metrics .metric-card strong { margin-top: 10px; font-size: 24px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 19px 21px; border-bottom: 1px solid var(--line); }
.panel-heading h2, .detail-panel h2, .conversation-heading h2 { margin: 0; font-size: 15px; letter-spacing: -.2px; }.panel-heading p, .conversation-heading p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .8fr); gap: 16px; margin: 17px 0; }
.content-grid.sidebar-content { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 16px; }
.stack { display: grid; gap: 14px; }
.detail-panel { padding: 19px; }.detail-panel h2 { margin-bottom: 15px; }

.attention-strip { display: flex; align-items: center; gap: 0; margin-bottom: 17px; padding: 0 9px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); box-shadow: var(--shadow); }
.attention-strip > div { flex: 1; min-height: 47px; display: flex; align-items: center; gap: 8px; padding: 0 14px; border-right: 1px solid var(--line); }.attention-strip > div:last-child { border-right: 0; }
.attention-strip strong { font-size: 15px; }.attention-strip span:last-child { color: var(--muted); font-size: 11px; }
.attention-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #9bad9f; }.attention-dot.warning { background: #d79a3b; box-shadow: 0 0 0 4px #fff2d7; }.attention-dot.danger { background: #cf5757; box-shadow: 0 0 0 4px #fce5e5; }.attention-dot.success { background: #40a071; box-shadow: 0 0 0 4px #e1f3e9; }

.bar-chart { height: 250px; display: flex; align-items: flex-end; gap: 8px; padding: 37px 22px 17px; overflow: hidden; }
.bar-column { position: relative; flex: 1; min-width: 18px; height: 190px; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; text-align: center; }
.bar { width: 100%; max-width: 32px; min-height: 4px; margin: 0 auto; border-radius: 5px 5px 2px 2px; background: linear-gradient(#3c8e6b, #216044); }.bar-column small { margin-top: 7px; color: #84928b; font-size: 9px; }
.bar-value { display: none; position: absolute; bottom: calc(var(--height) + 25px); left: 50%; transform: translateX(-50%); z-index: 2; padding: 5px 7px; border-radius: 6px; background: #162b22; color: #fff; font-size: 9px; white-space: nowrap; }.bar-column:hover .bar-value { display: block; }
.status-list { display: grid; gap: 16px; padding: 20px 21px; }.status-row { display: grid; grid-template-columns: 1fr 2fr 30px; align-items: center; gap: 10px; }.status-row > div:first-child { display: flex; justify-content: space-between; gap: 5px; }.status-name { font-size: 11px; font-weight: 650; }.status-row small { color: var(--muted); font-size: 9px; }.status-row > strong { text-align: right; font-size: 12px; }.progress { height: 5px; border-radius: 10px; background: #edf1ee; overflow: hidden; }.progress span { display: block; height: 100%; background: #438467; border-radius: inherit; }

.table-panel { overflow: hidden; }.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { height: 42px; padding: 0 16px; background: #fafbfa; border-bottom: 1px solid var(--line); color: #7a8881; font-size: 10px; font-weight: 700; text-align: left; text-transform: uppercase; letter-spacing: .45px; white-space: nowrap; }
td { height: 64px; padding: 9px 16px; border-bottom: 1px solid #edf0ee; color: #4f5d56; font-size: 12px; vertical-align: middle; }tbody tr:last-child td { border-bottom: 0; }tbody tr:hover td { background: #fbfcfb; }
.align-right { text-align: right; }.money { color: #174f3b; font-variant-numeric: tabular-nums; font-weight: 700; }
.primary-cell strong, .primary-cell span { display: block; }.primary-cell strong { max-width: 420px; overflow: hidden; text-overflow: ellipsis; color: var(--text); font-size: 12px; white-space: nowrap; }.primary-cell span { margin-top: 4px; color: var(--muted); font-size: 10px; }.primary-cell:hover strong, .subtle-link:hover { color: var(--green); }
.client-cell { display: flex; align-items: center; gap: 10px; min-width: 200px; }.client-cell strong, .client-cell small { display: block; }.client-cell strong { color: var(--text); font-size: 12px; }.client-cell small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.avatar { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; background: #e3f0e9; color: var(--green-dark); font-size: 12px; font-weight: 800; text-transform: uppercase; }.avatar.large { width: 54px; height: 54px; flex-basis: 54px; font-size: 18px; }
.date-cell { white-space: nowrap; color: var(--muted); }.row-arrow { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 7px; color: #8b9891; font-size: 15px; }.row-arrow:hover { color: var(--green); background: var(--green-soft); }

.badge { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border-radius: 99px; background: #eef1ef; color: #64726b; font-size: 9px; font-weight: 750; white-space: nowrap; }
.badge.active, .badge.access-active, .badge.success, .badge.version-active, .badge.payment-succeeded, .badge.generation-answered { background: var(--green-soft); color: var(--green); }
.badge.closed, .badge.access-expired, .badge.version-archived { background: #eff1f3; color: #69727a; }
.badge.access-trial, .badge.payment-pending, .badge.generation-safety_clarify { background: var(--amber-soft); color: var(--amber); }
.badge.access-free { background: var(--blue-soft); color: var(--blue); }
.badge.danger, .badge.payment-failed, .badge.version-failed, .badge.generation-error, .badge.generation-rejected { background: var(--red-soft); color: var(--red); }
.badge.generation-emergency, .badge.generation-urgent_today { background: #b93232; color: #fff; }.badge.generation-doctor_24h, .badge.generation-need_doctor { background: #fff0d6; color: #9a6314; }

.toolbar { display: flex; align-items: center; gap: 9px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.search-field { min-width: 260px; max-width: 440px; flex: 1; height: 38px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid #dce3df; border-radius: 9px; background: #fff; color: #8d9992; }.search-field:focus-within { border-color: #80ae9a; box-shadow: 0 0 0 3px #e8f3ee; }.search-field input { width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
select, .login-form input { min-height: 38px; padding: 0 33px 0 11px; border: 1px solid #dce3df; border-radius: 9px; background: #fff; color: var(--text); outline: none; font-size: 12px; }.stack-form select { width: 100%; margin-top: 6px; }
.button { min-height: 38px; display: inline-flex; align-items: center; justify-content: center; padding: 0 14px; border: 1px solid transparent; border-radius: 9px; font-size: 11px; font-weight: 700; }.button.primary { background: var(--green); color: #fff; }.button.primary:hover { background: var(--green-dark); }.button.secondary { border-color: #dce3df; background: #fff; color: #46564e; }.button.secondary:hover { background: #f6f8f7; }.button.danger-button, .danger-button { border-color: #efcaca; background: #fff; color: var(--red); }.button.small { min-height: 32px; }.button.full, .full { width: 100%; }.text-link { color: var(--green); font-size: 11px; font-weight: 700; white-space: nowrap; }.subtle-link { color: #46564e; font-weight: 650; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 22px; min-height: 55px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }.pagination a { color: var(--green); font-weight: 700; }

.stack-form label { color: var(--muted); font-size: 11px; }.stack-form .button { margin-top: 10px; }.stack-form.separated { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.detail-list { margin: 0; }.detail-list > div { display: flex; justify-content: space-between; gap: 15px; padding: 9px 0; border-bottom: 1px solid #edf0ee; }.detail-list > div:last-child { border-bottom: 0; }.detail-list dt { color: var(--muted); font-size: 11px; }.detail-list dd { margin: 0; max-width: 58%; color: #324139; font-size: 11px; font-weight: 650; text-align: right; }.detail-list .total { margin-top: 6px; padding-top: 13px; border-top: 2px solid var(--line); }.detail-list .total dt, .detail-list .total dd { font-weight: 800; color: var(--text); }
.payment-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }.payment-row:last-child { border: 0; }.payment-row strong, .payment-row small { display: block; }.payment-row strong { font-size: 12px; }.payment-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }.muted { color: var(--muted); font-size: 11px; }

.case-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.conversation-panel { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #f9fbfa; box-shadow: var(--shadow); }
.conversation-heading { display: flex; justify-content: space-between; align-items: center; padding: 18px 21px; border-bottom: 1px solid var(--line); background: #fff; }.live-dot { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }.live-dot i { width: 7px; height: 7px; border-radius: 50%; background: #49a678; box-shadow: 0 0 0 4px #e6f5ed; }
.conversation { padding: 20px; }.message-row { display: flex; gap: 10px; margin-bottom: 24px; }.message-row:last-child { margin-bottom: 0; }.message-row.role-user { flex-direction: row-reverse; }.message-row.role-system { opacity: .82; }
.message-avatar { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: #204e3c; color: #fff; font-size: 9px; font-weight: 800; }.role-user .message-avatar { background: #dfece5; color: #285e48; }.role-system .message-avatar { background: #7b8680; }
.message-column { max-width: min(82%, 850px); min-width: 0; }.role-user .message-column { display: flex; flex-direction: column; align-items: flex-end; }.message-meta { display: flex; align-items: center; gap: 8px; margin: 0 3px 6px; }.role-user .message-meta { flex-direction: row-reverse; }.message-meta strong { font-size: 10px; }.message-meta time { color: #8b9891; font-size: 9px; }
.message-bubble { max-width: 100%; padding: 13px 15px; border: 1px solid #e1e7e3; border-radius: 5px 15px 15px 15px; background: #fff; color: #26352e; box-shadow: 0 2px 8px rgba(22,50,38,.035); }.role-user .message-bubble { border-color: #cfe0d7; border-radius: 15px 5px 15px 15px; background: #e7f2ec; }.role-system .message-bubble { background: #f0f2f1; }
.message-text { font-size: 13px; line-height: 1.58; word-break: break-word; }.media-preview { display: block; margin-bottom: 10px; }.media-preview img { display: block; max-width: 100%; max-height: 430px; border-radius: 10px; object-fit: contain; }.message-bubble audio { max-width: 100%; margin-bottom: 9px; }.transcription { margin: 8px 0; padding: 9px 10px; border-left: 3px solid #76a790; background: rgba(255,255,255,.55); font-size: 11px; line-height: 1.5; }.transcription span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.message-cost { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 7px; padding: 7px 10px; border: 1px solid #dce7e1; border-radius: 8px; background: #f5f9f7; font-size: 9px; }.message-cost span { color: var(--muted); }.message-cost strong { color: var(--green); }.message-cost small { width: 100%; color: #7b8982; }
.answer-audit { width: 100%; margin-top: 8px; border: 1px solid #dfe5e1; border-radius: 10px; background: #fff; overflow: hidden; }.audit-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding: 9px 11px; color: var(--muted); font-size: 9px; }.audit-summary strong { margin-left: auto; color: var(--green); font-size: 11px; }.answer-audit details { border-top: 1px solid var(--line); }.answer-audit summary, .document-card summary { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; color: #405047; cursor: pointer; font-size: 10px; font-weight: 700; list-style: none; }.answer-audit summary::-webkit-details-marker, .document-card summary::-webkit-details-marker { display: none; }.answer-audit summary span { color: var(--muted); font-weight: 500; }
.evidence-list { display: grid; gap: 8px; padding: 0 11px 11px; }.evidence-card { padding: 10px; border: 1px solid #e4e8e5; border-radius: 8px; background: #fafbfa; }.evidence-card > div { display: flex; align-items: center; gap: 7px; }.source-number { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 5px; background: var(--green-soft); color: var(--green); font-size: 8px; font-weight: 800; }.evidence-card strong { font-size: 10px; }.evidence-card p { margin: 5px 0; color: var(--muted); font-size: 9px; }.evidence-card blockquote { margin: 7px 0; padding-left: 9px; border-left: 2px solid #aacbbd; color: #405047; font-size: 10px; line-height: 1.5; }.evidence-card small { color: var(--muted); font-size: 9px; }.empty-evidence { padding: 10px; border-radius: 7px; background: var(--amber-soft); color: #855b1f; font-size: 10px; }
.audit-detail { padding: 0 12px 12px; }.audit-detail dl { margin: 0; }.audit-detail dl div { display: grid; grid-template-columns: 125px 1fr; gap: 8px; padding: 6px 0; border-bottom: 1px solid #edf0ee; }.audit-detail dt { color: var(--muted); font-size: 9px; }.audit-detail dd { margin: 0; font-size: 10px; }.audit-detail h4 { margin: 12px 0 6px; font-size: 10px; }.retrieval-hit, .memory-hit { display: flex; justify-content: space-between; gap: 10px; margin: 0; padding: 6px; border-bottom: 1px solid #edf0ee; font-size: 9px; }.retrieval-hit span, .memory-hit span { color: var(--muted); white-space: nowrap; }
.error-box { margin-top: 8px; padding: 10px 12px; border: 1px solid #f0cccc; border-radius: 8px; background: var(--red-soft); color: #854040; font-size: 10px; line-height: 1.45; }.error-box strong { display: block; margin-bottom: 3px; }.client-card-link { display: flex; align-items: center; gap: 9px; }.client-card-link > span:nth-child(2) { min-width: 0; flex: 1; }.client-card-link strong, .client-card-link small { display: block; }.client-card-link strong { font-size: 11px; }.client-card-link small { margin-top: 3px; color: var(--muted); font-size: 9px; }.client-card-link b { color: #85928b; }.summary-copy { margin: 0; color: #48574f; font-size: 11px; line-height: 1.55; }
.anamnesis-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }.anamnesis-heading h2 { margin: 0; }.badge.anamnesis-completed { background: var(--green-soft); color: var(--green); }.badge.anamnesis-collecting { background: var(--amber-soft); color: var(--amber); }.badge.anamnesis-interrupted { background: var(--red-soft); color: var(--red); }.anamnesis-panel details { margin-top: 14px; border-top: 1px solid var(--line); }.anamnesis-panel summary { display: flex; justify-content: space-between; padding: 12px 0 0; cursor: pointer; color: #405047; font-size: 10px; font-weight: 700; list-style: none; }.anamnesis-answers { display: grid; gap: 8px; margin-top: 10px; }.anamnesis-answers article { padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel-soft); }.anamnesis-answers small, .anamnesis-answers strong { display: block; }.anamnesis-answers small { color: var(--green); font-size: 8px; text-transform: uppercase; }.anamnesis-answers strong { margin-top: 3px; font-size: 10px; }.anamnesis-answers p { margin: 5px 0; color: var(--muted); font-size: 9px; line-height: 1.4; }.anamnesis-answers blockquote { margin: 7px 0 0; padding-left: 8px; border-left: 2px solid #a9cabb; color: #34433b; font-size: 10px; line-height: 1.45; }

.costs-grid { grid-template-columns: 1fr 1fr; }.knowledge-panel { overflow: hidden; }.document-list { display: grid; }.document-card { display: flex; gap: 13px; padding: 19px 21px; border-bottom: 1px solid var(--line); }.document-card:last-child { border-bottom: 0; }.document-icon { width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 10px; background: var(--green-soft); color: var(--green); font-size: 18px; }.document-main { min-width: 0; flex: 1; }.document-title { display: flex; align-items: center; gap: 8px; }.document-title h3 { margin: 0; font-size: 13px; }.document-main > p { margin: 6px 0 9px; color: var(--muted); font-size: 10px; }.document-meta { display: flex; flex-wrap: wrap; gap: 7px 16px; color: #617068; font-size: 9px; }.document-card details { margin-top: 10px; border: 1px solid var(--line); border-radius: 8px; }.version-list > div { display: grid; grid-template-columns: 30px 1fr auto auto; align-items: center; gap: 8px; padding: 8px 10px; border-top: 1px solid var(--line); font-size: 9px; }.version-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.version-list small { color: var(--muted); }.version-list p { grid-column: 2 / -1; margin: 0; color: var(--red); }.warning-box { padding: 8px 10px; border-radius: 7px; background: var(--amber-soft); color: #89601f; font-size: 10px; }
.info-callout { display: flex; gap: 11px; margin-top: 16px; padding: 15px 17px; border: 1px solid #cfe0d7; border-radius: 12px; background: #edf6f1; }.info-callout > span { width: 23px; height: 23px; flex: 0 0 23px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; }.info-callout strong { font-size: 11px; }.info-callout p { margin: 4px 0 0; color: #5a6d63; font-size: 10px; line-height: 1.5; }

.health-strip { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; padding: 17px 19px; border: 1px solid #bedaca; border-radius: var(--radius); background: #edf7f1; }.health-strip.unhealthy { border-color: #efc4c4; background: var(--red-soft); }.health-icon { width: 34px; height: 34px; flex: 0 0 34px; display: grid; place-items: center; border-radius: 50%; background: var(--green); color: #fff; font-size: 16px; font-weight: 800; }.unhealthy .health-icon { background: var(--red); }.health-strip > div { flex: 1; }.health-strip strong { font-size: 13px; }.health-strip p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }.system-grid { grid-template-columns: .9fr 1.1fr; }.count-pill { min-width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; background: #edf1ef; color: #65736b; font-size: 10px; font-weight: 800; }.count-pill.danger { background: var(--red-soft); color: var(--red); }.errors-panel { overflow: hidden; }.error-list > a { display: flex; align-items: flex-start; gap: 10px; padding: 12px 17px; border-bottom: 1px solid var(--line); }.error-list > a:hover { background: #fbfcfb; }.error-list > a > div { min-width: 0; flex: 1; }.error-list strong { font-size: 10px; }.error-list p { margin: 3px 0; color: #57655e; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.error-list small { color: var(--muted); font-size: 9px; }

.empty-state { min-height: 120px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; color: var(--muted); text-align: center; font-size: 11px; }.empty-state strong { color: #46564e; font-size: 12px; }.empty-state.compact { min-height: 160px; }.flash-stack { position: fixed; top: 18px; right: 22px; z-index: 100; }.flash { padding: 11px 14px; border: 1px solid #bcd9ca; border-radius: 9px; background: #ecf7f1; color: var(--green-dark); box-shadow: 0 10px 30px rgba(0,0,0,.08); font-size: 11px; font-weight: 650; }

.login-body { min-height: 100vh; display: grid; place-items: center; padding: 25px; background: radial-gradient(circle at 25% 20%, #e6f2eb 0, transparent 34%), linear-gradient(135deg, #f6f8f6, #edf2ef); }
.login-card { width: 100%; max-width: 420px; padding: 38px; border: 1px solid #dce5df; border-radius: 20px; background: rgba(255,255,255,.96); box-shadow: 0 25px 70px rgba(28,67,49,.12); }.login-brand { margin-bottom: 26px; }.login-card .brand-mark { width: 46px; height: 46px; }.login-card h1 { margin: 5px 0 8px; font-size: 27px; letter-spacing: -.6px; }.login-copy { margin: 0 0 25px; color: var(--muted); line-height: 1.55; }.login-form { display: grid; gap: 14px; }.login-form label { color: #56655d; font-size: 11px; font-weight: 650; }.login-form input { display: block; width: 100%; min-height: 44px; margin-top: 6px; padding: 0 12px; }.login-form input:focus { border-color: #80ae9a; box-shadow: 0 0 0 3px #e8f3ee; }.login-form .button { min-height: 44px; margin-top: 5px; }.form-error { padding: 10px; border-radius: 8px; background: var(--red-soft); color: var(--red); font-size: 11px; }.login-note { margin: 20px 0 0; color: #8a9690; font-size: 9px; text-align: center; }

@media (max-width: 1180px) {
  .page { padding: 30px 25px 50px; }
  .metric-grid.five { grid-template-columns: repeat(3, 1fr); }
  .case-layout, .content-grid.sidebar-content { grid-template-columns: 1fr; }.case-aside { grid-template-columns: repeat(3, 1fr); }.content-grid.sidebar-content > .stack { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 920px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; }.main-shell { margin-left: 0; }.mobile-header { height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; border-bottom: 1px solid var(--line); background: #10271e; }.mobile-header .brand { padding: 0; }.mobile-header .brand strong { margin-left: 1px; }.mobile-header .brand-mark { width: 32px; height: 32px; flex-basis: 32px; }.menu-button { border: 0; background: transparent; color: #fff; font-size: 22px; }.menu-open .sidebar { transform: translateX(0); }.menu-open .menu-scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(8,24,17,.45); }
  .metric-grid.four, .metric-grid.five { grid-template-columns: repeat(2, 1fr); }.dashboard-grid, .costs-grid, .system-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .page { padding: 23px 14px 40px; }.page-heading h1 { font-size: 25px; }.split-heading { align-items: flex-start; flex-direction: column; }.segmented { width: 100%; overflow-x: auto; }.segmented a { flex: 1; text-align: center; }
  .metric-grid.three, .metric-grid.four, .metric-grid.five { grid-template-columns: 1fr 1fr; gap: 9px; }.metric-card { min-height: 100px; padding: 15px; }.metric-card strong { font-size: 21px; }.case-metrics .metric-card:first-child { grid-column: 1 / -1; }
  .attention-strip { align-items: stretch; flex-direction: column; }.attention-strip > div { border-right: 0; border-bottom: 1px solid var(--line); }.attention-strip > div:last-child { border-bottom: 0; }
  .toolbar { align-items: stretch; flex-direction: column; }.search-field { min-width: 0; max-width: none; width: 100%; }.toolbar select { width: 100%; }
  .case-aside, .content-grid.sidebar-content > .stack { grid-template-columns: 1fr; }.conversation { padding: 13px 9px; }.message-row { gap: 6px; }.message-avatar { width: 25px; height: 25px; flex-basis: 25px; }.message-column { max-width: 89%; }.message-text { font-size: 12px; }.audit-summary strong { margin-left: 0; }.audit-detail dl div { grid-template-columns: 1fr; }.panel-heading { padding: 16px; }
  .version-list > div { grid-template-columns: 28px 1fr auto; }.version-list small { grid-column: 2 / -1; }.health-strip { align-items: flex-start; }.health-strip > .badge { display: none; }
}
