[data-assistance-target][hidden] { display: none !important; }
:root {
  color-scheme: light;
  --ink: #17313a; --muted: #6d7f82; --paper: #f5f1e8; --white: #fffdf8;
  --teal: #166a67; --teal-soft: #d9ece8; --coral: #e56b4d; --line: #d9ded9; --warn: #fff0cf;
  --shadow: 0 18px 55px rgba(25,48,52,.10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: radial-gradient(circle at 8% 8%,#dcebe3 0,transparent 28%),var(--paper); min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 18px; }
h2 { font: 600 clamp(30px,4vw,56px)/1.04 Georgia,serif; letter-spacing: -.03em; }
h3 { font: 600 24px/1.1 Georgia,serif; }
.shell { min-height: 100vh; }
.topbar { min-height: 84px; display: flex; align-items: center; gap: 13px; padding: 12px clamp(24px,5vw,72px); border-bottom: 1px solid rgba(23,49,58,.12); background: rgba(255,253,248,.82); backdrop-filter: blur(14px); }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--ink); color: #fff; font: 25px Georgia,serif; }
.eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; }
.coral { color: var(--coral); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.app-nav { margin-left: 26px; display: flex; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.nav-button { border: 0; border-radius: 8px; padding: 8px 12px; background: transparent; color: var(--muted); font-weight: 800; }
.nav-button.active { background: var(--teal-soft); color: var(--teal); }
.language-control { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.language-control select { width: auto; padding: 8px 30px 8px 10px; background: var(--white); }
.top-status { font-size: 13px; font-weight: 700; color: var(--teal); display: flex; gap: 8px; align-items: center; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 4px rgba(229,107,77,.15); }
.startup-layout { min-height: calc(100vh - 84px); display: grid; place-items: center; padding: 40px 20px; }
.startup-card { display: flex; align-items: center; gap: 14px; color: var(--muted); font-weight: 700; }
.startup-spinner { width: 24px; height: 24px; border: 3px solid rgba(22,106,103,.18); border-top-color: var(--teal); border-radius: 50%; animation: startup-spin .8s linear infinite; }
@keyframes startup-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .startup-spinner { animation: none; border-color: var(--teal); } }
.login-layout { width: min(1160px,calc(100% - 40px)); margin: 9vh auto; display: grid; grid-template-columns: 1.35fr .75fr; gap: 28px; }
.hero-card, .login-card { border: 1px solid rgba(23,49,58,.12); border-radius: 28px; box-shadow: var(--shadow); }
.hero-card { min-height: 520px; padding: clamp(38px,6vw,76px); background: linear-gradient(145deg,#17313a,#166a67); color: #fff; display: flex; flex-direction: column; justify-content: center; gap: 25px; position: relative; overflow: hidden; }
.hero-logo { display: block; width: clamp(200px,22vw,240px); height: auto; max-width: 100%; object-fit: contain; background: #fff; box-shadow: 0 16px 40px rgba(0,0,0,.18); position: relative; z-index: 1; }
.hero-card::after { content: ""; position: absolute; width: 290px; height: 290px; border: 46px solid rgba(255,255,255,.06); border-radius: 50%; right: -115px; bottom: -110px; }
.hero-copy { max-width: 620px; color: #cfe0dc; font-size: 18px; line-height: 1.65; }
.guardrails { display: flex; flex-wrap: wrap; gap: 8px; }
.guardrails span { border-radius: 999px; padding: 8px 11px; background: rgba(255,255,255,.1); font-size: 12px; font-weight: 700; }
.login-card { background: var(--white); padding: 38px; display: flex; flex-direction: column; justify-content: center; gap: 20px; }
.login-card h2 { font-size: 34px; }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 800; }
input, select, textarea { width: 100%; border: 1px solid var(--line); padding: 13px 14px; border-radius: 12px; background: #fff; color: var(--ink); }
.primary, .ghost, .action { border: 0; border-radius: 12px; padding: 13px 16px; font-weight: 800; }
.primary { background: var(--coral); color: #fff; box-shadow: 0 8px 20px rgba(229,107,77,.24); }
.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
button:disabled { opacity: .45; cursor: not-allowed; }
.fine-print, .error, .local-note { color: var(--muted); font-size: 12px; line-height: 1.45; }
.error { color: #ad3926; min-height: 18px; }
.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; }
.session-expiry-notice { width: min(1160px,calc(100% - 40px)); margin: 20px auto; padding: 18px; border: 2px solid #ad3926; border-radius: 16px; background: #fff0cf; color: #692417; line-height: 1.5; overflow-wrap: anywhere; }
.session-expiry-notice h2 { margin-bottom: 8px; font: 800 20px/1.3 ui-sans-serif,system-ui,sans-serif; letter-spacing: normal; }
.session-expiry-notice a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; color: #692417; font-weight: 800; text-decoration: underline; }
.session-expiry-notice a:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.snapshot-warning { margin: 0 16px 12px; padding: 10px 12px; border: 1px solid #ad3926; border-radius: 10px; background: #fff0cf; color: #692417; font-size: 13px; font-weight: 800; line-height: 1.5; overflow-wrap: anywhere; }
.error-dialog { width: min(440px,calc(100% - 32px)); max-width: none; padding: 0; border: 0; border-radius: 22px; color: var(--ink); background: var(--white); box-shadow: 0 24px 70px rgba(23,49,58,.28); }
.error-dialog::backdrop { background: rgba(15,34,40,.58); backdrop-filter: blur(3px); }
.error-dialog-card { display: grid; gap: 16px; padding: clamp(26px,6vw,38px); }
.error-dialog-card h2 { font-size: clamp(28px,7vw,38px); }
.error-dialog-card > p:last-of-type { color: var(--muted); font-size: 16px; line-height: 1.55; }
.error-dialog-card form { display: flex; justify-content: flex-end; }
.error-dialog-card button { min-width: 110px; min-height: 44px; }
.error-dialog-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: #fff0eb; color: #ad3926; font-size: 26px; font-weight: 900; }
.hidden { display: none !important; }
.dashboard { width: min(1440px,calc(100% - 40px)); margin: 28px auto 52px; }
.warning-strip { background: var(--warn); border: 1px solid #e8cf93; border-radius: 14px; padding: 12px 16px; font-size: 13px; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: end; margin: 30px 0 22px; }
.dashboard-heading h2 { font-size: 38px; }
.metrics { display: grid; grid-template-columns: repeat(3,1fr) 1.7fr; gap: 14px; }
.metrics article { background: var(--white); border: 1px solid var(--line); border-radius: 17px; padding: 18px 20px; display: grid; gap: 5px; }
.metrics span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.metrics strong { font-size: 28px; }
.connector-card strong { color: var(--coral); font-size: 15px; }
.connector-card small { color: var(--muted); }
.accounts-section { margin-top: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 18px; box-shadow: var(--shadow); }
.accounts-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.accounts-heading h3 { margin-top: 4px; }
.account-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 12px; }
.account-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #fbfcf9; }
.account-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.account-card-head div { display: grid; gap: 4px; }
.account-card-head small { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.connection-badge { padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.connection-badge.online { color: var(--teal); background: var(--teal-soft); }
.connection-badge.offline { color: #a13b28; background: #fde5df; }
.account-card dl { margin: 12px 0 0; display: grid; gap: 7px; }
.account-card dl div { display: flex; justify-content: space-between; gap: 12px; }
.account-card dt { color: var(--muted); font-size: 11px; }
.account-card dd { margin: 0; font-size: 11px; font-weight: 800; text-align: right; }
.workspace { margin-top: 18px; min-height: 560px; display: grid; grid-template-columns: minmax(320px,.85fr) minmax(450px,1.45fr); background: var(--white); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); }
.queue-panel { border-right: 1px solid var(--line); container-type: inline-size; }
.panel-title { padding: 22px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.count-pill { background: var(--teal-soft); color: var(--teal); border-radius: 999px; padding: 6px 10px; font-size: 12px; font-weight: 800; }
.queue-tools { margin: 14px 16px 16px; padding: 14px; display: grid; gap: 12px; border: 1px solid #c9ded8; border-radius: 16px; background: linear-gradient(145deg,#f4faf7,#edf6f2); box-shadow: 0 8px 22px rgba(23,49,58,.06); }
.queue-tools label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 800; }
.queue-field-label { line-height: 1.35; overflow-wrap: anywhere; }
.queue-search-input { position: relative; display: block; min-width: 0; }
.queue-search-icon { position: absolute; z-index: 1; left: 13px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none; stroke: var(--teal); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.queue-tools input, .queue-tools select { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #c8d5d1; border-radius: 11px; background: var(--white); color: var(--ink); padding: 10px 12px; font: inherit; font-size: 13px; line-height: 1.3; }
.queue-tools input { padding-left: 40px; }
.queue-tools select { padding-right: 34px; }
.queue-tools input:focus, .queue-tools select:focus { outline: 3px solid rgba(23,107,92,.18); border-color: var(--teal); }
.queue-filter-row { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.queue-tools-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.queue-clear { flex: 0 0 auto; border: 0; padding: 4px 0; background: transparent; color: var(--teal); font: inherit; font-size: 12px; font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.queue-clear:focus-visible { outline: 3px solid rgba(23,107,92,.18); outline-offset: 4px; }
.queue-scope { color: var(--muted); font-size: 11px; line-height: 1.4; }
.queue-empty { padding: 34px 22px; text-align: center; color: var(--muted); line-height: 1.5; }
.conversation-item { width: 100%; text-align: left; padding: 18px 22px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); display: grid; gap: 8px; }
.conversation-item:hover, .conversation-item.active { background: #edf5f1; }
.conversation-top { display: flex; justify-content: space-between; gap: 12px; }
.conversation-top strong { font-size: 14px; }
.conversation-item p { color: var(--muted); font-size: 13px; line-height: 1.45; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { font-size: 10px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; color: var(--coral); }
.status.claimed { color: var(--teal); }
.status.resolved_local_only { color: var(--muted); }
.detail-panel { padding: 28px; }
.empty-state { min-height: 480px; display: grid; place-content: center; text-align: center; gap: 10px; color: var(--muted); }
.empty-icon { margin: auto; width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: var(--teal-soft); color: var(--teal); font-size: 23px; }
.detail-head { display: flex; justify-content: space-between; gap: 20px; align-items: start; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.detail-head h3 { margin-top: 6px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.info-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 6px; }
.info-box span { font-size: 10px; letter-spacing: .1em; color: var(--muted); font-weight: 900; }
.info-box strong { font-size: 13px; }
.reason-box { background: #fff8e9; border-left: 4px solid var(--coral); border-radius: 8px 14px 14px 8px; padding: 16px; margin-bottom: 18px; }
.reason-box strong { display: block; font-size: 12px; margin-bottom: 6px; }
.reason-box p, .message p { line-height: 1.55; font-size: 14px; }
.workflow-card, .knowledge-card { background: #fbfcf9; border-left-color: var(--teal); }
.workflow-card > label { display: grid; gap: 6px; margin: 10px 0; color: var(--muted); font-size: 11px; font-weight: 800; }
.workflow-card input, .workflow-card select { width: 100%; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 9px; }
.workflow-card select:disabled, .workflow-card input:disabled { background: #eef1ed; color: var(--muted); }
.knowledge-card .audit-entry { background: var(--teal-soft); }
.message { background: #f0f5f3; border-radius: 16px 16px 16px 4px; padding: 16px; margin: 12px 0 20px; max-width: 80%; }
.message small { display: block; color: var(--muted); margin-bottom: 5px; }
.composer { border: 1px solid var(--line); border-radius: 16px; padding: 16px; background: #fbfcf9; margin: 16px 0; }
.composer textarea { resize: vertical; margin: 8px 0 10px; line-height: 1.5; }
.composer textarea:focus { outline: 3px solid rgba(22,106,103,.13); border-color: var(--teal); }
.composer textarea:disabled { background: #eef1ed; color: var(--muted); }
.composer-tools { display: flex; gap: 8px; margin: 0 0 10px; }
.compact { padding: 8px 10px; font-size: 12px; }
.upload-label { display: inline-flex; align-items: center; width: auto; cursor: pointer; }
.upload-label input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.emoji-picker { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; margin-bottom: 10px; }
.emoji-picker button { border: 0; background: var(--paper); border-radius: 8px; padding: 7px 9px; font-size: 19px; }
.attachment-preview { display: grid; grid-template-columns: 64px 1fr auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; }
.attachment-preview img { width: 64px; height: 52px; object-fit: cover; border-radius: 8px; }
.attachment-preview div { display: grid; gap: 4px; min-width: 0; }
.attachment-preview strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.attachment-preview small { color: var(--muted); }
.simulate { width: 100%; }
.account-blocker { margin-top: 10px; padding: 10px 12px; border-left: 4px solid var(--coral); border-radius: 7px; background: #fff0eb; color: #873321; font-weight: 800; line-height: 1.45; }
.audit { margin: 18px 0; }
.audit-entry { border-left: 4px solid var(--teal); background: var(--teal-soft); border-radius: 8px 14px 14px 8px; padding: 14px; margin-top: 9px; }
.audit-entry p { font-size: 14px; line-height: 1.5; }
.audit-entry small { display: block; color: var(--teal); font-weight: 800; margin-top: 7px; }
.audit-entry img { display: block; max-width: min(320px,100%); max-height: 220px; object-fit: contain; border-radius: 10px; margin: 8px 0; background: #fff; }
.audit-entry > strong { display: block; font-size: 11px; }
.action-feedback { padding: 11px 13px; border-radius: 10px; margin: 12px 0; }
.action-feedback.success { background: #dff1df; color: #25643a; }
.action-feedback.error { background: #fde5df; color: #9f321f; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.action { background: var(--teal); color: #fff; }
.action.secondary { background: var(--ink); }
.workflow-summary { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 12px; }
.workflow-summary div { display: grid; gap: 5px; padding: 13px; background: var(--teal-soft); border-radius: 12px; }
.workflow-summary span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.workflow-summary strong { line-height: 1.4; }
.workflow-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.workflow-technical { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }
.workflow-technical summary { cursor: pointer; color: var(--muted); font-weight: 800; }
.workflow-technical[open] summary { margin-bottom: 10px; }
.conversation-history { margin: 18px 0; }
.conversation-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.conversation-history-head span { min-width: 30px; padding: 5px 9px; border-radius: 999px; background: var(--paper); color: var(--muted); font-size: 12px; font-weight: 800; text-align: center; }
.message-timeline { display: grid; gap: 10px; margin: 12px 0; }
.timeline-message { width: min(82%,620px); padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px 16px 16px 5px; background: var(--white); }
.timeline-message.support { justify-self: end; border-radius: 16px 16px 5px 16px; background: var(--teal-soft); }
.timeline-message.simulated-fixture { border-style: dashed; }
.timeline-message > div { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.timeline-message > div strong { color: var(--ink); }
.timeline-message p { margin-top: 7px; white-space: pre-wrap; line-height: 1.5; }
.message-delivery { display: block; margin-top: 8px; font-size: 11px; font-weight: 700; }
.message-delivery.delivered { color: #176f62; }
.message-delivery.pending { color: #93631a; }
.message-delivery.failed { color: #9f321f; }
.message-technical { margin-top: 8px; font-size: 11px; color: var(--muted); }
.message-technical summary { cursor: pointer; }
.message-technical dl { display: grid; gap: 5px; margin-top: 7px; }
.message-technical dl div { display: grid; grid-template-columns: minmax(110px,auto) 1fr; gap: 8px; }
.message-technical dd { margin: 0; overflow-wrap: anywhere; color: var(--ink); }
.message-attachments { margin: 9px 0 0; padding-left: 18px; color: var(--muted); font-size: 12px; }
.media-thumbnail { display: grid; gap: 6px; width: min(220px,100%); margin-top: 9px; padding: 0; border: 0; background: transparent; color: var(--muted); text-align: left; cursor: zoom-in; }
.media-thumbnail img { display: block; width: 100%; max-height: 150px; object-fit: cover; border: 1px solid var(--line); border-radius: 10px; background: var(--paper); }
.media-thumbnail span { font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
.delivery-failed { color: #9f321f !important; }
.retry-delivery { margin-top: 8px; }
.media-dialog { width: min(620px,calc(100% - 28px)); border: 0; border-radius: 18px; padding: 0; box-shadow: 0 24px 70px rgba(24,34,31,.28); }
.media-dialog::backdrop { background: rgba(24,34,31,.64); }
.media-dialog-card { padding: 24px; display: grid; gap: 14px; background: var(--white); }
.media-dialog-card > img { width: 100%; max-height: 65vh; object-fit: contain; border-radius: 12px; background: var(--paper); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.media-viewer-card form { justify-self: end; }
.fixture-note { margin-top: 10px; padding: 9px 11px; border: 1px dashed var(--coral); border-radius: 10px; background: #fff6f2; color: #873321; font-size: 12px; font-weight: 800; }
.context-status { margin: 8px 0 12px; padding: 9px 11px; border-left: 3px solid var(--coral); background: #fff8f4; color: #713527; font-size: 12px; line-height: 1.45; }
.local-note { margin-top: 10px; }
.settings-intro { color: var(--muted); max-width: 760px; line-height: 1.6; margin-top: -10px; }
.channel-settings-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(340px,1fr)); gap: 16px; margin-top: 22px; }
.settings-card { background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
.settings-card-head { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.settings-card-head h3 { margin-top: 5px; font-size: 21px; }
.settings-card dl { margin: 18px 0; display: grid; gap: 9px; }
.settings-card dl div { display: flex; justify-content: space-between; gap: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.settings-card dt { color: var(--muted); font-size: 12px; }
.settings-card dd { margin: 0; text-align: right; font-size: 12px; font-weight: 800; max-width: 60%; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-actions button { padding: 9px 11px; font-size: 12px; }
.provider-note { color: var(--muted); font-size: 13px; line-height: 1.5; padding: 12px; background: var(--paper); border-radius: 10px; }
@media (max-width: 900px) { .login-layout, .workspace { grid-template-columns: 1fr; } .hero-card { min-height: 400px; } .metrics { grid-template-columns: 1fr 1fr; } .queue-panel { border-right: 0; border-bottom: 1px solid var(--line); } }
@media (max-width: 900px) { .app-nav { order: 3; margin-left: 0; } .topbar { flex-wrap: wrap; } }
@media (max-width: 700px) { .top-status { display: none; } .header-actions { gap: 8px; } }
@media (max-width: 580px) { .language-control span { display: none; } .login-layout, .dashboard { width: calc(100% - 24px); margin-top: 20px; } .metrics, .detail-grid, .workflow-summary { grid-template-columns: 1fr; } .timeline-message { width: 92%; } .dashboard-heading { align-items: center; } .dashboard-heading h2 { font-size: 30px; } }
@container (max-width: 420px) { .queue-filter-row { grid-template-columns: 1fr; } .queue-tools-footer { align-items: flex-start; flex-direction: column; } }
/* Scoped source pointers and versions must remain readable on narrow screens. */
.final-reply-check, .mode-knowledge { min-width: 0; overflow-wrap: anywhere; }
.final-reply-check ul { padding-inline-start: 1.25rem; }
.final-reply-check a { overflow-wrap: anywhere; }
.overview-summary { padding: 20px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; }
.scope-note { color: var(--muted); line-height: 1.6; margin-bottom: 18px; }
.overview-task { display: block; text-align: left; margin: 12px 0; width: 100%; }
.loaded-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); gap: 10px; margin: 15px 0; }
.loaded-metrics article { display: grid; gap: 6px; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.loaded-metrics span { color: var(--muted); font-size: 12px; }
.loaded-metrics strong { font-size: 24px; }
.overview-accounts { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.overview-accounts p { margin: 10px 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.workforce-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin: 20px 0; }
.workforce-grid form { display: grid; gap: 12px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.workforce-grid label, .scope-options label { display: block; font-size: 13px; line-height: 1.8; }
.workforce-grid input:not([type="checkbox"]), .workforce-grid select { display: block; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px; }
.workforce-grid fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.workforce-grid input[type="checkbox"], .scope-options input { width: auto; margin-right: 7px; }
.collaboration-bar, .order-context { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); overflow-wrap: anywhere; }
.collaboration-bar > div:first-child { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.collaboration-bar p, .order-context p { font-size: 12px; line-height: 1.5; margin: 8px 0; }
.collaboration-bar form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 12px; }
.collaboration-bar label { display: grid; gap: 5px; font-size: 12px; }
.collaboration-bar select, #queue-pool { max-width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.order-context pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }
.conversation-evidence { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 18px; }
.conversation-evidence summary { font-weight: 700; cursor: pointer; }
.conversation-evidence .detail-grid { margin-top: 15px; }
.final-reply-check h4 { margin-bottom: 8px; }
@media (max-width: 850px) { .workforce-grid { grid-template-columns: 1fr; } .app-nav { overflow-x: auto; max-width: 100%; } .nav-button { white-space: nowrap; } }
/* Inbox keeps messages and the human composer ahead of optional administration. */
.inbox-layout { margin-top: 12px; }
.inbox-layout > .warning-strip { display: none; }
.inbox-layout > .dashboard-heading { margin: 12px 0; align-items: center; }
.inbox-layout > .dashboard-heading > div { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: baseline; }
.inbox-layout > .dashboard-heading h2 { font: 700 22px/1.25 Inter,ui-sans-serif,system-ui,sans-serif; letter-spacing: 0; }
.inbox-layout > .dashboard-heading .eyebrow { font-size: 10px; }
.inbox-layout .workspace { margin-top: 8px; }
.inbox-layout .detail-panel { padding: 18px; }
.inbox-layout .detail-head { padding-bottom: 10px; }
.inbox-layout .collaboration-bar { padding: 10px 12px; margin: 10px 0; }
.inbox-layout .collaboration-bar .settings-actions { gap: 6px; }
.inbox-layout .collaboration-bar .settings-actions button { padding: 7px 9px; font-size: 11px; }
.inbox-layout .collaboration-bar p { margin: 5px 0; font-size: 11px; }
.supervisor-transfer { margin-top: 7px; font-size: 11px; }
.supervisor-transfer summary, .source-details summary { cursor: pointer; color: var(--muted); font-weight: 700; }
.supervisor-transfer form { padding-top: 6px; }
.inbox-layout .order-context { padding: 8px 10px; margin: 8px 0; }
.source-overview { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 10px; font-size: 11px; line-height: 1.5; }
.source-overview > span { flex: 1 1 260px; }
.source-overview .settings-actions { gap: 5px; }
.source-overview .settings-actions button { padding: 6px 8px; font-size: 11px; }
.source-details { font-size: 10px; margin-top: 4px; }
[data-order-result]:not(:empty) { margin-top: 6px; font-size: 12px; line-height: 1.4; }
.inbox-layout .conversation-history { margin: 12px 0; }
.inbox-layout .conversation-history-head h4 { margin: 0; }
.inbox-layout .composer { padding: 12px; margin-top: 12px; }
.inbox-layout .composer > .provider-note { padding: 7px 9px; font-size: 11px; margin-bottom: 8px; }
.inbox-layout .composer textarea { min-height: 108px; }

/* Owner remediation: compact role-scoped administration and operator controls. */
.pool-tabs { display:flex; gap:4px; width:100%; margin-top:5px; }
.pool-tabs button { flex:1 1 0; min-width:0; min-height:46px; padding:7px 5px; border:1px solid var(--line); border-radius:8px; background:var(--paper); color:var(--ink); font-size:11px; line-height:1.25; overflow-wrap:anywhere; cursor:pointer; }
.pool-tabs button.selected,.record-tabs button.selected { background:#d8ece6; color:#135d5c; border-color:#267e77; box-shadow:inset 0 -3px #267e77; font-weight:800; }
.record-tabs { display:flex; flex-wrap:wrap; gap:8px; margin:16px 0; }
.record-table-wrap { overflow-x:auto; max-width:100%; }
.record-table { width:100%; border-collapse:collapse; font-size:13px; }
.record-table th,.record-table td { padding:12px 9px; border-bottom:1px solid var(--line); text-align:left; vertical-align:top; overflow-wrap:anywhere; }
.record-table td:last-child { min-width:170px; }
.record-editor { width:min(650px,calc(100vw - 28px)); max-height:88vh; border:1px solid var(--line); border-radius:14px; padding:22px; background:var(--paper); color:var(--ink); overflow-y:auto; }
.record-editor::backdrop { background:rgba(10,35,40,.38); }
.record-editor form { display:grid; gap:14px; margin:14px 0; }
.record-editor label { display:block; font-size:13px; line-height:1.6; }
.record-editor input:not([type="checkbox"]),.record-editor select { display:block; width:100%; border:1px solid var(--line); padding:9px; border-radius:7px; }
.record-editor input[readonly] { background:#ecefea; }
.record-editor fieldset { border:1px solid var(--line); border-radius:8px; padding:12px; }
.record-editor p { font-size:12px; line-height:1.5; }
.stage-summary { display:grid; grid-template-columns:1.2fr .7fr 1fr 1fr; gap:14px; margin-bottom:10px; }
.stage-summary span,.stage-summary small { display:block; color:var(--muted); font-size:11px; }
.stage-summary strong { display:block; margin:5px 0; font-size:14px; overflow-wrap:anywhere; }
.mode-configuration>summary,.connection-details>summary { cursor:pointer; font-weight:700; padding:10px 0; color:#1b6664; }
.mode-configuration[open] { border-top:1px solid var(--line); padding-top:10px; }
.connection-details { margin-top:16px; border:1px solid var(--line); border-radius:10px; padding:10px 14px; }
.final-reply-check p { font-size:12px; line-height:1.5; margin:7px 0; }
.final-reply-check [data-final-check-status] { font-weight:800; font-size:14px; }
.final-reply-check details { margin-top:10px; }
.final-reply-check details summary { cursor:pointer; color:var(--muted); font-weight:600; }
#send-confirm-dialog { width:min(520px,calc(100vw - 24px)); max-height:88vh; }
#send-confirm-dialog .media-dialog-card { padding:20px; }
#send-confirm-image { max-height:30vh; object-fit:contain; }
.header-actions #logout { white-space:nowrap; }
@media(max-width:850px){.stage-summary{grid-template-columns:1fr 1fr;gap:8px}.record-table{min-width:620px}.record-tabs{gap:5px}.record-tabs button{font-size:11px;padding:8px}.header-actions{flex-wrap:wrap}.pool-tabs button{font-size:10px}.record-editor{padding:15px}}
.settings-actions[data-complete-assistance]{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:8px;max-width:100%;margin:10px 0}
.settings-actions[data-complete-assistance] label{min-width:0;max-width:100%;font-size:12px}
.settings-actions[data-complete-assistance] select{min-width:0;max-width:100%;text-overflow:ellipsis}
.settings-actions[data-complete-assistance] p{grid-column:1/-1;font-size:11px;line-height:1.35;margin:0}
#unfinished-work{font-size:12px;line-height:1.35;margin:4px 0;overflow-wrap:anywhere}
.workflow-card .settings-actions>label{min-width:0;max-width:100%}
.workflow-card select[data-evidence-source]{min-width:0;max-width:100%;width:100%}
@media(max-width:850px){.settings-actions[data-complete-assistance]{grid-template-columns:minmax(0,1fr)}}
