:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --page: #f3f8f4;
  --surface: #fff;
  --surface-soft: #f8fcf9;
  --hover: #eef8f0;
  --selected: #e5f8e9;
  --border: #d9e7dc;
  --line: #e8f0ea;
  --text: #234039;
  --heading: #00151c;
  --muted: #607b6d;
  --muted-soft: #7c9788;
  --accent: #0fd452;
  --accent-strong: #068036;
  --accent-ink: #076d30;
  --accent-soft: #e3f9e9;
  --focus: #0fd452;
  --danger: #a73539;
  --warning: #8b680d;
  --warning-soft: #fff3d5;
  --purple: #7650a0;
  --purple-border: #d3bde8;
  --support: #f8f5fb;
  --support-border: #e6def1;
  --auth-glow-one: #def9e6;
  --auth-glow-two: #e9f3eb;
  --shadow: 0 7px 24px #103b200d;
  --auth-shadow: 0 20px 70px #123b1f1a;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #071b1c;
  --surface: #0d2827;
  --surface-soft: #112e2b;
  --hover: #173b30;
  --selected: #15452b;
  --border: #305148;
  --line: #244139;
  --text: #d7e9dc;
  --heading: #f2fff4;
  --muted: #a1b8a9;
  --muted-soft: #8ca697;
  --accent-strong: #37e975;
  --accent-ink: #81f4a5;
  --accent-soft: #16402a;
  --focus: #4bef83;
  --danger: #ff8a90;
  --warning: #f2ca6c;
  --warning-soft: #4c3d20;
  --purple: #d0aae8;
  --purple-border: #5a4268;
  --support: #2c2335;
  --support-border: #503b5c;
  --auth-glow-one: #123f2a;
  --auth-glow-two: #102e2e;
  --shadow: 0 7px 24px #0005;
  --auth-shadow: 0 20px 70px #0006;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--text); background: var(--page); }
button, input, select { font: inherit; }
button, summary, select, a, input[type="file"] { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button:active, summary:active { transform: scale(.97); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.asaak-logo { display: block; width: 116px; height: auto; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
.auth-screen { min-height: 100vh; display: grid; place-items: center; padding: 72px 24px 24px; background: radial-gradient(circle at 15% 20%, var(--auth-glow-one) 0, transparent 34%), radial-gradient(circle at 85% 85%, var(--auth-glow-two) 0, transparent 33%), var(--page); }
.auth-card { width: min(100%, 540px); padding: 42px; background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--accent); border-radius: 20px; box-shadow: var(--auth-shadow); }
.auth-brand { margin-bottom: 26px; }
.auth-brand .asaak-logo { width: 190px; }
.auth-theme-toggle { position: absolute; top: 22px; right: 24px; }
.eyebrow { color: var(--accent-ink); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.auth-card h1, .page-heading h1 { margin: 7px 0 8px; color: var(--heading); font-size: 32px; line-height: 1.15; letter-spacing: -.035em; }
.auth-card p, .page-heading p { margin: 0; color: var(--muted); line-height: 1.5; }
.auth-card form { margin-top: 30px; }
.auth-card label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 700; }
.token-row { display: flex; gap: 9px; }
.token-row input { min-width: 0; flex: 1; border: 1px solid var(--border); border-radius: 9px; padding: 12px 13px; color: var(--text); background: var(--surface-soft); }
.auth-card .auth-note { margin-top: 24px; font-size: 12px; color: var(--muted-soft); }
.auth-tenant { margin-top: 24px; }
.auth-tenant select { width: 100%; padding: 11px 12px; border: 1px solid var(--border); border-radius: 9px; color: var(--text); background: var(--surface-soft); }
.auth-methods { display: grid; gap: 10px; margin-top: 28px; }
.auth-method { width: 100%; min-height: 45px; font-size: 14px; }
.auth-hint { margin-top: 14px !important; font-size: 12px; text-align: center; }
.auth-confirm { display: grid; gap: 10px; margin-top: 20px; padding: 16px; border-radius: 10px; background: var(--surface-soft); }
.auth-confirm p { font-size: 12px; }
.google-mark { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; background: #fff; border-radius: 4px; vertical-align: middle; }
.google-mark img { display: block; width: 18px; height: auto; }
.developer-login { display: flex; flex-direction: column; align-items: flex-end; margin-top: 22px; }
.developer-toggle { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; color: var(--muted-soft); }
.developer-toggle:hover { color: var(--text); }
.developer-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.developer-login form { align-self: stretch; width: 100%; margin-top: 12px; }
.form-error { margin-top: 12px; color: var(--danger); font-size: 13px; }
.button { border-radius: 9px; padding: 9px 13px; border: 1px solid transparent; background: transparent; color: var(--accent-ink); font-size: 12px; font-weight: 750; white-space: nowrap; transition: background .18s, border-color .18s, transform .18s, box-shadow .18s; }
.button:hover { background: var(--hover); }
.button.primary { background: var(--accent); color: #00151c; }
.button.primary:hover { background: #35e575; }
.button.outline { border-color: var(--border); background: var(--surface); }
.button.outline:hover { border-color: var(--accent); background: var(--hover); }
.button.subtle { color: var(--muted); }
.theme-toggle { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; color: var(--text); }
.theme-toggle:hover { background: var(--hover); }
.theme-icon { width: 16px; text-align: center; font-size: 16px; line-height: 1; }

.topbar { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 26px; color: var(--heading); background: var(--surface); border-top: 3px solid var(--accent); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.topbar-brand, .topbar-actions { display: flex; align-items: center; gap: 12px; }
.topbar-brand { align-self: stretch; gap: 28px; }
.topbar-brand strong { font-size: 14px; letter-spacing: -.02em; white-space: nowrap; }
.topbar-divider { width: 1px; height: 22px; background: var(--border); margin: 0 2px; }
.operator { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); }
.page-content { max-width: 1900px; margin: 0 auto; padding: 22px 28px; }
.view-tabs { display: flex; align-self: stretch; align-items: stretch; gap: 6px; }
.view-tab { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border: 0; color: var(--muted); background: transparent; font-size: 13px; font-weight: 700; transition: color .18s, background .18s, transform .18s; }
.view-tab svg { display: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.view-tab:hover { color: var(--heading); background: var(--hover); }
.view-tab.active { color: var(--heading); }
.view-tab.active::after { position: absolute; right: 12px; bottom: 0; left: 12px; height: 3px; border-radius: 4px 4px 0 0; background: var(--accent); content: ""; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 17px; }
.page-heading h1 { margin: 0; }
.workspace { display: grid; grid-template-columns: minmax(268px, 23%) minmax(0, 1fr); gap: 16px; align-items: start; }
.workspace.with-telemetry { grid-template-columns: minmax(268px, 23%) minmax(430px, 1fr) minmax(295px, 25%); }
.panel { min-width: 0; overflow: hidden; background: var(--surface); border: 0; border-radius: 14px; box-shadow: var(--shadow); }
.queue-panel, .telemetry-panel { position: sticky; top: 20px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); font-size: 14px; }
.count-pill { min-width: 23px; padding: 2px 6px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 800; text-align: center; }
.queue-controls { padding: 14px; border-bottom: 1px solid var(--line); }
.search-field { display: flex; align-items: center; gap: 7px; height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; color: var(--muted); background: var(--surface-soft); }
.search-field svg { display: block; width: 16px; height: 16px; flex: 0 0 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.search-field input { width: 100%; height: 100%; min-width: 0; border: 0; outline: 0; color: var(--text); font-size: 12px; background: transparent; }
.search-field input::placeholder { color: var(--muted-soft); }
.select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }
.select-row label { color: var(--muted); font-size: 11px; font-weight: 700; }
.select-row select { display: block; width: 100%; margin-top: 4px; padding: 7px 8px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--border); border-radius: 7px; font-size: 12px; }
.category-filter { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; font-weight: 700; }
.category-filter select { display: block; width: 100%; margin-top: 4px; padding: 7px 8px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--border); border-radius: 7px; font-size: 12px; }
.tenant-filter { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; font-weight: 700; }
.tenant-filter select { display: block; width: 100%; margin-top: 4px; padding: 7px 8px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--border); border-radius: 7px; font-size: 12px; }
.inline-status { padding: 0 14px; color: var(--muted); font-size: 12px; }
.inline-status:not(:empty) { padding: 12px 14px; }
.inline-status.error { color: var(--danger); }
.conversation-list { max-height: calc(100vh - 300px); min-height: 70px; overflow-y: auto; }
.conversation-item { display: block; width: 100%; padding: 15px 17px; text-align: left; color: inherit; background: var(--surface); border: 0; border-bottom: 1px solid var(--line); transition: background .18s, transform .18s, box-shadow .18s; }
.conversation-item:hover { background: var(--hover); }
.conversation-item.selected { background: var(--selected); box-shadow: inset 3px 0 var(--border); }
.conversation-item.unread { box-shadow: inset 4px 0 var(--accent); }
.conversation-item:active { transform: scale(.99); }
.item-top, .item-meta, .item-badges, .run-top, .run-bottom, .provider-heading, .provider-metrics { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.item-title { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 800; }
.item-unread { display: inline-grid; min-width: 20px; height: 20px; padding: 0 5px; place-items: center; border-radius: 10px; color: #00151c; background: var(--accent); font-size: 10px; font-weight: 800; }
.item-date, .item-meta, .run-bottom, .provider-model, .provider-metrics { color: var(--muted); font-size: 11px; }
.item-date { white-space: nowrap; }
.item-meta { margin: 8px 0 10px; }
.item-badges { margin-top: 8px; color: var(--muted); font-size: 11px; }
.item-badges span + span::before { margin-right: 8px; content: "·"; color: var(--muted-soft); }
.item-badges .status-badge + span::before { margin-left: 8px; }
.status-badge.open { padding: 2px 7px; border-radius: 5px; background: var(--warning-soft); color: var(--warning); font-weight: 800; letter-spacing: .04em; }
.client-avatar { position: relative; display: inline-grid; place-items: center; width: 33px; height: 33px; flex: 0 0 33px; overflow: hidden; border: 1px solid var(--accent-strong); border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 11px; font-weight: 800; letter-spacing: .01em; }
.client-avatar.large { width: 43px; height: 43px; flex-basis: 43px; font-size: 14px; }
.client-avatar img { position: absolute; width: 100%; height: 100%; object-fit: cover; }
.detail-identity { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.detail-identity > div { min-width: 0; }
.item-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-badges { justify-content: flex-start; }
.pill { display: inline-block; padding: 3px 7px; border: 1px solid var(--border); border-radius: 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .03em; }
.pill.open { color: var(--warning); border-color: var(--warning); background: var(--warning-soft); }
.pill.bot { color: var(--accent-ink); border-color: var(--accent-strong); }
.pill.human { color: var(--purple); border-color: var(--purple-border); }
.load-more { display: block; width: 100%; border-radius: 0; color: var(--accent-ink); }

.blank-state { display: grid; justify-items: center; align-content: center; min-height: 230px; padding: 36px; text-align: center; color: var(--muted); }
.blank-state strong { color: var(--text); }
.blank-state p { margin: 7px 0 0; max-width: 260px; font-size: 12px; line-height: 1.5; }
.blank-state.compact { min-height: 170px; }
.blank-icon { margin-bottom: 12px; color: var(--muted-soft); font-size: 35px; line-height: 1; }
.detail-panel { display: flex; flex-direction: column; min-height: min(78vh, 800px); }
#detail-content { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.detail-panel.drag-over { outline: 3px solid var(--accent); outline-offset: -3px; background: var(--accent-soft); }
.detail-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 23px 22px 19px; border-bottom: 1px solid var(--line); }
.detail-header h2 { margin: 5px 0 7px; color: var(--heading); font-size: 23px; line-height: 1.22; overflow-wrap: anywhere; }
.detail-subtitle { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.detail-header-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.detail-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; }
.detail-badges .assignee { color: var(--muted); font-size: 11px; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; padding: 0; border: 0; border-radius: 9px; background: transparent; color: var(--text); font-size: 20px; line-height: 1; transition: background .18s, color .18s, transform .18s; }
.icon-button:hover { background: var(--hover); color: var(--accent-ink); }
.icon-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mobile-panel-nav, .mobile-back { display: none; }
.action-menu summary { cursor: pointer; }
.action-menu { position: relative; }
.action-menu summary { list-style: none; }
.action-menu summary::-webkit-details-marker { display: none; }
.action-menu[open] summary { background: var(--hover); }
.action-menu-popover { position: absolute; z-index: 20; top: 41px; right: 0; min-width: 225px; padding: 6px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); box-shadow: 0 14px 34px #0003; }
.action-menu-popover button { display: block; width: 100%; padding: 10px; border: 0; border-radius: 6px; color: var(--text); background: transparent; text-align: left; font-size: 12px; }
.action-menu-popover button:hover { background: var(--hover); }
.action-menu-popover button:disabled { opacity: .5; }
.action-menu-label { display: block; padding: 8px 10px 4px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.action-menu-divider { height: 1px; margin: 6px 4px; background: var(--line); }
.action-notice { padding: 8px 20px; color: var(--accent-ink); background: var(--surface-soft); font-size: 12px; }
.action-notice.error { color: var(--danger); }
.reply-form { position: relative; display: block; padding: 12px 17px 10px; border-top: 1px solid var(--line); background: var(--surface); }
.composer-row { display: flex; align-items: flex-end; gap: 7px; padding: 5px 6px; border-radius: 20px; background: var(--surface-soft); box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow .18s; }
.composer-row:focus-within { box-shadow: inset 0 0 0 1px var(--accent-strong), 0 0 0 3px var(--accent-soft); }
.composer-row textarea { flex: 1; min-width: 0; max-height: 170px; min-height: 38px; resize: vertical; padding: 10px 4px; color: var(--text); background: transparent; border: 0; outline: 0; font: inherit; font-size: 13px; line-height: 1.4; }
.composer-row textarea:focus-visible { outline: 0; }
.composer-row .icon-button { width: 38px; height: 38px; flex-basis: 38px; border-radius: 50%; }
.composer-row .send-button { background: var(--accent); color: var(--heading); }
.composer-row .send-button:hover { background: var(--accent-strong); color: #fff; }
.composer-row .send-button:disabled { color: var(--muted-soft); background: var(--line); cursor: default; }
.composer-status { min-height: 0; color: var(--muted); font-size: 11px; }
.composer-status:not(:empty) { padding-top: 7px; }
.composer-status.error { color: var(--danger); }
.attachment-preview { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; margin: 0 0 10px; padding: 6px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); font-size: 11px; }
.attachment-preview img { width: 48px; height: 48px; object-fit: cover; border-radius: 5px; }
.attachment-preview span { min-width: 0; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-dialog { width: min(540px, calc(100vw - 24px)); max-height: min(80vh, 700px); padding: 0; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--auth-shadow); }
.activity-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.activity-dialog::backdrop { background: #00151ca8; }
.activity-dialog-header { flex: 0 0 auto; display: flex; justify-content: space-between; align-items: start; padding: 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.activity-dialog-header h2 { margin: 4px 0 0; color: var(--heading); }
.activity-dialog-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-bottom: 10px; }
.activity-item { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 12px; padding: 12px 20px; border-top: 1px solid var(--line); font-size: 11px; }
.activity-item strong { color: var(--text); }
.activity-item span { margin-left: auto; color: var(--muted); }
.activity-item small { width: 100%; color: var(--muted); overflow-wrap: anywhere; }
.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border-block: 1px solid var(--border); background: var(--border); }
.metric { min-width: 0; padding: 13px 12px; background: var(--surface-soft); }
.metric span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 6px; }
.metric strong { color: var(--heading); font-size: 16px; white-space: nowrap; }
.section-heading { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 7px; font-size: 13px; font-weight: 800; }
.section-heading span { color: var(--muted-soft); font-weight: 500; }
.message-list { flex: 1; max-height: calc(100vh - 320px); min-height: 180px; overflow-y: auto; padding: 0 18px 17px; }
.message { margin: 10px 0; padding: 14px; border: 0; border-radius: 12px; background: var(--surface-soft); }
.message.selectable { cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.message.selectable:hover { background: var(--hover); }
.message.selected { box-shadow: inset 3px 0 var(--accent); }
.message.bot { background: var(--accent-soft); }
.message.support { background: var(--surface-soft); }
.message-top { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.message-top time { margin-left: auto; color: var(--muted-soft); }
.conversation-event { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 5px 7px; margin: 13px auto; color: var(--muted); font-size: 11px; text-align: center; }
.conversation-event .event-mark { color: var(--accent-strong); font-size: 19px; line-height: 0; }
.conversation-event time { color: var(--muted-soft); font-size: 10px; }
.sender-dot { width: 8px; height: 8px; background: var(--muted-soft); border-radius: 50%; }
.message.bot .sender-dot { background: var(--accent); }
.message.support .sender-dot { background: var(--accent-strong); }
.person-link { color: var(--accent-ink); text-decoration: none; font-weight: 750; }
.person-link:hover { text-decoration: underline; }
.activity-item .activity-actor { width: 100%; margin: 0; color: var(--muted); }
.message-body { margin-top: 9px; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--text); font-size: 12px; line-height: 1.6; }
.message-image { display: block; max-width: min(100%, 400px); max-height: 300px; margin-top: 10px; border: 1px solid var(--border); border-radius: 8px; object-fit: contain; }
.image-loading { margin-top: 9px; color: var(--muted); font-size: 11px; }
.message-attachment { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 2px 8px; align-items: center; width: min(100%, 430px); margin-top: 10px; padding: 10px; border-radius: 9px; background: var(--surface); }
.message-attachment .attachment-symbol { grid-row: span 2; color: var(--muted); font-size: 23px; line-height: 1; }
.message-attachment strong, .message-attachment span { display: block; }
.message-attachment strong { color: var(--text); font-size: 11px; }
.message-attachment div > span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.attachment-description { grid-column: 2; color: var(--muted); font-size: 11px; }
.attachment-description summary { width: fit-content; color: var(--accent-ink); font-weight: 700; }
.attachment-description p { margin: 7px 0 0; line-height: 1.45; overflow-wrap: anywhere; }
.telemetry-response { margin: 0 18px 12px; padding: 10px 12px; border-radius: 8px; background: var(--surface-soft); color: var(--text); font-size: 11px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 140px; overflow: hidden; }
.execution-timeline { margin: 8px 18px 15px; }
.timeline-heading { display: flex; justify-content: space-between; gap: 8px; color: var(--text); font-size: 11px; }
.timeline-heading span, .timeline-empty { color: var(--muted); }
.timeline-empty { margin: 8px 0 0; font-size: 11px; }
.timeline-track { display: flex; height: 12px; overflow: hidden; margin-top: 9px; border-radius: 8px; background: var(--line); }
.timeline-segment { display: block; min-width: 2px; flex-basis: 0; background: var(--accent-strong); border-right: 1px solid var(--surface); }
.timeline-segment.tool { background: var(--muted-soft); }
.timeline-segment.other { background: var(--line); }
.timeline-legend { display: flex; gap: 14px; margin-top: 7px; color: var(--muted); font-size: 10px; }
.timeline-legend span::before { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 2px; background: var(--accent-strong); content: ""; }
.timeline-legend .tool::before { background: var(--muted-soft); }
.timeline-legend .other::before { background: var(--line); }
.facts { margin: 0; padding: 0 18px 9px; font-size: 11px; }
.facts div { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 800; text-align: right; }
.provider-call { padding: 11px 18px; border-top: 1px solid var(--line); font-size: 11px; }
.provider-model { margin: 5px 0; }
.provider-heading strong { text-transform: capitalize; }
.status-ok { color: var(--accent-ink); }
.status-error { color: var(--danger); }
.subtle-note { padding: 8px 20px; color: var(--warning); font-size: 11px; }
.trace-event { position: relative; margin: 0 14px; padding: 11px 0 12px 20px; border-left: 2px solid var(--border); border-bottom: 1px solid var(--line); font-size: 11px; }
.trace-event:last-child { border-bottom: 0; }
.trace-index { display: grid; place-items: center; flex: 0 0 19px; width: 19px; height: 19px; margin-left: -31px; color: #00151c; background: var(--accent); border-radius: 50%; font-size: 10px; font-weight: 800; }
.trace-event.tool .trace-index { background: var(--accent-strong); color: #fff; }
.trace-event.decision .trace-index { background: var(--muted-soft); color: #fff; }
.trace-event.result .trace-index { background: var(--text); color: var(--surface); }
.trace-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
.trace-heading strong { flex: 1; overflow-wrap: anywhere; font-size: 11px; }
.trace-summary { margin: 7px 0 0; color: var(--muted); line-height: 1.45; }
.trace-model-usage { margin: 7px 0 0; padding: 7px 9px; border-radius: 6px; color: var(--accent-ink); background: var(--accent-soft); line-height: 1.45; }
.trace-details { margin-top: 7px; }
.trace-details summary { color: var(--accent-ink); cursor: pointer; font-weight: 700; }
.trace-details pre { max-height: 260px; overflow: auto; margin: 8px 0 0; padding: 9px; border-radius: 6px; color: var(--text); background: var(--surface-soft); border: 1px solid var(--line); font-size: 10px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.analytics-view { padding-bottom: 40px; }
.analytics-heading { display: flex; justify-content: space-between; align-items: end; flex-wrap: wrap; gap: 18px; margin-bottom: 18px; }
.analytics-heading h1 { margin: 0 0 5px; color: var(--heading); font-size: 31px; letter-spacing: -.035em; }
.analytics-heading p, .analytics-card p { margin: 0; color: var(--muted); font-size: 12px; }
.range-presets { display: flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--surface); }
.range-preset { padding: 8px 12px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-size: 12px; font-weight: 700; transition: background .18s, color .18s; }
.range-preset:hover { background: var(--hover); }
.range-preset.active { color: var(--accent-ink); background: var(--accent-soft); }
.analytics-range { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin-bottom: 17px; }
.analytics-range label { display: grid; gap: 5px; color: var(--muted); font-size: 11px; font-weight: 700; }
.analytics-range input { width: 205px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--text); background: var(--surface); font-size: 12px; cursor: pointer; }
.analytics-range input:hover { border-color: var(--accent-strong); }
.analytics-range .button { height: 36px; }
.analytics-status { min-height: 0; color: var(--muted); font-size: 12px; }
.analytics-status:not(:empty) { margin-bottom: 12px; }
.analytics-status.error { color: var(--danger); }
.analytics-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.summary-card, .analytics-card { min-width: 0; padding: 20px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); }
.summary-card span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 11px; }
.summary-card strong { color: var(--heading); font-size: 23px; letter-spacing: -.03em; }
.analytics-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.analytics-card h2 { margin: 0 0 5px; color: var(--heading); font-size: 15px; }
.analytics-card .chart { min-height: 215px; margin-top: 18px; }
.bar-plot { display: flex; align-items: stretch; gap: 2px; height: 170px; padding-top: 5px; border-bottom: 1px solid var(--line); }
.bar-slot { display: flex; flex: 1; flex-direction: column; justify-content: end; min-width: 0; position: relative; }
.bar-stack { display: flex; flex-direction: column-reverse; width: min(80%, 24px); height: 145px; margin: 0 auto; }
.bar-segment { display: block; min-height: 0; background: var(--accent); border-radius: 2px 2px 0 0; transition: opacity .18s; }
.bar-segment:hover { opacity: .7; }
.segment-1 { background: var(--accent-strong); }
.segment-2 { background: var(--muted-soft); }
.bar-label { position: absolute; top: calc(100% + 5px); left: 50%; width: 70px; transform: translateX(-50%); color: var(--muted); font-size: 10px; text-align: center; white-space: nowrap; pointer-events: none; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 30px; color: var(--muted); font-size: 11px; }
.chart-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.chart-legend i.segment-1 { background: var(--accent-strong); }
.chart-legend i.segment-2 { background: var(--muted-soft); }
.chart svg { display: block; width: 100%; height: 165px; overflow: visible; }
.chart-gridline { stroke: var(--line); stroke-width: 1; }
.chart-line { fill: none; stroke: var(--accent-strong); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-axis { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 10px; }
.breakdown-chart { min-height: 90px; margin-top: 18px; }
.breakdown-row + .breakdown-row { margin-top: 15px; }
.breakdown-label { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 6px; color: var(--muted); font-size: 11px; text-transform: capitalize; }
.breakdown-label strong { color: var(--text); }
.breakdown-track { height: 6px; border-radius: 6px; background: var(--line); }
.breakdown-track span { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.chart-empty { color: var(--muted); font-size: 12px; }
@media (max-width: 1050px) { .analytics-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1250px) { .workspace, .workspace.with-telemetry { grid-template-columns: 280px minmax(0, 1fr); }.telemetry-panel { grid-column: 2; position: static; }.metric-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 1050px) { .analytics-charts { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .topbar { min-height: 56px; padding: 8px 14px; }
  .topbar-brand { gap: 0; }
  .topbar-brand .asaak-logo { width: 86px; }
  .topbar-actions { gap: 5px; }
  .operator { display: none; }
  .view-tabs { position: fixed; z-index: 50; right: 0; bottom: 0; left: 0; height: calc(64px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 3px 12px env(safe-area-inset-bottom); border-top: 1px solid var(--line); background: var(--surface); box-shadow: 0 -6px 25px #00000012; }
  .view-tab { flex-direction: column; gap: 2px; padding: 4px 8px; border-radius: 9px; font-size: 11px; }
  .view-tab svg { display: block; }
  .view-tab.active { color: var(--accent-ink); background: var(--accent-soft); }
  .view-tab.active::after { display: none; }
  .page-content { padding: 15px 15px calc(80px + env(safe-area-inset-bottom)); }
  .page-heading h1 { font-size: 25px; }
  .workspace, .workspace.with-telemetry { display: block; }
  #conversations-view[data-mobile-panel="messages"] .page-heading,
  #conversations-view[data-mobile-panel="telemetry"] .page-heading { display: none; }
  #workspace[data-mobile-panel="list"] .detail-panel,
  #workspace[data-mobile-panel="list"] .telemetry-panel,
  #workspace[data-mobile-panel="messages"] .queue-panel,
  #workspace[data-mobile-panel="messages"] .telemetry-panel,
  #workspace[data-mobile-panel="telemetry"] .queue-panel,
  #workspace[data-mobile-panel="telemetry"] .detail-panel { display: none; }
  .panel { margin-bottom: 13px; }
  .queue-panel, .telemetry-panel { position: static; }
  .conversation-list { max-height: none; overflow: visible; }
  .mobile-panel-nav { display: block; border-bottom: 1px solid var(--line); }
  .mobile-back { display: inline-flex; align-items: center; gap: 5px; min-height: 45px; padding: 8px 14px; border: 0; border-radius: 9px; background: transparent; color: var(--accent-ink); font-size: 13px; font-weight: 750; transition: background .18s, transform .18s; }
  .mobile-back:hover { background: var(--hover); }
  .mobile-back svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
  .detail-panel { height: calc(100dvh - 140px - env(safe-area-inset-bottom)); min-height: 380px; }
  .detail-header { padding: 16px 17px; }
  .detail-header h2 { font-size: 20px; }
  .message-list { max-height: none; min-height: 0; overscroll-behavior: contain; }
  .telemetry-panel { min-height: calc(100dvh - 140px - env(safe-area-inset-bottom)); }
  .telemetry-panel .panel-heading { justify-content: flex-start; gap: 9px; padding: 7px 12px; }
  .analytics-charts { grid-template-columns: 1fr; }
  .analytics-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-range input { width: min(43vw, 205px); }
  .auth-card { padding: 28px; }
  .token-row { display: block; }
  .token-row input, .token-row button { width: 100%; }
  .token-row button { margin-top: 10px; }
}
