/* OPPO Sans: 保留品牌字体，字体文件由 OPPO 官方域名提供。 */
@font-face {
    font-family: "OPPO Sans";
    font-style: normal;
    font-weight: 400 900;
    font-display: swap;
    src: url("https://code.oppo.com/content/dam/oppo/common/fonts/font2/new-font/OPPOSansOS2-5000-Regular.woff2") format("woff2");
}

:root {
    --page-bg: #f5f7fb;
    --surface: #ffffff;
    --ink: #18253b;
    --muted: #738096;
    --line: #e9edf4;
    --blue: #2563eb;
    --blue-hover: #1d4ed8;
    --blue-soft: #edf4ff;
    --shadow: 0 18px 60px rgba(33, 52, 86, .055);
    --radius: 24px;

--service-font-family: "OPPO Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;

--bs-font-sans-serif: var(--service-font-family);
--bs-body-font-family: var(--service-font-family);    
    
}



* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(ellipse at 82% 0, rgba(213, 228, 255, .34), transparent 42%),
        var(--page-bg);
font-family: var(--service-font-family);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
    font: inherit;
}

button,
a,
input,
textarea,
summary {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: var(--blue);
    text-decoration: none;
}

button:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .35);
    outline-offset: 4px;
}

[hidden] {
    display: none !important;
}

.svg-definitions {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.page-container {
    width: min(1380px, calc(100% - 80px));
    margin-inline: auto;
}

.skip-link {
    position: fixed;
    left: 16px;
    top: -80px;
    z-index: 2000;
    padding: 12px 18px;
    border-radius: 12px;
    background: var(--ink);
    color: white;
}

.skip-link:focus {
    top: 12px;
}

.site-header {
    height: 88px;
    border-bottom: 1px solid rgba(225, 231, 241, .85);
    background: rgba(255, 255, 255, .8);
    backdrop-filter: blur(18px);
}

.header-inner,
.header-actions,
.brand,
.assistant-identity {
    display: flex;
    align-items: center;
}

.header-inner {
    height: 100%;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    gap: 12px;
    color: var(--ink);
    min-width: 0;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: white;
    background: linear-gradient(145deg, #3f7cf3, #2455d4);
    box-shadow: 0 5px 12px rgba(37, 99, 235, .14);
}

.brand-mark .icon {
    width: 23px;
    height: 23px;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.brand-copy strong {
    font-size: 15px;
    font-weight: 650;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 280px;
}

.brand-copy > span {
    color: var(--muted);
    font-size: 9px;
    letter-spacing: 2.3px;
}

.header-actions {
    gap: 22px;
    flex-shrink: 0;
}

.header-link {
    border: 0;
    background: none;
    color: #55637a;
    padding: 8px 0;
}

.header-link:hover {
    color: var(--blue);
}

.btn {
    border-radius: 11px;
    font-size: 13px;
    font-weight: 550;
    padding: 11px 19px;
}

.btn-sm {
    padding: 9px 14px;
}

.btn-primary {
    --bs-btn-bg: var(--blue);
    --bs-btn-border-color: var(--blue);
    --bs-btn-hover-bg: var(--blue-hover);
    --bs-btn-hover-border-color: var(--blue-hover);
    --bs-btn-disabled-bg: var(--blue);
    --bs-btn-disabled-border-color: var(--blue);
}

.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #dfE9fb;
    background: var(--blue-soft);
    color: #255ac4;
}

.btn-soft:hover {
    background: #e0ecff;
    color: #1d4ed8;
}

.btn-soft .icon {
    width: 17px;
    height: 17px;
}

.icon-button {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: white;
    color: #65728a;
}

.main-shell {
    padding-bottom: 24px;
}

.page-intro {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 27px 0 25px;
    gap: 20px;
}

.eyebrow,
.section-kicker,
.sidebar-tag {
    margin-bottom: 10px;
    color: #8896ad;
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 2px;
}

.page-intro h1 {
    margin: 0;
    font-size: 25px;
    font-weight: 600;
    letter-spacing: -.6px;
}

.intro-note {
    margin: 0 0 3px;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: .3px;
}

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 296px;
    gap: 24px;
    align-items: start;
}

.service-panel {
    height: calc(100dvh - 218px);
    min-height: 610px;
    max-height: 1000px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(229, 234, 243, .95);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
    min-width: 0;
}

.service-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 28px 19px;
    gap: 16px;
}

.assistant-identity {
    gap: 12px;
}

.assistant-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--blue-soft);
    color: var(--blue);
}

.assistant-identity h2 {
    margin: 0 0 5px;
    font-size: 15px;
    font-weight: 650;
}

.assistant-identity p {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 11px;
    color: var(--muted);
}

.status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #9ba9bd;
}

.status-dot.waiting {
    background: var(--blue);
}

.service-badge {
    padding: 5px 9px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: #8a96a9;
    font-size: 10px;
    white-space: nowrap;
}

.view-tabs {
    display: flex;
    gap: 22px;
    padding: 0 28px;
    border-bottom: 1px solid var(--line);
    flex-shrink: 0;
}

.view-tab {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 13px 0 15px;
    border: 0;
    background: none;
    color: #7b879a;
    font-size: 12px;
    white-space: nowrap;
}

.view-tab .icon {
    width: 16px;
    height: 16px;
}

.view-tab.active {
    color: var(--blue);
    font-weight: 600;
}

.view-tab.active::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--blue);
}

.reply-badge {
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 5px;
    background: var(--blue-soft);
    color: var(--blue);
}

.service-view {
    flex: 1;
    min-height: 0;
}

.chat-view {
    display: flex;
    flex-direction: column;
}

.feed-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
}

.chat-feed {
    height: 100%;
    padding: 25px 28px 20px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dfe5ef transparent;
    overscroll-behavior: contain;
}

.welcome {
    max-width: 520px;
    margin: 18px auto 25px;
    text-align: center;
}

.welcome-symbol {
    width: 66px;
    height: 66px;
    display: inline-grid;
    place-items: center;
    border: 1px solid #e4ecfa;
    border-radius: 22px;
    background: linear-gradient(150deg, #f8fbff, #edf3ff);
    box-shadow: 0 10px 28px rgba(53, 91, 159, .055);
    color: var(--blue);
}

.welcome-symbol .icon {
    width: 15px;
    height: 15px;
    stroke-width: 1.3;
}

.welcome-label {
    margin: 20px 0 9px;
    color: #8b99ae;
    font-size: 11px;
    letter-spacing: 1px;
}

.welcome h3 {
    margin: 0 0 13px;
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -.7px;
}

.welcome-description {
    margin: 0 auto;
    max-width: 400px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.95;
}

.suggestion-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 25px;
}

.suggestion {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 13px;
    border: 1px solid #e5eaf2;
    border-radius: 10px;
    background: white;
    color: #536178;
    font-size: 11px;
    transition: background .18s, border-color .18s, transform .18s;
}

.suggestion:hover {
    border-color: #c6d8fc;
    background: #f8fbff;
    transform: translateY(-1px);
}

.suggestion span:last-child {
    color: #99a8bf;
}

.welcome-footnote {
    margin-top: 25px;
    font-size: 10px;
    color: #a1aabc;
}

.welcome.compact {
    margin: 0 0 24px;
    padding: 12px 0 24px;
    border-bottom: 1px solid var(--line);
}

.welcome.compact .welcome-symbol,
.welcome.compact .welcome-label,
.welcome.compact .suggestion-list,
.welcome.compact .welcome-footnote {
    display: none;
}

.welcome.compact h3 {
    font-size: 16px;
    margin-bottom: 8px;
}

.message-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 23px;
}

.message-row.user {
    justify-content: flex-end;
}

.message-avatar {
    width: 29px;
    height: 29px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 10px;
    color: var(--blue);
    background: var(--blue-soft);
    margin-top: 3px;
}

.message-avatar .icon {
    width: 16px;
    height: 16px;
}

.message-content {
    max-width: min(85%, 680px);
    min-width: 0;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 7px;
    font-size: 10px;
    color: #8e9bb0;
}

.user .message-meta {
    justify-content: flex-end;
}

.message-bubble {
    padding: 14px 17px;
    border-radius: 3px 16px 16px;
    background: #f5f7fa;
    color: #344258;
    font-size: 13px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.user .message-bubble {
    border-radius: 16px 3px 16px 16px;
    background: #eaf2ff;
    color: #24436d;
    white-space: pre-wrap;
}

.message-bubble p {
    margin: 0 0 10px;
    white-space: pre-wrap;
}

.message-bubble p:last-child {
    margin-bottom: 0;
}

.message-bubble ul,
.message-bubble ol {
    padding-left: 21px;
    margin-bottom: 10px;
}

.message-bubble li + li {
    margin-top: 3px;
}

.message-bubble h4 {
    margin: 13px 0 8px;
    font-size: 13px;
    font-weight: 650;
}

.message-bubble h4:first-child {
    margin-top: 0;
}

.message-bubble pre {
    margin: 10px 0;
    padding: 13px;
    background: #e9edf4;
    border-radius: 9px;
    font-size: 11px;
    line-height: 1.7;
    overflow-x: auto;
    white-space: pre;
}

.message-bubble code {
    color: #385780;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.message-tools {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.text-action,
.copy-message {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    padding: 3px 0;
    background: none;
    color: var(--blue);
    font-size: 11px;
}

.copy-message {
    color: #8b99ae;
}

.copy-message:hover {
    color: var(--blue);
}

.copy-message .icon {
    width: 12px;
    height: 12px;
}

.wait-bubble {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 49px;
    color: #7f8da2;
    font-size: 12px;
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #6d93db;
    animation: typing 1.3s infinite;
}

.typing-dots i:nth-child(2) {
    animation-delay: .15s;
}

.typing-dots i:nth-child(3) {
    animation-delay: .3s;
}

@keyframes typing {
    0%, 70%, 100% { opacity: .35; transform: translateY(0); }
    35% { opacity: 1; transform: translateY(-3px); }
}

.error-bubble {
    background: #fff8f3;
    color: #80624d;
}

.error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 8px;
}

.scroll-bottom {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border: 1px solid #e5eaf2;
    border-radius: 99px;
    background: rgba(255, 255, 255, .96);
    color: #5b7193;
    box-shadow: 0 4px 20px rgba(23, 43, 77, .09);
    font-size: 11px;
}

.scroll-bottom .icon {
    width: 14px;
    height: 14px;
}

.composer-area {
    flex-shrink: 0;
    padding: 0 22px 16px;
    background: white;
}

.composer {
    border: 1px solid #e0e6ef;
    border-radius: 17px;
    background: #fcfdff;
    transition: border-color .18s, box-shadow .18s;
}

.composer:focus-within {
    border-color: #9bb9f3;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .045);
    background: white;
}

.composer textarea {
    display: block;
    width: 100%;
    min-height: 66px;
    max-height: 160px;
    resize: none;
    padding: 15px 16px 5px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.7;
}

.composer textarea::placeholder {
    color: #a0aabd;
}

.composer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 10px 10px 16px;
}

.character-count {
    font-size: 10px;
    color: #a0aabd;
}

.send-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 76px;
    min-height: 36px;
    border: 0;
    border-radius: 10px;
    background: var(--blue);
    color: white;
    font-size: 12px;
    transition: background .15s, opacity .15s;
}

.send-button .icon {
    width: 15px;
    height: 15px;
}

.send-button:hover:not(:disabled) {
    background: var(--blue-hover);
}

.send-button:disabled {
    background: #edf1f8;
    color: #a5b1c3;
    cursor: not-allowed;
}

.composer-caption {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 3px 0;
    color: #a0aabd;
    font-size: 9px;
}

.inline-notice {
    margin: 0 2px 10px;
    padding: 9px 12px;
    border-radius: 10px;
    background: #f1f6ff;
    color: #637a9f;
    font-size: 11px;
    line-height: 1.7;
}

.content-view {
    overflow-y: auto;
    padding: 31px 34px;
    scrollbar-width: thin;
}

.view-heading {
    margin-bottom: 28px;
}

.section-kicker {
    display: block;
    margin-bottom: 12px;
    color: #7891b6;
}

.view-heading h3 {
    margin-bottom: 12px;
    font-size: 23px;
    font-weight: 600;
    letter-spacing: -.5px;
    line-height: 1.5;
}

.view-heading p {
    margin: 0;
    font-size: 12px;
    line-height: 1.85;
    color: var(--muted);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.contact-card {
    display: flex;
    flex-direction: column;
    gap: 13px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fcfdff;
}

.contact-label {
    color: #8a97ab;
    font-size: 11px;
}

.contact-value {
    font-size: 15px;
    font-weight: 550;
    color: #334b70;
    overflow-wrap: anywhere;
}

.contact-caption {
    color: #99a4b5;
    font-size: 10px;
}

.contact-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 24px;
    padding: 22px 0 0;
    border-top: 1px solid var(--line);
}

.contact-footer strong {
    font-size: 12px;
    font-weight: 550;
}

.contact-footer p {
    margin: 7px 0 0;
    font-size: 11px;
    color: var(--muted);
}

.empty-contact {
    padding: 32px 25px;
    text-align: center;
    border: 1px dashed #dae4f3;
    border-radius: 18px;
    background: #f9fbff;
}

.empty-contact .icon {
    width: 30px;
    height: 30px;
    margin-bottom: 15px;
    color: #7393c6;
}

.empty-contact h4 {
    font-size: 16px;
}

.empty-contact p {
    max-width: 380px;
    margin: 12px auto 0;
    font-size: 12px;
    line-height: 1.8;
    color: var(--muted);
}

.form-label {
    margin-bottom: 9px;
    font-size: 12px;
    font-weight: 550;
    color: #46546a;
}

.optional {
    margin-left: 5px;
    font-size: 10px;
    font-weight: 400;
    color: #9ba6b7;
}

.required-mark {
    color: #6e93d7;
}

.form-control,
.form-select {
    border-color: #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12px;
    color: #344258;
    background-color: #fcfdff;
}

.form-control::placeholder {
    color: #a3acbc;
}

.form-control:focus,
.form-select:focus {
    border-color: #9ab8ef;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .06);
    background-color: white;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
    line-height: 1.8;
}

.form-text {
    font-size: 10px;
    color: #9ba6b7;
    margin-top: 8px;
}

.honeypot {
    display: none;
}

.message-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 23px;
}

.message-submit-row > span {
    color: #97a3b5;
    font-size: 10px;
}

.message-submit-row .btn {
    flex-shrink: 0;
}

.form-error {
    margin-top: 18px;
    padding: 11px 14px;
    border-radius: 10px;
    background: #fff4ef;
    color: #ad6341;
    font-size: 12px;
    line-height: 1.8;
}

.message-success {
    max-width: 400px;
    margin: 35px auto;
    text-align: center;
}

.success-symbol {
    width: 65px;
    height: 65px;
    display: inline-grid;
    place-items: center;
    margin-bottom: 24px;
    border-radius: 22px;
    color: #319477;
    background: #eaf7f1;
}

.success-symbol .icon {
    width: 30px;
    height: 30px;
}

.message-success h3 {
    font-size: 25px;
    margin-bottom: 14px;
}

.message-success > p {
    font-size: 12px;
    line-height: 1.9;
    color: var(--muted);
}

.receipt {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 15px;
    margin: 24px 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fafcff;
    font-size: 11px;
}

.receipt span {
    color: var(--muted);
}

.receipt strong {
    color: #4c668b;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-weight: 500;
}

.message-success .text-action {
    display: block;
    margin-inline: auto;
}

.help-sidebar {
    --bs-offcanvas-width: 340px;
}

.help-sidebar .offcanvas-body {
    padding: 0;
}

.sidebar-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.help-card {
    padding: 23px;
    border: 1px solid #e6ecf5;
    border-radius: 20px;
    background: rgba(255, 255, 255, .83);
}

.guide-card {
    background: linear-gradient(145deg, #f4f8ff, #fff);
}

.sidebar-tag {
    display: block;
    font-size: 8px;
    letter-spacing: 1.6px;
    color: #8da1bf;
}

.help-card h2 {
    margin: 0 0 13px;
    font-size: 14px;
    line-height: 1.75;
    font-weight: 600;
}

.guide-card h2 {
    font-size: 19px;
    line-height: 1.6;
    letter-spacing: -.4px;
}

.help-card > p {
    margin: 0 0 18px;
    color: #8290a5;
    font-size: 11px;
    line-height: 1.95;
}

.guide-item {
    display: flex;
    align-items: center;
    gap: 11px;
    margin-top: 13px;
}

.guide-item > span {
    font-size: 10px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    color: #91a8cc;
}

.guide-item p {
    margin: 0;
    color: #677891;
    font-size: 11px;
}

.sidebar-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.sidebar-heading h2 {
    margin-bottom: 0;
}

.sidebar-heading span {
    font-size: 9px;
    letter-spacing: 1px;
    color: #9ba9bd;
}

.faq-item {
    border-bottom: 1px solid #edf0f5;
}

.faq-item:last-child {
    border-bottom: 0;
}

.faq-item summary {
    position: relative;
    padding: 14px 18px 14px 0;
    color: #697991;
    font-size: 11px;
    cursor: pointer;
    list-style: none;
    line-height: 1.6;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 0;
    color: #94a3ba;
    font-size: 15px;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item p {
    margin: 0 0 15px;
    color: #8a97ab;
    font-size: 11px;
    line-height: 1.85;
}

.support-card > p {
    margin-bottom: 12px;
}

.support-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid #edf1f7;
    background: none;
    color: #57739a;
    font-size: 11px;
    text-align: left;
}

.support-link:hover {
    color: var(--blue);
}

.support-hours {
    margin-top: 17px;
    color: #9ba8ba;
    font-size: 10px;
}

.sidebar-footer {
    margin: 0;
    text-align: center;
    color: #a6b1c1;
    font-size: 9px;
    letter-spacing: .7px;
}

.app-toast {
    position: fixed;
    z-index: 2000;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    max-width: calc(100% - 32px);
    padding: 12px 19px;
    border-radius: 12px;
    color: white;
    background: rgba(30, 43, 63, .94);
    font-size: 12px;
    box-shadow: 0 8px 25px rgba(20, 35, 60, .12);
}

/* ==================== 管理后台 ==================== */

.admin-page {
    min-height: 100dvh;
}

.admin-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 38px 24px 50px;
}

.admin-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 27px;
}

.admin-heading h1 {
    margin: 0 0 9px;
    font-size: 28px;
    font-weight: 600;
}

.admin-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.admin-card {
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: white;
    box-shadow: var(--shadow);
}

.admin-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.admin-tabs a {
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #75839a;
    font-size: 12px;
}

.admin-tabs a.active {
    border-color: #dfe9fc;
    background: var(--blue-soft);
    color: var(--blue);
}

.filter-grid {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) 150px 150px 130px auto;
    gap: 12px;
    align-items: end;
    margin-bottom: 23px;
}

.filter-grid .form-label {
    font-size: 11px;
}

.admin-table {
    margin: 0;
    font-size: 12px;
}

.admin-table th {
    padding: 14px 12px;
    background: #f8faff;
    border-bottom-color: var(--line);
    color: #8390a4;
    font-size: 10px;
    font-weight: 550;
    white-space: nowrap;
}

.admin-table td {
    padding: 17px 12px;
    color: #526178;
    border-bottom-color: #eef1f6;
    vertical-align: middle;
}

.admin-table small {
    display: block;
    margin-top: 6px;
    color: #98a4b7;
    font-size: 10px;
}

.table-summary {
    max-width: 350px;
    overflow-wrap: anywhere;
    line-height: 1.8;
}

.record-status {
    display: inline-flex;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 10px;
    white-space: nowrap;
    background: #eff3f9;
    color: #73849d;
}

.record-status.pending,
.record-status.waiting {
    background: #fff4e7;
    color: #b68037;
}

.record-status.done,
.record-status.active {
    background: #edf7f2;
    color: #4b9878;
}

.record-status.error {
    background: #fff0ef;
    color: #b57570;
}

.admin-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
    color: #97a3b5;
    font-size: 11px;
}

.admin-pagination nav {
    display: flex;
    gap: 10px;
}

.admin-empty {
    padding: 65px 20px;
    text-align: center;
    color: #9aa7ba;
    font-size: 13px;
}

.login-shell {
    display: grid;
    place-items: center;
    min-height: 100dvh;
    padding: 25px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 38px;
}

.login-card .brand {
    margin-bottom: 32px;
}

.login-card h1 {
    font-size: 23px;
    margin-bottom: 10px;
}

.login-card > p {
    font-size: 12px;
    line-height: 1.8;
    color: var(--muted);
}

.login-card .form-control {
    font-size: 14px;
}

.record-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 22px;
}

.record-heading h2 {
    font-size: 18px;
    margin: 0 0 7px;
}

.record-heading p {
    margin: 0;
    font-size: 11px;
    color: var(--muted);
}

.record-message {
    margin-bottom: 18px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fafcff;
}

.record-message.assistant {
    background: white;
}

.record-message-meta {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    color: #8d9bb0;
    font-size: 10px;
    margin-bottom: 11px;
}

.record-message-content,
.message-detail-content {
    font-size: 13px;
    line-height: 1.95;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.record-message .record-status {
    margin-top: 10px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--line);
}

.detail-grid dt {
    margin-bottom: 9px;
    color: #95a2b5;
    font-size: 11px;
    font-weight: 400;
}

.detail-grid dd {
    margin: 0;
    color: #42536c;
    font-size: 13px;
    overflow-wrap: anywhere;
}

/* ==================== 响应式 ==================== */

@media (min-width: 992px) {
    .help-sidebar {
        position: static;
        display: block;
        visibility: visible !important;
        background: transparent !important;
    }

    .help-sidebar .offcanvas-body {
        display: block;
        overflow: visible;
        background: transparent !important;
    }
}

@media (min-width: 1600px) {
    .page-intro {
        padding-top: 34px;
        padding-bottom: 31px;
    }

    .service-panel {
        height: calc(100dvh - 235px);
    }

    .welcome {
        margin-top: 45px;
    }
}

@media (max-width: 1199.98px) {
    .page-container {
        width: calc(100% - 48px);
    }

    .workspace {
        grid-template-columns: minmax(0, 1fr) 265px;
        gap: 18px;
    }

    .help-card {
        padding: 20px;
    }

    .intro-note {
        display: none;
    }

    .service-panel {
        min-height: 610px;
    }
}

@media (max-width: 991.98px) {
    .workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .service-panel {
        min-height: 540px;
    }

    .help-sidebar {
        background: #f7f9fd;
    }

    .help-sidebar .offcanvas-body {
        padding: 8px 20px 24px;
    }

    .help-sidebar .offcanvas-header {
        padding: 22px;
    }

    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-search {
        grid-column: 1 / -1;
    }
}

@media (max-width: 575.98px) {
    .page-container {
        width: calc(100% - 28px);
    }

    .site-header {
        height: 66px;
    }

    .brand {
        gap: 9px;
    }

    .brand-mark {
        width: 34px;
        height: 34px;
        border-radius: 11px;
    }

    .brand-mark .icon {
        width: 20px;
        height: 20px;
    }

    .brand-copy strong {
        font-size: 12px;
        max-width: 150px;
    }

    .brand-copy > span {
        font-size: 8px;
        letter-spacing: 1.3px;
    }

    .header-actions {
        gap: 8px;
    }

    .header-actions .btn {
        font-size: 10px;
        padding: 8px 10px;
    }

    .header-actions .btn .icon {
        display: none;
    }

    .page-intro {
        padding: 15px 2px;
    }

    .page-intro .eyebrow {
        display: none;
    }

    .page-intro h1 {
        font-size: 14px;
        color: #7a879b;
        font-weight: 450;
        letter-spacing: 0;
    }

    .main-shell {
        padding-bottom: 12px;
    }

    .service-panel {
        height: calc(var(--viewport-height, 100dvh) - 122px);
        min-height: 330px;
        max-height: none;
        border-radius: 19px;
    }

    .service-topbar {
        padding: 16px 18px 12px;
    }

    .assistant-avatar {
        width: 35px;
        height: 35px;
        border-radius: 11px;
    }

    .assistant-identity h2 {
        font-size: 13px;
    }

    .assistant-identity p {
        font-size: 10px;
    }

    .service-badge {
        font-size: 9px;
    }

    .view-tabs {
        justify-content: space-between;
        gap: 12px;
        padding: 0 18px;
    }

    .view-tab {
        font-size: 11px;
        gap: 5px;
        padding: 11px 0 12px;
    }

    .view-tab .icon {
        width: 14px;
        height: 14px;
    }

    .chat-feed {
        padding: 20px 16px;
    }

    .welcome {
        margin: 8px auto 20px;
    }

    .welcome-symbol {
        width: 52px;
        height: 52px;
        border-radius: 18px;
    }

    .welcome-symbol .icon {
        width: 25px;
        height: 25px;
    }

    .welcome-label {
        margin-top: 16px;
        font-size: 10px;
    }

    .welcome h3 {
        font-size: 22px;
    }

    .welcome-description {
        max-width: 290px;
        font-size: 11px;
    }

    .suggestion-list {
        flex-direction: column;
        max-width: 280px;
        margin: 18px auto 0;
        gap: 8px;
    }

    .suggestion {
        justify-content: space-between;
        padding: 10px 13px;
    }

    .welcome-footnote {
        margin-top: 17px;
    }

    .message-row {
        gap: 7px;
        margin-bottom: 20px;
    }

    .message-avatar {
        width: 25px;
        height: 25px;
        border-radius: 8px;
    }

    .message-content {
        max-width: calc(100% - 32px);
    }

    .message-bubble {
        padding: 12px 13px;
        font-size: 12px;
    }

    .composer-area {
        padding: 0 12px 11px;
    }

    .composer textarea {
        font-size: 16px;
        min-height: 62px;
        max-height: 125px;
        padding: 13px 13px 3px;
        line-height: 1.5;
    }

    .composer-bottom {
        padding: 6px 8px 8px 13px;
    }

    .composer-caption {
        font-size: 9px;
        padding-top: 8px;
    }

    .content-view {
        padding: 24px 19px;
    }

    .view-heading h3 {
        font-size: 20px;
    }

    .view-heading {
        margin-bottom: 22px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 11px;
    }

    .contact-card {
        padding: 18px;
    }

    .contact-footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .form-control {
        font-size: 16px;
    }

    .message-submit-row {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .message-submit-row .btn {
        width: 100%;
        min-height: 44px;
    }

    .message-success {
        margin-top: 15px;
    }

    .message-success h3 {
        font-size: 23px;
    }

    .admin-shell {
        padding: 25px 14px;
    }

    .admin-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-heading h1 {
        font-size: 24px;
    }

    .admin-card {
        padding: 19px;
        border-radius: 16px;
    }

    .login-card {
        padding: 28px;
    }

    .admin-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================
   全屏客服工作台
   仅作用于前台 .chat-page，不影响管理员页面。
   ========================================================== */

body.chat-page {
    --chat-header-height: 64px;
    --chat-sidebar-width: 292px;
    --chat-blue: #3268ed;
    --chat-purple: #7864dc;
    --chat-teal: #269b91;

    position: fixed;
    inset: 0;
    width: 100%;
    height: var(--viewport-height, 100dvh);
    min-height: 0;
    overflow: hidden;
    overscroll-behavior: none;

    background: #edf2fa;
}

/* 顶部导航：紧凑，仍然保留足够的点击面积。 */

.chat-page .site-header {
    height: var(--chat-header-height);
    background: #f9fbff;
    border-bottom: 1px solid #dce5f3;
    backdrop-filter: none;
}

.chat-page .page-container {
    width: 100%;
    max-width: none;
    margin: 0;
}

.chat-page .header-inner {
    padding: 0 24px;
}

.chat-page .brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(140deg, #4386f6, #605bde);
    box-shadow: 0 4px 12px rgba(70, 96, 211, .18);
}

.chat-page .brand-copy strong {
    font-size: 14px;
}

.chat-page .brand-copy > span {
    font-size: 8px;
    letter-spacing: 1.8px;
}

.chat-page .header-actions {
    gap: 20px;
}

.chat-page .header-link {
    font-size: 12px;
}

.chat-page .header-actions .btn-soft {
    border-color: #d8e1fb;
    background: #eaf0ff;
    color: #4c62b7;
}

/* 去除介绍区域、外边距和主栏之间的空隙。 */

.chat-page .page-intro {
    display: none;
}

.chat-page .main-shell {
    height: calc(
        var(--viewport-height, 100dvh) - var(--chat-header-height)
    );
    padding: 0;
    overflow: hidden;
}

.chat-page .workspace {
    height: 100%;
    min-height: 0;
    grid-template-columns:
        minmax(0, 1fr)
        var(--chat-sidebar-width);
    gap: 0;
    align-items: stretch;
}

.chat-page .service-panel {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
}

/* 聊天标题和服务切换。 */

.chat-page .service-topbar {
    flex-shrink: 0;
    padding: 15px 26px 12px;
    background: linear-gradient(100deg, #ffffff, #f7f9ff);
}

.chat-page .assistant-avatar {
    width: 38px;
    height: 38px;
    border: 1px solid #e0e7ff;
    border-radius: 13px;
    color: #6270df;
    background: linear-gradient(145deg, #edf4ff, #f0ebff);
}

.chat-page .assistant-identity h2 {
    font-size: 14px;
}

.chat-page .assistant-identity p {
    font-size: 10px;
}

.chat-page .status-dot {
    background: #97a6bf;
}

.chat-page .status-dot.waiting {
    background: #7b67d9;
    box-shadow: 0 0 0 3px #eee9ff;
}

.chat-page .service-topbar-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-page .service-badge {
    border-color: #dddff8;
    background: #f0edff;
    color: #7663b7;
    font-size: 10px;
}

.chat-page .quick-human {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 6px 10px;
    border: 1px solid #d5eae5;
    border-radius: 9px;
    color: #338776;
    background: #eff9f5;
    font-size: 11px;
}

.chat-page .quick-human:hover {
    background: #e3f4ed;
}

.chat-page .view-tabs {
    padding: 0 26px;
    gap: 27px;
    background: #fff;
    border-bottom-color: #e2e8f3;
}

.chat-page .view-tab {
    padding: 10px 0 12px;
    font-size: 12px;
}

.chat-page .view-tab.active {
    color: #3866d2;
}

.chat-page .view-tab.active::after {
    height: 3px;
    background: linear-gradient(90deg, #3e7aef, #8a6ee4);
}

.chat-page .reply-badge {
    background: #e6f7ef;
    color: #298269;
}

/* 给首次使用者的提示，不占用大块空间。 */

.chat-page .chat-tip-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    gap: 14px;
    padding: 9px 26px;
    border-bottom: 1px solid #e3eaf8;
    background: linear-gradient(90deg, #eef5ff, #f4f1ff);
    color: #697da0;
    font-size: 11px;
    line-height: 1.6;
}

.chat-page .chat-tip-content {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.chat-page .tip-symbol {
    flex-shrink: 0;
    color: #8b76d8;
    font-size: 15px;
}

.chat-page .chat-tip-bar > button {
    flex-shrink: 0;
    min-height: 28px;
    padding: 3px 0;
    border: 0;
    background: transparent;
    color: #7760b7;
    font-size: 11px;
}

.chat-page .chat-tip-bar > button:hover {
    color: #4f3a99;
}

/* 记录区域独立滚动。
   欢迎页、历史消息、等待消息都处于这个滚动容器内。 */

.chat-page .chat-view {
    overflow: hidden;
    min-height: 0;
    background: #f7f9fd;
}

.chat-page .feed-wrap {
    overflow: hidden;
    min-height: 0;
}

.chat-page .chat-feed {
    padding: 28px max(26px, calc((100% - 1050px) / 2)) 24px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
    scrollbar-color: #c9d5e9 transparent;

    background:
        radial-gradient(
            ellipse at 15% 0,
            rgba(216, 229, 255, .3),
            transparent 48%
        ),
        radial-gradient(
            ellipse at 95% 5%,
            rgba(231, 222, 255, .24),
            transparent 42%
        ),
        #f7f9fd;
}

.chat-page .chat-feed::-webkit-scrollbar {
    width: 6px;
}

.chat-page .chat-feed::-webkit-scrollbar-thumb {
    border-radius: 10px;
    background: #c9d5e9;
}

.chat-page .welcome {
    max-width: 590px;
    margin: clamp(16px, 5vh, 58px) auto 30px;
}

.chat-page .welcome-symbol {
    width: 30px;
    height: 30px;
    border-color: #e0e3fb;
    background: linear-gradient(145deg, #e9f2ff, #f0eaff);
    color: #6870d7;
    box-shadow: 0 12px 32px rgba(104, 112, 215, .11);
}

.chat-page .welcome-label {
    color: #8b80ad;
}

.chat-page .welcome h3 {
    color: #263754;
    font-size: 29px;
    letter-spacing: -.8px;
}

.chat-page .welcome-description {
    max-width: 450px;
    color: #7887a0;
    font-size: 13px;
}

.chat-page .suggestion-list {
    gap: 10px;
}

.chat-page .suggestion {
    padding: 12px 15px;
    font-size: 12px;
    border-color: #dce5f5;
    background: #edf4ff;
    color: #526f9d;
}

.chat-page .suggestion:nth-child(2) {
    border-color: #e4def5;
    background: #f2eeff;
    color: #7a65a4;
}

.chat-page .suggestion:nth-child(3) {
    border-color: #d4eae4;
    background: #edf8f4;
    color: #548e7f;
}

.chat-page .suggestion:hover {
    transform: translateY(-2px);
    border-color: #b7c9ed;
    box-shadow: 0 6px 16px rgba(47, 74, 122, .07);
}

.chat-page .suggestion span:last-child {
    color: inherit;
    opacity: .65;
}

.chat-page .welcome-footnote {
    color: #99a3b8;
}

.chat-page .welcome.compact {
    margin: 0 0 26px;
    padding: 0 0 20px;
    border-bottom-color: #e1e8f4;
}

.chat-page .welcome.compact h3 {
    font-size: 15px;
    letter-spacing: 0;
}

.chat-page .welcome.compact .welcome-description {
    font-size: 11px;
}

/* 消息颜色更明确，但长文本仍然保持阅读舒适。 */

.chat-page .message-row {
    margin-bottom: 25px;
}

.chat-page .message-avatar {
    border: 1px solid #e0e1f9;
    color: #7b6cce;
    background: #eeeaff;
}

.chat-page .message-meta {
    color: #8997ae;
    font-size: 10px;
}

.chat-page .message-bubble {
    padding: 15px 19px;
    border: 1px solid #e3e9f4;
    border-radius: 4px 17px 17px;
    background: #fff;
    color: #3f4e67;
    box-shadow: 0 2px 5px rgba(43, 67, 110, .025);
    font-size: 14px;
    line-height: 1.9;
}

.chat-page .user .message-bubble {
    border-color: #d5e3fc;
    border-radius: 17px 4px 17px 17px;
    background: linear-gradient(120deg, #e8f1ff, #eaefff);
    color: #345589;
}

.chat-page .message-bubble strong {
    color: #3e5b8c;
}

.chat-page .message-bubble pre {
    border: 1px solid #e0e5f1;
    background: #f2f4fa;
}

.chat-page .wait-bubble {
    border-color: #e5def7;
    background: #f7f3ff;
    color: #8b79ab;
    font-size: 12px;
}

.chat-page .typing-dots i {
    background: #9680d2;
}

.chat-page .error-bubble {
    border-color: #f0dfca;
    background: #fff8ee;
    color: #94734f;
}

.chat-page .copy-message {
    min-height: 28px;
    color: #8898b3;
}

.chat-page .error-actions .text-action {
    min-height: 30px;
}

.chat-page .scroll-bottom {
    border-color: #dce5f5;
    background: #fff;
    color: #5b74a7;
    box-shadow: 0 5px 20px rgba(38, 66, 118, .12);
}

/* 输入区固定在聊天区域底部，不随记录一起滚动。 */

.chat-page .composer-area {
    flex-shrink: 0;
    padding: 28px max(26px, calc((100% - 1050px) / 2)) 24px;
    border-top: 1px solid #e1e8f4;
    background: #f2f5fb;
}

.chat-page .composer {
    border-color: #d2def1;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 3px 14px rgba(44, 77, 133, .035);
}

.chat-page .composer:focus-within {
    border-color: #90ade8;
    box-shadow:
        0 0 0 3px rgba(68, 112, 211, .07),
        0 3px 14px rgba(44, 77, 133, .035);
}

.chat-page .composer textarea {
    min-height: 62px;
    padding: 14px 16px 4px;
    font-size: 14px;
}

.chat-page .composer textarea::placeholder {
    color: #97a6be;
}

.chat-page .composer-bottom {
    padding-top: 5px;
}

.chat-page .character-count {
    color: #8c9ab1;
    font-size: 10px;
}

.chat-page .send-button {
    min-height: 38px;
    min-width: 84px;
    background: linear-gradient(115deg, #3979ee, #6262db);
    box-shadow: 0 4px 9px rgba(78, 102, 210, .15);
}

.chat-page .send-button:hover:not(:disabled) {
    background: linear-gradient(115deg, #2868df, #5653cc);
}

.chat-page .send-button:disabled {
    background: #e6edf8;
    color: #97a8c4;
    box-shadow: none;
}

.chat-page .composer-caption {
    align-items: center;
    padding: 8px 3px 0;
    font-size: 10px;
    color: #8e9db4;
}

.chat-page .composer-caption kbd {
    padding: 2px 4px;
    border: 1px solid #dde5f2;
    border-radius: 4px;
    background: #f8faff;
    color: #8a9ab3;
    font-family: inherit;
    font-size: 9px;
    box-shadow: none;
}

.chat-page .hint-divider {
    margin: 0 5px;
}

.chat-page .mobile-input-hint {
    display: none;
}

.chat-page .composer-help-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 0;
    border: 0;
    background: none;
    color: #7b71a7;
    font-size: 10px;
    text-align: right;
}

.chat-page .composer-help-link:hover {
    color: #5d4c93;
}

.chat-page .inline-notice {
    margin: 0 0 10px;
    border: 1px solid #e6ddf6;
    background: #f4efff;
    color: #8a76aa;
}

.chat-page .inline-notice .notice-action {
    margin-left: 8px;
    min-height: 28px;
    padding: 2px 7px;
    border: 1px solid #ddd0f0;
    border-radius: 6px;
    background: #fff;
    color: #76609f;
    font-size: 11px;
}

/* 留言和联系方式各自在主区域内滚动，
   切换视图不会带动整个网页滚动。 */

.chat-page .content-view {
    padding: 30px max(28px, calc((100% - 850px) / 2));
    overflow-x: hidden;
    overscroll-behavior: contain;
    background: linear-gradient(145deg, #f8faff, #fff);
}

.chat-page .contact-card {
    border-color: #dce6f6;
    background: #f0f5ff;
}

.chat-page .contact-card:nth-child(2) {
    border-color: #dbece5;
    background: #eff8f3;
}

.chat-page .contact-card:nth-child(3) {
    border-color: #e7dff4;
    background: #f5f0fc;
}

.chat-page .contact-card:nth-child(4) {
    border-color: #efe4d5;
    background: #fff8ee;
}

.chat-page .contact-value {
    font-size: 16px;
}

.chat-page .empty-contact {
    border-color: #ded7f2;
    background: #f4f0ff;
}

.chat-page .form-control {
    border-color: #dbe4f3;
    background: #e4e9ed;
}

.chat-page .form-control:focus {
    background: #fff;
}

.chat-page .message-success .success-symbol {
    background: linear-gradient(145deg, #e0f4ea, #e8f7f4);
}

.chat-page .receipt {
    border-color: #d8e8e1;
    background: #f0f8f4;
}

/* 右侧辅助栏与聊天贴合，使用不同底色区分。 */

@media (min-width: 992px) {
    .chat-page .help-sidebar {
        height: 100%;
        min-height: 0;
        overflow: hidden;
        border-left: 1px solid #dce5f2;
        background: #eaf0fa !important;
    }

    .chat-page .help-sidebar .offcanvas-body {
        height: 100%;
        min-height: 0;
        padding: 0;
        overflow: hidden;
        background: #eaf0fa !important;
    }

    .chat-page .sidebar-stack {
        height: 100%;
        min-height: 0;
        gap: 0;
    }

    .chat-page .help-card {
        flex-shrink: 0;
        padding: 24px;
        border: 0;
        border-bottom: 1px solid #dce5f2;
        border-radius: 0;
        background: transparent;
    }

    .chat-page .guide-card {
        background: linear-gradient(135deg, #e8efff, #eeeafb);
    }

    .chat-page .guide-card h2 {
        color: #455d87;
        font-size: 18px;
    }

    .chat-page .guide-card > p {
        color: #7d88a8;
    }

    .chat-page .guide-item > span {
        color: #9b87c0;
    }

    .chat-page .help-card:not(.guide-card):not(.support-card) {
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        scrollbar-width: thin;
        overscroll-behavior: contain;
        background: #f0f4fc;
    }

    .chat-page .sidebar-heading > span {
        color: #9b85bf;
    }

    .chat-page .faq-item {
        border-bottom-color: #dde6f4;
    }

    .chat-page .faq-item summary {
        color: #617598;
        padding-top: 13px;
        padding-bottom: 13px;
    }

    .chat-page .support-card {
        background: #e9f4f0;
    }

    .chat-page .support-card h2 {
        color: #437668;
    }

    .chat-page .support-card > p {
        color: #7d9b90;
    }

    .chat-page .support-card .sidebar-tag {
        color: #7aa896;
    }

    .chat-page .support-link {
        border-bottom-color: #d5e7df;
        color: #558578;
        min-height: 37px;
    }

    .chat-page .support-hours {
        margin-top: 12px;
        color: #8aa598;
    }

    .chat-page .sidebar-footer {
        flex-shrink: 0;
        margin: 0;
        padding: 14px 10px;
        color: #93a2b9;
        background: #eaf0fa;
    }
}

/* 较矮屏幕压缩辅助说明，优先保证聊天空间。 */

@media (min-width: 992px) and (max-height: 800px) {
    .chat-page .help-card {
        padding: 18px 22px;
    }

    .chat-page .guide-card h2 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .chat-page .guide-card > p {
        margin-bottom: 10px;
        font-size: 10px;
    }

    .chat-page .guide-item {
        margin-top: 8px;
    }

    .chat-page .sidebar-tag {
        margin-bottom: 7px;
    }

    .chat-page .help-card > p {
        margin-bottom: 9px;
    }

    .chat-page .sidebar-footer {
        padding: 10px;
    }
}

@media (min-width: 992px) and (max-height: 620px) {
    .chat-page .guide-card > p,
    .chat-page .guide-item,
    .chat-page .sidebar-footer {
        display: none;
    }

    .chat-page .help-card {
        padding: 14px 20px;
    }

    .chat-page .support-card > p,
    .chat-page .support-hours {
        display: none;
    }
}

/* 平板与手机：帮助栏收进侧滑面板。 */

@media (max-width: 991.98px) {
    .chat-page .workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .chat-page .service-panel {
        min-height: 0;
    }

    .chat-page .help-sidebar {
        background: #edf2fb;
    }

    .chat-page .help-sidebar .offcanvas-body {
        padding: 0;
        overflow-y: auto;
    }

    .chat-page .help-sidebar .sidebar-stack {
        gap: 0;
    }

    .chat-page .help-sidebar .help-card {
        border: 0;
        border-bottom: 1px solid #dce5f2;
        border-radius: 0;
    }

    .chat-page .help-sidebar .guide-card {
        background: #ececff;
    }

    .chat-page .help-sidebar .support-card {
        background: #eaf5f0;
    }

    .chat-page .help-sidebar .sidebar-footer {
        padding: 18px;
    }
}

@media (max-width: 575.98px) {
    body.chat-page {
        --chat-header-height: 58px;
    }

    .chat-page .header-inner {
        padding: 0 14px;
    }

    .chat-page .brand-mark {
        width: 32px;
        height: 32px;
        border-radius: 10px;
    }

    .chat-page .brand-copy strong {
        font-size: 12px;
        max-width: 145px;
    }

    .chat-page .header-actions {
        gap: 8px;
    }

    .chat-page .header-actions .btn {
        min-height: 34px;
        padding: 8px 10px;
        font-size: 10px;
    }

    .chat-page .service-panel {
        height: 100%;
        min-height: 0;
        border-radius: 0;
    }

    .chat-page .service-topbar {
        padding: 12px 16px 10px;
    }

    .chat-page .assistant-avatar {
        width: 33px;
        height: 33px;
        border-radius: 10px;
    }

    .chat-page .assistant-identity {
        gap: 9px;
    }

    .chat-page .assistant-identity h2 {
        font-size: 13px;
    }

    .chat-page .service-topbar-tools {
        gap: 0;
    }

    .chat-page .service-topbar-tools .service-badge {
        display: none;
    }

    .chat-page .quick-human {
        min-height: 32px;
        font-size: 10px;
    }

    .chat-page .view-tabs {
        padding: 0 16px;
        gap: 18px;
    }

    .chat-page .view-tab {
        font-size: 11px;
        padding: 9px 0 11px;
    }

    .chat-page .chat-tip-bar {
        padding: 7px 16px;
        font-size: 10px;
        gap: 8px;
    }

    .chat-page .chat-tip-bar > button {
        display: none;
    }

    .chat-page .chat-feed {
        padding: 22px 14px 18px;
        scrollbar-gutter: auto;
    }

    .chat-page .welcome {
        margin: 20px auto 22px;
    }

    .chat-page .welcome-symbol {
        width: 58px;
        height: 58px;
        border-radius: 19px;
    }

    .chat-page .welcome h3 {
        font-size: 24px;
    }

    .chat-page .welcome-description {
        font-size: 12px;
        max-width: 300px;
    }

    .chat-page .suggestion-list {
        max-width: 310px;
        gap: 9px;
    }

    .chat-page .suggestion {
        min-height: 43px;
        padding: 11px 14px;
        font-size: 11px;
    }

    .chat-page .welcome.compact {
        margin: 0 0 20px;
        padding-bottom: 17px;
    }

    .chat-page .welcome.compact h3 {
        font-size: 14px;
    }

    .chat-page .message-row {
        margin-bottom: 22px;
    }

    .chat-page .message-bubble {
        padding: 12px 14px;
        font-size: 13px;
        line-height: 1.85;
    }

    .chat-page .composer-area {
        padding: 10px 12px calc(8px + env(safe-area-inset-bottom, 0px));
    }

    .chat-page .composer textarea {
        min-height: 56px;
        max-height: 125px;
        padding: 12px 13px 3px;
        font-size: 16px;
        line-height: 1.5;
    }

    .chat-page .composer-bottom {
        padding: 5px 8px 8px 13px;
    }

    .chat-page .send-button {
        min-width: 78px;
        min-height: 38px;
    }

    .chat-page .character-count {
        max-width: calc(100% - 90px);
        font-size: 9px;
        line-height: 1.5;
    }

    .chat-page .composer-caption {
        gap: 8px;
        font-size: 9px;
        padding-top: 6px;
    }

    .chat-page .desktop-input-hint {
        display: none;
    }

    .chat-page .mobile-input-hint {
        display: inline;
    }

    .chat-page .composer-help-link {
        font-size: 9px;
    }

    .chat-page .content-view {
        padding: 24px 18px;
    }

    .chat-page .contact-value {
        font-size: 15px;
    }
}

/* 软键盘打开或横屏时，进一步让出聊天空间。 */

@media (max-width: 991.98px) and (max-height: 520px) {
    .chat-page .chat-tip-bar {
        display: none;
    }

    .chat-page .service-topbar {
        padding-top: 8px;
        padding-bottom: 7px;
    }

    .chat-page .composer-caption {
        display: none;
    }

    .chat-page .composer textarea {
        min-height: 42px;
    }

    .chat-page .welcome {
        margin-top: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .chat-page .suggestion:hover {
        transform: none;
    }
}

/* 移除聊天标题后，服务切换栏直接作为主区域顶部。 */
.chat-page .view-tabs {
    min-height: 48px;
    align-items: stretch;
    padding: 0 24px;
    background: linear-gradient(100deg, #ffffff, #f3f6ff);
}

.chat-page .view-tab {
    min-height: 48px;
    padding: 12px 0;
}

@media (max-width: 575.98px) {
    .chat-page .view-tabs {
        min-height: 44px;
        padding: 0 16px;
    }

    .chat-page .view-tab {
        min-height: 44px;
        padding: 10px 0;
    }
}

.navigation-card {
    background: #f0f4fc;
}

.navigation-list {
    display: flex;
    flex-direction: column;
}

.navigation-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 39px;
    padding: 9px 0;
    border-bottom: 1px solid #dce5f2;
    color: #5f789f;
    font-size: 11px;
}

.navigation-link:last-child {
    border-bottom: 0;
}

.navigation-link:hover {
    color: #3268ed;
}

@media (min-width: 992px) {
    .chat-page .navigation-card {
        flex: 0 0 auto;
        background: #edf3fc;
    }
}

/* 开始对话后，整个欢迎区域退出布局。 */
.chat-page #welcome[hidden],
.chat-page #welcome.compact {
    display: none !important;
}

/* ===== 客服前台精致化：轻盈留白、细腻层次、统一交互 ===== */
:root{--page-bg:#f4f7fc;--ink:#172843;--muted:#73829a;--line:#e6ecf5;--blue:#316be4;--blue-hover:#2458c5;--blue-soft:#edf4ff;--shadow:0 20px 60px rgba(27,49,83,.075);--radius:22px}
body{letter-spacing:.002em;background:radial-gradient(ellipse at 80% -10%,rgba(211,226,255,.52),transparent 38%),#f4f7fc}
.site-header{height:78px;background:rgba(255,255,255,.86);border-bottom-color:rgba(222,230,242,.85);box-shadow:0 3px 18px rgba(30,54,91,.025)}
.brand-mark{border-radius:14px;background:linear-gradient(145deg,#4387f5,#2559ce);box-shadow:0 7px 18px rgba(37,99,235,.2)}
.page-container{width:min(1320px,calc(100% - 64px))}
button,.btn,.send-button,.primary-button{transition:transform .16s ease,box-shadow .18s ease,background .18s ease,border-color .18s ease}
button:active,.btn:active{transform:translateY(0) scale(.985)}
input,textarea,select{border-radius:12px;transition:border-color .18s ease,box-shadow .18s ease}
input:focus,textarea:focus,select:focus{outline:none;border-color:#8db2fa!important;box-shadow:0 0 0 4px rgba(49,107,228,.09)!important}
.chat-shell,.assistant-card,.content-card,.message-panel,.contact-card{border:1px solid rgba(224,232,244,.95);box-shadow:0 14px 42px rgba(27,49,83,.055);border-radius:20px}
.chat-bubble{border-radius:17px}
@media(max-width:767px){.page-container{width:calc(100% - 28px)}.site-header{height:68px}}
