:root {
  color-scheme: light;
  --bg: #eef2ef;
  --panel: #ffffff;
  --soft: #f6f8f7;
  --ink: #17221c;
  --muted: #6d7972;
  --line: #dfe7e2;
  --brand: #176d4c;
  --brand-dark: #0f5139;
  --brand-soft: #e7f4ed;
  --rail: #12281f;
  --orange: #ad6315;
  --orange-soft: #fff3e4;
  --red: #b63d37;
  --red-soft: #fff0ef;
  --blue: #3568ad;
  --shadow: 0 24px 70px rgba(18, 45, 33, .11);
}

* { box-sizing: border-box; }
html, body { width: 100%; min-height: 100%; }
body { margin: 0; color: var(--ink); font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.eyebrow { color: var(--brand); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }

/* Login */
.login-page {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 15% 12%, rgba(77, 169, 121, .18), transparent 29%),
    radial-gradient(circle at 88% 82%, rgba(189, 149, 76, .16), transparent 27%),
    #0f2119;
}

.login-shell { display: grid; grid-template-columns: minmax(380px, .92fr) minmax(560px, 1.08fr); min-height: 100vh; }
.login-hero { display: flex; flex-direction: column; padding: clamp(34px, 5vw, 72px); color: #fff; }
.brand-lockup { display: flex; align-items: center; gap: 13px; color: #bed1c7; font-size: 12px; font-weight: 800; letter-spacing: .14em; }
.brand-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; background: linear-gradient(145deg, #42b27d, #19714f); color: #fff; font-size: 15px; letter-spacing: -.04em; box-shadow: 0 15px 40px rgba(28, 129, 87, .35); }
.hero-copy { max-width: 650px; margin: auto 0; padding: 70px 0; }
.hero-copy .eyebrow { color: #66c794; }
.hero-copy h1 { margin: 20px 0 22px; font-size: clamp(42px, 5vw, 72px); line-height: 1.12; letter-spacing: -.06em; }
.hero-copy p { max-width: 570px; margin: 0; color: #b8c9c0; font-size: 16px; line-height: 1.9; }
.hero-points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.hero-points div { padding: 16px 17px; border: 1px solid rgba(255,255,255,.11); border-radius: 16px; background: rgba(255,255,255,.055); backdrop-filter: blur(12px); }
.hero-points strong, .hero-points span { display: block; }
.hero-points strong { margin-bottom: 7px; font-size: 13px; }
.hero-points span { color: #9eb4a9; font-size: 10px; line-height: 1.55; }

.login-panel { display: flex; flex-direction: column; justify-content: center; padding: clamp(40px, 6vw, 90px); border-radius: 36px 0 0 36px; background: #f7f9f8; box-shadow: -30px 0 90px rgba(0,0,0,.17); }
.login-panel-head { margin-bottom: 28px; }
.login-panel-head h2 { margin: 18px 0 7px; font-size: 32px; letter-spacing: -.04em; }
.login-panel-head p { margin: 0; color: var(--muted); font-size: 14px; }
.live-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border: 1px solid #cde4d7; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 10px; font-weight: 800; }
.live-badge i, .live-label i { width: 7px; height: 7px; border-radius: 50%; background: #28a66d; box-shadow: 0 0 0 4px rgba(40,166,109,.12); }
.account-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.account-card { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 12px; min-height: 78px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 17px; background: #fff; color: var(--ink); text-align: left; transition: transform .16s, border-color .16s, box-shadow .16s; }
.account-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.account-card:hover { transform: translateY(-2px); border-color: #a8ceba; box-shadow: 0 14px 30px rgba(22,83,57,.09); }
.account-card-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: #fff; font-size: 14px; font-weight: 850; }
.account-card-icon.emerald { background: linear-gradient(145deg, #47a477, #1f7651); }
.account-card-icon.rose { background: linear-gradient(145deg, #db8296, #a84661); }
.account-card-icon.violet { background: linear-gradient(145deg, #8e79bd, #5c4890); }
.account-card-icon.amber { background: linear-gradient(145deg, #dfa451, #ad691e); }
.account-card-icon.blue { background: linear-gradient(145deg, #67a0ce, #396f9c); }
.account-card-copy strong, .account-card-copy span { display: block; }
.account-card-copy strong { margin-bottom: 4px; font-size: 14px; }
.account-card-copy span { color: var(--muted); font-size: 10px; }
.account-card-arrow { color: #9aa69f; font-size: 18px; }
.login-security { display: flex; gap: 11px; margin-top: 24px; padding: 14px 16px; border: 1px solid #e1e8e3; border-radius: 15px; background: #f0f4f2; }
.login-security p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.login-security strong { color: #3d4c44; }

.login-dialog { width: min(410px, calc(100vw - 30px)); padding: 0; border: 0; border-radius: 24px; box-shadow: 0 40px 110px rgba(7,25,16,.4); }
dialog::backdrop { background: rgba(9,25,17,.58); backdrop-filter: blur(4px); }
.login-dialog form { position: relative; padding: 34px; text-align: center; }
.dialog-close { position: absolute; top: 16px; right: 16px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 10px; background: #f0f3f1; color: #68756e; font-size: 20px; }
.selected-account-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 17px; border-radius: 18px; background: var(--brand); color: #fff; font-size: 17px; font-weight: 850; }
.login-dialog h2 { margin: 0; font-size: 22px; }
.login-dialog h2 + p { margin: 7px 0 24px; color: var(--muted); font-size: 12px; }
.password-field { display: grid; gap: 7px; text-align: left; }
.password-field span { color: #425047; font-size: 11px; font-weight: 750; }
.password-field input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; outline: 0; }
.password-field input:focus { border-color: #70a98c; box-shadow: 0 0 0 4px rgba(23,109,76,.09); }
.login-error { min-height: 19px; margin: 8px 0 4px; color: var(--red); font-size: 11px; }
.login-submit { width: 100%; height: 46px; border: 0; border-radius: 12px; background: var(--brand); color: #fff; font-size: 13px; font-weight: 800; }
.login-submit:hover { background: var(--brand-dark); }
.login-submit:disabled { cursor: wait; opacity: .65; }
.login-footnote { margin: 12px 0 0 !important; font-size: 10px !important; }

/* Workbench */
.app-page { overflow: hidden; background: var(--bg); }
.app-shell { display: grid; grid-template-columns: 72px 318px minmax(470px, 1fr) 374px; width: 100vw; height: 100vh; min-width: 1160px; }
.rail { display: flex; flex-direction: column; align-items: center; padding: 18px 0; background: var(--rail); color: #fff; }
.rail-logo { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 28px; border-radius: 14px; background: linear-gradient(145deg, #38a876, #1b724f); box-shadow: 0 10px 25px rgba(27,114,79,.35); font-size: 14px; font-weight: 850; letter-spacing: -.04em; }
.rail-nav { display: grid; gap: 10px; }
.rail-button { display: grid; place-items: center; width: 50px; height: 44px; border: 0; border-radius: 13px; background: transparent; color: #9eb2a8; font-size: 11px; font-weight: 760; letter-spacing: .04em; transition: .15s; }
.rail-button:hover, .rail-button.active { background: rgba(255,255,255,.11); color: #fff; }
.rail-bottom { display: grid; justify-items: center; gap: 13px; margin-top: auto; }
.operator-avatar { display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid rgba(255,255,255,.15); border-radius: 50%; background: #e6b262; color: #452d0c; font-size: 12px; font-weight: 850; }
.inbox { display: flex; min-width: 0; flex-direction: column; border-right: 1px solid var(--line); background: #f8faf9; }
.workspace-head { padding: 20px 17px 15px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.76); }
.auto-demo-launch { display: grid; grid-template-columns: 27px 1fr auto; align-items: center; gap: 9px; width: 100%; margin-top: 14px; padding: 10px 11px; border: 0; border-radius: 13px; background: linear-gradient(135deg,#173a2b,#1d6f50); color: #fff; text-align: left; box-shadow: 0 10px 25px rgba(21,88,61,.18); }
.auto-demo-launch > span:first-child { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 9px; background: rgba(255,255,255,.13); color: #a9efca; }
.auto-demo-launch strong, .auto-demo-launch small { display: block; }
.auto-demo-launch strong { font-size: 11px; }
.auto-demo-launch small { margin-top: 3px; color: #b9d7c8; font-size: 8px; }
.auto-demo-launch b { font-size: 9px; white-space: nowrap; }
.workspace-row, .conversation-head, .copilot-head, .compose-actions, .dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.workspace-title { font-size: 17px; font-weight: 830; letter-spacing: -.03em; }
.workspace-subtitle { display: flex; align-items: center; gap: 7px; margin-top: 5px; color: var(--muted); font-size: 10px; }
.demo-pill { padding: 3px 6px; border-radius: 999px; background: #e8ece9; color: #68746d; font-size: 8px; font-weight: 820; letter-spacing: .08em; }
.icon-button { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #4f5d55; font-size: 19px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-top: 15px; }
.stat { padding: 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.stat strong { display: block; font-size: 18px; letter-spacing: -.04em; }
.stat span { color: var(--muted); font-size: 10px; }
.stat.alert strong { color: var(--red); }
.inbox-tools { padding: 13px 14px 10px; }
.search-wrap { position: relative; display: block; }
.search-wrap > span { position: absolute; left: 11px; top: 7px; color: #8b968f; font-size: 20px; }
.search { width: 100%; height: 38px; padding: 0 12px 0 34px; border: 1px solid var(--line); border-radius: 11px; outline: 0; background: #fff; color: var(--ink); }
.search:focus, textarea:focus, input:focus, select:focus { border-color: #70a88d !important; box-shadow: 0 0 0 3px rgba(23,109,76,.08); }
.filters { display: flex; gap: 5px; margin-top: 9px; }
.filter-button { height: 29px; padding: 0 10px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; }
.filter-button.active { background: var(--brand-soft); color: var(--brand); }
.conversation-list { flex: 1; overflow-y: auto; padding: 2px 9px 16px; }
.conversation-item { display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 9px; width: 100%; padding: 12px 10px; border: 1px solid transparent; border-radius: 14px; background: transparent; text-align: left; transition: .15s; }
.conversation-item:hover { background: #fff; }
.conversation-item.active { border-color: #cde1d6; background: #fff; box-shadow: 0 8px 24px rgba(23,67,47,.07); }
.avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: #fff; font-size: 13px; font-weight: 800; }
.avatar.green { background: linear-gradient(145deg,#4c9b78,#247252); }
.avatar.purple { background: linear-gradient(145deg,#8b75ba,#5d4894); }
.avatar.orange { background: linear-gradient(145deg,#e4a35c,#b96c29); }
.avatar.blue { background: linear-gradient(145deg,#6a9ec7,#3b6f9b); }
.conversation-main { min-width: 0; }
.conversation-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 770; }
.conversation-preview { display: block; overflow: hidden; margin-top: 5px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.channel { padding: 2px 5px; border-radius: 6px; font-size: 8px; font-weight: 820; }
.channel.douyin { background: #22272a; color: #fff; }
.channel.meituan { background: #ffd43c; color: #4c3e00; }
.conversation-side { display: grid; justify-items: end; align-content: space-between; min-height: 40px; }
.conversation-time { color: #98a29c; font-size: 9px; }
.unread { display: grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 9px; font-weight: 800; }
.risk-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.inbox-foot { padding: 9px 13px; border-top: 1px solid var(--line); color: #849089; font-size: 9px; text-align: center; }

.conversation-panel { display: flex; min-width: 0; flex-direction: column; background: #fff; }
.conversation-head { min-height: 72px; padding: 13px 19px; border-bottom: 1px solid var(--line); }
.customer-name { margin: 0; font-size: 16px; font-weight: 800; }
.customer-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; color: var(--muted); font-size: 10px; }
.status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; background: var(--orange-soft); color: var(--orange); font-size: 10px; font-weight: 730; }
.status-badge.replied { background: var(--brand-soft); color: var(--brand); }
.status-badge.high { background: var(--red-soft); color: var(--red); }
.head-actions { display: flex; gap: 7px; }
.small-button { min-height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: #4e5c54; font-size: 11px; font-weight: 700; }
.chat-area { flex: 1; overflow-y: auto; padding: 23px clamp(18px, 3.5vw, 48px); background: radial-gradient(circle at 95% 0%,rgba(44,151,104,.06),transparent 28%),#f7f9f8; }
.day-label { margin: 0 0 20px; color: #99a39d; font-size: 10px; text-align: center; }
.message-row { display: flex; gap: 10px; margin-bottom: 17px; }
.message-row.agent { flex-direction: row-reverse; }
.message-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: #dfe8e3; color: #405249; font-size: 10px; font-weight: 800; }
.message-row.agent .message-avatar { background: var(--brand); color: #fff; }
.message-wrap { max-width: min(76%, 620px); }
.bubble { padding: 10px 13px; border: 1px solid var(--line); border-radius: 6px 16px 16px 16px; background: #fff; box-shadow: 0 7px 20px rgba(25,55,42,.04); font-size: 13px; line-height: 1.68; white-space: pre-wrap; }
.message-row.agent .bubble { border-color: #cce4d7; border-radius: 16px 6px 16px 16px; background: #eaf6ef; }
.message-time { margin-top: 5px; color: #9aa49e; font-size: 9px; }
.message-row.agent .message-time { text-align: right; }
.system-note { width: fit-content; margin: 3px auto 17px; padding: 6px 10px; border-radius: 999px; background: #e9eeeb; color: #748078; font-size: 9px; }
.composer { padding: 12px 17px 14px; border-top: 1px solid var(--line); background: #fff; }
.composer textarea { width: 100%; min-height: 64px; max-height: 140px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; outline: 0; resize: vertical; color: var(--ink); line-height: 1.55; }
.compose-actions { margin-top: 8px; }
.compose-hint { color: #919c95; font-size: 9px; }
.primary-button, .secondary-button { min-height: 36px; padding: 0 13px; border-radius: 10px; font-size: 11px; font-weight: 760; }
.primary-button { border: 0; background: var(--brand); color: #fff; }
.primary-button:hover { background: var(--brand-dark); }
.primary-button:disabled { cursor: wait; opacity: .6; }
.secondary-button { border: 1px solid #bcd8ca; background: var(--brand-soft); color: var(--brand-dark); }

.copilot { overflow-y: auto; border-left: 1px solid var(--line); background: #fbfcfb; }
.copilot-head { position: sticky; z-index: 2; top: 0; min-height: 72px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); backdrop-filter: blur(10px); }
.copilot-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 820; }
.ai-mark { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 10px; background: var(--brand); color: #fff; font-size: 10px; }
.model-state { display: flex; align-items: center; gap: 6px; max-width: 190px; color: var(--muted); font-size: 9px; }
.model-state span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-dot { flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #abb5af; }
.model-dot.ok { background: #25a36a; box-shadow: 0 0 0 4px rgba(37,163,106,.11); }
.model-dot.bad { background: var(--red); }
.copilot-body { display: grid; gap: 12px; padding: 13px; }
.card { border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 7px 24px rgba(25,55,42,.035); }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 13px 9px; color: #34443b; font-size: 11px; font-weight: 800; }
.card-content { padding: 0 13px 13px; }
.quiet-label { color: #8a958f; font-size: 9px; font-weight: 650; }
.summary-text { margin: 0; color: #45544c; font-size: 11px; line-height: 1.62; }
.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.tag { padding: 5px 8px; border-radius: 8px; background: #eef3f0; color: #526159; font-size: 9px; font-weight: 700; }
.tag.intent { background: #e9f1fb; color: var(--blue); }
.tag.warning { background: var(--orange-soft); color: var(--orange); }
.tag.danger { background: var(--red-soft); color: var(--red); }
.info-list { display: grid; gap: 7px; }
.info-row { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; }
.info-row span { color: var(--muted); }
.info-row strong { color: #38473f; font-weight: 740; text-align: right; }
.missing-box { margin-top: 9px; padding: 8px 9px; border-radius: 10px; background: var(--orange-soft); color: #8b571d; font-size: 9px; line-height: 1.55; }
.ai-draft { width: 100%; min-height: 112px; padding: 10px; border: 1px solid var(--line); border-radius: 11px; outline: 0; resize: vertical; background: #f8fbf9; color: #26362e; font-size: 11px; line-height: 1.62; }
.draft-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.ai-meta { min-height: 16px; margin-top: 7px; color: var(--muted); font-size: 9px; }
.ai-meta.error { color: var(--red); }
.quick-demo-card { overflow: hidden; border-color: #bddacb; background: linear-gradient(160deg,#fff 40%,#f0f8f4); }
.live-label { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-size: 8px; letter-spacing: .08em; }
.quick-description { margin: 0 0 10px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.quick-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 9px; }
.quick-chips button { padding: 5px 7px; border: 1px solid #d8e6de; border-radius: 8px; background: #fff; color: #506058; font-size: 8px; }
.quick-chips button:hover { border-color: #8fbea6; color: var(--brand); }
.quick-input { width: 100%; min-height: 64px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; outline: 0; resize: vertical; font-size: 10px; line-height: 1.55; }
.quick-generate { display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 36px; margin-top: 8px; padding: 0 12px; border: 0; border-radius: 10px; background: #142d22; color: #fff; font-size: 10px; font-weight: 750; }
.quick-generate:disabled { cursor: wait; opacity: .65; }
.quick-result { min-height: 62px; margin-top: 9px; padding: 10px; border: 1px dashed #b9d4c5; border-radius: 10px; background: rgba(255,255,255,.7); color: #34463c; font-size: 10px; line-height: 1.65; white-space: pre-wrap; }
.quick-result > span { color: #96a19b; }
.safety-note { padding: 10px 11px; border: 1px solid #f0dcc0; border-radius: 13px; background: #fffbf4; color: #76552b; font-size: 9px; line-height: 1.62; }
.logout-button { min-height: 36px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: #6e7973; font-size: 10px; }

/* Automatic reply stage */
.auto-demo-dialog { width: min(1480px, calc(100vw - 28px)); height: min(900px, calc(100vh - 28px)); max-width: none; max-height: none; padding: 0; border: 0; border-radius: 24px; background: #eef3f0; box-shadow: 0 40px 120px rgba(7,28,18,.45); overflow: hidden; }
.auto-demo-dialog[open] { display: flex; flex-direction: column; }
.auto-demo-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 22px; border-bottom: 1px solid #d8e1dc; background: #fff; }
.auto-demo-head h2 { margin: 5px 0 3px; font-size: 20px; letter-spacing: -.03em; }
.auto-demo-head p { margin: 0; color: var(--muted); font-size: 10px; }
.auto-demo-head-actions { display: flex; align-items: center; gap: 9px; }
.load-test-button { display: grid; grid-template-columns: 22px 1fr; align-items: center; gap: 6px; min-height: 42px; padding: 6px 10px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #b94d1d, #e27a25); color: #fff; text-align: left; box-shadow: 0 9px 20px rgba(190,82,25,.25); }
.load-test-button > span:first-child { font-size: 16px; }
.load-test-button strong, .load-test-button small { display: block; }
.load-test-button strong { font-size: 10px; }
.load-test-button small { margin-top: 2px; color: #ffe3cb; font-size: 8px; }
.load-test-button:disabled { cursor: wait; opacity: .72; }
.load-test-button.running { animation: loadTestPulse 1.1s infinite ease-in-out; }
@keyframes loadTestPulse { 50% { transform: translateY(-1px); box-shadow: 0 12px 25px rgba(190,82,25,.42); } }
.engine-live { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 9px; font-weight: 760; }
.engine-live i { width: 7px; height: 7px; border-radius: 50%; background: #2bb176; box-shadow: 0 0 0 4px rgba(43,177,118,.12); }
.auto-demo-grid { display: grid; grid-template-columns: minmax(350px,.9fr) minmax(420px,1.18fr) 310px; gap: 15px; min-height: 0; flex: 1; padding: 15px; }
.demo-phone-panel, .merchant-demo-panel, .auto-policy-panel { display: flex; min-width: 0; min-height: 0; flex-direction: column; }
.view-label { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; margin: 1px 3px 10px; }
.view-number { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; background: #193d2d; color: #fff; font-size: 10px; font-weight: 850; }
.view-label strong, .view-label small { display: block; }
.view-label strong { color: #2e4036; font-size: 11px; }
.view-label small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.phone-frame, .merchant-console { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow: hidden; border: 1px solid #d6dfda; border-radius: 21px; background: #fff; box-shadow: 0 13px 32px rgba(24,62,44,.08); }
.phone-frame { border: 7px solid #1e2622; border-radius: 28px; }
.phone-bar { display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; min-height: 61px; padding: 0 12px; border-bottom: 1px solid #e5ebe7; text-align: center; }
.phone-bar > span { font-size: 25px; text-align: left; }
.phone-bar > b { font-size: 15px; text-align: right; }
.phone-bar strong, .phone-bar small { display: block; }
.phone-bar strong { font-size: 12px; }
.phone-bar small { margin-top: 4px; color: #769083; font-size: 8px; font-weight: 600; }
.phone-bar small i { display: inline-block; width: 5px; height: 5px; margin-right: 3px; border-radius: 50%; background: #2cac72; }
.auto-messages { flex: 1; overflow-y: auto; padding: 18px 16px; background: #f4f7f5; }
.auto-msg { display: flex; margin-bottom: 13px; }
.auto-msg.customer { justify-content: flex-end; }
.auto-msg.agent { justify-content: flex-start; }
.merchant-view .auto-msg.customer { justify-content: flex-start; }
.merchant-view .auto-msg.agent { justify-content: flex-end; }
.auto-msg > div { max-width: 82%; }
.auto-msg p { margin: 0; padding: 10px 12px; border: 1px solid #dce4df; border-radius: 15px 15px 15px 5px; background: #fff; color: #26362e; font-size: 11px; line-height: 1.58; white-space: pre-wrap; }
.auto-msg.customer p { border-color: #bfe0cf; border-radius: 15px 15px 5px 15px; background: #dff3e8; }
.merchant-view .auto-msg.customer p { border-color: #dce4df; border-radius: 15px 15px 15px 5px; background: #fff; }
.merchant-view .auto-msg.agent p { border-color: #bfe0cf; border-radius: 15px 15px 5px 15px; background: #dff3e8; }
.auto-msg time { display: block; margin-top: 4px; color: #9aa49e; font-size: 8px; }
.auto-msg.customer time, .merchant-view .auto-msg.agent time { text-align: right; }
.auto-msg.typing p { display: flex; gap: 4px; min-width: 54px; }
.auto-msg.typing i { width: 6px; height: 6px; border-radius: 50%; background: #87a395; animation: typingPulse 1s infinite ease-in-out; }
.auto-msg.typing i:nth-child(2) { animation-delay: .14s; }
.auto-msg.typing i:nth-child(3) { animation-delay: .28s; }
@keyframes typingPulse { 0%,70%,100% { opacity: .35; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
.customer-compose { display: grid; grid-template-columns: 1fr 60px; align-items: end; gap: 8px; padding: 10px; border-top: 1px solid #e1e7e3; }
.customer-compose textarea { min-height: 45px; max-height: 92px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 13px; outline: 0; resize: none; font-size: 10px; line-height: 1.45; }
.customer-compose button { height: 45px; border: 0; border-radius: 13px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 800; }
.customer-compose button:disabled { cursor: wait; opacity: .55; }
.merchant-console-head { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 9px; min-height: 62px; padding: 0 14px; border-bottom: 1px solid #e3e9e5; }
.merchant-console-head .avatar { width: 36px; height: 36px; }
.merchant-console-head strong, .merchant-console-head small { display: block; }
.merchant-console-head strong { font-size: 11px; }
.merchant-console-head small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.auto-on { padding: 5px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: 8px; font-weight: 760; }
.auto-decision { display: grid; gap: 4px; min-height: 57px; padding: 11px 14px; border-top: 1px solid #dde5e0; background: #fff; }
.auto-decision span { color: #31443a; font-size: 10px; font-weight: 780; }
.auto-decision small { color: var(--muted); font-size: 8px; }
.auto-decision.risk { background: #fff5ea; }
.auto-decision.risk span { color: #9a5b17; }
.auto-decision.held { background: #fff0f0; }
.auto-decision.held span { color: var(--red); }
.auto-policy-panel { overflow-y: auto; }
.policy-card, .prompt-card, .demo-boundary { border: 1px solid #d5dfd9; border-radius: 15px; background: #fff; }
.policy-card { padding: 12px; }
.policy-card > p { margin: 0 0 10px; color: var(--muted); font-size: 9px; line-height: 1.5; }
.policy-option { display: grid; grid-template-columns: 16px 1fr; gap: 7px; margin-top: 7px; padding: 9px; border: 1px solid #e0e7e3; border-radius: 11px; cursor: pointer; }
.policy-option.selected { border-color: #7eb698; background: #edf7f1; box-shadow: 0 0 0 2px rgba(36,123,83,.07); }
.policy-option input { margin: 2px 0 0; accent-color: var(--brand); }
.policy-option strong, .policy-option small { display: block; }
.policy-option strong { color: #35483e; font-size: 9px; }
.policy-option strong em { margin-left: 4px; padding: 2px 4px; border-radius: 5px; background: #d8eee2; color: var(--brand); font-size: 7px; font-style: normal; }
.policy-option strong em.flex-tag { background: #e9eef9; color: #4c6093; }
.policy-option small { margin-top: 4px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.prompt-card { display: grid; gap: 6px; margin-top: 10px; padding: 11px; }
.prompt-card > strong { margin-bottom: 2px; color: #3a4b42; font-size: 9px; }
.prompt-card > strong small { margin-left: 4px; color: #8a958f; font-size: 7px; font-weight: 600; }
.prompt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.prompt-card button { min-height: 34px; padding: 7px 8px; border: 1px solid #dce5e0; border-radius: 9px; background: #f8faf9; color: #56645d; font-size: 8px; line-height: 1.35; text-align: left; }
.prompt-card button:hover { border-color: #91bea8; color: var(--brand); }
.customer-prompt-card { flex: 0 0 auto; margin-top: 10px; border-color: #cbe2d5; background: linear-gradient(135deg, #fff, #f1f8f4); }
.demo-boundary { margin-top: 10px; padding: 10px; background: #f6f8f7; color: #7b8780; font-size: 8px; line-height: 1.55; }

.load-test-dialog { width: min(920px, calc(100vw - 32px)); max-height: min(760px, calc(100vh - 32px)); padding: 0; border: 0; border-radius: 22px; background: #f4f7f5; box-shadow: 0 38px 100px rgba(7,28,18,.42); overflow: hidden; }
.load-test-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 20px 22px; border-bottom: 1px solid #dce5df; background: #fff; }
.load-test-head h2 { margin: 5px 0 4px; font-size: 21px; letter-spacing: -.03em; }
.load-test-head p { margin: 0; color: var(--muted); font-size: 10px; }
.load-test-body { padding: 16px 18px 18px; overflow-y: auto; }
.load-test-summary { padding: 13px 14px; border: 1px solid #f0c7a9; border-radius: 14px; background: #fff7f0; color: #824017; font-size: 12px; font-weight: 720; line-height: 1.55; }
.load-test-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 13px; }
.load-test-result { padding: 11px 12px; border: 1px solid #dce5df; border-radius: 12px; background: #fff; }
.load-test-result.ok { border-left: 4px solid #2d9a69; }
.load-test-result.failed { border-left: 4px solid var(--red); }
.load-test-result.pending { border-left: 4px solid #e19a3a; background: linear-gradient(90deg, #fffaf0, #fff); }
.load-test-result strong, .load-test-result small, .load-test-result p { display: block; }
.load-test-result strong { color: #34453d; font-size: 11px; }
.load-test-result small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.load-test-result p { margin: 7px 0 0; color: #48574f; font-size: 10px; line-height: 1.55; }
.load-test-note { margin: 12px 1px 0; color: #7d8982; font-size: 9px; line-height: 1.55; }

.app-dialog { width: min(680px, calc(100vw - 36px)); max-height: calc(100vh - 48px); padding: 0; border: 0; border-radius: 20px; background: #fff; box-shadow: 0 35px 100px rgba(14,43,30,.28); }
.dialog-head { padding: 17px 19px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { margin: 4px 0 0; font-size: 17px; }
.dialog-head p { margin: 5px 0 0; color: var(--muted); font-size: 9px; }
.dialog-body, .profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; overflow-y: auto; padding: 18px 19px; }
.dialog-foot { justify-content: flex-end; padding: 12px 19px; border-top: 1px solid var(--line); background: var(--soft); }
.field { display: grid; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field > span { color: #425047; font-size: 10px; font-weight: 750; }
.field input, .field textarea, .field select { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #fff; color: var(--ink); }
.field input, .field select { height: 39px; padding: 0 10px; }
.field textarea { min-height: 82px; padding: 9px 10px; resize: vertical; line-height: 1.55; }
.profile-item { padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fafcfb; }
.profile-item.full { grid-column: 1 / -1; }
.profile-item span, .profile-item strong { display: block; }
.profile-item span { margin-bottom: 6px; color: var(--muted); font-size: 9px; }
.profile-item strong { color: #34443b; font-size: 11px; font-weight: 680; line-height: 1.65; white-space: pre-wrap; }
.profile-edit-note { display: flex; align-items: center; gap: 10px; margin: 14px 19px 0; padding: 10px 12px; border: 1px solid #cfe4d8; border-radius: 12px; background: #eff8f3; color: #527063; font-size: 9px; }
.profile-edit-note strong { color: var(--brand-dark); white-space: nowrap; }
#profileDialog { width: min(820px, calc(100vw - 36px)); }
#profileDialog .profile-grid { max-height: min(590px, calc(100vh - 250px)); }
.profile-edit-field { display: grid; gap: 6px; }
.profile-edit-field.full { grid-column: 1 / -1; }
.profile-edit-field > span { color: #425047; font-size: 10px; font-weight: 760; }
.profile-edit-field > small { color: #89958e; font-size: 8px; line-height: 1.45; }
.profile-edit-field input, .profile-edit-field textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #fff; color: var(--ink); font-size: 10px; line-height: 1.55; }
.profile-edit-field input { height: 40px; padding: 0 10px; }
.profile-edit-field textarea { min-height: 78px; padding: 9px 10px; resize: vertical; }
.profile-edit-field.packages textarea { min-height: 118px; font-family: inherit; }
.profile-actions { display: flex; align-items: center; gap: 8px; }
.profile-actions > span { margin-right: auto; color: var(--muted); font-size: 9px; }
.profile-actions > span.saved { color: var(--brand); font-weight: 760; }
.empty { padding: 34px 16px; color: var(--muted); font-size: 11px; text-align: center; }

@media (max-width: 1320px) {
  .app-shell { grid-template-columns: 64px 292px minmax(440px, 1fr) 350px; }
  .auto-demo-grid { grid-template-columns: minmax(320px,.9fr) minmax(390px,1.1fr) 280px; }
}

@media (max-width: 1080px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { min-height: 470px; }
  .hero-copy { padding: 70px 0 50px; }
  .login-panel { border-radius: 30px 30px 0 0; }
}

@media (max-width: 720px) {
  .login-hero { min-height: auto; padding: 28px 22px 38px; }
  .hero-copy { padding: 58px 0 38px; }
  .hero-copy h1 { font-size: 38px; }
  .hero-points { grid-template-columns: 1fr; }
  .login-panel { padding: 34px 22px 50px; }
  .account-grid { grid-template-columns: 1fr; }
  .account-card:last-child:nth-child(odd) { grid-column: auto; }

  /* 登录后默认打开的双视角演示：手机改为从上到下依次查看。 */
  .auto-demo-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; }
  .auto-demo-head { position: relative; gap: 10px; padding: 12px 14px; }
  .auto-demo-head .eyebrow, .auto-demo-head p, .engine-live, #resetAutoDemo { display: none; }
  .auto-demo-head h2 { margin: 0; font-size: 15px; line-height: 1.35; }
  .auto-demo-head-actions { margin-left: auto; }
  .auto-demo-head .icon-button { width: 34px; height: 34px; }
  .load-test-button { grid-template-columns: 16px 1fr; min-height: 34px; padding: 4px 7px; border-radius: 10px; }
  .load-test-button > span:first-child { font-size: 12px; }
  .load-test-button strong { font-size: 9px; }
  .load-test-button small { display: none; }
  .auto-demo-grid { grid-template-columns: 1fr; gap: 18px; overflow-y: auto; padding: 13px 12px calc(24px + env(safe-area-inset-bottom)); }
  .demo-phone-panel { min-height: 630px; }
  .merchant-demo-panel { min-height: 400px; }
  .auto-policy-panel { overflow: visible; }
  .view-label { margin: 0 2px 8px; }
  .phone-frame { flex: 1 1 auto; min-height: 0; }
  .merchant-console { flex: 1 1 auto; min-height: 0; }
  .customer-prompt-card { margin-top: 10px; }
  .customer-prompt-card > strong { font-size: 11px; }
  .customer-prompt-card > strong small { font-size: 9px; }
  .customer-prompt-card .prompt-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .customer-prompt-card button { min-height: 38px; padding: 5px 4px; font-size: 9px; text-align: center; }
  .auto-messages { padding: 14px 12px; }
  .customer-compose { padding: 9px 10px max(10px, env(safe-area-inset-bottom)); }
  .customer-compose textarea { min-height: 48px; font-size: 16px; }
  .customer-compose button { height: 48px; }
  .auto-msg p { font-size: 12px; }
  .policy-option { padding: 11px 10px; }
  .policy-option strong { font-size: 11px; }
  .policy-option small, .policy-card > p, .demo-boundary { font-size: 10px; }
  .prompt-card button { min-height: 40px; font-size: 10px; }
  .load-test-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border-radius: 0; }
  .load-test-head { padding: 14px; }
  .load-test-head .eyebrow, .load-test-head p { display: none; }
  .load-test-head h2 { margin: 0; font-size: 16px; }
  .load-test-body { padding: 13px 12px calc(20px + env(safe-area-inset-bottom)); }
  .load-test-grid { grid-template-columns: 1fr; }
}
