:root {
  color-scheme: light;
  --ink: #142126;
  --muted: #6c7a80;
  --line: #dbe3e5;
  --paper: #f3f6f7;
  --surface: #ffffff;
  --stage: #0b1719;
  --teal: #087f73;
  --teal-soft: #e3f3ef;
  --blue: #3377c6;
  --amber: #d49228;
  --coral: #db5f4b;
  --green: #159a6f;
  --shadow: 0 12px 32px rgba(20, 38, 43, .08);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-width: 320px; min-height: 100%; color: var(--ink); background: #e8edef; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(8,127,115,.2); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
.app-shell { min-height: 100vh; display: grid; grid-template: 64px minmax(0,1fr) / 76px minmax(0,1fr); background: var(--paper); }
.topbar { grid-column: 1 / -1; display: grid; grid-template-columns: 256px 1fr auto; align-items: center; min-width: 0; padding: 0 18px; border-bottom: 1px solid #cad5d7; background: var(--surface); }
.brand, .plant-switch, .topbar-meta, .user-button, .system-live, .page-actions, .select-control, .panel-heading, .legend, .view-toolbar, .sync-badge, .assistant-head, .assistant-head > div, .assistant-actions, .voice-controls, .assistant-foot, .dialog-heading, .dialog-actions, .confirm-sheet, .confirm-actions { display: flex; align-items: center; }
.brand { gap: 10px; }.brand-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; color: #fff; background: #0d7470; font-weight: 900; }.brand h1 { font-size: 15px; }.brand p { margin-top: 2px; color: #829095; font-size: 9px; text-transform: uppercase; }
.plant-switch { width: fit-content; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 5px; background: #f8faf9; font-size: 12px; font-weight: 750; }.plant-switch svg { width: 15px; }.plant-switch svg:last-child { width: 13px; color: var(--muted); }
.topbar-meta { justify-content: flex-end; gap: 14px; }.shift { display: grid; gap: 2px; padding-right: 15px; border-right: 1px solid var(--line); }.shift span { color: var(--muted); font-size: 9px; }.shift b { font-size: 11px; }.system-live { gap: 7px; color: var(--muted); font-size: 10px; }.system-live > span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(21,154,111,.12); }
.icon-button { position: relative; width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: white; }.icon-button:hover { background: var(--paper); }.icon-button svg { width: 16px; height: 16px; }.icon-button em { position: absolute; right: -3px; top: -4px; min-width: 15px; height: 15px; display: grid; place-items: center; border-radius: 8px; color: white; background: var(--coral); font-size: 8px; font-style: normal; }
.user-button { gap: 7px; padding: 0; border: 0; background: transparent; }.user-button > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #304b52; font-size: 12px; }.user-button b { font-size: 11px; }.user-button svg { width: 13px; color: var(--muted); }
.sidebar { min-height: 0; padding: 12px 8px; display: flex; flex-direction: column; gap: 7px; border-right: 1px solid #cad5d7; background: #111d20; }.side-nav { height: 52px; padding: 0; display: grid; place-items: center; align-content: center; gap: 3px; border: 0; border-radius: 5px; color: #8fa1a5; background: transparent; font-size: 9px; }.side-nav svg { width: 19px; }.side-nav:hover { color: white; background: #1c2b2f; }.side-nav.active { color: #b7eee1; background: #183a39; box-shadow: inset 3px 0 #3eb7a5; }.side-spacer { flex: 1; }
.workspace { min-width: 0; min-height: 0; height: calc(100vh - 64px); padding: 14px; display: grid; grid-template-columns: minmax(760px, 1fr) 354px; gap: 14px; overflow: hidden; }
.mes-area { min-width: 0; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }.page-heading { flex: 0 0 56px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }.breadcrumb { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9px; }.breadcrumb svg { width: 10px; }.breadcrumb b { color: #46575c; }.page-heading h2 { margin-top: 5px; font-size: 20px; }.page-actions { gap: 7px; }.select-control { height: 34px; gap: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; background: white; }.select-control svg { width: 14px; color: var(--muted); }.select-control select { border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 11px; }
.primary-button, .secondary-button, .danger-button { min-height: 34px; padding: 0 11px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 5px; font-size: 11px; font-weight: 750; }.primary-button { border: 1px solid var(--teal); color: white; background: var(--teal); }.secondary-button { border: 1px solid var(--line); color: var(--ink); background: white; }.danger-button { border: 1px solid #b84335; color: white; background: #c64e3f; }.primary-button svg, .secondary-button svg { width: 14px; }
.mes-view { display: none; flex: 1; min-height: 0; overflow: auto; }.mes-view.active { display: block; }.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }.kpi-card { min-width: 0; min-height: 106px; padding: 14px; display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 6px; background: white; box-shadow: 0 2px 7px rgba(20,38,43,.035); transition: box-shadow .2s, border-color .2s, transform .2s; }.kpi-card.highlight { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(8,127,115,.11), var(--shadow); transform: translateY(-2px); }.kpi-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 5px; }.kpi-icon svg { width: 18px; }.kpi-icon.teal { color: var(--teal); background: var(--teal-soft); }.kpi-icon.blue { color: var(--blue); background: #eaf1fa; }.kpi-icon.amber { color: var(--amber); background: #fbf2df; }.kpi-icon.coral { color: var(--coral); background: #fbeae7; }.kpi-card > div:nth-child(2) { min-width: 0; display: grid; gap: 5px; }.kpi-card span { color: var(--muted); font-size: 10px; }.kpi-card strong { font-size: 23px; white-space: nowrap; }.kpi-card small { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 9px; }.kpi-card small svg { width: 11px; }.kpi-card small.up { color: var(--green); }.kpi-card small.down { color: var(--coral); }.mini-ring { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--teal) calc(var(--progress) * 1%), #e4ecea 0); }.mini-ring::before { content: ""; grid-area: 1/1; width: 36px; height: 36px; border-radius: 50%; background: white; }.mini-ring span { z-index: 1; grid-area: 1/1; color: var(--muted); font-size: 7px; line-height: 1.3; text-align: center; }.spark-bars { width: 50px; height: 42px; display: flex; align-items: end; gap: 3px; }.spark-bars i { flex: 1; min-height: 5px; border-radius: 1px; background: #89abd1; }.kpi-note { align-self: end; padding: 4px 6px; border-radius: 3px; color: #81611d; background: #faf0d9; font-size: 8px; }.text-link { padding: 0; display: inline-flex; align-items: center; gap: 3px; border: 0; color: var(--teal); background: transparent; font-size: 9px; font-weight: 750; }.text-link svg { width: 12px; }
.overview-grid { margin-top: 10px; display: grid; grid-template-columns: minmax(0,1.52fr) minmax(300px,.78fr); grid-template-rows: minmax(260px,1.25fr) minmax(192px,.8fr); gap: 10px; }.panel { min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: white; box-shadow: 0 2px 7px rgba(20,38,43,.03); }.production-panel { grid-row: 1 / -1; display: flex; flex-direction: column; }.panel-heading { min-height: 54px; padding: 0 14px; justify-content: space-between; gap: 12px; border-bottom: 1px solid #edf1f2; }.panel-heading h3 { font-size: 12px; }.panel-heading p { margin-top: 3px; color: var(--muted); font-size: 8px; }.legend { gap: 9px; }.legend span { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 8px; }.legend i { width: 6px; height: 6px; border-radius: 50%; }.legend i.running { background: var(--green); }.legend i.idle { background: var(--amber); }.legend i.fault { background: var(--coral); }
.line-list { flex: 1; padding: 2px 14px; display: flex; flex-direction: column; justify-content: space-around; }.line-row { min-height: 80px; padding: 11px 0; display: grid; grid-template-columns: minmax(155px,1.2fr) minmax(110px,1fr) 58px 58px 62px; align-items: center; gap: 10px; border-bottom: 1px solid #edf1f2; transition: background .2s, box-shadow .2s; }.line-row:last-child { border-bottom: 0; }.line-row.highlight { margin: 0 -8px; padding-left: 8px; padding-right: 8px; background: #fff5f3; box-shadow: inset 3px 0 var(--coral); }.line-name { min-width: 0; display: flex; align-items: center; gap: 9px; }.line-name > span { flex: 0 0 auto; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 4px; color: #fff; background: #344d54; font-size: 11px; font-weight: 800; }.line-name div { min-width: 0; display: grid; gap: 4px; }.line-name b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }.line-name small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 8px; }.line-progress { display: grid; gap: 5px; }.line-progress > div { height: 5px; overflow: hidden; border-radius: 3px; background: #e8eeef; }.line-progress i { display: block; height: 100%; background: var(--teal); }.line-progress span { color: var(--muted); font-size: 8px; }.line-stat { display: grid; gap: 4px; }.line-stat span { color: var(--muted); font-size: 8px; }.line-stat b { font-size: 10px; }.status-tag { width: fit-content; padding: 4px 6px; border-radius: 3px; font-size: 8px; font-weight: 800; white-space: nowrap; }.status-tag.running { color: #087854; background: #e3f4ee; }.status-tag.idle { color: #8b6117; background: #fbf0d9; }.status-tag.fault { color: #a33c30; background: #fbe8e5; }
.trend-panel, .alarm-panel { display: flex; flex-direction: column; }.line-chart { flex: 1; min-height: 125px; position: relative; margin: 9px 12px 0 34px; }.line-chart svg { position: absolute; inset: 0 0 18px; width: 100%; height: calc(100% - 18px); overflow: visible; }.line-chart .grid { stroke: #e7edef; stroke-width: 1; vector-effect: non-scaling-stroke; }.line-chart .plan { fill: none; stroke: #9aa9ad; stroke-width: 1.5; stroke-dasharray: 5 5; vector-effect: non-scaling-stroke; }.line-chart .area { fill: url(#areaFill); }.line-chart .actual { fill: none; stroke: var(--teal); stroke-width: 2.5; vector-effect: non-scaling-stroke; }.chart-y { position: absolute; left: -31px; top: 0; bottom: 18px; display: flex; flex-direction: column; justify-content: space-between; color: #8d9a9e; font-size: 7px; }.chart-x { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; color: #8d9a9e; font-size: 7px; }.chart-summary { min-height: 38px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #edf1f2; }.chart-summary span { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 8px; }.chart-summary b { color: var(--ink); }.chart-summary i { width: 7px; height: 2px; }.actual-dot { background: var(--teal); }.plan-dot { border-top: 2px dashed #9aa9ad; }
.alarm-list { flex: 1; padding: 1px 12px; display: flex; flex-direction: column; justify-content: space-around; }.alarm-item { padding: 7px 0; display: grid; grid-template-columns: 23px 1fr auto; align-items: center; gap: 8px; border-bottom: 1px solid #edf1f2; }.alarm-item:last-child { border: 0; }.alarm-level { width: 21px; height: 21px; display: grid; place-items: center; border-radius: 4px; font-size: 8px; font-weight: 900; }.alarm-item.critical .alarm-level { color: #a33c30; background: #fbe8e5; }.alarm-item.warning .alarm-level { color: #8b6117; background: #fbf0d9; }.alarm-item.info .alarm-level { color: var(--blue); background: #e7f0fb; }.alarm-item div { min-width: 0; }.alarm-item b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }.alarm-item p { margin-top: 3px; color: var(--muted); font-size: 7px; }.alarm-item time { color: var(--muted); font-size: 7px; }
.guide-callout { position: fixed; z-index: 8; left: 102px; bottom: 24px; width: min(560px, calc(100vw - 500px)); padding: 12px; display: grid; grid-template-columns: 32px 1fr 30px; align-items: center; gap: 10px; border: 1px solid #acd8cd; border-radius: 6px; background: #f0faf7; box-shadow: var(--shadow); }.guide-callout[hidden] { display: none; }.guide-callout > span { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 5px; color: var(--teal); background: #d8f0ea; }.guide-callout > span svg { width: 17px; }.guide-callout b { font-size: 11px; }.guide-callout p { margin-top: 4px; color: #53666a; font-size: 9px; line-height: 1.55; }
.view-toolbar { height: 50px; justify-content: space-between; }.segmented { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 5px; background: #e9eef0; }.segmented button { min-height: 28px; padding: 0 10px; border: 0; border-radius: 3px; color: var(--muted); background: transparent; font-size: 9px; }.segmented button.active { color: var(--ink); background: white; box-shadow: 0 1px 4px rgba(20,38,43,.1); }.search-control { width: 220px; height: 34px; padding: 0 9px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 5px; background: white; }.search-control svg { width: 14px; color: var(--muted); }.search-control input { min-width: 0; width: 100%; border: 0; outline: 0; font-size: 10px; }.table-panel { overflow: hidden; }.sync-badge { gap: 5px; color: var(--green); font-size: 8px; }.sync-badge svg { width: 11px; }.data-table { overflow-x: auto; }.table-row { min-width: 780px; min-height: 52px; display: grid; align-items: center; gap: 12px; padding: 0 14px; border-bottom: 1px solid #edf1f2; font-size: 9px; }.equipment-table .table-row { grid-template-columns: 1fr .7fr .75fr .85fr 1.25fr .7fr .55fr; }.order-table .table-row { grid-template-columns: 1.4fr 1.1fr .8fr 1fr .55fr .9fr .65fr; }.table-row.table-head { min-height: 38px; color: var(--muted); background: #f7f9f9; font-size: 8px; font-weight: 700; }.table-row strong { font-size: 10px; }.row-action { padding: 0; border: 0; color: var(--teal); background: transparent; font-size: 9px; font-weight: 750; }.danger-text { color: var(--coral); font-weight: 750; }.fault-row.highlight, .target-order.highlight { background: #fff1ef; box-shadow: inset 3px 0 var(--coral); animation: focusRow 1.2s ease 2; }.table-row.filtered-out { display: none; } @keyframes focusRow { 50% { background: #ffe4df; } }.inline-progress { width: 54px; height: 4px; margin-right: 6px; display: inline-block; overflow: hidden; border-radius: 2px; background: #e5ecee; vertical-align: middle; }.inline-progress b { display: block; height: 100%; background: var(--teal); }
.quality-kpis { margin-bottom: 10px; display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }.quality-kpis article { padding: 15px; display: grid; gap: 5px; border: 1px solid var(--line); border-radius: 6px; background: white; }.quality-kpis span, .quality-kpis small { color: var(--muted); font-size: 9px; }.quality-kpis strong { font-size: 23px; }.quality-kpis small.down { color: var(--coral); }.quality-kpis small.warn { color: var(--amber); }.quality-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }.defect-bars { padding: 17px; display: grid; gap: 16px; }.defect-bars div { display: grid; grid-template-columns: 62px 1fr 25px; align-items: center; gap: 9px; font-size: 9px; }.defect-bars i { height: 7px; overflow: hidden; border-radius: 4px; background: #e8edef; }.defect-bars b { display: block; height: 100%; border-radius: 4px; background: var(--coral); }.quality-trend { padding: 18px; }.quality-trend > strong { font-size: 28px; }.quality-trend > span { margin-left: 8px; color: var(--muted); font-size: 9px; }.trend-line { height: 150px; margin-top: 12px; background: linear-gradient(165deg, transparent 0 44%, rgba(8,127,115,.15) 44.5% 66%, transparent 66.5%), linear-gradient(175deg, transparent 0 47%, var(--teal) 47.3% 48%, transparent 48.3%); border-bottom: 1px solid var(--line); }.trend-days { display: flex; justify-content: space-between; margin-top: 7px; color: var(--muted); font-size: 8px; }.empty-view { padding-top: 12vh; text-align: center; }.empty-view > svg { width: 40px; height: 40px; color: var(--teal); }.empty-view h3 { margin-top: 12px; }.empty-view p { margin-top: 8px; color: var(--muted); font-size: 10px; }.trace-search { width: min(500px, 90%); margin: 24px auto; display: flex; gap: 7px; }.trace-search input { flex: 1; min-width: 0; height: 38px; padding: 0 11px; border: 1px solid var(--line); border-radius: 5px; }
.assistant-panel { min-height: 0; display: grid; grid-template-rows: 54px 274px auto minmax(120px,1fr) 66px 34px; overflow: hidden; border: 1px solid #cad5d7; border-radius: 7px; background: white; box-shadow: var(--shadow); }.assistant-head { padding: 0 11px; justify-content: space-between; border-bottom: 1px solid var(--line); }.assistant-head > div:first-child { min-width: 0; gap: 8px; }.assistant-online { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(21,154,111,.12); }.assistant-head b { display: block; font-size: 11px; }.assistant-head p { margin-top: 3px; color: var(--muted); font-size: 7px; }.assistant-actions { gap: 5px; }.assistant-actions .icon-button { width: 30px; height: 30px; }
.avatar-stage { min-height: 0; display: grid; grid-template-rows: minmax(0,1fr) 48px; color: white; background: var(--stage); }.avatar-viewport { min-height: 0; position: relative; overflow: hidden; }.offline-avatar, #sdk { position: absolute; inset: 0; }.offline-avatar { z-index: 1; display: grid; place-items: end center; overflow: hidden; background: linear-gradient(145deg,#0b1719,#17302e 63%,#091113); }.offline-avatar::before { content: ""; position: absolute; inset: 8%; border: 1px solid rgba(164,227,211,.08); }.avatar-aura { position: absolute; left: 50%; bottom: 3%; width: 220px; height: 220px; transform: translateX(-50%); border: 1px solid rgba(164,227,211,.15); border-radius: 50%; box-shadow: 0 0 60px rgba(31,167,144,.1) inset; }.avatar-figure { position: relative; width: 140px; height: 92%; min-height: 175px; }.avatar-head-shape { position: absolute; top: 4%; left: 50%; width: 74px; height: 92px; transform: translateX(-50%); }.hair { position: absolute; inset: 0 2px 4px; border-radius: 52% 48% 44% 44%; background: #1d2221; }.face { position: absolute; left: 12px; top: 14px; width: 51px; height: 66px; border-radius: 44% 44% 48% 48%; background: linear-gradient(110deg,#dfb097,#efc9b1 58%,#c18a73); }.face::before { content: ""; position: absolute; top: 26px; left: 11px; width: 4px; height: 2px; border-radius: 50%; background: #26302e; box-shadow: 25px 0 #26302e; }.face::after { content: ""; position: absolute; left: 19px; bottom: 13px; width: 13px; height: 4px; border-bottom: 1px solid #995d57; border-radius: 50%; }.neck { position: absolute; left: 26px; bottom: -6px; width: 24px; height: 27px; background: #d3a089; }.avatar-body-shape { position: absolute; left: 50%; bottom: 0; width: 138px; height: calc(100% - 82px); transform: translateX(-50%); clip-path: polygon(30% 0,70% 0,100% 22%,95% 100%,5% 100%,0 22%); background: linear-gradient(105deg,#e5edeb,#aebfbb 48%,#f6f9f8 70%); }.avatar-body-shape::after { content: ""; position: absolute; left: 50%; width: 2px; height: 100%; background: rgba(8,127,115,.38); }.scanline { position: absolute; inset: 0; background: repeating-linear-gradient(0deg,transparent 0 4px,rgba(255,255,255,.015) 5px); }.avatar-status { position: absolute; z-index: 4; left: 9px; top: 9px; right: 9px; display: flex; justify-content: space-between; align-items: center; }.avatar-status > span { padding: 4px 6px; border-radius: 3px; background: rgba(2,8,9,.7); font-size: 8px; }.avatar-status small { display: flex; align-items: center; gap: 3px; color: #c6d1d0; font-size: 7px; }.avatar-status svg { width: 9px; }.subtitle { position: absolute; z-index: 4; left: 10px; right: 10px; bottom: 10px; display: flex; justify-content: center; pointer-events: none; }.subtitle span { max-width: 320px; padding: 6px 8px; border-radius: 3px; color: white; background: rgba(3,9,10,.78); font-size: 9px; line-height: 1.5; text-align: center; }.listen-indicator { position: absolute; z-index: 5; left: 50%; top: 11px; height: 26px; padding: 0 7px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px; border: 1px solid rgba(164,227,211,.25); border-radius: 3px; background: rgba(4,15,15,.82); }.listen-indicator[hidden] { display: none; }.listen-indicator i { width: 2px; height: 7px; background: #a9e4d5; animation: wave .7s ease-in-out infinite alternate; }.listen-indicator i:nth-child(2) { animation-delay:.1s; }.listen-indicator i:nth-child(3) { animation-delay:.2s; }.listen-indicator i:nth-child(4) { animation-delay:.3s; }.listen-indicator b { margin-left: 3px; font-size: 7px; } @keyframes wave { to { height: 15px; } } #sdk { z-index: 2; } #sdk canvas { width: 100% !important; height: 100% !important; object-fit: contain; }
.voice-controls { justify-content: center; gap: 7px; border-top: 1px solid rgba(255,255,255,.09); }.mic-button, .interrupt-button, .avatar-power-control { min-height: 31px; padding: 0 10px; display: inline-flex; align-items: center; gap: 5px; border: 0; border-radius: 4px; font-size: 9px; font-weight: 800; }.mic-button { color: #0c3b34; background: #abe8d8; }.mic-button.listening { background: white; }.interrupt-button { color: white; background: var(--coral); }.interrupt-button:disabled { opacity: .36; cursor: not-allowed; }.avatar-power-control { color: #d9eeea; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.08); }.avatar-power-control.online { color: #ffe0da; border-color: rgba(255,155,137,.24); background: rgba(169,55,38,.2); }.mic-button svg, .interrupt-button svg, .avatar-power-control svg { width: 13px; }
.quick-actions { padding: 8px 9px 3px; display: flex; gap: 5px; overflow-x: auto; }.quick-actions button { white-space: nowrap; padding: 5px 7px; border: 1px solid var(--line); border-radius: 3px; color: #536469; background: #f5f8f8; font-size: 8px; }.quick-actions button:hover { border-color: var(--teal); color: var(--teal); }.message-list { min-height: 0; overflow-y: auto; padding: 7px 10px; }.message { width: 88%; margin-bottom: 10px; display: grid; gap: 3px; }.message.user { margin-left: auto; justify-items: end; }.message-meta { color: #89969a; font-size: 7px; }.message-bubble { padding: 8px 9px; border: 1px solid var(--line); border-radius: 5px; background: #f7f9f9; font-size: 9px; line-height: 1.55; }.message.user .message-bubble { border-color: var(--teal); color: white; background: var(--teal); }
.message.assistant.mobvoi .message-bubble { border-color: #6b4cc7; color: #1a1030; background: #f0ebfa; }
.message.assistant.mobvoi .message-meta { color: #6b4cc7; }
.message.assistant.xingyun .message-bubble { border-color: var(--teal); color: #0c3b34; background: #e3f3ef; }
.message.assistant.xingyun .message-meta { color: var(--teal); }.message.tool .message-bubble { border-color: #eadbbd; color: #655637; background: #fbf5e9; }.message-image { width: 100%; margin-top: 6px; display: block; border: 1px solid var(--line); border-radius: 4px; }.tool-result { display: flex; align-items: center; gap: 5px; }.tool-result svg { width: 12px; color: var(--teal); }.typing-dots { height: 16px; display: flex; align-items: center; gap: 3px; }.typing-dots span { width: 4px; height: 4px; border-radius: 50%; background: #8d999d; animation: typing 1s infinite alternate; }.typing-dots span:nth-child(2) { animation-delay:.15s; }.typing-dots span:nth-child(3) { animation-delay:.3s; } @keyframes typing { to { transform:translateY(-3px); opacity:.5; } }
.composer { position: relative; margin: 5px 9px 8px; padding: 8px 38px 8px 9px; display: flex; align-items: center; border: 1px solid #cbd6d8; border-radius: 5px; background: white; }.composer:focus-within { border-color: var(--teal); }.composer textarea { width: 100%; max-height: 64px; resize: none; border: 0; outline: 0; font-size: 9px; line-height: 1.45; }.composer textarea::placeholder { color: #9ba6a9; }.send-button { position: absolute; right: 6px; bottom: 6px; width: 28px; height: 28px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 4px; color: white; background: var(--teal); }.send-button svg { width: 14px; }.interim-text { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); padding: 6px 8px; border-radius: 3px; color: #0d6259; background: #e4f4f0; box-shadow: var(--shadow); font-size: 8px; }.assistant-foot { padding: 0 10px; justify-content: space-between; border-top: 1px solid var(--line); color: var(--muted); font-size: 7px; }.assistant-foot span { display: flex; align-items: center; gap: 4px; }.assistant-foot svg { width: 10px; }.assistant-foot button { padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 7px; }
.settings-dialog { width: min(540px,calc(100vw - 28px)); padding: 0; border: 0; border-radius: 7px; box-shadow: 0 28px 90px rgba(10,24,27,.32); }.settings-dialog::backdrop { background: rgba(5,15,17,.66); backdrop-filter: blur(3px); }.settings-dialog form { padding: 21px; }.dialog-heading { justify-content: space-between; }.dialog-heading span { color: var(--teal); font-size: 8px; font-weight: 800; }.dialog-heading h2 { margin-top: 4px; font-size: 18px; }.dialog-copy { margin: 13px 0 15px; color: var(--muted); font-size: 10px; line-height: 1.6; }.provider-switch { margin-top: 15px; width: 100%; }.provider-switch button { flex: 1; }.provider-panel[hidden] { display: none; }.settings-dialog label { margin-top: 11px; display: grid; gap: 5px; color: #46575c; font-size: 9px; font-weight: 800; }.settings-dialog input, .settings-dialog select { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--ink); background: white; }.provider-options { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: end; }.provider-options .check-control { min-height: 38px; display: flex; grid-template-columns: auto 1fr; flex-direction: row; align-items: center; gap: 7px; }.provider-options .check-control input { width: 15px; height: 15px; margin: 0; }
.mobvoi-helper { display: grid; gap: 2px; padding: 10px 12px; margin-bottom: 4px; border: 1px solid #d4e6e1; border-radius: 5px; background: #f4faf8; }
.helper-hint { color: #4a6b64; font-size: 8px; line-height: 1.5; margin-bottom: 4px; }
.mobvoi-selects { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mobvoi-selects label { margin-top: 0; }
.interaction-settings { margin-top: 14px; padding: 12px; border: 1px solid #d6e1e3; border-radius: 5px; background: #f8fafa; }
.interaction-settings-head { display: flex; align-items: center; justify-content: space-between; }
.interaction-settings-head b { color: var(--ink); font-size: 10px; }
.interaction-settings-head span { color: var(--muted); font-size: 8px; }
.interaction-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.interaction-settings-grid label { margin-top: 9px; }
.audio-device-settings { margin-top: 11px; padding-top: 10px; border-top: 1px solid #dbe5e7; }
.text-button { padding: 3px 7px; border: 0; color: var(--teal); background: transparent; font-size: 8px; font-weight: 800; cursor: pointer; }
.helper-divider { text-align: center; color: var(--muted); font-size: 8px; margin: 6px 0 2px; }
.full-width { width: 100%; margin-top: 8px; justify-content: center; }.download-progress { margin-top: 14px; display: grid; gap: 5px; }.download-progress[hidden] { display: none; }.download-progress span { width: 0; height: 4px; border-radius: 2px; background: var(--teal); transition: width .2s; }.download-progress b { color: var(--muted); font-size: 8px; }.dialog-actions { margin-top: 20px; justify-content: flex-end; gap: 7px; }
.confirm-sheet { position: fixed; z-index: 30; left: 50%; bottom: 22px; width: min(620px,calc(100vw - 30px)); min-height: 76px; padding: 12px 14px; transform: translateX(-50%); grid-template-columns: 36px 1fr auto; gap: 11px; border: 1px solid #e2b0a9; border-radius: 7px; background: white; box-shadow: 0 20px 65px rgba(35,27,25,.24); }.confirm-sheet[hidden] { display: none; }.confirm-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 5px; color: var(--coral); background: #fbe8e5; }.confirm-icon svg { width: 19px; }.confirm-sheet b { font-size: 11px; }.confirm-sheet p { margin-top: 4px; color: var(--muted); font-size: 9px; }.confirm-actions { gap: 7px; }.toast-region { position: fixed; z-index: 40; right: 18px; bottom: 18px; display: grid; gap: 7px; }.toast { max-width: 340px; padding: 9px 11px; border-radius: 5px; color: white; background: #26363a; box-shadow: var(--shadow); font-size: 9px; animation: toastIn .18s ease; }.toast.error { background: #943e33; } @keyframes toastIn { from { opacity:0; transform:translateY(6px); } }
.assistant-jump { display: none; }
@media (max-width: 1180px) { .workspace { grid-template-columns: minmax(690px,1fr) 320px; }.topbar { grid-template-columns: 220px 1fr auto; }.shift { display:none; }.line-row { grid-template-columns: minmax(145px,1.1fr) minmax(100px,1fr) 52px 52px 58px; }.kpi-card { grid-template-columns: 34px 1fr; }.kpi-card > :last-child { display:none; } }
@media (max-width: 920px) { .app-shell { grid-template: 60px auto / 58px minmax(0,1fr); }.topbar { grid-template-columns: 190px 1fr auto; }.plant-switch { justify-self:start; }.topbar-meta .system-live,.topbar-meta .user-button b,.topbar-meta .user-button svg { display:none; }.workspace { height:auto; min-height:calc(100vh - 60px); grid-template-columns:1fr; overflow:visible; }.mes-area { min-height:720px; }.assistant-panel { min-height:720px; }.guide-callout { left:80px; width:calc(100vw - 110px); }.sidebar { padding-left:5px; padding-right:5px; }.kpi-grid { grid-template-columns:repeat(2,1fr); }.overview-grid { grid-template-columns:1fr; grid-template-rows:auto; }.production-panel { grid-row:auto; min-height:420px; }.trend-panel { min-height:280px; }.alarm-panel { min-height:230px; } }
@media (max-width: 620px) { .app-shell { display:block; }.topbar { height:58px; padding:0 10px; grid-template-columns:1fr auto; }.brand p,.plant-switch,.topbar-meta .system-live { display:none; }.sidebar { height:55px; padding:4px 8px; position:sticky; top:0; z-index:12; flex-direction:row; border-right:0; border-bottom:1px solid #27383c; }.side-nav { flex:1; height:46px; }.side-spacer,.side-nav:last-child { display:none; }.workspace { padding:8px; }.page-actions .primary-button,.page-actions .secondary-button { width:34px; padding:0; font-size:0; }.page-actions .primary-button svg,.page-actions .secondary-button svg { width:15px; }.page-heading { align-items:flex-start; }.page-heading h2 { font-size:17px; }.kpi-grid { grid-template-columns:1fr 1fr; }.kpi-card { padding:11px; min-height:96px; }.kpi-card strong { font-size:19px; }.line-row { min-width:680px; }.line-list { overflow-x:auto; }.quality-kpis,.quality-grid { grid-template-columns:1fr 1fr; }.assistant-panel { min-height:680px; }.guide-callout { left:10px; width:calc(100vw - 20px); }.confirm-sheet { grid-template-columns:36px 1fr; }.confirm-actions { grid-column:1/-1; justify-content:flex-end; }.assistant-jump { position:fixed; z-index:18; right:14px; bottom:14px; min-height:40px; padding:0 12px; display:flex; align-items:center; gap:6px; border:0; border-radius:20px; color:white; background:var(--teal); box-shadow:0 10px 26px rgba(8,127,115,.28); font-size:10px; font-weight:800; }.assistant-jump svg { width:15px; } }

/* Presenter mode: the avatar becomes a foreground guide instead of a boxed widget. */
.workspace { position: relative; grid-template-columns: minmax(0, 1fr); }
.assistant-panel {
  position: fixed;
  z-index: 16;
  inset: 64px 0 0 76px;
  min-height: 0;
  display: block;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}
.presenter-shell {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: clamp(340px, 31vw, 460px);
  height: min(82vh, 690px);
  --avatar-x: 0px;
  --avatar-y: 0px;
  --avatar-scale: 1;
  transform: translateX(calc(-50% + var(--avatar-x))) translateY(var(--avatar-y)) scale(var(--avatar-scale));
  transform-origin: 50% 100%;
  transition: left .35s ease, transform .35s ease;
  pointer-events: none;
}
.presenter-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  bottom: 16px;
  width: 118%;
  height: 74%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 72%, rgba(7, 91, 82, .18), rgba(7, 91, 82, .06) 43%, transparent 70%);
  filter: blur(8px);
}
.presenter-head {
  position: absolute;
  z-index: 9;
  top: 12px;
  left: 50%;
  width: min(440px, calc(100% - 12px));
  min-height: 48px;
  padding: 8px 9px 8px 13px;
  justify-content: space-between;
  transform: translateX(-50%);
  border: 1px solid rgba(171, 232, 216, .22);
  border-radius: 24px;
  color: #eefcf8;
  background: rgba(8, 24, 25, .82);
  box-shadow: 0 14px 42px rgba(5, 23, 24, .22);
  backdrop-filter: blur(14px);
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}
.presenter-head.dragging { cursor: grabbing; }
.presenter-head .assistant-actions { flex-shrink: 0; gap: 3px; }
.presenter-head .assistant-actions .icon-button { width: 25px; height: 25px; }
.presenter-head .assistant-actions .icon-button svg { width: 12px; }
.presenter-head .drag-indicator { cursor: grab; opacity: .65; }
.presenter-head b { font-size: 11px; }
.presenter-head p { max-width: 230px; overflow: hidden; color: #9fc0ba; text-overflow: ellipsis; white-space: nowrap; font-size: 7px; }
.presenter-head .icon-button { border-color: rgba(255, 255, 255, .13); color: white; background: rgba(255, 255, 255, .07); }
.avatar-stage {
  position: absolute;
  inset: 52px 0 92px;
  min-height: 0;
  display: block;
  overflow: visible;
  color: white;
  background: transparent;
}
.avatar-stage::before, .avatar-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 49%;
  width: 64%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%) scale(.86);
  border: 1px solid rgba(26, 157, 139, .15);
  border-radius: 50%;
  opacity: 0;
}
.avatar-stage.listening::before, .avatar-stage.speaking::before, .avatar-stage.thinking::before { opacity: 1; animation: avatarPulse 1.8s ease-out infinite; }
.avatar-stage.listening::after { opacity: 1; border-color: rgba(81, 220, 194, .35); animation: avatarPulse 1.8s .6s ease-out infinite; }
.avatar-stage.speaking::after { opacity: 1; border-color: rgba(91, 165, 255, .3); animation: avatarPulse 1.4s .4s ease-out infinite; }
.avatar-stage.thinking::after { opacity: 1; border-color: rgba(245, 194, 89, .3); animation: avatarOrbit 2.4s linear infinite; }
.avatar-viewport { position: absolute; inset: 0; min-height: 0; overflow: visible; }
.offline-avatar, #sdk { position: absolute; inset: 0; }
.offline-avatar {
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  color: #9dc9c0;
  background: radial-gradient(circle at 50% 60%, rgba(24, 113, 101, .2), transparent 56%);
  font-size: 10px;
}
.offline-avatar[hidden] { display: none !important; }
.avatar-loader { display: flex; gap: 5px; }
.avatar-loader i { width: 7px; height: 7px; border-radius: 50%; background: #71d8c4; animation: loaderDot .8s ease-in-out infinite alternate; }
.avatar-loader i:nth-child(2) { animation-delay: .14s; }
.avatar-loader i:nth-child(3) { animation-delay: .28s; }
.demo-avatar-figure { position: relative; width: 120px; height: 180px; margin-bottom: 8px; }
.demo-avatar-figure .demo-head { position: absolute; top: 0; left: 50%; width: 60px; height: 72px; transform: translateX(-50%); border-radius: 50% 50% 45% 45%; background: linear-gradient(135deg, #5fc9b5, #3da896); animation: demoFloat 3s ease-in-out infinite; }
.demo-avatar-figure .demo-head::before { content: ""; position: absolute; top: 26px; left: 14px; width: 6px; height: 6px; border-radius: 50%; background: #0b1719; box-shadow: 22px 0 #0b1719; }
.demo-avatar-figure .demo-head::after { content: ""; position: absolute; top: 46px; left: 22px; width: 16px; height: 8px; border-bottom: 2px solid #0b1719; border-radius: 50%; }
.demo-avatar-figure .demo-body { position: absolute; bottom: 0; left: 50%; width: 100px; height: 100px; transform: translateX(-50%); clip-path: polygon(28% 0, 72% 0, 100% 30%, 92% 100%, 8% 100%, 0 30%); background: linear-gradient(135deg, #3da896, #2a7d6e); animation: demoFloat 3s ease-in-out infinite reverse; }
@keyframes demoFloat { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-6px); } }
#sdk {
  z-index: 3;
  width: 100% !important;
  height: 100% !important;
  position: absolute !important;
  inset: 0 !important;
  overflow: hidden !important;
  pointer-events: none;
}
#sdk canvas { pointer-events: auto; }
.presenter-shell[data-provider="xingyun"] #sdk canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  left: 50% !important;
  top: 8% !important;
  transform: translateX(-50%) scale(1.42) !important;
  transform-origin: 50% 0 !important;
  object-fit: contain !important;
}
.presenter-shell[data-provider="mobvoi"] #sdk video.mobvoi-video-layer {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  transform: none !important;
  object-fit: contain !important;
  object-position: 50% 100% !important;
}
.presenter-shell[data-provider="mobvoi"] #sdk canvas.mobvoi-platform-canvas {
  position: absolute !important;
  z-index: 5;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  transform: none !important;
  object-fit: contain !important;
  pointer-events: none !important;
}
.presenter-shell[data-provider="mobvoi"] #sdk canvas.mobvoi-active-canvas {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.presenter-shell[data-provider="mobvoi"] #sdk canvas.mobvoi-duplicate-canvas {
  display: none !important;
  visibility: hidden !important;
}
.presenter-shell[data-provider="mobvoi"] #sdk video.mobvoi-active-layer {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.presenter-shell[data-provider="mobvoi"] #sdk video.mobvoi-active-layer.mobvoi-chroma-source { opacity: 0 !important; }
.presenter-shell[data-provider="mobvoi"] #sdk canvas.mobvoi-chroma-layer {
  position: absolute !important;
  z-index: 5;
  left: 50% !important;
  top: auto !important;
  bottom: 0 !important;
  width: auto !important;
  height: 100% !important;
  max-width: 100% !important;
  transform: translateX(-50%) !important;
  pointer-events: none !important;
}
.presenter-shell[data-provider="mobvoi"] #sdk video.mobvoi-duplicate-layer {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.avatar-viewport { overflow: hidden !important; }
.avatar-status {
  z-index: 7;
  left: 18px;
  top: 20px;
  right: 18px;
  opacity: .88;
}
.avatar-status > span, .avatar-status small {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  color: #d9eeea;
  background: rgba(5, 18, 19, .62);
  backdrop-filter: blur(10px);
}
.subtitle {
  z-index: 8;
  left: 50%;
  right: auto;
  bottom: 16px;
  width: min(420px, calc(100vw - 32px));
  transform: translateX(-50%);
}
.subtitle span {
  max-width: 100%;
  padding: 9px 13px;
  border: 1px solid rgba(178, 234, 220, .2);
  border-radius: 8px;
  background: rgba(5, 17, 18, .8);
  box-shadow: 0 12px 32px rgba(4, 18, 19, .2);
  backdrop-filter: blur(12px);
  font-size: 10px;
  line-height: 1.55;
}
.listen-indicator, .thinking-indicator {
  z-index: 9;
  left: 50%;
  top: 74px;
  min-height: 30px;
  padding: 0 10px;
  transform: translateX(-50%);
  border: 1px solid rgba(164, 227, 211, .28);
  border-radius: 15px;
  background: rgba(4, 15, 15, .82);
  box-shadow: 0 10px 28px rgba(4, 18, 19, .18);
  backdrop-filter: blur(10px);
}
.thinking-indicator { position: absolute; display: flex; align-items: center; gap: 4px; color: #fff2c9; font-size: 8px; }
.thinking-indicator[hidden] { display: none; }
.thinking-indicator span { width: 4px; height: 4px; border-radius: 50%; background: #efc86c; animation: typing 1s infinite alternate; }
.thinking-indicator span:nth-child(2) { animation-delay: .15s; }
.thinking-indicator span:nth-child(3) { animation-delay: .3s; }
.thinking-indicator b { margin-left: 4px; }
.presenter-controls {
  position: absolute;
  z-index: 10;
  left: 50%;
  bottom: 10px;
  width: min(440px, calc(100vw - 30px));
  display: grid;
  justify-items: center;
  gap: 6px;
  transform: translateX(-50%);
  pointer-events: auto;
}
.presenter-controls .voice-controls {
  min-height: 42px;
  padding: 5px 7px;
  gap: 6px;
  border: 1px solid rgba(157, 219, 204, .2);
  border-radius: 23px;
  background: rgba(7, 24, 25, .84);
  box-shadow: 0 16px 40px rgba(7, 24, 25, .2);
  backdrop-filter: blur(14px);
}
.provider-quick-select { min-height: 30px; padding: 3px 5px 3px 9px; display: flex; align-items: center; gap: 5px; border: 1px solid rgba(157,219,204,.2); border-radius: 16px; color: #d9eeea; background: rgba(7,24,25,.84); box-shadow: 0 10px 30px rgba(7,24,25,.15); backdrop-filter: blur(12px); pointer-events: auto; }
.provider-quick-select > svg { width: 12px; }.provider-quick-select > span { font-size: 8px; font-weight: 800; }.provider-quick-select > b { padding: 4px 8px; border-radius: 10px; color: white; background: rgba(255,255,255,.08); font-size: 8px; }.runtime-warning button { height: 23px; padding: 0 8px; border: 0; border-radius: 11px; color: #083c36; background: #a9e4d5; font-size: 8px; font-weight: 800; }
.runtime-warning { max-width: min(460px,calc(100vw - 30px)); min-height: 32px; padding: 5px 6px 5px 9px; display: flex; align-items: center; gap: 7px; border: 1px solid rgba(255,178,148,.32); border-radius: 17px; color: #ffe0d6; background: rgba(92,37,29,.9); box-shadow: 0 12px 34px rgba(57,22,18,.2); pointer-events: auto; }.runtime-warning[hidden] { display: none; }.runtime-warning > svg { width: 13px; flex: 0 0 auto; }.runtime-warning > span { font-size: 8px; line-height: 1.4; }.runtime-warning button { margin-left: auto; flex: 0 0 auto; }
.sdk-diagnostic { min-height: 48px; margin: 0 0 12px; padding: 9px 10px; display: flex; align-items: flex-start; gap: 9px; border: 1px solid #cfe1dd; border-radius: 5px; color: #315650; background: #f2faf8; }.sdk-diagnostic.error { border-color: #efc0b8; color: #7f3328; background: #fff4f2; }.sdk-diagnostic svg { width: 16px; flex: 0 0 auto; }.sdk-diagnostic div { display: grid; gap: 3px; }.sdk-diagnostic b { font-size: 9px; }.sdk-diagnostic p { color: inherit; font-size: 8px; line-height: 1.45; }
.presenter-controls .mic-button, .presenter-controls .interrupt-button, .presenter-controls .avatar-power-control { min-height: 32px; border-radius: 16px; font-size: 9px; }
.presenter-controls .quick-actions { max-width: 100%; padding: 0; gap: 4px; }
.presenter-controls .quick-actions button { padding: 5px 8px; border-color: rgba(7, 73, 68, .18); border-radius: 12px; color: #234641; background: rgba(255, 255, 255, .9); box-shadow: 0 5px 14px rgba(5, 30, 29, .08); backdrop-filter: blur(8px); }
.barge-hint { display: flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 10px; color: #315b55; background: rgba(238, 249, 246, .9); font-size: 8px; }
.barge-hint svg { width: 11px; }
.conversation-dock {
  position: absolute;
  z-index: 20;
  top: 14px;
  right: 14px;
  bottom: 14px;
  width: min(380px, calc(100vw - 28px));
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) 76px 34px;
  overflow: hidden;
  transform: translateX(calc(100% + 28px));
  border: 1px solid rgba(164, 194, 190, .65);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 24px 70px rgba(17, 45, 48, .22);
  backdrop-filter: blur(18px);
  opacity: 0;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s ease;
  pointer-events: auto;
}
.assistant-panel.chat-open .conversation-dock { transform: translateX(0); opacity: 1; }
.assistant-panel.chat-open .presenter-shell { left: calc(50% - 150px); }
.dock-heading { padding: 0 12px 0 15px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dock-heading div { display: grid; gap: 3px; }
.dock-heading span { color: var(--teal); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.dock-heading b { font-size: 11px; }
.conversation-dock .message-list { padding: 12px 13px; }
.conversation-dock .composer { margin: 8px 10px 10px; }
.assistant-jump {
  position: fixed;
  z-index: 38;
  right: 22px;
  bottom: 22px;
  min-height: 42px;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 22px;
  color: white;
  background: #0d7369;
  box-shadow: 0 14px 34px rgba(7, 87, 79, .3);
  font-size: 10px;
  font-weight: 800;
}
.assistant-jump svg { width: 15px; }
.assistant-jump.dock-open { opacity: 0; pointer-events: none; transform: translateY(8px); }
.media-stage {
  position: fixed;
  z-index: 25;
  left: 96px;
  top: 104px;
  width: min(56vw, 820px);
  max-height: calc(100vh - 150px);
  padding: 10px;
  border: 1px solid rgba(16, 76, 73, .2);
  border-radius: 8px;
  background: rgba(245, 249, 249, .96);
  box-shadow: 0 24px 70px rgba(9, 28, 30, .25);
  backdrop-filter: blur(16px);
  pointer-events: auto;
}
.media-stage[hidden] { display: none; }
.media-stage-head { min-height: 38px; padding: 0 2px 8px 5px; display: flex; align-items: center; justify-content: space-between; }
.media-stage-head > div:first-child { display: grid; gap: 2px; }
.media-stage-head span { color: var(--teal); font-size: 8px; font-weight: 800; }
.media-stage-head b { color: var(--ink); font-size: 12px; }
.media-stage-head > div:last-child { display: flex; gap: 5px; }
.media-stage-body { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 5px; background: #102426; }
.media-stage-body img, .media-stage-body video { width: 100%; height: 100%; display: block; object-fit: contain; }
.media-stage > p { margin: 7px 4px 1px; color: var(--muted); font-size: 8px; }
.message-video { width: 100%; margin-top: 7px; border-radius: 5px; background: #102426; }
@keyframes avatarPulse { 0% { opacity: .7; transform: translate(-50%, -50%) scale(.76); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.18); } }
@keyframes avatarOrbit { to { transform: translate(-50%, -50%) rotate(360deg) scale(.95); } }
@keyframes loaderDot { to { transform: translateY(-7px); opacity: .35; } }

@media (max-width: 1080px) {
  .presenter-shell { width: 350px; height: min(72vh, 560px); }
  .assistant-panel.chat-open .presenter-shell { left: calc(50% - 140px); }
  .conversation-dock { width: 350px; }
  .presenter-head .drag-indicator, .presenter-head #avatarReset { display: none; }
}
@media (max-width: 760px) {
  .assistant-panel { inset: 113px 0 0; }
  .presenter-shell { left: 50%; width: 300px; height: 470px; }
  .presenter-head { top: 0; width: 280px; }
  .presenter-head #avatarZoomOut, .presenter-head #avatarZoomIn, .presenter-head .drag-indicator { display: none; }
  .assistant-panel.chat-open .presenter-shell { opacity: .18; left: 50%; }
  .conversation-dock { inset: 8px; width: auto; }
  .subtitle { width: min(330px, calc(100vw - 20px)); }
  .presenter-controls { bottom: 8px; }
  .presenter-controls .quick-actions { display: none; }
  .barge-hint { display: none; }
  .assistant-jump { right: 14px; bottom: 14px; }
  .media-stage { left: 8px; right: 8px; top: 126px; width: auto; max-height: calc(100vh - 150px); }
}

/* Jiansi presentation mode: the stage shows only the digital human. */
.plant-switch { border: 0; cursor: pointer; }
.presenter-head, .presenter-controls, .avatar-status, .subtitle, .listen-indicator, .thinking-indicator, .assistant-jump { display: none !important; }
.presenter-shell { width: clamp(280px, 28vw, 420px); height: min(82vh, 680px); pointer-events: auto; }
.presenter-shell::before, .avatar-stage::before, .avatar-stage::after { display: none !important; }
.avatar-stage { inset: 0; pointer-events: none; cursor: pointer; touch-action: none; user-select: none; }
.avatar-stage.dragging { cursor: grabbing; }
.avatar-viewport { inset: 0; }
#sdk canvas, #sdk video { pointer-events: none !important; }
.avatar-hit-target { position: absolute; z-index: 6; left: 50%; top: 4%; width: 58%; height: 92%; transform: translateX(-50%); pointer-events: auto; cursor: pointer; touch-action: none; }
.assistant-panel.chat-open .presenter-shell { left: calc(50% - 190px); }
.offline-avatar { color: rgba(232,255,249,.8); background: transparent; }

.avatar-context-menu { position: fixed; z-index: 60; width: 220px; padding: 8px; display: grid; gap: 4px; border: 1px solid rgba(174,205,199,.75); border-radius: 7px; background: rgba(255,255,255,.98); box-shadow: 0 22px 60px rgba(12,34,36,.25); pointer-events: auto; }
.avatar-context-menu[hidden] { display: none; }
.avatar-menu-head { min-height: 40px; padding: 2px 5px 7px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.avatar-menu-head > div { display: flex; align-items: center; gap: 7px; }
.avatar-menu-head > div > span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(21,154,111,.12); }
.avatar-menu-head b { font-size: 10px; }.avatar-menu-head small { color: var(--muted); font-size: 8px; }
.avatar-context-menu > button { min-height: 34px; padding: 0 9px; display: flex; align-items: center; gap: 8px; border: 0; border-radius: 4px; color: var(--ink); background: transparent; font-size: 9px; text-align: left; cursor: pointer; }
.avatar-context-menu > button:hover, .avatar-menu-row button:hover { background: #eef5f3; }
.avatar-context-menu svg { width: 14px; color: var(--teal); }
.avatar-menu-row { padding-top: 4px; display: grid; grid-template-columns: repeat(4,1fr); gap: 4px; border-top: 1px solid var(--line); }
.avatar-menu-row button { height: 34px; display: grid; place-items: center; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }

.top-popover { position: fixed; z-index: 45; top: 62px; right: 18px; width: 310px; padding: 12px; border: 1px solid var(--line); border-radius: 7px; background: white; box-shadow: 0 20px 54px rgba(15,35,38,.2); }
.top-popover[hidden] { display: none; }.top-popover > div { display: flex; align-items: center; justify-content: space-between; }.top-popover > div > b { font-size: 11px; }.top-popover section { margin-top: 8px; display: grid; gap: 6px; color: var(--muted); font-size: 9px; line-height: 1.55; }.top-popover article { padding: 8px; border-left: 3px solid var(--teal); background: #f4f8f7; }

.trace-view { padding-top: 10px; }.trace-hero { display: flex; align-items: center; gap: 12px; }.trace-hero > svg { width: 34px; color: var(--teal); }.trace-hero h3 { font-size: 16px; }.trace-hero p { margin-top: 4px; color: var(--muted); font-size: 9px; }.trace-search { margin: 14px 0; width: min(620px,100%); }.trace-result { padding: 16px; }.trace-result-head { display: flex; justify-content: space-between; align-items: center; }.trace-result-head div { display: grid; gap: 4px; }.trace-result-head span { color: var(--muted); font-size: 8px; }.trace-result-head b { font-size: 12px; }.trace-result-head em { padding: 5px 8px; border-radius: 3px; color: #0a6d53; background: #def4eb; font-size: 8px; font-style: normal; font-weight: 800; }.trace-timeline { margin-top: 18px; display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }.trace-timeline article { min-height: 125px; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: #f8fafa; }.trace-timeline svg { width: 18px; color: var(--teal); }.trace-timeline b { display: block; margin-top: 9px; font-size: 10px; }.trace-timeline p { min-height: 34px; margin-top: 5px; color: var(--muted); font-size: 8px; line-height: 1.5; }.trace-timeline time { color: #74908b; font-size: 8px; }
.order-dialog { width: min(560px,calc(100vw - 28px)); }

@media (max-width: 900px) { .trace-timeline { grid-template-columns: 1fr 1fr; }.assistant-panel.chat-open .presenter-shell { left: 40%; } }
@media (max-width: 620px) { .trace-timeline { grid-template-columns: 1fr; }.avatar-context-menu { width: 205px; }.presenter-shell { width: 290px; height: 470px; } }
