:root {
  color-scheme: light;
  --ink: #152033;
  --muted: #667085;
  --quiet-value: #475467;
  --line: #dfe5ec;
  --surface: #ffffff;
  --canvas: #f4f7fa;
  --brand: #2457d6;
  --brand-dark: #173f9f;
  --success: #067647;
  --warning: #b54708;
  --danger: #b42318;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #84adff; outline-offset: 2px; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 300; padding: 10px 14px; border-radius: 10px; background: #101828; color: white; font-weight: 750; text-decoration: none; }
.skip-link:focus { top: 14px; }

.login-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 20% 10%, #dcecff, transparent 35%), var(--canvas); }
.login-card { width: min(440px, 100%); background: var(--surface); border: 1px solid var(--line); border-radius: 24px; padding: 32px; box-shadow: 0 24px 80px rgba(16, 40, 80, .12); }
.oidc-login { display: block; box-sizing: border-box; margin: 18px 0 14px; text-align: center; text-decoration: none; }
.login-separator { margin: 14px 0; color: var(--muted); font-size: 13px; text-align: center; }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--brand); color: white; font-weight: 800; margin-bottom: 20px; }
h1, h2, h3 { margin-top: 0; line-height: 1.2; }
h1 { font-size: 28px; margin-bottom: 8px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
.muted { color: var(--muted); }
.prototype-note { padding: 12px 14px; border: 1px solid #fec84b; background: #fffaeb; border-radius: 12px; color: #7a2e0e; font-size: 13px; margin: 20px 0; }
.field { display: grid; gap: 7px; margin: 14px 0; }
.field label { font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #cbd5e1; border-radius: 10px; padding: 10px 12px; background: white; color: var(--ink); }
select[multiple] { min-height: 176px; padding: 6px; }
select[multiple] option { padding: 7px 9px; border-radius: 7px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid #d5e5ff; border-color: var(--brand); }
.btn { border: 1px solid transparent; border-radius: 10px; padding: 10px 15px; font-weight: 700; background: var(--brand); color: white; }
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: white; color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: #f8fafc; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 7px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.is-busy { position: relative; padding-right: 38px; }
.btn.is-busy::after { content: ""; position: absolute; right: 14px; top: 50%; width: 14px; height: 14px; margin-top: -7px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.error { color: var(--danger); font-size: 14px; margin: 10px 0; }
.field-hint { color: var(--muted); font-size: 12px; line-height: 1.4; }
.field-error { margin: 0; color: var(--danger); font-size: 12px; font-weight: 650; }

.workspace { min-height: 100vh; display: grid; grid-template-columns: 272px minmax(0, 1fr); }
.content-shell { min-width: 0; }
.sidebar { background: #101828; color: white; padding: 20px 14px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
.sidebar .brand { display: flex; gap: 12px; align-items: center; padding: 0 8px 20px; }
.sidebar .brand-mark { margin: 0; width: 40px; height: 40px; }
.brand-subtitle { color: #98a2b3; font-size: 12px; margin-top: 2px; }
.sidebar-close { display: none; margin-left: auto; width: 36px; height: 36px; padding: 0; border: 1px solid #344054; border-radius: 9px; background: transparent; color: white; font-size: 24px; }
.sidebar nav { min-height: 0; flex: 1; display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.nav-primary { flex: 0 0 auto; display: grid; gap: 4px; }
.nav-secondary { min-height: 0; overflow-y: auto; padding-right: 3px; }
.nav-favorites { flex: 0 1 auto; max-height: 180px; overflow-y: auto; }
.nav-section-title { margin: 0; padding: 6px 12px; color: #d0d5dd; font-size: 12px; font-weight: 700; }
.nav-row { display: grid; grid-template-columns: minmax(0, 1fr) 32px; gap: 2px; align-items: center; }
.nav-favorite { width: 32px; height: 36px; padding: 7px; border: 0; border-radius: 8px; background: transparent; color: #98a2b3; }
.nav-favorite:hover, .nav-favorite[aria-pressed="true"] { color: #fdb022; background: #1d2939; }
.nav-favorite svg { display: block; width: 18px; height: 18px; }
.nav-group-label { width: 100%; min-height: 36px; display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 6px; border: 0; background: transparent; color: #d0d5dd; font-size: 12px; font-weight: 700; text-align: left; }
.nav-group-label:first-child { padding-top: 2px; }
.nav-group-label:hover { color: white; }
.nav-group-chevron { transition: transform .18s ease; }
.nav-group-label[aria-expanded="false"] .nav-group-chevron { transform: rotate(-90deg); }
.nav-group-items { display: grid; gap: 4px; }
.nav-group.collapsed .nav-group-items { display: none; }
.nav-button { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; border-radius: 9px; padding: 10px 12px; color: #d0d5dd; background: transparent; font-weight: 650; }
.nav-button:hover { background: #182230; color: white; }
.nav-button.active { background: #1d2939; color: white; box-shadow: inset 3px 0 0 #84adff; }
.nav-icon { width: 20px; text-align: center; color: #98a2b3; font-size: 17px; }
.nav-button.active .nav-icon { color: #84adff; }
.account { flex: 0 0 auto; margin-top: 8px; border-top: 1px solid #344054; padding: 16px 8px 0; color: #d0d5dd; background: #101828; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 10px; align-items: center; }
.account-avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #344054; color: white; font-weight: 800; }
.account-copy { min-width: 0; display: grid; }
.account strong { color: white; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account span, .account small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.account button { margin-top: 8px; grid-column: 1 / -1; width: 100%; }
.topbar { height: 72px; position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px clamp(18px, 4vw, 48px); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.menu-button { display: none; flex: 0 0 auto; }
.global-search { position: relative; width: min(620px, 62vw); }
.global-search input { height: 44px; padding-left: 42px; padding-right: 58px; background: #f8fafc; }
.search-icon { position: absolute; left: 14px; top: 8px; color: var(--muted); font-size: 23px; z-index: 1; pointer-events: none; }
.global-search kbd { position: absolute; right: 10px; top: 10px; border: 1px solid var(--line); border-radius: 6px; padding: 3px 6px; background: white; color: var(--muted); font: 11px ui-monospace, SFMono-Regular, monospace; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-context { display: grid; gap: 2px; }
.topbar-context small { color: var(--muted); }
.environment-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 10px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.environment-chip.prototype { background: #fffaeb; color: #b54708; }
.environment-chip.production { background: #ecfdf3; color: #067647; }
.icon-button { position: relative; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--ink); }
.icon-button:hover { background: #f8fafc; }
.notification-button { width: auto; padding: 0 13px; }
.bell-icon { font-size: 12px; font-weight: 800; }
.notification-count { position: absolute; right: -5px; top: -5px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border: 2px solid white; border-radius: 999px; background: var(--danger); color: white; font-size: 10px; font-weight: 800; }
.notification-wrap { position: relative; }
.topbar-popover { position: absolute; top: calc(100% + 10px); z-index: 80; background: white; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 22px 60px rgba(16,24,40,.18); overflow: auto; }
.search-popover { left: 0; right: 0; max-height: min(560px, calc(100vh - 100px)); }
.notification-popover { right: 0; width: min(420px, calc(100vw - 32px)); max-height: min(620px, calc(100vh - 100px)); }
.popover-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 16px; background: white; border-bottom: 1px solid var(--line); }
.popover-header small { display: block; color: var(--muted); margin-top: 2px; }
.popover-empty { padding: 26px 18px; color: var(--muted); text-align: center; }
.text-button { border: 0; background: transparent; color: var(--brand); font-weight: 750; padding: 5px; white-space: nowrap; }
.search-result { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 11px; align-items: center; padding: 12px 15px; border: 0; border-bottom: 1px solid #f2f4f7; background: white; color: var(--ink); text-align: left; }
.search-result:hover, .search-result.active, .notification-item:hover { background: #eef4ff; }
.entity-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; background: #eef4ff; color: var(--brand); font-weight: 800; }
.entity-icon.CHAT { background: #ecfdf3; color: var(--success); }
.search-result-copy { min-width: 0; display: grid; gap: 3px; }
.search-result-copy strong, .search-result-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-copy small { color: var(--muted); }
.secure-match { color: var(--success); font-size: 10px; font-weight: 750; }
.notification-item { width: 100%; display: grid; gap: 4px; padding: 13px 16px 13px 19px; border: 0; border-bottom: 1px solid #f2f4f7; background: white; color: var(--ink); text-align: left; box-shadow: inset 3px 0 0 #84adff; }
.notification-item.severity-WARNING { box-shadow: inset 3px 0 0 #f79009; }
.notification-item.severity-CRITICAL { box-shadow: inset 3px 0 0 #f04438; }
.notification-item small, .notification-item time { color: var(--muted); font-size: 12px; }
.main { position: relative; padding: 30px clamp(18px, 4vw, 48px) 64px; min-width: 0; max-width: 1720px; margin-inline: auto; }
.main[aria-busy="true"] { min-height: 320px; }
.main[aria-busy="true"]::after { content: ""; position: absolute; left: 50%; top: 110px; width: 28px; height: 28px; border: 3px solid #d5e5ff; border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; }
.page-loading { min-height: 88px; display: grid; place-items: center; padding-top: 42px; color: var(--muted); font-size: 13px; }
.page-header { display: flex; gap: 16px; align-items: start; justify-content: space-between; margin-bottom: 24px; }
.page-header p { margin: 6px 0 0; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: 0 6px 24px rgba(16, 40, 80, .04); margin-bottom: 18px; }
.toolbar { display: grid; grid-template-columns: minmax(220px, 1fr) 220px auto; gap: 12px; margin-bottom: 18px; }
.application-toolbar { grid-template-columns: minmax(220px, 1fr) auto; align-items: end; }
.application-extra-filters { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.application-toolbar:not(.filters-expanded) .application-extra-filters { display: none; }
.application-filter-toggle { display: block; min-height: 44px; text-align: left; }
.application-mobile-details { display: none; }
.application-toolbar .field, .faq-toolbar .field, .chat-ai-sources .toolbar .field { min-width: 0; margin: 0; }
.application-toolbar select, .faq-toolbar select { min-width: 0; text-overflow: ellipsis; }
.application-scopes { align-items: center; }
.application-scopes .field { display: flex; flex-direction: row-reverse; align-items: center; gap: 8px; margin: 0 0 0 auto; }
.application-scopes input { width: 18px; height: 18px; }
.application-result-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; margin-bottom: 10px; }
.application-result-actions > [role="status"] { margin: 0 auto 0 0; }
.application-table { table-layout: fixed; }
.application-table th, .application-table td { min-width: 0; overflow-wrap: anywhere; vertical-align: top; }
.application-select-col { width: 38px; }
.application-candidate-col { width: 30%; }
.application-status-col { width: 22%; }
.application-action-col { width: 30%; }
.application-assignee-col { width: 18%; }
.application-candidate-link { display: block; border: 0; padding: 0; background: transparent; color: var(--brand); font-weight: 750; text-align: left; line-height: 1.4; }
.application-candidate-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.application-candidate-meta { margin-top: 5px; }
.application-mobile-meta { display: none; }
.application-identity { min-width: 0; }
.application-action-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }
.application-row-details { margin-top: 5px; font-size: 12px; }
.application-row-details summary { cursor: pointer; color: var(--muted); padding-block: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; list-style-position: inside; }
.application-row-details p { margin: 8px 0; white-space: pre-wrap; }
.faq-toolbar { grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(0, 1fr)); }
.faq-publication { padding: 16px 0; margin: 12px 0; border-block: 1px solid var(--line); }
.faq-publication p { margin: 8px 0 0; line-height: 1.5; }
.chat-ai-summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 20px; align-items: center; }
.chat-ai-summary h2, .chat-ai-summary p { margin: 0; }
.chat-ai-summary-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.chat-ai-summary p { grid-column: 1; line-height: 1.5; }
.chat-ai-summary .chat-ai-mode { color: var(--brand-dark); font-size: 14px; }
.chat-ai-billing { grid-column: 1 / -1; color: var(--muted); font-size: 13px; }
.chat-ai-billing summary { cursor: pointer; }
.chat-ai-billing p { margin-top: 8px; }
.chat-ai-summary > button { grid-column: 2; grid-row: 1 / 4; }
.chat-ai-tabs { margin-top: 0; }
.chat-ai-sources .toolbar { grid-template-columns: minmax(0, 1fr) minmax(180px, .5fr); }
.chat-ai-sources .list-item { overflow-wrap: anywhere; }
.filter-panel { display: grid; gap: 14px; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 12px; }
.audit-filter-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
.audit-filter-grid > * { min-width: 0; width: 100%; }
.work-task { border-bottom: 1px solid var(--line); }
.work-task:last-child { border-bottom: 0; }
.work-task-actions { padding: 0 10px 12px 60px; flex-wrap: wrap; }
.operation-timeline { display: grid; gap: 18px; padding-left: 24px; }
.operation-timeline p { margin: 4px 0; color: var(--muted); }
.audit-operation { overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid #eaecf0; text-align: left; vertical-align: middle; font-size: 14px; }
th { color: var(--muted); font-size: 12px; letter-spacing: .02em; text-transform: uppercase; }
.sort-button { display: inline-flex; align-items: center; gap: 5px; padding: 3px 0; border: 0; background: transparent; color: inherit; font: inherit; font-weight: 750; letter-spacing: inherit; text-align: left; text-transform: inherit; }
.sort-button::after { content: "↕"; color: var(--muted); font-size: 11px; }
th[aria-sort="ascending"] .sort-button::after { content: "↑"; color: var(--brand); }
th[aria-sort="descending"] .sort-button::after { content: "↓"; color: var(--brand); }
.notification-button.degraded { position: relative; }
.notification-button.degraded::after {
  content: "!"; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--danger, #b42318); color: #fff; font-size: 10px; line-height: 14px; text-align: center;
}
.table-empty { padding: 34px 12px; color: var(--muted); text-align: center; }
tr:last-child td { border-bottom: 0; }
.clickable-row:hover { background: #f8fafc; }
.status { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 750; background: #eef4ff; color: #3538cd; }
.status.RECEIVED { background: #eff8ff; color: #175cd3; }
.status.IN_REVIEW { background: #f4f3ff; color: #5925dc; }
.status.NEEDS_CLARIFICATION { background: #fffaeb; color: #b54708; }
.status.NEXT_STAGE { background: #ecfdf3; color: #067647; }
.status.COMPLETED { background: #f2f4f7; color: #475467; }
.status.IN_PROGRESS, .status.PROCESSING, .status.RUNNING, .status.SENDING { background: #f4f3ff; color: #5925dc; }
.status.PENDING, .status.IN_TRANSIT, .status.REQUESTED, .status.QUEUED, .status.SCHEDULED, .status.WAITING_LEGAL_BASIS, .status.WAITING_FOR_DATA, .status.READY_WITH_FOLLOW_UP { background: #fffaeb; color: #b54708; }
.status.ACCEPTED { background: #ecfdf3; color: #067647; }
.status.UNKNOWN { background: #f2f4f7; color: #475467; }
.status.READY, .status.ACTIVE, .status.APPROVED, .status.CONFIRMED, .status.DELIVERED, .status.PASSED { background: #ecfdf3; color: #067647; }
.status.UNDELIVERABLE, .status.REJECTED, .status.FAILED, .status.ERROR, .status.BLOCKED, .status.INFECTED, .status.ACTION_REQUIRED { background: #fef3f2; color: #b42318; }
.status.CANCELLED, .status.DISABLED, .status.ARCHIVED, .status.EXPIRED, .status.REVOKED { background: #f2f4f7; color: #475467; }
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.col-4 { grid-column: span 4; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }
.metric { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.metric .value { font-size: 28px; font-weight: 800; margin-top: 6px; }
.definition { display: grid; grid-template-columns: 190px 1fr; gap: 8px 16px; margin: 0; }
.definition dt { color: var(--muted); }
.definition dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.history li { border-left: 3px solid #84adff; padding-left: 14px; }
.history time { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.split { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 18px; }
.list { display: grid; gap: 8px; }
.list-item { width: 100%; text-align: left; padding: 12px; background: white; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.list-item.active { border-color: var(--brand); box-shadow: 0 0 0 2px #d5e5ff; }
.chat-ai-preview-results, .chat-ai-insights > div { display: grid; gap: 12px; margin-top: 12px; }
.chat-ai-insights > div { grid-template-columns: minmax(0, 1fr); }
.chat-ai-preview-results small, .chat-ai-insights .list-item > small { display: block; line-height: 1.5; margin-top: 6px; }
.chat-ai-preview-results blockquote { margin: 14px 0; padding-left: 12px; border-left: 2px solid var(--line); }
.chat-ai-insights details { margin: 10px 0; }
.chat-ai-insights .list-item > button { margin-top: 12px; }
.chat-queue { align-self: start; position: sticky; top: 90px; max-height: calc(100dvh - 112px); overflow: auto; }
.chat-filters { display: grid; gap: 8px; margin-bottom: 12px; }
.chat-filters .field { margin: 0; min-width: 0; }
.chat-queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.chat-queue-heading h2 { margin: 0; }
.chat-filter-toggle { min-height: 36px; }
.chat-extra-filters { padding: 12px 0; border-block: 1px solid var(--line); }
.chat-active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chat-active-filters:empty { display: none; }
.chat-active-filters button { max-width: 100%; white-space: normal; text-align: left; }
.chat-queue-item { display: grid; gap: 6px; }
.chat-queue-item.has-unread { background: #f5f9ff; border-color: #b2ccff; }
.chat-queue-item small { color: var(--muted); }
.chat-preview { margin: 0; overflow: hidden; color: #475467; font-size: 12px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.chat-title-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.chat-title-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-title-row time { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 650; }
.chat-badges, .tag-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.priority, .tag, .unread-badge, .sla-overdue, .sla-warning { display: inline-flex; padding: 3px 7px; border-radius: 999px; font-size: 11px; font-weight: 750; }
.priority.NORMAL, .tag { background: #f2f4f7; color: #475467; }
.priority.HIGH { background: #fffaeb; color: #b54708; }
.priority.URGENT, .sla-overdue { background: #fef3f2; color: #b42318; }
.sla-warning { background: #fffaeb; color: #b54708; }
.unread-badge { background: var(--brand); color: white; min-width: 22px; justify-content: center; }
.chat-heading { display: flex; justify-content: space-between; gap: 14px; align-items: start; }
.chat-heading p { margin: 4px 0; }
.stream-state { font-size: 12px; color: var(--success); white-space: nowrap; }
.stream-state::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; background: currentColor; }
.stream-state.typing { color: var(--brand); }
.stream-state.reconnecting { color: var(--warning); }
.chat-tools { display: grid; grid-template-columns: minmax(180px, 1fr) auto minmax(140px, 220px) auto auto; gap: 8px; align-items: end; border-top: 1px solid var(--line); padding-top: 12px; }
.chat-tools .field { margin: 0; }
.assignment-state { align-self: center; color: var(--success); font-size: 12px; font-weight: 750; }
.chat-conversation { position: sticky; top: 90px; height: calc(100dvh - 112px); min-height: 600px; display: flex; flex-direction: column; overflow: auto; }
.chat-conversation > :not(.messages) { flex-shrink: 0; }
.chat-ai-context { padding: 12px; margin-bottom: 8px; }
.chat-ai-state-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.chat-ai-state-heading h3 { margin: 0; }
.chat-ai-extra { max-height: 300px; overflow: auto; margin-top: 8px; }
.chat-ai-extra > summary { cursor: pointer; font-size: 13px; }
.chat-composer { flex: 0 0 auto; margin: 0; padding: 12px 0; border-top: 1px solid var(--line); background: white; }
.chat-composer textarea { min-height: 76px; max-height: 180px; }
.chat-composer select { margin-bottom: 8px; }
.chat-settings { flex: 0 0 auto; border-top: 1px solid var(--line); padding-top: 8px; }
.chat-settings summary { cursor: pointer; padding: 7px 0; font-size: 13px; font-weight: 750; }
.autosave-status { align-self: center; min-height: 18px; }
.chat-notes { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.chat-handoff { margin-top: 14px; border: 1px solid #b2ccff; background: #f5f9ff; border-radius: 12px; padding: 12px; }
.chat-handoff summary { cursor: pointer; font-weight: 750; }
.chat-notes summary { cursor: pointer; font-weight: 750; }
.note-list { display: grid; gap: 8px; margin: 12px 0; }
.internal-note { padding: 10px 12px; border-radius: 10px; background: #fffaeb; border: 1px solid #fedf89; }
.internal-note small { display: block; color: var(--muted); margin-top: 4px; }
.messages { min-height: 180px; max-height: none; flex: 1 1 auto; overflow: auto; display: flex; flex-direction: column; gap: 10px; padding: 8px 0 16px; }
.chat-history-load { display: flex; flex: 0 0 auto; justify-content: center; padding: 2px 0 6px; }
.message { max-width: 75%; border-radius: 14px; padding: 10px 12px; background: #f2f4f7; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.ADMIN { align-self: flex-end; background: #e8f1ff; }
.message small { display: block; color: var(--muted); margin-top: 5px; }
.message-attachment { display: grid; gap: 7px; color: var(--brand-dark); text-decoration: none; font-size: 12px; font-weight: 700; margin-bottom: 7px; }
.message-attachment img { display: block; width: min(280px, 100%); max-height: 260px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: #eef2f6; }
.message-attachment:hover span { text-decoration: underline; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty-with-action { display: grid; justify-items: center; gap: 10px; }
.empty-with-action p { margin: 0; }
.banner { border: 1px solid #f79009; background: #fffaeb; border-radius: 12px; padding: 11px 14px; margin-bottom: 18px; color: #7a2e0e; font-size: 13px; }
.toast { position: fixed; right: 24px; bottom: 24px; width: min(460px, calc(100vw - 32px)); display: grid; grid-template-columns: 26px minmax(0, 1fr) 28px; gap: 10px; align-items: start; padding: 14px 14px 14px 16px; border-radius: 12px; background: #101828; color: white; box-shadow: 0 12px 40px rgba(0,0,0,.22); z-index: 180; }
.toast-success { background: #05603a; }
.toast-error { background: #7a271a; }
.toast-mark { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(255,255,255,.14); font-weight: 850; }
.toast-copy { display: grid; gap: 3px; line-height: 1.35; }
.toast-copy small { color: rgba(255,255,255,.78); overflow-wrap: anywhere; }
.toast-close { width: 28px; height: 28px; padding: 0; border: 0; border-radius: 7px; background: transparent; color: white; font-size: 20px; }
.toast-close:hover { background: rgba(255,255,255,.14); }

.dialog-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; background: rgba(16,24,40,.62); backdrop-filter: blur(2px); }
.dialog-card { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; padding: 22px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 30px 90px rgba(16,24,40,.32); }
.dialog-heading { display: flex; justify-content: space-between; gap: 18px; align-items: start; }
.dialog-heading h2 { margin: 2px 0 0; }
.dialog-description { line-height: 1.5; }
.dialog-close { width: 34px; height: 34px; flex: 0 0 auto; border: 0; border-radius: 9px; background: #f2f4f7; color: #475467; font-size: 22px; }
.dialog-actions { justify-content: flex-end; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); }
.confirmation-block { margin-top: 16px; padding: 14px; border: 1px solid #fecdca; border-radius: 12px; background: #fffafa; }
.confirmation-block p:first-child { margin-top: 0; }
.confirmation-block .field-error { margin-top: 8px; }
.subnav { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 24px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.subnav-button { border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; background: white; color: var(--muted); font-weight: 700; }
.subnav-button:hover, .subnav-button.active { border-color: var(--brand); background: #eef4ff; color: var(--brand-dark); }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin: 6px 0 16px; }
.section-heading h2, .section-heading p { margin-bottom: 4px; }
.table-note { font-size: 12px; margin-top: 4px; max-width: 360px; }
.editor-wide { max-width: 1120px; margin-inline: auto; }
.form-grid, .condition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.condition-grid { padding: 12px 16px; margin: 8px 0 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.condition-grid .field { align-content: start; }
.multi-choice { position: relative; display: grid; gap: 8px; }
.multi-choice-summary { color: var(--muted); font-size: 12px; min-height: 18px; }
.multi-choice-list { max-height: 230px; overflow: auto; display: grid; gap: 2px; padding: 6px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.multi-choice-list label { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; align-items: center; padding: 7px 8px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.multi-choice-list label:hover { background: #f8fafc; }
.multi-choice-list input { width: 17px; height: 17px; margin: 0; }
.audience-preview { padding: 9px 0; font-size: 13px; }
.editor-actions, .panel-actions { margin-top: 20px; }
.status.PUSH_DRAFT, .status.PUSH_PAUSED { background: #f2f4f7; color: #475467; }
.status.PUSH_SCHEDULED { background: #eff8ff; color: #175cd3; }
.status.PUSH_SENDING { background: #f4f3ff; color: #5925dc; }
.status.PUSH_SENT, .status.PUSH_ACTIVE { background: #ecfdf3; color: #067647; }
.status.PUSH_PARTIAL { background: #fffaeb; color: #b54708; }
.status.PUSH_FAILED, .status.PUSH_CANCELLED { background: #fef3f2; color: #b42318; }
.metric small { display: block; margin-top: 5px; }
.unified-timeline { max-height: 560px; overflow: auto; }
.timeline-INTERNAL_NOTE { border-left-color: #f79009 !important; }
.timeline-CHAT_MESSAGE { border-left-color: #12b76a !important; }
.timeline-CALLBACK, .timeline-CONTACT_ATTEMPT { border-left-color: #7f56d9 !important; }
.timeline-NOTIFICATION { border-left-color: #2e90fa !important; }
.timeline-CHAT_HANDOFF { border-left-color: #f79009 !important; }
.duplicate-warning { border-color: #fec84b; background: #fffaeb; }
.content-preview { max-width: 960px; margin-inline: auto; }
.content-preview pre, .integration-card pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: 14px; background: #f8fafc; border-radius: 10px; font-size: 13px; }
.content-preview-sections { display: grid; gap: 26px; margin-top: 26px; }
.content-preview-sections p, .content-live-preview p { white-space: pre-wrap; line-height: 1.62; }
.legal-preview-body { white-space: pre-wrap; line-height: 1.68; }
.info-callout { border-left: 4px solid var(--brand); background: #f7faff; }
.info-callout p { margin: 6px 0 0; color: var(--muted); }
.compact-panel { padding: 18px; box-shadow: none; background: #f8fafc; }
.warning-banner { margin: 14px 0 0; }
.content-editor-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .8fr); gap: 20px; align-items: start; margin: 20px 0; }
.section-editor-list { display: grid; gap: 14px; }
.section-editor-card { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #f8fafc; }
.section-editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-editor-heading h3 { margin: 0; }
.content-live-preview { position: sticky; top: 94px; min-height: 340px; padding: 24px; border: 1px solid #b2ccff; border-radius: 18px; background: linear-gradient(180deg, #fff, #f7faff); box-shadow: 0 8px 28px rgba(16,40,80,.07); }
.content-live-preview > small { color: var(--brand); font-weight: 750; }
.content-live-preview > h2 { margin-top: 16px; }
.content-live-preview section { margin-top: 22px; }
.faq-live-preview { align-self: start; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafc; }
.faq-live-preview small, .faq-live-preview strong { display: block; margin-bottom: 8px; }
.content-diff-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.content-diff-grid article { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.content-diff-grid pre { max-height: 420px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.advanced-editor { margin: 20px 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.advanced-editor summary, .technical-details summary { cursor: pointer; font-weight: 750; }
.draft-status { display: block; min-height: 18px; margin: 8px 0; color: var(--success); }
.danger-text { color: var(--danger); }
.readiness { font-size: 18px; font-weight: 800; margin-top: 8px; }
.readiness.READY { color: var(--success); }
.readiness.PROTOTYPE { color: var(--warning); }
.readiness.ACTION_REQUIRED { color: var(--danger); }
.integration-READY { background: #ecfdf3; color: #067647; }
.integration-DEGRADED, .integration-WAITING_FOR_DATA { background: #fffaeb; color: #b54708; }
.integration-DISABLED { background: #f2f4f7; color: #475467; }
.integration-summary { min-height: 42px; margin: 14px 0; padding: 11px 12px; border-radius: 10px; font-size: 13px; font-weight: 650; line-height: 1.45; }
.integration-summary.ok { background: #ecfdf3; color: #05603a; }
.integration-summary.action-required { background: #fffaeb; color: #7a2e0e; }
.technical-details { margin-top: 12px; }
.technical-details code, .technical-details pre { display: block; max-height: 300px; overflow: auto; margin-top: 10px; padding: 12px; border-radius: 9px; background: #101828; color: #e4e7ec; white-space: pre-wrap; overflow-wrap: anywhere; font: 12px ui-monospace, SFMono-Regular, monospace; }

.overview-metrics { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.overview-card { min-height: 82px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 6px; padding: 12px 14px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); }
.overview-card:hover { border-color: var(--brand); background: #eef4ff; }
.overview-card.attention { border-color: #fecdca; background: #fffafa; }
.overview-icon { grid-row: 1 / 3; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #eef4ff; color: var(--brand); font-size: 20px; font-weight: 800; }
.overview-card.attention .overview-icon { background: #fef3f2; color: var(--danger); }
.overview-card.zero { background: #f8fafc; box-shadow: none; }
.overview-card.zero .overview-value { color: var(--quiet-value); }
.overview-value { font-size: 24px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.overview-label { color: var(--muted); font-size: 12px; font-weight: 650; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr); gap: 18px; align-items: start; }
.dashboard-integrations { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0 18px; color: var(--muted); font-size: 13px; }
.dashboard-work .work-item { grid-template-columns: 38px minmax(0, 1fr); gap: 6px 12px; }
.dashboard-work .work-item-meta { grid-column: 2; justify-content: space-between; }
.dashboard-work .work-item-copy small { white-space: normal; line-height: 1.4; }
.dashboard-schedule .schedule-item small { white-space: normal; line-height: 1.4; }
.dashboard-work, .dashboard-schedule { min-width: 0; }
.work-list { display: grid; }
.work-item { width: 100%; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 10px; border: 0; border-bottom: 1px solid #eaecf0; background: transparent; color: var(--ink); text-align: left; }
.work-item:last-child { border-bottom: 0; }
.work-item:hover { background: #f8fafc; border-radius: 10px; }
.task-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: #eef4ff; color: var(--brand); font-weight: 800; }
.work-item.severity-WARNING .task-icon { background: #fffaeb; color: var(--warning); }
.work-item.severity-CRITICAL .task-icon { background: #fef3f2; color: var(--danger); }
.work-item-copy { min-width: 0; display: grid; gap: 4px; }
.work-item-copy strong, .work-item-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.work-item-copy small { color: var(--muted); }
.work-item-meta { display: grid; grid-auto-flow: column; gap: 12px; align-items: center; color: var(--muted); font-size: 12px; white-space: nowrap; }
.work-item.severity-CRITICAL .work-item-meta time { color: var(--danger); font-weight: 750; }
.work-item.severity-WARNING .work-item-meta time { color: var(--warning); font-weight: 750; }
.compact-empty { padding: 30px 12px; }
.schedule-item { width: 100%; display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 12px 4px; border: 0; border-bottom: 1px solid #eaecf0; background: transparent; color: var(--ink); text-align: left; }
.schedule-item:last-child { border-bottom: 0; }
.schedule-item:hover { color: var(--brand); }
.schedule-item time { color: var(--brand); font-size: 12px; font-weight: 800; }
.schedule-item span { min-width: 0; display: grid; gap: 3px; }
.schedule-item small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-system { margin-top: 0; }
.system-alert { display: grid; grid-template-columns: minmax(180px, .8fr) minmax(240px, 1.5fr) auto; gap: 16px; align-items: center; padding: 11px 13px; margin-top: 8px; border-radius: 10px; background: #f8fafc; border-left: 3px solid #84adff; }
.system-alert.severity-WARNING { border-left-color: #f79009; background: #fffcf5; }
.system-alert.severity-CRITICAL { border-left-color: #f04438; background: #fffafa; }
.system-alert span, .system-alert time { color: var(--muted); font-size: 12px; }
.work-filters { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 14px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.filter-chip { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; background: white; color: var(--muted); font-size: 13px; font-weight: 750; }
.filter-chip:hover, .filter-chip.active { border-color: var(--brand); background: #eef4ff; color: var(--brand-dark); }

.candidate-hero { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 22px 24px; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(135deg, #fff 0%, #f7faff 100%); box-shadow: 0 8px 28px rgba(16,40,80,.055); }
.candidate-avatar { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: #dfeaff; color: var(--brand-dark); font-size: 22px; font-weight: 850; }
.candidate-hero-copy { min-width: 0; }
.candidate-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.candidate-title-row h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); }
.candidate-hero-copy > p { margin: 6px 0 9px; color: var(--muted); }
.candidate-meta-row { display: flex; flex-wrap: wrap; gap: 7px 18px; color: #475467; font-size: 13px; }
.candidate-meta-row span { position: relative; }
.candidate-meta-row span + span::before { content: "·"; position: absolute; left: -11px; color: #98a2b3; }
.candidate-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: end; }
.candidate-mobile-actions { display: none; }
.candidate-tabs { position: sticky; top: 72px; z-index: 20; display: flex; gap: 4px; padding: 8px; margin-bottom: 18px; overflow-x: auto; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.97); box-shadow: 0 4px 18px rgba(16,40,80,.045); backdrop-filter: blur(10px); }
.candidate-tab { flex: 0 0 auto; padding: 9px 13px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 750; }
.candidate-tab:hover { background: #f8fafc; color: var(--ink); }
.candidate-tab.active { background: #eef4ff; color: var(--brand-dark); }
.candidate-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 20px; align-items: start; }
.candidate-tab-body, .candidate-tab-panel { min-width: 0; }
.candidate-tab-panel[hidden] { display: none; }
.candidate-action-rail { position: sticky; top: 142px; display: grid; gap: 12px; }
.candidate-action-card { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 6px 22px rgba(16,40,80,.04); }
.candidate-action-card h3 { margin-bottom: 13px; }
.candidate-action-card .field { margin: 10px 0; }
.candidate-action-card textarea { resize: vertical; }
.candidate-current-state { display: grid; justify-items: start; gap: 9px; border-color: #b2ccff; background: #f8faff; }
.candidate-current-state p { margin: 0; font-weight: 650; }
.candidate-current-state time { color: var(--muted); font-size: 12px; }
.candidate-rail-button, .candidate-primary-action { width: 100%; }
.candidate-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.candidate-summary-card { min-height: 145px; display: grid; align-content: start; gap: 9px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.candidate-summary-card small { color: var(--muted); font-weight: 700; }
.candidate-summary-card strong { font-size: 17px; line-height: 1.35; }
.candidate-summary-card span { color: var(--muted); font-size: 12px; }
.communication-quick-action, .protected-document { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.communication-quick-action h2, .communication-quick-action p, .protected-document h2, .protected-document p { margin-bottom: 4px; }
.timezone-preview { margin: 8px 0 14px; padding: 10px 12px; border-radius: 10px; background: #f8fafc; font-size: 12px; }
.author-date { display: grid; gap: 3px; }

.chat-workspace-three { position: relative; display: grid; grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }
.chat-workspace-three > * { min-width: 0; }
.mobile-chat-back { display: none; margin-bottom: 10px; }
.chat-workspace-three .chat-tools { grid-template-columns: minmax(0, 1fr) auto; }
.chat-context { position: absolute; right: 0; top: 0; z-index: 20; width: min(360px, 100%); max-height: calc(100dvh - 112px); overflow: auto; display: none; gap: 14px; padding: 16px; box-shadow: 0 12px 36px rgba(16,24,40,.18); }
.chat-workspace-three.has-selection.context-open .chat-context { display: grid; }
.chat-context-body { display: grid; gap: 14px; }
.chat-context-close { justify-self: end; }
.chat-heading { flex-wrap: wrap; }
.chat-workspace-three:not(.has-selection) .chat-context-toggle { display: none; }
.chat-context-heading { display: flex; align-items: start; justify-content: space-between; gap: 10px; padding-bottom: 4px; }
.chat-context-heading small { color: var(--muted); }
.chat-context-heading h2 { margin: 3px 0 0; font-size: 18px; }
.chat-context-block { display: grid; justify-items: start; gap: 8px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: #f8fafc; }
.chat-context-block h3 { margin: 0; font-size: 14px; }
.chat-context-block p { margin: 0; font-size: 13px; line-height: 1.45; }
.chat-context-block small { display: block; color: var(--muted); }
.compact-definition { width: 100%; grid-template-columns: minmax(78px, .7fr) minmax(0, 1.3fr); gap: 6px 10px; font-size: 12px; }
.compact-definition dd { text-align: right; font-weight: 650; }
.sla-context.WARNING { border-color: #fedf89; background: #fffcf5; }
.sla-context.OVERDUE { border-color: #fecdca; background: #fffafa; }
.sla-context.WARNING strong { color: var(--warning); }
.sla-context.OVERDUE strong { color: var(--danger); }
.chat-context-note { margin: 0; padding: 0 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }

.integration-overview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sms-provider-section { margin-bottom: 20px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8fafc; }
.sms-provider-section > .section-heading { margin-bottom: 14px; }
.sms-provider-section > .section-heading h2 { margin-bottom: 4px; }
.sms-provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sms-provider-actions { margin-top: auto; }
.sms-history-filter .filter-grid { grid-template-columns: repeat(5, minmax(140px, 1fr)); }
.integration-card { min-width: 0; border-top: 4px solid #84adff; }
.integration-card-DEGRADED { border-top-color: #f79009; }
.integration-card-DISABLED { border-top-color: #98a2b3; }
.integration-card-heading, .diagnostic-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.integration-card-heading h2 { margin: 3px 0 0; }
.integration-card-heading small { color: var(--muted); }
.integration-safe-details { display: grid; gap: 7px; margin: 16px 0; }
.integration-safe-details > div { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 1.2fr); gap: 10px; padding-bottom: 7px; border-bottom: 1px solid #f2f4f7; }
.integration-safe-details dt { color: var(--muted); font-size: 11px; text-transform: capitalize; }
.integration-safe-details dd { margin: 0; overflow-wrap: anywhere; text-align: right; font-size: 12px; font-weight: 650; }
.integration-secret-note { color: var(--success); }
.integration-errors-panel .section-heading select { width: min(260px, 100%); }
.section-tabs { position: sticky; top: 72px; z-index: 18; display: flex; gap: 5px; overflow-x: auto; margin-bottom: 18px; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.97); }
.section-tab { flex: 0 0 auto; padding: 9px 13px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 750; }
.section-tab.active { background: #eef4ff; color: var(--brand-dark); }
.diagnostic-list { display: grid; gap: 12px; }
.diagnostic-card { display: grid; gap: 12px; padding: 16px; border: 1px solid var(--line); border-left: 4px solid #f79009; border-radius: 12px; background: white; }
.dead-letter-card { border-left-color: #7f56d9; }
.diagnostic-heading small { color: var(--muted); font-weight: 700; }
.diagnostic-heading h3 { margin: 3px 0 0; font-size: 16px; }
.diagnostic-count { padding: 4px 8px; border-radius: 999px; background: #fffaeb; color: #b54708; font-size: 11px; font-weight: 800; }
.diagnostic-code { width: fit-content; padding: 6px 9px; border-radius: 8px; background: #f2f4f7; color: #344054; font: 12px ui-monospace, SFMono-Regular, monospace; overflow-wrap: anywhere; }
.diagnostic-definition { max-width: 720px; grid-template-columns: 150px minmax(0, 1fr); }
.diagnostic-definition dd { text-align: left; }
.diagnostic-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.page-error { max-width: 720px; margin: 56px auto; display: grid; justify-items: center; text-align: center; }
.page-error-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; background: #fef3f2; color: var(--danger); font-size: 26px; font-weight: 850; }
.page-error details { width: 100%; margin-top: 14px; text-align: left; }

.privacy-request-card { border-left: 5px solid #84adff; }
.privacy-request-card.due-overdue { border-left-color: #f04438; }
.privacy-request-card.due-warning { border-left-color: #f79009; }
.privacy-card-status { display: flex; flex-wrap: wrap; justify-content: end; gap: 8px; }
.due-badge { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: #eef4ff; color: #3538cd; font-size: 12px; font-weight: 750; }
.due-badge.warning { background: #fffaeb; color: #b54708; }
.due-badge.overdue { background: #fef3f2; color: #b42318; }
.due-badge.done { background: #ecfdf3; color: #067647; }
.privacy-decision { margin-top: 16px; padding: 16px; border-radius: 12px; background: #f8fafc; }
.delivery-callout { margin: 12px 0; padding: 12px 14px; border: 1px solid #b2ccff; border-radius: 10px; background: #eef4ff; }
.delivery-callout p { margin: 5px 0 0; }
.delivery-status { display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 750; }
.delivery-status.PREPARED { background: #fffaeb; color: #b54708; }
.delivery-status.DELIVERED { background: #ecfdf3; color: #067647; }
.next-step-preview { margin: 10px 0 14px; padding: 12px; border: 1px solid #b2ccff; border-radius: 10px; background: #f8faff; }
.next-step-preview p { margin: 5px 0; }
.next-step-preview small { color: var(--muted); }
.deletion-details { display: grid; gap: 18px; max-height: 65vh; overflow: auto; }

.tag-editor { min-width: 0; margin: 0; padding: 9px 10px 10px; border: 1px solid #cbd5e1; border-radius: 10px; background: white; }
.tag-editor:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px #d5e5ff; }
.tag-editor legend { padding: 0 4px; color: var(--muted); font-size: 11px; font-weight: 700; }
.tag-editor-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-editor-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 4px 5px 4px 8px; border-radius: 999px; background: #eef4ff; color: var(--brand-dark); font-size: 12px; font-weight: 700; }
.tag-editor-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-editor-chip button { width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.tag-editor-chip button:hover { background: #d5e5ff; }
.tag-editor input { margin-top: 7px; padding: 5px 2px; border: 0; outline: 0; box-shadow: none; }

.push-wizard { max-width: 1240px; }
.wizard-stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 20px 0 24px; padding: 0; list-style: none; counter-reset: step; }
.wizard-stepper li { position: relative; padding: 12px 10px 12px 36px; border-radius: 10px; background: #f2f4f7; color: var(--muted); font-size: 12px; font-weight: 750; }
.wizard-stepper li.active { background: #eef4ff; color: var(--brand-dark); box-shadow: inset 0 0 0 1px #b2ccff; }
.wizard-stepper li.done { background: #ecfdf3; color: var(--success); }
.wizard-step-panel { min-height: 360px; }
.push-message-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.push-device-preview { position: sticky; top: 94px; padding: 44px 18px 22px; border: 8px solid #101828; border-radius: 34px; background: #f8fafc; box-shadow: 0 18px 50px rgba(16,24,40,.18); }
.push-device-preview::before { content: ""; position: absolute; left: 50%; top: 10px; width: 72px; height: 18px; transform: translateX(-50%); border-radius: 999px; background: #101828; }
.push-device-preview small { color: var(--muted); }
.push-device-preview strong { display: block; margin: 12px 0 6px; overflow-wrap: anywhere; }
.push-device-preview h3 { margin: 11px 0 6px; }
.push-device-preview p { white-space: pre-wrap; overflow-wrap: anywhere; }
.wizard-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.review-warning { padding: 12px 14px; border: 1px solid #fedf89; border-radius: 10px; background: #fffaeb; color: #7a2e0e; }
.campaign-review { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.campaign-review > div { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }

.analytics-filter { display: grid; gap: 14px; }
.analytics-filter .filter-grid { grid-template-columns: repeat(3, minmax(180px, 1fr)); }
.analytics-chart { min-height: 280px; }
.bar-chart { min-height: 230px; display: flex; align-items: end; gap: 7px; overflow-x: auto; padding: 20px 4px 2px; }
.bar-column { min-width: 34px; flex: 1 0 34px; height: 210px; display: grid; grid-template-rows: 18px minmax(0, 1fr) 18px; gap: 4px; align-items: end; text-align: center; }
.bar-value { color: var(--muted); font-size: 10px; }
.bar-svg { display: block; width: 100%; height: 144px; align-self: end; overflow: visible; }
.bar-svg rect { fill: var(--brand); }
.bar-column small { color: var(--muted); font-size: 9px; white-space: nowrap; }

.readiness-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 380px); gap: 24px; align-items: center; }
.readiness-grid { scroll-margin-top: 88px; }
.readiness-summary.has-blockers { border-color: #fecdca; background: #fffafa; }
.readiness-progress-wrap { display: grid; gap: 7px; }
.readiness-progress-wrap small { color: var(--muted); text-align: right; }
.readiness-progress { display: block; width: 100%; height: 14px; overflow: hidden; border-radius: 8px; background: #e4e7ec; }
.readiness-segment { fill: var(--muted); }
.readiness-segment.ready { fill: var(--success); }
.readiness-segment.follow-up { fill: var(--warning); }
.readiness-segment.blocking { fill: var(--danger); }
.operational-alerts > .panel { margin: 12px 0 0; padding: 0; border: 0; box-shadow: none; }
.readiness-filter > summary, .operational-alerts > summary { min-height: 32px; cursor: pointer; font-weight: 700; }
.readiness-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.readiness-grid .panel { margin: 0; }
.readiness-card { border-top: 4px solid #98a2b3; }
.readiness-card-ACTION_REQUIRED { border-top-color: #f04438; }
.readiness-card-PROTOTYPE { border-top-color: #f79009; }
.readiness-card-DEGRADED { border-top-color: #f79009; }
.readiness-card-DISABLED { border-top-color: #f04438; }
.readiness-card-READY { border-top-color: #12b76a; }
.readiness-card-READY_WITH_FOLLOW_UP { border-top-color: #f79009; }
.readiness-card-heading { display: flex; align-items: start; justify-content: space-between; gap: 14px; }
.readiness-card-heading small { color: var(--muted); }
.readiness-card-heading h2 { margin: 4px 0 0; font-size: 18px; }
.readiness-action { min-height: 44px; padding: 11px 12px; border-radius: 10px; background: #fffaeb; color: #7a2e0e; line-height: 1.45; }
.readiness-action.ok { background: #ecfdf3; color: #05603a; }
.readiness-action.follow-up { background: #fffaeb; color: #7a2e0e; }
.readiness-status-ACTION_REQUIRED { background: #fef3f2; color: #b42318; }
.readiness-status-PROTOTYPE { background: #fffaeb; color: #b54708; }
.readiness-status-DEGRADED { background: #fffaeb; color: #b54708; }
.readiness-status-DISABLED { background: #fef3f2; color: #b42318; }
.readiness-status-READY { background: #ecfdf3; color: #067647; }
.readiness-status-READY_WITH_FOLLOW_UP { background: #fffaeb; color: #b54708; }

.audit-integrity.ok { border-color: #abefc6; background: #f6fef9; }
.audit-integrity.warning { border-color: #fedf89; background: #fffcf5; }
.audit-integrity.error { border-color: #fecdca; background: #fffafa; }
.audit-details pre { max-height: 300px; overflow: auto; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.pagination-summary, .pagination-page { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pagination-single { justify-content: flex-start; }
.text-danger { color: var(--danger); }
.test-send-block { display: grid; justify-items: start; gap: 7px; }
.pagination-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.pagination-actions select { width: auto; min-width: 150px; padding: 7px 30px 7px 9px; font-size: 12px; }
.chat-queue .pagination { align-items: stretch; flex-direction: column; gap: 9px; }
.chat-queue .pagination-actions { display: grid; grid-template-columns: 1fr 1fr; }
.chat-queue .pagination-actions select, .chat-queue .pagination-page { grid-column: 1 / -1; width: 100%; text-align: center; }
.chat-queue .pagination-summary { text-align: center; }

@media (max-width: 1400px) and (min-width: 901px) {
  .overview-metrics { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
}

@media (max-width: 1120px) {
  .chat-workspace-three { grid-template-columns: minmax(240px, 280px) minmax(0, 1fr); }
  .integration-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sms-provider-grid { grid-template-columns: 1fr; }
  .filter-grid, .audit-filter-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .sms-history-filter .filter-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); }
  .content-editor-layout { grid-template-columns: 1fr; }
  .content-live-preview { position: static; }
  .content-diff-grid { grid-template-columns: 1fr; }
  .application-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .faq-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .workspace { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; z-index: 70; width: min(320px, calc(100vw - 52px)); height: 100vh; transform: translateX(-102%); transition: transform .2s ease; box-shadow: 20px 0 60px rgba(16,24,40,.28); }
  .sidebar-close { display: grid; place-items: center; }
  .workspace.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-overlay { position: fixed; inset: 0; z-index: 60; width: 100%; padding: 0; border: 0; background: rgba(16,24,40,.55); }
  .sidebar-overlay[hidden] { display: none; }
  .menu-button { display: inline-grid; place-items: center; }
  .account { margin-top: auto; }
  .topbar { top: 0; }
  .overview-metrics { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .toolbar, .split, .chat-tools { grid-template-columns: 1fr; }
  .application-toolbar { grid-template-columns: minmax(0, 1fr) auto; }
  .faq-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .candidate-workspace, .chat-workspace-three { grid-template-columns: 1fr; }
  .candidate-action-rail { position: static; max-height: none; grid-column: auto; }
  .chat-workspace-three.has-selection .chat-queue, .chat-workspace-three:not(.has-selection) > :not(.chat-queue) { display: none; }
  .mobile-chat-back { display: inline-flex; }
  .candidate-action-rail { grid-row: 1; }
  .candidate-tab-body { grid-row: 2; }
  .candidate-summary-grid, .integration-overview-grid { grid-template-columns: 1fr; }
  .candidate-hero { grid-template-columns: 52px minmax(0, 1fr); }
  .candidate-avatar { width: 52px; height: 52px; border-radius: 14px; font-size: 18px; }
  .candidate-hero-actions { grid-column: 1 / -1; justify-content: start; }
  .candidate-mobile-actions { position: sticky; top: 68px; z-index: 19; display: flex; gap: 8px; margin-bottom: 10px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.98); box-shadow: 0 5px 18px rgba(16,40,80,.08); }
  .candidate-mobile-actions .btn { flex: 1 1 auto; }
  .candidate-tabs { top: 126px; scrollbar-width: thin; box-shadow: inset -18px 0 16px -18px rgba(16,24,40,.5), 0 4px 18px rgba(16,40,80,.045); }
  .chat-queue { position: static; max-height: none; }
  .chat-conversation { position: static; height: calc(100dvh - 118px); min-height: 620px; }
  .form-grid, .condition-grid { grid-template-columns: 1fr; }
  .readiness-grid, .readiness-summary { grid-template-columns: 1fr; }
  .push-message-layout { grid-template-columns: 1fr; }
  .push-device-preview { position: static; width: min(340px, 100%); margin-inline: auto; }
  .wizard-stepper { grid-template-columns: repeat(2, 1fr); }
  .col-4, .col-6, .col-8 { grid-column: span 12; }
}

body.nav-open { overflow: hidden; }
.main h1[tabindex="-1"]:focus { outline: none; }

@media (max-width: 560px) {
  .topbar { height: auto; padding: 10px 14px; }
  .global-search { width: 100%; }
  .global-search kbd, .environment-chip { display: none; }
  .topbar-actions { flex: 0 0 auto; }
  .overview-metrics { grid-template-columns: 1fr 1fr; }
  .overview-card { min-height: 82px; padding: 12px; }
  .overview-value { font-size: 24px; }
  .work-item { grid-template-columns: 34px minmax(0, 1fr); }
  .work-item-meta { grid-column: 2; justify-content: space-between; }
  .system-alert { grid-template-columns: 1fr; gap: 4px; }
  .main { padding: 20px 14px 48px; }
  .page-header { display: block; }
  .application-scopes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .application-scopes .filter-chip { padding: 8px 5px; font-size: 12px; }
  .application-scopes .field { margin-left: 0; grid-column: 1 / -1; justify-content: flex-end; }
  .application-filter-toggle { display: block; text-align: left; }
  .application-toolbar:not(.filters-expanded) .application-extra-filters { display: none; }
  .application-extra-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .application-toolbar > .field, .faq-toolbar .field:first-child { grid-column: 1 / -1; }
  .application-toolbar .field:last-child, .faq-toolbar .field:last-child { grid-column: 1 / -1; }
  .chat-ai-summary { grid-template-columns: minmax(0, 1fr); }
  .chat-ai-summary > button { grid-column: 1; grid-row: auto; justify-self: start; margin-top: 8px; }
  .chat-ai-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-ai-sources .toolbar { grid-template-columns: minmax(0, 1fr); }
  .candidate-hero { padding: 16px; }
  .candidate-meta-row { display: grid; gap: 4px; }
  .candidate-meta-row span + span::before { display: none; }
  .candidate-hero-actions .btn { flex: 1 1 auto; }
  .candidate-mobile-actions { top: 60px; }
  .candidate-tabs { top: 118px; }
  .communication-quick-action, .protected-document { align-items: stretch; flex-direction: column; }
  .diagnostic-definition { grid-template-columns: 1fr; }
  .diagnostic-definition dd { text-align: left; }
  .definition { grid-template-columns: 1fr; }
  .definition dd { margin-bottom: 8px; }
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .pagination-actions select, .pagination-page { grid-column: 1 / -1; width: 100%; text-align: center; }
  .filter-grid, .audit-filter-grid, .analytics-filter .filter-grid { grid-template-columns: 1fr; }
  .sms-history-filter .filter-grid { grid-template-columns: 1fr; }
  .wizard-stepper { grid-template-columns: 1fr; }
  .wizard-stepper li:not(.active):not(.done) { display: none; }
  .campaign-review { grid-template-columns: 1fr; }
  .wizard-actions { align-items: stretch; flex-direction: column-reverse; }
  .wizard-actions > .actions { display: grid; }
  .privacy-card-status { justify-content: start; margin-top: 10px; }
  .table-wrap:has(.mobile-card-table) { overflow: visible; }
  .mobile-card-table, .mobile-card-table tbody, .mobile-card-table tr, .mobile-card-table td { display: block; width: 100%; }
  .mobile-card-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .mobile-card-table tbody { display: grid; gap: 12px; }
  .mobile-card-table tbody tr { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: white; }
  .mobile-card-table tbody td { display: grid; grid-template-columns: minmax(92px, .75fr) minmax(0, 1.25fr); gap: 10px; align-items: start; padding: 7px 0; border: 0; border-bottom: 1px solid #f2f4f7; overflow-wrap: anywhere; }
  .mobile-card-table tbody td:last-child { border-bottom: 0; }
  .application-table tbody td:has(input[type="checkbox"]) { width: 100%; }
  .application-table tbody td.application-select-cell:empty { display: none; }
  .application-table .application-row-details { display: none; }
  .application-table tbody td.application-candidate-cell { display: block; }
  .application-table tbody td.application-candidate-cell::before { content: none; }
  .application-mobile-meta { display: block; }
  .application-table tbody td.application-detail-cell { display: none; }
  .application-table tbody td.application-mobile-details { display: block; }
  .application-table tbody td.application-mobile-details::before { content: none; }
  .application-mobile-details summary { padding: 6px 0; cursor: pointer; color: var(--brand); font-weight: 650; }
  .mobile-card-table tbody td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 750; }
  .mobile-card-table .table-empty { display: block; text-align: center; }
  .mobile-card-table .table-empty::before { content: none; }
  .chat-workspace-three.has-selection .chat-queue { display: none; }
  .chat-workspace-three:not(.has-selection) > :not(.chat-queue) { display: none; }
  .mobile-chat-back { display: inline-flex; }
  .chat-conversation { height: calc(100dvh - 86px); min-height: 560px; margin-bottom: 8px; }
  .dialog-overlay { padding: 10px; align-items: end; }
  .dialog-card { max-height: calc(100vh - 20px); padding: 18px; border-radius: 18px 18px 10px 10px; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
}

@media (min-width: 1600px) {
  .chat-workspace-three.has-selection { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr) minmax(240px, 280px); }
  .chat-workspace-three.has-selection .chat-context { position: sticky; top: 90px; display: grid; width: auto; box-shadow: none; }
  .chat-context-close, .chat-context-toggle { display: none; }
}

.panel-disclosure { min-width: 0; }
.panel-disclosure > summary { min-height: 44px; cursor: pointer; font-weight: 700; line-height: 1.4; }
.panel-disclosure > .panel { border: 0; border-radius: 0; box-shadow: none; padding: 12px 0 0; margin: 0; background: transparent; }
.faq-editor-answer { min-height: 280px; line-height: 1.5; }
.faq-ai-settings { padding-block: 16px; border-block: 1px solid var(--line); margin-block: 20px; }
.faq-ai-settings > summary { cursor: pointer; font-size: 18px; font-weight: 700; min-height: 36px; }
.faq-ai-settings h2 { margin-top: 20px; }
.faq-editor .chat-ai-regression { padding: 20px 0; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.faq-editor-actions { position: sticky; bottom: 0; z-index: 19; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); background: var(--surface); }
.faq-editor-actions .draft-status { min-width: 0; margin: 0; }
.faq-editor-actions .actions { flex: 0 0 auto; }
.faq-editor-tools { max-width: 1120px; margin-inline: auto; }
@media (max-width: 560px) {
  .faq-editor-actions { flex-direction: column; align-items: stretch; padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .faq-editor-actions .actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .faq-toolbar ~ div .btn.small { min-height: 44px; }
  .application-extra-filters { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.acquisition-library summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
.acquisition-library .section-heading { margin-top: 24px; }
.acquisition-library-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.acquisition-library-description { display: flex; flex: 1; min-width: min(100%, 240px); flex-direction: column; gap: 5px; overflow-wrap: anywhere; }
.acquisition-library .btn, .acquisition-global-filter .btn { min-height: 44px; }
.acquisition-global-filter .section-heading, .acquisition-library .section-heading { gap: 12px; flex-wrap: wrap; }
.acquisition-comparison-fields { margin-top: 16px; }
.acquisition-comparison-fields[hidden] { display: none; }
.acquisition-highlights ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 16px; }
.acquisition-highlight { padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); overflow-wrap: anywhere; }
.acquisition-highlight p { margin: 8px 0 0; line-height: 1.5; }
.acquisition-daily-average { margin: 8px 0 0; font-size: 13px; line-height: 1.5; }
.acquisition-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.acquisition-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; }
.acquisition-status { flex: 1; min-width: 180px; }
.acquisition-error { margin-top: 16px; }
.acquisition-error p { margin-bottom: 0; color: var(--danger); }
.acquisition-method summary { cursor: pointer; font-weight: 600; }
.acquisition-method p { max-width: 90ch; }
.acquisition-caption { margin: 24px 0 16px; }
.acquisition-results tfoot { font-weight: 700; border-top: 2px solid var(--line); }
.acquisition-results .grid { margin-bottom: 16px; }
.acquisition-comparison-caption { color: var(--brand-dark); }
.acquisition-change { font-size: 13px; line-height: 1.5; font-weight: 650; color: var(--ink); margin: 8px 0 0; }
.acquisition-insight-controls { display: grid; grid-template-columns: minmax(160px, 280px); gap: 16px; }
.acquisition-insight-controls .field { margin: 0; }
.acquisition-scope-hint { font-size: 13px; line-height: 1.5; }
.acquisition-funnel { margin: 24px 0; }
.acquisition-funnel ol { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0; }
.acquisition-funnel-stage { border: 1px solid var(--line); border-radius: var(--radius); background: var(--canvas); padding: 16px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.acquisition-funnel-stage strong { font-size: 28px; color: var(--ink); }
.acquisition-funnel-stage progress { display: block; width: 100%; height: 10px; accent-color: currentColor; }
.acquisition-funnel-stage > span:first-child { font-weight: 700; color: var(--ink); }
.acquisition-funnel-stage .muted, .acquisition-funnel-loss { font-size: 13px; }
.acquisition-funnel-loss { color: var(--muted); }
.acquisition-funnel-summary { font-weight: 700; }
.acquisition-source-comparison { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.acquisition-source-comparison p { display: flex; flex-direction: column; padding: 12px; background: var(--canvas); border-radius: 10px; }
.acquisition-series-installs { color: var(--brand); }
.acquisition-series-started { color: var(--warning); }
.acquisition-series-submitted { color: var(--success); }
.acquisition-legend { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.acquisition-legend-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; border: 1px solid var(--line); background: var(--surface); padding: 9px 12px; border-radius: 10px; font-size: 13px; font-weight: 650; }
.acquisition-legend-button::before { content: ''; width: 20px; border-top: 3px solid currentColor; }
.acquisition-legend-button.acquisition-series-started::before { border-top-style: dashed; }
.acquisition-legend-button.acquisition-series-submitted::before { border-top-style: dotted; }
.acquisition-legend-button[aria-pressed='false'] { color: var(--muted); text-decoration: line-through; background: var(--canvas); }
.acquisition-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.acquisition-chart text { fill: var(--muted); font-size: 12px; }
.acquisition-chart-grid { stroke: var(--line); stroke-width: 1; }
.acquisition-chart-line { fill: none; stroke: currentColor; stroke-width: 2.5; }
.acquisition-chart-line, .acquisition-chart-grid, .acquisition-chart-guide { vector-effect: non-scaling-stroke; }
.acquisition-chart-line.acquisition-series-started { stroke-dasharray: 8 4; }
.acquisition-chart-line.acquisition-series-submitted { stroke-dasharray: 2 4; }
.acquisition-chart-point { fill: currentColor; }
.acquisition-chart-guide { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 4; }
.acquisition-chart input[type='range'] { min-height: 44px; padding: 0; accent-color: var(--brand); }
.acquisition-chart-readout { background: var(--canvas); padding: 12px; border-radius: 10px; min-height: 46px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.acquisition-chart-data summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 650; }
.acquisition-tree-label { display: flex; flex-direction: column; gap: 3px; max-width: 340px; overflow-wrap: anywhere; }
.acquisition-tree-kind { color: var(--muted); font-size: 11px; font-weight: 500; }
.acquisition-level-1 { padding-left: 20px; }
.acquisition-level-2 { padding-left: 40px; }
.acquisition-tree-toggle { display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--ink); font-weight: 650; padding: 4px 0; min-height: 44px; text-align: left; line-height: 1.4; }
.acquisition-chevron { font-size: 24px; min-width: 12px; line-height: 1; }
.acquisition-tree-toggle[aria-expanded='true'] .acquisition-chevron { transform: rotate(90deg); }
.acquisition-tree-leaf { padding: 10px 0; }
.acquisition-tree-row-1 { background: var(--canvas); }
.acquisition-tree-row-2 { background: var(--surface); }
.acquisition-tree-footer { margin-top: 16px; }
.acquisition-step-count { display: flex; flex-direction: column; gap: 4px; font-variant-numeric: tabular-nums; }
.acquisition-step-count small { white-space: normal; }
.acquisition-step-diagnostics { display: flex; flex-wrap: wrap; gap: 12px 24px; margin-top: 16px; }
.acquisition-detailed-funnel td { vertical-align: top; }
.acquisition-results .acquisition-detailed-funnel .table-wrap { max-height: none; }
@media (max-width: 760px) {
  .acquisition-insight-controls, .acquisition-funnel ol, .acquisition-source-comparison { grid-template-columns: minmax(0, 1fr); }
  .acquisition-level-1 { padding-left: 8px; }
  .acquisition-level-2 { padding-left: 16px; }
  .acquisition-tree-label { max-width: 100%; }
  .acquisition-tree .section-heading { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
}
@media (min-width: 561px) {
  .acquisition-results .table-wrap { max-height: 65vh; overflow: auto; }
  .acquisition-results thead { position: sticky; top: 0; background: var(--surface, #fff); z-index: 1; }
}
@media (max-width: 560px) {
  .acquisition-chart text { font-size: 28px; }
  .acquisition-results tfoot { display: block; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; }
  .acquisition-results tfoot th { display: block; width: 100%; padding: 7px 0; }
  .acquisition-results tfoot td { display: grid; grid-template-columns: minmax(92px, .75fr) minmax(0, 1.25fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid #f2f4f7; }
  .acquisition-results tfoot td::before { content: attr(data-label); color: var(--muted); font-size: 11px; }
  .acquisition-results tfoot td:empty { display: none; }
}

.push-proposal-card { overflow-wrap: anywhere; }
.push-proposal-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.push-proposal-card .actions { margin-top: 18px; }
.push-proposal-evidence { margin: 18px 0; }
.push-proposal-evidence summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.push-proposal-evidence blockquote { margin: 12px 0; padding: 12px 16px; border-left: 3px solid var(--line); white-space: pre-wrap; }

/* Scenario v3: numeric exclusion reasons stay readable in a narrow editor. */
.push-audience-diagnostics { margin-block: 1rem; }
.push-audience-reasons { margin-block: .5rem 1rem; }
.push-audience-reasons > div { display: flex; justify-content: space-between; gap: 1rem; padding-block: .35rem; }
.push-audience-reasons dt { overflow-wrap: anywhere; }
.push-audience-reasons dd { margin: 0; font-variant-numeric: tabular-nums; flex-shrink: 0; }
.push-scenario-preview .push-device-preview { position: relative; top: auto; max-width: 100%; margin-block: 1rem; }
.push-scenario-preview blockquote { margin-inline: 0; overflow-wrap: anywhere; }

.chat-ai-answer-text { white-space: pre-wrap; max-width: 72ch; overflow-wrap: anywhere; }
.chat-ai-dialog .actions { flex-wrap: wrap; }
.chat-ai-history th, .chat-ai-history td { font-variant-numeric: tabular-nums; }
.chat-ai-history .table-wrap:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* SMS uses the existing administrative workspace typography and surface tokens. */
.sms-template-layout { display: grid; grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); gap: 20px; align-items: start; }
.sms-template-list { display: grid; gap: 8px; }
.sms-template-choice { display: grid; gap: 6px; text-align: left; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); padding: 16px; color: var(--ink); }
.sms-template-choice.active { border-color: var(--brand); }
.sms-template-choice span, .sms-template-choice small { font-size: 13px; }
.sms-draft-label { color: var(--warning); }
.sms-template-editor { min-width: 0; margin: 0; }
.sms-template-form { display: grid; gap: 16px; }
.sms-template-form > .section-heading, .sms-template-form > p { margin: 0; }
.sms-template-form textarea { resize: vertical; min-height: 120px; }
.sms-template-preview { padding: 18px; background: var(--canvas); border: 1px solid var(--line); border-radius: 10px; }
.sms-template-preview h3 { margin-top: 0; font-size: 15px; }
.sms-message-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0; }
.sms-preview-body { font-size: 17px; line-height: 1.5; }
.sms-template-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.sms-versions { border-top: 1px solid var(--line); padding-top: 16px; }
.sms-versions summary { cursor: pointer; font-weight: 650; }
.sms-version { display: grid; gap: 6px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.sms-version .text-button { justify-self: start; text-align: left; }
.sms-history-message { min-width: 220px; max-width: 360px; }
.sms-delivery-result { display: grid; gap: 8px; }
.sms-delivery-result > .status { justify-self: start; }
.sms-delivery-result > p { margin: 0; }
@media (max-width: 900px) {
  .sms-template-layout { grid-template-columns: minmax(0, 1fr); }
  .sms-template-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .sms-template-list { grid-template-columns: minmax(0, 1fr); }
  .sms-template-actions .btn { width: 100%; }
}

.sms-template-form > .section-heading .status { flex-shrink: 0; white-space: nowrap; }
.sms-history-filter { min-width: 0; }
.sms-history-filter > * { min-width: 0; }
.sms-history-filter .filter-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.candidate-workspace:has(#candidate-panel-sms:not([hidden])) { grid-template-columns: minmax(0, 1fr); }
.candidate-workspace:has(#candidate-panel-sms:not([hidden])) > .candidate-action-rail,
.main:has(#candidate-panel-sms:not([hidden])) > .candidate-mobile-actions { display: none; }

.chat-ai-scenarios { margin-top: 20px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.chat-ai-scenarios summary, .chat-ai-decision summary { cursor: pointer; }
.chat-ai-scenarios .list-item > small { display: block; margin-block: 4px 8px; color: var(--muted); }
.chat-ai-scenarios fieldset { min-width: 0; margin-block: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.chat-ai-scenarios input, .chat-ai-scenarios textarea, .chat-ai-scenarios select { max-width: 100%; }
.chat-ai-decision { margin-block: 12px; overflow-wrap: anywhere; }
/* Persistent operational workflows share the existing panel and form scale. */
.workflow-summary { margin-block: 16px; padding-block: 12px; border-block: 1px solid var(--line); }
.workflow-list { display: grid; gap: 16px; }
.workflow-card { padding-block: 16px; border-top: 1px solid var(--line); min-width: 0; }
.workflow-card-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.workflow-card-heading h3 { margin: 0; overflow-wrap: anywhere; }
.workflow-card details { margin-block: 12px; }
.workflow-card summary { cursor: pointer; }
.workflow-comparison { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
.workflow-comparison > div { min-width: 0; }
.preserve-lines { white-space: pre-wrap; overflow-wrap: anywhere; }
.sample-notice, .manual-followup-notice { border-left: 3px solid currentColor; padding: 10px 14px; }
@media (max-width: 640px) { .workflow-comparison { grid-template-columns: minmax(0,1fr); } }

/* Reviewed FAQ instructions and versioned quality checks. */
.chat-ai-materials, .chat-ai-handoff-review { margin-block: 16px; min-width: 0; }
.chat-ai-materials summary, .chat-ai-handoff-review summary { cursor: pointer; font-weight: 600; }
.chat-ai-materials fieldset { min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-block: 12px; }
.chat-ai-state-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; }
.chat-ai-state-choice { display: flex; align-items: center; gap: 8px; min-height: 36px; margin: 0; cursor: pointer; }
.chat-ai-state-choice input[type="checkbox"] { width: 18px; height: 18px; margin: 0; flex: 0 0 18px; }
.chat-ai-state-choice span { overflow-wrap: anywhere; }
.chat-ai-step-editor { display: grid; gap: 8px; }
.chat-ai-step-editor fieldset { margin: 0; }
.chat-ai-batch { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 20px; }
.chat-ai-batch .actions, .chat-ai-handoff-review .actions { flex-wrap: wrap; }
.chat-ai-batch .list-item { margin-block: 12px; overflow-wrap: anywhere; }
.chat-ai-quality .toolbar { flex-wrap: wrap; }
.chat-ai-quality .toolbar .field { flex: 1 1 200px; min-width: 0; }
.chat-ai-quality caption { text-align: left; font-weight: 600; padding-block: 12px; }
@media (max-width: 900px) { .chat-ai-state-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) { .chat-ai-state-grid { grid-template-columns: minmax(0, 1fr); } }
