:root {
  --ink: #14213d;
  --ink-2: #21335c;
  --accent: #ff6b35;
  --accent-dark: #df5422;
  --accent-soft: #fff0e9;
  --blue: #2f6fed;
  --blue-soft: #edf3ff;
  --green: #168a5b;
  --green-soft: #e8f7f0;
  --amber: #b36b00;
  --amber-soft: #fff5df;
  --red: #c43f3f;
  --red-soft: #fff0f0;
  --text: #18213a;
  --muted: #69738a;
  --line: #e4e8f0;
  --surface: #ffffff;
  --canvas: #f5f7fb;
  --shadow: 0 14px 36px rgba(20, 33, 61, 0.08);
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif; color: var(--text); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; display: flex; }
.app-shell.chat-active { height: 100vh; min-height: 0; overflow: hidden; }
.sidebar { width: 244px; min-height: 100vh; background: var(--ink); color: #fff; padding: 24px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--accent); font-weight: 800; font-size: 18px; }
.brand h1 { font-size: 17px; margin: 0; letter-spacing: .02em; }
.brand p { margin: 4px 0 0; color: #aeb9d1; font-size: 11px; }
.nav-label { color: #7f8ba6; font-size: 11px; padding: 16px 12px 8px; letter-spacing: .08em; }
.nav-item { border: 0; width: 100%; color: #cbd3e4; background: transparent; border-radius: 10px; padding: 11px 12px; text-align: left; display: flex; align-items: center; gap: 10px; margin: 2px 0; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.09); }
.nav-icon { width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 5px; display: inline-grid; place-items: center; font-size: 10px; flex: 0 0 auto; }
.sidebar-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,.1); }
.user-mini { display: flex; align-items: center; gap: 10px; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--blue-soft); color: var(--blue); display: grid; place-items: center; font-weight: 700; }
.sidebar .avatar { background: #33466f; color: #fff; }
.user-mini strong { display: block; font-size: 13px; }
.user-mini span { display: block; font-size: 11px; color: #98a5bf; margin-top: 2px; }
.main { min-width: 0; flex: 1; }
.chat-active .main { height: 100vh; overflow: hidden; display: flex; flex-direction: column; }
.chat-active .topbar { flex: 0 0 70px; }
.topbar { height: 70px; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 32px; position: sticky; top: 0; z-index: 20; }
.topbar h2 { font-size: 18px; margin: 0; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.role-switch { border: 1px solid var(--line); background: #fff; padding: 8px 12px; border-radius: 9px; color: var(--muted); }
.identity-badge { border: 1px solid var(--line); background: #fff; padding: 7px 11px; border-radius: 9px; color: var(--text); font-size: 12px; font-weight: 700; }
.logout-btn { width: 100%; border: 0; border-top: 1px solid rgba(255,255,255,.1); margin-top: 14px; padding: 12px 0 0; background: transparent; color: #98a5bf; text-align: left; font-size: 12px; }
.logout-btn:hover { color: #fff; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 6px 14px; border-radius: 10px; background: rgba(255,255,255,.08); }
.mode-switch button { border: 0; border-radius: 7px; padding: 8px 5px; background: transparent; color: #9eabc3; font-size: 11px; }
.mode-switch button.active { background: #fff; color: var(--ink); font-weight: 700; }
.scope-notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: var(--blue-soft); border: 1px solid #d9e5ff; border-radius: 14px; padding: 16px 18px; margin-bottom: 20px; }
.scope-notice strong { font-size: 14px; }
.record-selectors { display: flex; gap: 10px; }
.record-selectors .select:first-child { width: 170px; }
.record-selectors .select:last-child { width: 140px; }
.scope-notice p { margin: 5px 0 0; color: #526b9e; font-size: 12px; line-height: 1.55; }
.permission-chain { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; background: #f7f8fb; border-radius: 12px; padding: 16px; margin: 14px 0 20px; font-size: 12px; }
.permission-chain span { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-weight: 700; }
.permission-chain i { color: var(--blue); font-style: normal; }
.content { padding: 30px 32px 56px; max-width: 1480px; margin: 0 auto; }
.hero { background: var(--ink); color: #fff; border-radius: 22px; padding: 30px; display: flex; justify-content: space-between; align-items: center; overflow: hidden; position: relative; }
.hero:after { content: ""; position: absolute; width: 250px; height: 250px; border-radius: 50%; right: -80px; top: -120px; background: rgba(255,107,53,.22); }
.hero-copy { position: relative; z-index: 1; }
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .1em; margin-bottom: 10px; }
.hero h3 { font-size: 27px; line-height: 1.35; margin: 0 0 10px; }
.hero p { color: #bcc5d7; margin: 0; line-height: 1.7; }
.hero-score { z-index: 1; min-width: 170px; text-align: center; padding: 18px; border-left: 1px solid rgba(255,255,255,.15); }
.hero-score strong { display: block; font-size: 38px; color: #fff; }
.hero-score span { font-size: 12px; color: #aeb9d1; }
.grid { display: grid; gap: 18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.section { margin-top: 28px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; gap: 16px; }
.section-head h3 { font-size: 18px; margin: 0; }
.section-head p { color: var(--muted); font-size: 13px; margin: 5px 0 0; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card.hover { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card.hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #cfd7e6; }
.metric-label { color: var(--muted); font-size: 12px; }
.metric-value { font-size: 28px; font-weight: 800; margin: 8px 0 4px; }
.metric-delta { font-size: 12px; color: var(--green); }
.level-card { position: relative; min-height: 214px; display: flex; flex-direction: column; }
.level-card.locked { background: #f8f9fc; color: #9098aa; }
.level-tag { width: fit-content; font-size: 12px; padding: 5px 9px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); }
.level-card.locked .level-tag { background: #eceef3; color: #7f8798; }
.level-card h4 { margin: 17px 0 8px; font-size: 20px; }
.level-card p { color: var(--muted); line-height: 1.7; font-size: 13px; margin: 0; }
.level-foot { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; }
.progress { height: 7px; background: #edf0f5; border-radius: 999px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); border-radius: inherit; }
.btn { border: 0; border-radius: 10px; padding: 10px 16px; font-weight: 700; background: #eef1f6; color: var(--text); }
.btn:hover { filter: brightness(.98); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.blue { background: var(--blue); color: #fff; }
.btn.ghost { background: #fff; border: 1px solid var(--line); color: var(--text); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.small { padding: 7px 10px; font-size: 12px; }
.btn:disabled { opacity: .48; cursor: not-allowed; }
.current-training-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 5px 9px; border-radius: 999px; background: #eff2f7; color: var(--muted); }
.pill.success { background: var(--green-soft); color: var(--green); }
.pill.warning { background: var(--amber-soft); color: var(--amber); }
.pill.danger { background: var(--red-soft); color: var(--red); }
.auth-page { min-height: calc(100vh - 48px); display: grid; grid-template-columns: 1.05fr .95fr; background: #fff; }
.site-compliance { min-height: 48px; padding: 12px 20px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px 18px; color: var(--muted); background: var(--panel); border-top: 1px solid var(--line); font-size: 12px; }
.site-compliance a { color: inherit; text-decoration: none; }
.site-compliance a:hover { color: var(--primary); }
.auth-showcase { background: var(--ink); color: #fff; padding: 56px 8vw; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-showcase:before { content: ""; width: 420px; height: 420px; border-radius: 50%; border: 80px solid rgba(255,107,53,.08); position: absolute; right: -170px; top: -80px; }
.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.auth-showcase h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.15; max-width: 620px; margin: 30px 0 20px; position: relative; z-index: 1; }
.auth-showcase p { color: #b7c0d2; line-height: 1.8; max-width: 560px; position: relative; z-index: 1; }
.auth-points { display: flex; gap: 24px; color: #dce2ee; font-size: 13px; position: relative; z-index: 1; }
.auth-panel { display: grid; place-items: center; padding: 40px; background: #fbfcfe; }
.auth-box { width: min(440px, 100%); }
.auth-tabs { display: flex; gap: 24px; margin-bottom: 30px; border-bottom: 1px solid var(--line); }
.auth-tab { border: 0; background: transparent; padding: 12px 2px; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; }
.auth-tab.active { color: var(--text); border-color: var(--accent); }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 7px; }
.input, .select, .textarea { width: 100%; border: 1px solid #dbe0ea; border-radius: 10px; padding: 11px 12px; background: #fff; color: var(--text); outline: none; }
.textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.config-prompt { min-height: 320px; font-size: 13px; line-height: 1.75; white-space: pre-wrap; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,111,237,.12); }
.help { font-size: 12px; color: var(--muted); line-height: 1.6; }
.demo-note { background: var(--blue-soft); color: #315b9f; border-radius: 12px; padding: 12px 14px; font-size: 12px; line-height: 1.6; margin-top: 18px; }
.steps { display: flex; align-items: center; justify-content: center; gap: 0; margin: 4px 0 28px; }
.step { display: flex; align-items: center; gap: 8px; color: #969eae; font-size: 12px; }
.step i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #e7eaf0; color: #69738a; font-style: normal; font-weight: 700; }
.step.active { color: var(--text); font-weight: 700; }
.step.active i, .step.done i { background: var(--accent); color: #fff; }
.step-line { width: 80px; height: 1px; background: #dfe3ea; margin: 0 10px; }
.choice-card { border: 2px solid transparent; cursor: pointer; min-height: 180px; }
.choice-card.selected { border-color: var(--accent); background: #fffaf7; }
.choice-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue); font-weight: 800; font-size: 18px; }
.choice-card:nth-child(2) .choice-icon { background: var(--accent-soft); color: var(--accent); }
.choice-card h4 { font-size: 18px; margin: 16px 0 8px; }
.choice-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.scene-card { display: flex; gap: 15px; cursor: pointer; }
.scene-card.selected { border-color: var(--accent); background: #fffaf7; }
.admin-scene-card { cursor: default; min-height: 160px; }
.scene-page-tabs { display: flex; gap: 8px; margin: 18px 0; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.scene-page-tabs button { border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 10px; padding: 9px 14px; font-weight: 700; }
.scene-page-tabs button.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.scene-page-tabs span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 5px; padding: 0 5px; border-radius: 999px; background: #eef1f6; color: var(--muted); font-size: 11px; }
.scene-page-tabs button.active span { background: rgba(255,255,255,.16); color: #fff; }
.scene-no { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; background: #f0f3f8; color: var(--ink-2); font-weight: 800; }
.scene-card h4 { margin: 1px 0 7px; }
.scene-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.chat-layout { height: calc(100vh - 70px); min-height: 0; overflow: hidden; display: grid; grid-template-columns: 250px minmax(420px, 1fr) 300px; background: #eef1f6; }
.chat-list { border-right: 1px solid var(--line); background: #fff; padding: 16px 0; overflow: auto; }
.chat-list-title { font-size: 14px; padding: 4px 16px 14px; margin: 0; }
.chat-search { margin: 0 12px 12px; background: #f3f5f8; color: #9299a7; border-radius: 9px; padding: 9px 11px; font-size: 12px; }
.customer-item { display: flex; gap: 10px; padding: 13px 14px; background: #f6f8fb; border-left: 3px solid var(--accent); }
.customer-item .avatar { flex: 0 0 auto; }
.customer-item h4 { margin: 1px 0 5px; font-size: 13px; }
.customer-item p { margin: 0; color: var(--muted); font-size: 11px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; width: 140px; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; background: #f5f7fa; }
.chat-head { height: 66px; background: #fff; border-bottom: 1px solid var(--line); padding: 0 20px; display: flex; justify-content: space-between; align-items: center; }
.chat-head h3 { margin: 0 0 4px; font-size: 14px; }
.chat-head p { margin: 0; color: var(--muted); font-size: 11px; }
.chat-messages { flex: 1 1 auto; min-height: 0; padding: 22px 28px; overflow-y: auto; overscroll-behavior: contain; scroll-behavior: smooth; scrollbar-gutter: stable; }
.time-line { text-align: center; color: #9ba3b2; font-size: 11px; margin: 6px 0 18px; }
.msg { display: flex; gap: 9px; margin: 17px 0; align-items: flex-start; }
.msg.me { justify-content: flex-end; }
.msg .avatar { width: 34px; height: 34px; font-size: 12px; }
.bubble { max-width: 66%; padding: 11px 14px; border-radius: 5px 14px 14px 14px; background: #fff; border: 1px solid #e6eaf0; font-size: 13px; line-height: 1.65; }
.msg.me .bubble { background: #dff0ff; border-color: #cfe6fb; border-radius: 14px 5px 14px 14px; }
.typing-bubble { display:flex; align-items:center; gap:5px; color:var(--muted); }
.typing-bubble i { width:6px; height:6px; border-radius:50%; background:var(--accent); animation:typingPulse 1.2s infinite ease-in-out; }
.typing-bubble i:nth-child(2) { animation-delay:.15s; }
.typing-bubble i:nth-child(3) { animation-delay:.3s; }
.typing-bubble span { margin-left:5px; font-size:12px; }
@keyframes typingPulse { 0%,60%,100% { transform:translateY(0); opacity:.35; } 30% { transform:translateY(-4px); opacity:1; } }
.chat-compose { flex: 0 0 auto; position: relative; z-index: 3; background: #fff; border-top: 1px solid var(--line); padding: 12px 18px 16px; box-shadow: 0 -8px 24px rgba(20,33,61,.04); }
.tools { display: flex; gap: 16px; color: #7d8798; font-size: 12px; padding: 0 4px 9px; }
.link-compose { display: flex; gap: 8px; align-items: center; margin: 0 0 9px; }
.link-compose .select { flex: 1; min-width: 0; padding: 8px 10px; font-size: 12px; }
.compose-resize-handle { height: 12px; display: grid; place-items: center; cursor: row-resize; margin: -4px 0 3px; touch-action: none; }
.compose-resize-handle span { width: 52px; height: 4px; border-radius: 999px; background: #d8dde7; }
.compose-resize-handle:hover span { background: var(--blue); }
.compose-row { display: flex; gap: 10px; align-items: flex-end; }
.compose-row textarea { flex: 1; min-height: 96px; max-height: 260px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; resize: vertical; outline: none; line-height: 1.6; overflow-y: auto; }
.compose-row textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47,111,237,.1); }
.chat-compose:has(textarea[style*="height"]) { max-height: 42vh; }
.chat-compose-resize-note { color: var(--muted); font-size: 11px; }
.chat-side { background: #fff; border-left: 1px solid var(--line); overflow: auto; }
.side-panel-title { position: sticky; top: 0; z-index: 2; background: #fff; border-bottom: 1px solid var(--line); padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.side-panel-title strong { display: block; font-size: 14px; }
.side-panel-title span:not(.pill) { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; }
.virtual-order-list { padding: 12px 12px 2px; display: grid; gap: 10px; }
.virtual-order { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.virtual-order.primary-order { border-color: #f0b497; box-shadow: 0 0 0 2px rgba(255,107,53,.08); }
.virtual-order summary { list-style: none; cursor: pointer; padding: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; background: #fafbfc; }
.virtual-order summary::-webkit-details-marker { display: none; }
.virtual-order summary div { min-width: 0; }
.virtual-order summary strong { display: block; font-size: 12px; margin: 5px 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.virtual-order summary small { color: var(--green); font-size: 10px; }
.order-platform { display: inline-block; font-size: 10px; color: var(--blue); background: var(--blue-soft); border-radius: 5px; padding: 2px 5px; }
.order-arrow { color: var(--muted); font-size: 18px; transition: transform .2s; }
.virtual-order[open] .order-arrow { transform: rotate(180deg); }
.order-body { padding: 12px; border-top: 1px solid var(--line); }
.order-product { display: flex; gap: 10px; align-items: flex-start; padding-bottom: 11px; border-bottom: 1px dashed var(--line); }
.product-thumb { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px; background: linear-gradient(145deg,#edf2f8,#dce4ef); color: var(--ink-2); font-weight: 800; }
.order-product strong { display: block; font-size: 12px; line-height: 1.45; }
.order-product p { margin: 3px 0; color: var(--muted); font-size: 10px; }
.order-product span { color: var(--muted); font-size: 10px; }
.order-product b { color: var(--accent); }
.order-fields { display: grid; gap: 7px; padding-top: 10px; }
.order-fields > div { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 7px; align-items: start; font-size: 10px; }
.order-fields span { color: var(--muted); }
.order-fields strong,.order-fields code { color: var(--text); font-family: inherit; font-size: 10px; text-align: right; word-break: break-all; }
.primary-order-tip,.history-order-tip { margin-top: 10px; padding: 6px 8px; border-radius: 7px; font-size: 10px; text-align: center; }
.primary-order-tip { color: var(--accent-dark); background: var(--accent-soft); }
.history-order-tip { color: var(--muted); background: #f3f5f8; }
.empty-orders { margin: 10px 0; padding: 20px 12px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; font-size: 11px; }
.training-meta { margin-top: 12px; }
.side-tabs { display: flex; border-bottom: 1px solid var(--line); }
.side-tab { flex: 1; border: 0; padding: 14px 4px; background: #fff; color: var(--muted); font-size: 12px; }
.side-tab.active { color: var(--accent); border-bottom: 2px solid var(--accent); }
.order-card { margin: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.product { display: flex; gap: 10px; }
.product-pic { width: 58px; height: 58px; border-radius: 8px; background: #e8edf5; display: grid; place-items: center; color: #7c879a; font-size: 11px; }
.product h4 { margin: 1px 0 6px; font-size: 12px; }
.product p { margin: 0; color: var(--muted); font-size: 11px; }
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; padding: 8px 0; border-bottom: 1px dashed #edf0f4; }
.kv:last-child { border: 0; }
.kv span { color: var(--muted); }
.report-hero { background: var(--ink); color: #fff; border-radius: 20px; padding: 28px; display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center; }
.score-ring { width: 142px; height: 142px; border-radius: 50%; border: 14px solid var(--accent); display: grid; place-items: center; margin: auto; }
.score-ring strong { font-size: 38px; line-height: 1; }
.score-ring span { font-size: 11px; color: #b9c2d4; }
.report-hero h3 { font-size: 24px; margin: 0 0 9px; }
.report-hero p { margin: 0 0 18px; color: #bdc6d7; line-height: 1.7; }
.radar-list { display: grid; gap: 14px; }
.radar-row { display: grid; grid-template-columns: 100px 1fr 40px; align-items: center; gap: 12px; font-size: 13px; }
.radar-row .progress { height: 9px; }
.feedback-quote { padding: 15px; border-left: 3px solid var(--green); background: var(--green-soft); border-radius: 0 10px 10px 0; line-height: 1.7; font-size: 13px; }
.feedback-quote.bad { border-color: var(--red); background: var(--red-soft); }
.admin-toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 16px; }
.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
.records-toolbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin: 20px 0 14px; }
.records-toolbar h3 { margin: 0; font-size: 18px; }
.records-toolbar p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.name-search { display: grid; grid-template-columns: auto minmax(180px, 240px) auto; align-items: center; gap: 8px; }
.name-search span { color: var(--muted); font-size: 12px; }
.name-search .input { padding: 8px 10px; }
.record-actions { white-space: nowrap; }
.record-actions .btn + .btn { margin-left: 6px; }
.dialogue-modal { width: min(760px, 100%); max-height: 88vh; display: flex; flex-direction: column; }
.dialogue-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.dialogue-title h3 { margin: 0 0 5px; }
.dialogue-title p { margin: 0; color: var(--muted); font-size: 12px; }
.dialogue-archive { overflow-y: auto; padding: 14px 4px; background: #f7f8fb; border-radius: 12px; margin-top: 14px; }
.archive-message { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; }
.archive-message.service { flex-direction: row-reverse; text-align: right; }
.archive-message .avatar { flex: 0 0 auto; width: 34px; height: 34px; font-size: 11px; }
.archive-message strong { display: block; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.archive-message p { display: inline-block; max-width: 520px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px 12px 12px 12px; background: #fff; text-align: left; font-size: 13px; line-height: 1.65; }
.archive-message.service p { background: #dff0ff; border-color: #cfe6fb; border-radius: 12px 4px 12px 12px; }
.dialogue-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-top: 14px; color: var(--muted); font-size: 12px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
th { background: #f8f9fb; color: #626d82; font-size: 12px; }
tr:last-child td { border-bottom: 0; }
.config-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 18px; }
.config-nav { padding: 10px; height: fit-content; }
.config-nav button { width: 100%; border: 0; background: transparent; border-radius: 9px; padding: 11px 12px; text-align: left; color: var(--muted); }
.config-nav button.active { background: var(--blue-soft); color: var(--blue); font-weight: 700; }
.code-area { min-height: 290px; font-family: Consolas, monospace; font-size: 12px; background: #10192e; color: #d6deeb; border: 0; border-radius: 12px; padding: 16px; line-height: 1.7; }
.split-test { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.config-workspace { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .7fr); gap: 18px; margin-top: 18px; }
.config-prompt { min-height: 170px; font-family: Consolas, monospace; font-size: 12px; line-height: 1.65; }
.config-actions { display: flex; justify-content: flex-end; gap: 10px; }
.test-result { margin-top: 14px; padding: 14px; background: var(--blue-soft); border-radius: 12px; }
.test-result p { font-size: 13px; line-height: 1.65; }
.test-result strong { color: var(--blue); font-size: 12px; }
.check-row { display: flex; align-items: center; gap: 9px; padding: 12px; background: #f7f8fb; border-radius: 10px; font-size: 13px; }
.test-chat { background: #f5f7fa; border: 1px solid var(--line); border-radius: 12px; padding: 15px; min-height: 260px; }
.chart-card { min-height: 300px; }
.bar-chart { display: grid; gap: 16px; padding-top: 14px; }
.bar-item { display: grid; grid-template-columns: 92px 1fr 44px; gap: 10px; align-items: center; font-size: 12px; }
.bar-track { height: 14px; border-radius: 4px; background: #edf0f5; overflow: hidden; }
.bar-fill { height: 100%; background: var(--blue); border-radius: 4px; }
.line-chart { height: 210px; display: flex; align-items: flex-end; gap: 14px; padding: 20px 12px 28px; border-bottom: 1px solid var(--line); }
.line-col { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; }
.line-col i { width: 100%; background: var(--accent); border-radius: 6px 6px 2px 2px; display: block; }
.line-col span { position: absolute; bottom: -23px; width: 100%; text-align: center; color: var(--muted); font-size: 11px; }
.empty-lock { text-align: center; padding: 50px 20px; color: var(--muted); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(10,18,36,.55); z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal { background: #fff; width: min(520px, 100%); border-radius: 18px; padding: 24px; box-shadow: var(--shadow); }
.modal h3 { margin: 0 0 10px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.review-backdrop { align-items: start; overflow-y: auto; }
.review-modal { width: min(1080px, 100%); margin: 20px auto; }
.review-title { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 16px; }
.review-title h3 { margin: 8px 0 5px; font-size: 22px; }
.review-title p { margin: 0; color: var(--muted); font-size: 12px; }
.review-hero { margin-bottom: 18px; }
.review-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 18px 0; }
.review-panel h4, .model-answer h4 { margin: 0 0 14px; font-size: 17px; }
.analysis-list { display: grid; gap: 11px; }
.analysis-list > div { padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.analysis-list > div:last-child { border-bottom: 0; padding-bottom: 0; }
.analysis-list span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.analysis-list p { margin: 0; line-height: 1.65; font-size: 13px; }
.decision-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.decision-grid > div { padding: 14px; border-radius: 12px; background: #f7f8fb; }
.decision-grid span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.decision-grid strong { font-size: 15px; }
.ok-text { color: var(--green); }
.danger-text { color: var(--red); }
.review-evidence { border-left: 3px solid var(--green); background: var(--green-soft); border-radius: 0 12px 12px 0; padding: 15px; }
.review-evidence.bad { border-color: var(--red); background: var(--red-soft); }
.review-evidence > strong { font-size: 12px; color: var(--muted); }
.review-evidence blockquote { margin: 9px 0; padding: 10px 12px; background: rgba(255,255,255,.75); border-radius: 9px; line-height: 1.65; font-size: 13px; }
.review-evidence p { margin: 8px 0 0; font-size: 13px; line-height: 1.7; }
.ai-rewrite { margin-top: 13px; padding-top: 12px; border-top: 1px dashed rgba(196,63,63,.28); }
.ai-rewrite b { font-size: 12px; color: var(--red); }
.model-answer { display: grid; grid-template-columns: 220px 1fr; gap: 22px; align-items: start; margin-top: 18px; background: #fffaf7; border-color: #ffd8c9; }
.model-answer h4 { margin-top: 10px; }
.model-answer p { color: var(--muted); font-size: 12px; line-height: 1.6; }
.model-answer blockquote { margin: 0; padding: 18px; background: #fff; border-left: 4px solid var(--accent); border-radius: 0 12px 12px 0; line-height: 1.8; font-size: 14px; }
@media (max-width: 760px) {
  .review-grid, .model-answer, .config-workspace { grid-template-columns: 1fr; }
  .decision-grid { grid-template-columns: 1fr 1fr; }
  .review-title { flex-direction: column; }
}
.toast { position: fixed; top: 18px; left: 50%; transform: translate(-50%, -20px); opacity: 0; pointer-events: none; z-index: 300; background: #17233d; color: #fff; padding: 10px 16px; border-radius: 9px; font-size: 13px; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.mobile-menu { display: none; border: 0; background: transparent; font-size: 20px; }
@media (max-width: 1250px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chat-layout { grid-template-columns: 180px minmax(320px, 1fr) 270px; }
  .config-layout { grid-template-columns: 1fr; }
  .config-nav { display: flex; overflow: auto; }
  .config-nav button { width: auto; white-space: nowrap; }
}
@media (max-width: 820px) {
  .sidebar { width: 78px; padding: 20px 10px; }
  .brand-copy, .nav-item span:last-child, .nav-label, .sidebar-foot .user-mini div { display: none; }
  .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .nav-item { justify-content: center; }
  .mode-switch { grid-template-columns: 1fr; margin-left: 0; margin-right: 0; }
  .mode-switch button { font-size: 0; padding: 8px 4px; }
  .mode-switch button[data-mode="learning"]:after { content: "学"; font-size: 11px; }
  .mode-switch button[data-mode="management"]:after { content: "管"; font-size: 11px; }
  .mode-switch button[data-mode="configuration"]:after { content: "配"; font-size: 11px; }
  .sidebar-foot { padding-left: 9px; }
  .topbar { padding: 0 18px; }
  .content { padding: 22px 18px 44px; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-showcase { display: none; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .hero { align-items: flex-start; }
  .hero-score { display: none; }
  .chat-layout { grid-template-columns: 1fr; height: calc(100vh - 70px); }
  .chat-list, .chat-side { display: none; }
  .report-hero { grid-template-columns: 1fr; text-align: center; }
  .split-test { grid-template-columns: 1fr; }
  .records-toolbar { align-items: stretch; flex-direction: column; }
  .name-search { grid-template-columns: auto 1fr auto; }
}
@media (max-width: 560px) {
  .sidebar { display: none; }
  .grid-4 { grid-template-columns: 1fr; }
  .topbar h2 { font-size: 15px; }
  .role-switch { display: none; }
  .mobile-menu { display: block; }
  .steps { justify-content: flex-start; overflow: auto; }
  .step-line { width: 34px; }
  .chat-messages { padding: 18px 14px; }
  .bubble { max-width: 82%; }
}
