/* Enterprise workspace: shared tokens, management, conversation, detail, responsive. */
:root {
  --primary: #315eea; --primary-hover: #244bd0; --primary-soft: #eef3ff;
  --ink: #192b45; --muted: #62728a; --line: #e4e9f1; --background: #f4f6fa;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--background); color: var(--ink); font: 16px/1.6 "Segoe UI","Microsoft YaHei",sans-serif; -webkit-font-smoothing: antialiased; }
button,input,textarea { font: inherit; }
button,a,input,textarea { outline-offset: 3px; }
button:focus-visible,a:focus-visible { outline: 2px solid var(--primary); }
a { color: var(--primary); text-decoration: none; }
h1,h2,h3,p { margin-top: 0; }
h1 { margin-bottom: 6px; font-size: 26px; font-weight: 650; letter-spacing: -.4px; line-height: 1.4; }
h2 { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
h3 { font-size: 16px; font-weight: 600; }
p { margin-bottom: 12px; }
small { font-size: 13px; }
[v-cloak], input[type=file] { display: none; }
main { width: 100%; max-width: 1440px; margin: 0 auto; padding: 0 40px 28px; }
.topbar { height: 72px; position: relative; display: flex; justify-content: space-between; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); background: #fff; }
.topbar::before { content: ""; position: absolute; inset: 0 calc((min(100vw,1440px) - 100vw)/2 - 40px); z-index: -1; background: #fff; border-bottom: 1px solid var(--line); }
.product-header { display: flex; align-items: center; gap: 12px; min-width: 0; }
.product-mark { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: var(--primary); font-size: 23px; flex-shrink: 0; }
.product-header strong { font-size: 21px; letter-spacing: 1px; display: flex; align-items: center; gap: 12px; }
.product-subtitle { font-size: 14px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.header-divider { width: 1px; height: 20px; background: var(--line); margin: 0 8px; }
.current-module { color: #475569; font-size: 14px; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.page-switch { color: #475569; font-size: 14px; border: 1px solid var(--line); background: #fff; padding: 7px 12px; border-radius: 6px; }
.page-switch:hover { color: var(--primary); background: #f8fafc; }
.page-switch i { margin-left: 5px; }
.health-button { display: flex; align-items: center; gap: 7px; padding: 8px 0; border: 0; background: transparent; cursor: pointer; color: #64748b; font-size: 13px; white-space: nowrap; }
.health-button i { font-size: 11px; }
.health-dot { width: 6px; height: 6px; background: #f59e0b; border-radius: 50%; }
.health-dot.healthy { background: #16a34a; }
.health-detail h3 { margin-bottom: 16px; }
.health-detail>div { display: flex; justify-content: space-between; margin: 12px 0; font-size: 14px; }
.health-detail p { font-size: 13px; margin-top: 16px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 0 26px; }
.page-heading p { color: var(--muted); font-size: 15px; margin: 0; }
.page-eyebrow { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.page-eyebrow span { color: #bac4d2; }
.workspace-main h1 { font-size: 28px; margin-bottom: 8px; }
.scope-badge { display: flex; align-items: center; gap: 10px; color: #475569; font-size: 14px; }
.scope-badge>i { font-size: 22px; color: #94a3b8; }
.scope-badge small { display: block; color: #94a3b8; font-size: 13px; }
.hint { color: var(--muted); font-size: 14px; }
.error { color: #dc2626 !important; overflow-wrap: anywhere; }
.sub { display: block; margin-top: 5px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.management-sections { display: flex; align-items: stretch; gap: 20px; height: 60px; padding: 0; margin-top: 0; background: transparent; border-bottom: 1px solid var(--line); }
.management-sections a { position: relative; display: flex; gap: 9px; align-items: center; justify-content: center; min-width: 118px; color: #62728a; padding: 0 8px; font-size: 16px; border-bottom: 3px solid transparent; transition: background .15s,color .15s; }
.management-sections a:hover { color: var(--primary); background: #f8fafc; }
.management-sections a i { font-size: 19px; }
.management-sections a.selected { color: var(--primary); border-color: var(--primary); background: transparent; font-weight: 600; }
.stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; margin-bottom: 20px; }
.stat-card { position: relative; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); padding: 20px 24px; box-shadow: 0 2px 3px #192b4502; }
.stat-card>div { display: flex; align-items: center; justify-content: space-between; font-size: 15px; color: #52637b; }
.stat-card i { position: absolute; right: 24px; top: 24px; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 11px; font-size: 22px; color: var(--primary); background: var(--primary-soft); }
.stat-card strong { display: block; color: var(--ink); font-size: 34px; font-weight: 650; line-height: 1.35; margin: 10px 0 8px; font-variant-numeric: tabular-nums; letter-spacing: -.6px; }
.stat-card p { margin: 0; color: var(--muted); font-size: 14px; }
.stat-1 i { color: #23846c; background: #ecf8f3; }
.stat-2 i { color: #a8741d; background: #fff7e8; }
.import-card { display: flex; align-items: center; gap: 20px; border: 1px solid #dbe4fa; background: #f9fbff; border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.upload-icon { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 10px; background: var(--primary-soft); color: var(--primary); font-size: 25px; flex-shrink: 0; }
.import-copy { flex: 1; }
.import-copy p { font-size: 15px; color: #52637b; margin-bottom: 6px; }
.import-copy .hint { font-size: 14px; }
.upload-actions { display: flex; align-items: center; gap: 12px; }
.library-panel { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 0 24px 20px; overflow: hidden; box-shadow: 0 3px 10px #192b4503; }
.library-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0 4px; }
.library-heading h2 { font-size: 18px; margin-bottom: 5px; }
.library-heading p { color: var(--muted); font-size: 14px; margin: 0; }
.library-kind { display: flex; align-items: center; gap: 7px; white-space: nowrap; color: var(--muted); font-size: 13px; }
.library-kind i { font-size: 17px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.library-panel>.section-head { height: 64px; border-bottom: 1px solid #edf2f7; margin-bottom: 0; }
.segmented { display: flex; gap: 26px; height: 100%; }
.segmented button { border: 0; border-bottom: 2px solid transparent; background: transparent; color: #64748b; padding: 0 2px; font-size: 15px; cursor: pointer; }
.segmented button.selected { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.refresh-note { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.filter-bar { display: flex; align-items: center; gap: 12px; padding: 20px 0; }
.filter-bar>.el-input { max-width: 320px; }
.filter-bar>.el-select { width: 155px; }
.filter-bar>.hint { margin-left: auto; font-size: 13px; }
.table-scroll-hint { display: none; }
.file-cell { display: flex; align-items: center; gap: 12px; }
.file-cell>i { color: #6488c8; font-size: 22px; background: #eff6ff; padding: 10px; border-radius: 6px; }
.file-cell>div { min-width: 0; }
.result-counts b { font-size: 14px; color: #334155; font-weight: 500; }
.result-counts>span { display: block; color: var(--muted); font-size: 13px; margin-top: 4px; }
.danger-link { color: #dc2626 !important; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 20px; }
.page-foot { display: flex; justify-content: space-between; gap: 20px; color: #94a3b8; margin-top: 18px; font-size: 13px; }
.page-foot a { color: #64748b; }
.el-button { border-radius: 7px; font-size: 15px; }
.el-button--primary { background: var(--primary); border-color: var(--primary); }
.el-button--primary:hover,.el-button--primary:focus { background: var(--primary-hover); border-color: var(--primary-hover); }
.el-button--primary.is-disabled,.el-button--primary.is-disabled:hover { background: #93b4ef; border-color: #93b4ef; }
.el-button--primary.is-plain { color: var(--primary); background: var(--primary-soft); border-color: #bfdbfe; }
.el-button--primary.is-plain:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.el-button--text { color: var(--primary); }
.el-input__inner,.el-textarea__inner { border-radius: 6px; border-color: #dce3ec; font-size: 15px; }
.el-input__inner:focus,.el-textarea__inner:focus,.el-select .el-input.is-focus .el-input__inner { border-color: var(--primary); }
.el-input--small .el-input__inner { height: 38px; line-height: 38px; }
.el-select-dropdown__item { font-size: 14px; }
.el-table { color: #334155; font-size: 15px; }
.el-table th.el-table__cell { font-size: 14px; font-weight: 600; color: #52637b; background: #f6f8fb; padding: 12px 0; }
.el-table td.el-table__cell { padding: 17px 0; border-color: #edf2f7; }
.el-table .cell { line-height: 1.65; overflow-wrap: anywhere; }
.el-table::before { background: #edf2f7; }
.library-panel .el-table { border: 1px solid #edf0f5; border-radius: 8px; }
.library-panel .el-table .cell { padding-left: 16px; padding-right: 16px; }
.el-table__body tr:hover>td.el-table__cell { background: #f8fafc; }
.el-tag { border-radius: 4px; font-weight: 400; }
.el-tag--small,.el-tag--mini { font-size: 13px; }
.el-tag:not(.el-tag--success):not(.el-tag--danger):not(.el-tag--warning):not(.el-tag--info) { background: #eff6ff; border-color: #dbeafe; color: #2563eb; }
.el-tag--success { background: #f0fdf4; border-color: #dcfce7; color: #15803d; }
.el-tag--info { background: #f8fafc; border-color: #e2e8f0; color: #64748b; }
.el-alert { margin: 12px 0; }
.el-alert__title { font-size: 14px; line-height: 1.6; }
.el-textarea__inner { line-height: 1.75; }
.el-dialog__headerbtn { width: 30px; height: 30px; border-radius: 6px; top: 18px; right: 18px; }
.el-dialog__headerbtn:hover { background: #f1f5f9; }
.el-collapse { border-color: #e8edf3; }
.el-collapse-item__header { min-height: 44px; font-size: 14px; color: #64748b; border-color: #edf2f7; background: transparent; }
.el-collapse-item__wrap { border-color: #edf2f7; background: transparent; }
.el-collapse-item__content { color: #475569; }
.el-loading-mask { border-radius: 8px; }
.el-pagination .el-pager li.active { color: var(--primary); }
.chat-main { height: 100dvh; display: flex; flex-direction: column; padding-bottom: 24px; }
.chat-main .topbar,.chat-main .page-heading { flex-shrink: 0; }
.chat-main .page-heading { padding: 22px 0 20px; }
.chat-main h1 { font-size: 24px; }
.chat-layout { margin-top: 24px; display: grid; grid-template-columns: 280px minmax(0,1fr); flex: 1; min-height: 0; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; box-shadow: 0 3px 12px #0f172a03; }
.sessions { display: flex; flex-direction: column; min-height: 0; background: #fafbfe; border-right: 1px solid var(--line); padding: 20px 16px 14px; }
.session-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.session-top h3 { margin: 0; color: #334155; font-size: 16px; }
.session-top .el-button { padding: 7px 0; }
.session-list { flex: 1; overflow-y: auto; margin-top: 16px; scrollbar-width: thin; }
.session-list button { display: flex; gap: 10px; width: 100%; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #475569; padding: 12px 10px; text-align: left; cursor: pointer; font-size: 15px; margin-bottom: 6px; }
.session-list button>i { padding-top: 5px; font-size: 16px; color: #94a3b8; }
.session-list button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-list button small { display: block; font-size: 12px; color: #94a3b8; margin-top: 6px; }
.session-list button.selected { background: #eff6ff; color: var(--primary); border-color: #dbeafe; }
.session-list button.selected>i { color: #3b82f6; }
.session-list button:hover { background: #f1f5f9; }
.session-list button:disabled { cursor: wait; }
.session-note { border-top: 1px solid var(--line); padding: 14px 4px 0; font-size: 12px; line-height: 1.8; color: #94a3b8; }
.session-note i { margin-right: 5px; }
.conversation { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.conversation-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 28px; border-bottom: 1px solid #edf2f7; flex-shrink: 0; }
.conversation-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.conversation-title>div { min-width: 0; }
.assistant-avatar { width: 38px; height: 38px; border-radius: 9px; background: #eff6ff; color: #2563eb; font-size: 22px; display: grid; place-items: center; flex-shrink: 0; }
.conversation-head b { display: block; font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 600px; }
.conversation-head small { display: block; font-size: 13px; color: #94a3b8; margin-top: 3px; }
.context-panel { margin: 0 28px; flex-shrink: 0; border-top: 0; }
.context-panel .el-collapse-item__header { height: 42px; min-height: 42px; line-height: 42px; font-size: 13px; color: #64748b; }
.context-panel .el-collapse-item__content { max-height: 150px; overflow: auto; padding-bottom: 12px; }
.profile-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.profile-row { padding: 12px; background: #f8fafc; border-radius: 6px; }
.profile-row span { display: block; color: #64748b; font-size: 13px; }
.profile-row b { display: block; margin-top: 3px; font-size: 15px; font-weight: 500; }
.profile-row small { display: block; color: #94a3b8; font-size: 12px; margin-top: 4px; }
.messages { flex: 1; min-height: 100px; overflow-y: auto; padding: 26px 36px 12px; scrollbar-width: thin; }
.turn { width: min(100%,860px); margin: 0 auto 26px; }
.role { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #64748b; margin-bottom: 10px; }
.role>span { width: 26px; height: 26px; display: grid; place-items: center; background: #eff6ff; color: #3b82f6; border-radius: 6px; font-size: 16px; }
.bubble { color: #253449; font-size: 18px; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.turn.assistant .bubble { padding-left: 34px; }
.turn.user { text-align: right; }
.user .role { justify-content: flex-end; }
.user .role>span { background: #f1f5f9; color: #64748b; }
.user .bubble { display: inline-block; max-width: 86%; padding: 12px 18px; background: #eff6ff; color: #1e3a5f; border: 1px solid #e0edff; border-radius: 10px 2px 10px 10px; text-align: left; }
.welcome { text-align: center; width: min(100%,680px); margin: 0 auto; padding: 56px 16px 30px; }
.welcome-mark { width: 60px; height: 60px; margin: 0 auto 22px; background: #eff6ff; color: #3b82f6; border: 1px solid #dbeafe; display: grid; place-items: center; border-radius: 16px; font-size: 30px; }
.eyebrow { font-size: 13px; color: #94a3b8; letter-spacing: 1px; margin-bottom: 10px; }
.welcome h2 { font-size: 24px; color: #1e293b; font-weight: 600; margin-bottom: 12px; }
.welcome p { font-size: 15px; color: #64748b; }
.welcome-notes { display: flex; justify-content: center; flex-wrap: wrap; gap: 20px; font-size: 13px; color: #94a3b8; margin-top: 24px; }
.welcome-notes i { color: #64748b; margin-right: 6px; }
.pending { width: min(100%,860px); margin: 0 auto; padding: 12px 0; font-size: 14px; color: #64748b; }
.pending i { margin-right: 8px; color: var(--primary); }
.chat-recovery { padding: 8px 24px; }
.conversation>.el-alert { width: auto; margin: 4px 28px; flex-shrink: 0; }
.composer { flex-shrink: 0; margin: 8px 28px 20px; border: 1px solid #d6e0ed; border-radius: 9px; padding: 14px 16px 12px; background: #fff; box-shadow: 0 2px 8px #0f172a04; }
.composer:focus-within { border-color: #93b4ef; box-shadow: 0 0 0 3px #eff6ff; }
.composer .el-textarea__inner { padding: 0; border: 0; background: transparent; box-shadow: none; color: #334155; font-size: 17px; line-height: 1.65; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 10px; }
.composer-foot>span { color: #94a3b8; font-size: 12px; }
.composer-foot .el-button { padding: 10px 18px; }
.detail-dialog { border-radius: 10px; overflow: hidden; }
.detail-dialog .el-dialog__header { padding: 22px 26px; border-bottom: 1px solid var(--line); }
.detail-dialog .el-dialog__title { font-size: 18px; color: var(--ink); font-weight: 600; }
.detail-dialog .el-dialog__body { padding: 22px 26px; max-height: 79vh; overflow-y: auto; }
.detail-body { min-height: 110px; }
.content-card,.chunk,.segment-card { border: 1px solid var(--line); border-radius: 7px; padding: 20px; margin: 14px 0; background: #fff; }
.content-card h3 { font-size: 18px; font-weight: 500; line-height: 1.7; }
.field-label { display: block; font-size: 13px; color: #64748b; margin: 16px 0 8px; }
.content-card>.field-label:first-child { margin-top: 0; }
blockquote { margin: 12px 0; padding: 16px 20px; background: #f8fafc; border-left: 3px solid #bfdbfe; font-size: 17px; line-height: 1.85; white-space: pre-wrap; }
.method-list { padding-left: 24px; line-height: 1.9; }
.method-list li { padding-left: 4px; margin-bottom: 12px; font-size: 16px; }
.condition-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-section-title { margin: 28px 0 10px; font-size: 16px; }
.evidence { display: grid; grid-template-columns: 75px minmax(0,1fr); gap: 14px; padding: 12px 14px; background: #f8fafc; border-radius: 6px; margin: 9px 0; font-size: 15px; }
.evidence.employee { background: #eff6ff; }
.evidence>div { color: #64748b; font-size: 13px; }
.evidence small { display: block; color: #94a3b8; font-size: 12px; }
.evidence p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.preview { display: block; max-width: 100%; max-height: 400px; object-fit: contain; background: #f8fafc; margin: 16px auto; border: 1px solid var(--line); border-radius: 5px; }
.chunk .el-checkbox { margin-top: 12px; }
.chunk-actions { margin-top: 16px; }
.task-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; font-size: 14px; color: #64748b; margin-bottom: 20px; }
.task-metrics { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; margin-bottom: 16px; color: #64748b; }
.task-metrics span { background: #f8fafc; padding: 7px 12px; border-radius: 5px; }
.task-metrics b { color: #334155; margin-left: 5px; }
.conversation-result { margin-top: 24px; }
.conversation-result>h3 { overflow-wrap: anywhere; }
.duration-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #edf2f7; font-size: 14px; }
.duration-row b { font-weight: 500; }
.raw-details { margin-top: 24px; color: #64748b; font-size: 13px; }
.raw-details summary { cursor: pointer; }
.json { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow-y: auto; background: #f8fafc; border: 1px solid var(--line); border-radius: 6px; padding: 18px; color: #475569; font: 14px/1.8 Consolas,monospace; }
.empty-note { text-align: center; padding: 24px 8px; color: #94a3b8; font-size: 14px; }
@media(min-width:1600px) {
  .chat-layout { grid-template-columns: 300px minmax(0,1fr); }
}
@media(max-width:1100px) {
  main { padding: 0 24px 24px; }
  .topbar::before { inset: 0 -24px; }
  .product-subtitle,.header-divider,.current-module { display: none; }
  .chat-layout { grid-template-columns: 240px minmax(0,1fr); }
  .scope-badge { display: none; }
  .filter-bar>.hint { display: none; }
  .upload-actions { flex-direction: column; align-items: flex-end; gap: 6px; }
  .upload-actions .el-button+.el-button { margin-left: 0; }
  .messages { padding: 24px; }
  .conversation-head b { max-width: 360px; }
}
@media(max-width:800px) {
  main { padding: 0 16px 20px; }
  .topbar { height: 64px; }
  .topbar::before { inset: 0 -16px; }
  .page-heading { padding: 24px 0 20px; }
  .page-heading p { font-size: 14px; }
  .chat-main .page-heading { padding: 18px 0; }
  .chat-main .page-heading p { display: none; }
  .chat-layout { grid-template-columns: 200px minmax(0,1fr); }
  .sessions { padding: 16px 12px; }
  .session-list button { font-size: 14px; padding: 10px 8px; }
  .conversation-head { padding: 16px; }
  .conversation-head b { max-width: 230px; font-size: 15px; }
  .conversation-head small { font-size: 12px; }
  .assistant-avatar { display: none; }
  .context-panel { margin: 0 16px; }
  .messages { padding: 20px 16px 8px; }
  .composer { margin: 8px 16px 16px; }
  .bubble { font-size: 18px; }
  .turn.assistant .bubble { padding-left: 0; }
  .stat-grid { gap: 12px; }
  .stat-card { padding: 16px; }
  .stat-card p { font-size: 12px; }
  .import-card { padding: 20px; }
  .upload-icon { display: none; }
  .library-panel { padding: 0 16px 16px; }
  .library-heading { padding-top: 20px; }
  .library-kind { display: none; }
  .filter-bar { flex-wrap: wrap; }
  .filter-bar>.el-input { flex: 1; min-width: 180px; }
  .filter-bar>.el-select { width: 140px; }
  .refresh-note { font-size: 12px; }
  .welcome { padding: 35px 8px; }
  .welcome h2 { font-size: 22px; }
  .welcome-notes { gap: 12px; }
}
@media(max-width:600px) {
  .topbar-actions { gap: 10px; }
  .health-button { display: none; }
  .product-header strong { font-size: 20px; }
  .page-switch { font-size: 13px; padding: 6px 10px; }
  .chat-main { height: 100dvh; padding-bottom: 12px; }
  .chat-layout { display: flex; flex-direction: column; min-height: 0; }
  .sessions { flex: 0 0 auto; max-height: 135px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .session-top { margin: 0; }
  .session-top h3 { font-size: 14px; }
  .sessions>.el-input,.session-note { display: none; }
  .session-list { display: flex; gap: 6px; overflow: auto; margin-top: 8px; }
  .session-list button { flex-shrink: 0; width: 160px; margin: 0; padding: 8px; }
  .session-list button small { display: none; }
  .conversation { flex: 1; min-height: 0; }
  .conversation-head { padding: 10px 14px; }
  .conversation-head small { display: none; }
  .conversation-head b { max-width: 210px; }
  .context-panel .el-collapse-item__header { height: 36px; min-height: 36px; line-height: 36px; }
  .composer { margin: 6px 12px 12px; padding: 12px; }
  .composer-foot>span { font-size: 11px; }
  .composer .el-textarea__inner { font-size: 16px; }
  .welcome { padding: 24px 4px; }
  .welcome-mark { width: 45px; height: 45px; font-size: 25px; margin-bottom: 16px; }
  .welcome h2 { font-size: 20px; }
  .welcome-notes { display: none; }
  .profile-grid { grid-template-columns: 1fr; }
  .stat-grid { gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-card>div { font-size: 13px; }
  .stat-card p,.stat-card i { display: none; }
  .stat-card strong { font-size: 26px; }
  .import-card { flex-wrap: wrap; gap: 14px; }
  .import-copy { flex-basis: 100%; }
  .upload-actions { flex-direction: row; align-items: center; }
  .refresh-note { font-size: 0; }
  .refresh-note .el-button { font-size: 14px; }
  .segmented { gap: 20px; }
  .page-foot { font-size: 12px; }
  .page-foot a { display: none; }
  .detail-dialog .el-dialog__header { padding: 18px; }
  .detail-dialog .el-dialog__body { padding: 16px; }
  .content-card,.chunk,.segment-card { padding: 16px; }
  .evidence { grid-template-columns: 50px minmax(0,1fr); padding: 10px; gap: 10px; }
  .task-summary { gap: 12px; }
}


@media(max-width:600px){.chat-layout{margin-top:12px}}

@media(max-width:600px){
  .management-sections{height:56px;margin-top:0;gap:16px}
  .management-sections a{flex:1;min-width:0;padding:0 12px}
  .workspace-main .page-heading { padding: 22px 0; }
  .workspace-main h1 { font-size: 25px; }
  .page-eyebrow { margin-bottom: 7px; }
  .stat-card strong { margin: 8px 0 0; }
  .import-card { padding: 20px; }
  .import-copy p { font-size: 14px; }
  .upload-actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .filter-bar { gap: 10px; padding: 16px 0; }
  .filter-bar>.el-input { max-width: none; flex-basis: 100%; }
  .filter-bar>.el-select { flex: 1; min-width: 0; width: auto; }
  .table-scroll-hint { display: block; margin: 0 0 12px; font-size: 12px; color: var(--muted); }
  .table-scroll-hint i { display: inline-block; transform: rotate(90deg); margin-right: 5px; }
  .library-heading p { font-size: 13px; }
  .pagination { flex-wrap: wrap; }
}

/* Customer conversation: scoped to keep the management workspace independent. */
.chat-main { max-width: 1320px; height: 100dvh; padding: 18px 24px; }
.chat-main .chat-layout { position: relative; display: flex; flex-direction: column; margin: 0; width: 100%; min-height: 0; border: 1px solid #e6eaf2; border-radius: 22px; background: #fff; box-shadow: 0 16px 60px #243c6907; }
.chat-main .conversation { flex: 1; min-height: 0; background: radial-gradient(ellipse at 85% 5%,#f1f5ff80,transparent 45%),#fff; }
.chat-main .conversation-head { padding: 15px 26px; background: #ffffffed; border-bottom: 1px solid #eef1f6; }
.chat-main .conversation-title { gap: 12px; }
.chat-main .assistant-avatar { width: 42px; height: 42px; display: grid; color: #fff; background: #315eea; border-radius: 13px; box-shadow: 0 4px 10px #315eea20; }
.chat-main .conversation-head b { font-size: 21px; color: #172d4d; letter-spacing: .5px; }
.advisor-name { font-size: 16px; font-weight: 500; margin-left: 9px; letter-spacing: 0; }
.chat-main .conversation-head small { font-size: 13px; color: #75849b; margin-top: 3px; }
.conversation-actions { display: flex; gap: 8px; }
.conversation-actions .el-button { margin: 0; font-size: 14px; padding: 11px 14px; background: #fff; border-color: #e5eaf2; color: #52637b; border-radius: 9px; }
.conversation-actions .el-button:hover { color: var(--primary); background: #f5f8ff; border-color: #cbd8ff; }
.conversation-actions .el-button:last-child { background: #f2f5ff; color: #315eea; border-color: #e4eaff; }
.chat-main .messages { padding: 20px 40px 12px; overscroll-behavior: contain; scrollbar-color: #d7deeb transparent; }
.chat-main .welcome { text-align: left; width: min(100%,820px); padding: clamp(8px,2vh,20px) 0 12px; margin: 0 auto; }
.welcome-label { display: flex; align-items: center; gap: 8px; color: #526b9b; font-size: 13px; letter-spacing: 1px; margin-bottom: 12px; }
.welcome-label>span { width: 7px; height: 7px; border-radius: 50%; background: #8da7ef; }
.chat-main .welcome h2 { font-size: clamp(26px,2.2vw,32px); line-height: 1.4; font-weight: 650; letter-spacing: -.5px; margin: 0 0 12px; color: #1e3354; }
.chat-main .welcome h2>span { color: #4266d9; }
.chat-main .welcome p { font-size: 14px; line-height: 1.8; color: #708098; margin-bottom: 18px; }
.starter-label { font-size: 13px; color: #8692a5; margin-bottom: 12px; }
.starter-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.starter-grid button { position: relative; text-align: left; padding: 16px; border: 1px solid #e4e9f3; border-radius: 14px; background: #fcfdff; color: #243b5b; cursor: pointer; transition: border-color .18s,box-shadow .18s,transform .18s; }
.starter-grid button:hover { border-color: #b4c5f8; box-shadow: 0 6px 18px #315eea0a; transform: translateY(-2px); }
.starter-grid button:active { transform: translateY(0); }
.starter-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #5274cf; background: #eef3ff; font-size: 18px; margin-bottom: 10px; }
.starter-grid button:nth-child(2) .starter-icon { color: #538e83; background: #edf7f4; }
.starter-grid button:nth-child(3) .starter-icon { color: #977b50; background: #faf4e9; }
.starter-grid b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 5px; }
.starter-grid small { display: block; color: #7e8ca2; font-size: 13px; line-height: 1.7; }
.starter-arrow { position: absolute; top: 22px; right: 18px; color: #9caaca; font-size: 16px; }
.chat-main .turn { max-width: 820px; margin-bottom: 28px; }
.chat-main .role { font-size: 13px; color: #7b8aa1; margin-bottom: 10px; }
.chat-main .role>span { border-radius: 8px; width: 28px; height: 28px; background: #eef3ff; color: #5473cc; }
.chat-main .bubble { font-size: 17px; line-height: 1.95; color: #293e5a; }
.chat-main .turn.assistant .bubble { padding: 2px 0 2px 36px; }
.chat-main .user .bubble { background: #edf2ff; border: 1px solid #e4ebfc; color: #243e70; border-radius: 16px 4px 16px 16px; padding: 13px 20px; max-width: 85%; }
.chat-main .pending { max-width: 820px; font-size: 14px; padding: 0 0 20px 36px; display: flex; align-items: center; gap: 10px; color: #7b8aa1; }
.thinking-dots { display: inline-flex; gap: 4px; align-items: center; height: 20px; }
.thinking-dots i { width: 5px; height: 5px; border-radius: 50%; background: #7d9ae6; animation: thinking 1.3s ease-in-out infinite; }
.thinking-dots i:nth-child(2) { animation-delay: .15s; }
.thinking-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes thinking { 0%,70%,100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
.composer-area { flex-shrink: 0; width: 100%; max-width: 900px; padding: 8px 40px 16px; margin: 0 auto; }
.chat-main .composer { margin: 0; border-radius: 16px; border: 1px solid #dce3f0; padding: 17px 18px 12px; background: #fff; box-shadow: 0 6px 24px #233c6b07; }
.chat-main .composer:focus-within { border-color: #97aef0; box-shadow: 0 0 0 3px #eef3ff; }
.chat-main .composer .el-textarea__inner { min-height: 48px; line-height: 1.65; color: #293e5a; font-size: 15px; }
.chat-main .composer .el-textarea__inner::placeholder { color: #99a5b7; }
.chat-main .composer-foot { margin-top: 8px; }
.chat-main .composer-foot>span { color: #8b97aa; font-size: 12px; }
.chat-main .composer-foot .el-button { padding: 10px 17px; border-radius: 10px; font-size: 14px; }
.composer-caption { margin: 11px 0 0; font-size: 12px; color: #97a2b3; text-align: center; }
.chat-main .conversation>.el-alert,.chat-main .chat-recovery { width: calc(100% - 80px); max-width: 820px; margin: 4px auto; flex-shrink: 0; }
.chat-main .history-backdrop { position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: #172c4a30; backdrop-filter: blur(3px); z-index: 9; cursor: pointer; }
.chat-main .sessions { position: absolute; inset: 0 auto 0 0; z-index: 10; width: min(360px,88%); max-height: none; padding: 26px 20px; background: #fafbfe; box-shadow: 8px 0 30px #0f172a12; }
.chat-main .session-top { margin-bottom: 20px; align-items: flex-start; }
.chat-main .session-top h3 { font-size: 18px; }
.history-caption { font-size: 13px; color: #8b97aa; margin: 5px 0 0; }
.history-close { border: 0; border-radius: 8px; background: #fff; color: #64748b; width: 32px; height: 32px; cursor: pointer; }
.history-close:hover { background: #eef3ff; color: var(--primary); }
.chat-main .session-list { margin-top: 18px; }
.chat-main .session-list button { padding: 13px 10px; border-radius: 10px; }
.chat-main .session-list button.selected { background: #edf2ff; border-color: #e0e8ff; }
@media(max-width:800px) {
  .chat-main { padding: 12px; }
  .chat-main .conversation-head { padding: 18px 22px; }
  .chat-main .messages { padding: 24px 28px 16px; }
  .chat-main .welcome { padding-top: 24px; }
  .composer-area { padding: 8px 28px 14px; }
  .starter-grid { gap: 10px; }
  .starter-grid button { padding: 16px 12px; }
  .starter-arrow { top: 18px; right: 12px; }
}
@media(max-width:600px) {
  .chat-main { padding: 0; }
  .chat-main .chat-layout { border: 0; border-radius: 0; }
  .chat-main .conversation-head { padding: 14px 16px; gap: 8px; }
  .chat-main .assistant-avatar { display: none; }
  .chat-main .conversation-head b { font-size: 20px; max-width: none; }
  .advisor-name { font-size: 14px; margin-left: 6px; }
  .chat-main .conversation-head small { display: none; }
  .conversation-actions { gap: 6px; }
  .conversation-actions .el-button { padding: 9px 10px; font-size: 13px; }
  .chat-main .messages { padding: 22px 20px 10px; }
  .chat-main .welcome { padding-top: 14px; padding-bottom: 16px; }
  .welcome-label { font-size: 12px; margin-bottom: 16px; }
  .chat-main .welcome h2 { font-size: 26px; line-height: 1.4; margin-bottom: 10px; }
  .chat-main .welcome p { font-size: 14px; margin-bottom: 22px; }
  .starter-grid { grid-template-columns: 1fr; gap: 9px; }
  .starter-grid button { padding: 13px 36px 13px 58px; min-height: 68px; }
  .starter-icon { position: absolute; left: 13px; top: 17px; width: 32px; height: 32px; font-size: 18px; margin: 0; }
  .starter-grid b { font-size: 14px; margin-bottom: 1px; }
  .starter-grid small { font-size: 12px; }
  .starter-arrow { top: 25px; right: 14px; }
  .chat-main .bubble { font-size: 17px; line-height: 1.9; }
  .chat-main .turn.assistant .bubble { padding-left: 0; }
  .chat-main .user .bubble { max-width: 92%; padding: 11px 16px; }
  .chat-main .pending { padding-left: 0; }
  .composer-area { padding: 8px 12px max(10px,env(safe-area-inset-bottom)); }
  .chat-main .composer { padding: 14px 14px 10px; border-radius: 14px; }
  .chat-main .composer-foot>span { font-size: 11px; }
  .composer-caption { font-size: 11px; margin-top: 8px; }
  .chat-main .sessions>.el-input { display: block; }
  .chat-main .session-list { display: block; margin-top: 16px; }
  .chat-main .session-list button { width: 100%; margin-bottom: 6px; }
  .chat-main .session-list button small { display: block; }
  .chat-main .conversation>.el-alert,.chat-main .chat-recovery { width: calc(100% - 24px); }
}
/* Short desktop windows include common laptop resolutions and browser zoom. */
@media(min-width:601px) and (max-height:800px) {
  .chat-main { padding-top: 10px; padding-bottom: 10px; }
  .chat-main .conversation-head { padding-top: 12px; padding-bottom: 12px; }
  .chat-main .messages { padding-top: 12px; }
  .chat-main .welcome { padding-top: 4px; padding-bottom: 4px; }
  .chat-main .welcome h2 { font-size: 26px; line-height: 1.3; }
  .chat-main .welcome p { margin-bottom: 12px; }
  .welcome-label { margin-bottom: 8px; }
  .starter-label { margin-bottom: 8px; }
  .starter-grid button { padding: 12px 14px; }
  .starter-icon { margin-bottom: 7px; width: 26px; height: 26px; font-size: 16px; }
  .starter-grid b { font-size: 14px; margin-bottom: 2px; }
  .starter-grid small { font-size: 12px; }
  .composer-area { padding-top: 6px; padding-bottom: 10px; }
  .chat-main .composer { padding: 12px 16px 10px; }
  .composer-caption { margin-top: 7px; }
}
@media(prefers-reduced-motion:reduce) {
  .thinking-dots i { animation: none; }
  .starter-grid button { transition: none; }
}
