/* 设计系统变量与基础样式 */
:root {
    --primary: #0f766e; /* 新华深碧色 */
    --primary-hover: #0d5c56;
    --primary-light: #f0fdfa;
    --primary-border: #ccfbf1;
    --accent-gold: #d97706; /* 尊贵金 */
    --accent-red: #ef4444; /* 警示红 */
    --accent-gray: #64748b; /* 灰色 */
    
    --bg-app: #f1f5f9;
    --bg-card: #ffffff;
    --bg-chat-user: #0f766e;
    --bg-chat-assistant: #ffffff;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #94a3b8;
    
    --border-color: #e2e8f0;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 28px;
    
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px -2px rgba(15, 118, 110, 0.08);
    --shadow-lg: 0 12px 24px -4px rgba(15, 118, 110, 0.12);
    
    --font-sans: 'Outfit', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #0d1e1c;
    background-image: radial-gradient(circle at 10% 20%, rgba(15, 118, 110, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at 90% 80%, rgba(217, 119, 6, 0.05) 0%, transparent 40%);
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden;
}

/* APP 框架 & 手机壳模拟 */
.app-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 20px;
}

.phone-frame {
    position: relative;
    width: 412px;
    height: 846px;
    background: #1e293b;
    border: 12px solid #334155;
    border-radius: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 
                0 0 0 2px rgba(255,255,255,0.05);
    overflow: hidden;
}

/* 顶部刘海 */
.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 130px;
    height: 24px;
    background: #334155;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    z-index: 1000;
}

.phone-notch::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #1e293b;
    border-radius: 2px;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background-color: var(--bg-app);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* 微信头部栏 */
.wechat-header {
    height: 56px;
    padding-top: 10px; /* 留出刘海距离 */
    padding-left: 16px;
    padding-right: 16px;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 99;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 16px;
}

.icon-back {
    cursor: pointer;
}

.header-right {
    display: flex;
    align-items: center;
}

.wechat-capsule {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 3px 10px;
    border-radius: 20px;
    color: var(--text-main);
    font-size: 12px;
    gap: 8px;
}

.capsule-divider {
    width: 1px;
    height: 12px;
    background: rgba(0, 0, 0, 0.15);
}

.capsule-more {
    cursor: pointer;
    font-weight: bold;
}

.capsule-close {
    cursor: pointer;
    display: flex;
    align-items: center;
}

/* 主内容滚动区域 */
.app-content {
    flex: 1;
    overflow-y: auto;
    position: relative;
    scrollbar-width: none; /* Firefox */
}

.app-content::-webkit-scrollbar {
    display: none; /* Safari & Chrome */
}

/* TAB PANEL 切换 */
.tab-pane {
    display: none;
    height: 100%;
    animation: fadeIn 0.3s ease;
}

.tab-pane.active {
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 微信底部导航栏 */
.wechat-nav {
    height: 60px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: 4px;
    z-index: 99;
}

.nav-item {
    border: none;
    background: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--text-light);
    cursor: pointer;
    font-size: 11px;
    gap: 4px;
    transition: color 0.2s ease;
}

.nav-item.active {
    color: var(--primary);
}

.nav-icon {
    width: 22px;
    height: 22px;
    transition: transform 0.2s ease;
}

.nav-item:active .nav-icon {
    transform: scale(0.9);
}

/* TAB 1: 智能咨询客服聊天区 */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 85%;
    animation: bubbleIn 0.3s ease forwards;
}

@keyframes bubbleIn {
    from { opacity: 0; transform: scale(0.9) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.chat-message.assistant {
    align-self: flex-start;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message.system {
    align-self: center;
    max-width: 90%;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.chat-message.system .message-text {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-muted);
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 12px;
    line-height: 1.4;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.message-bubble {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    line-height: 1.5;
    word-break: break-all;
    box-shadow: var(--shadow-sm);
}

.chat-message.assistant .message-bubble {
    background-color: var(--bg-chat-assistant);
    color: var(--text-main);
    border-top-left-radius: 2px;
    border: 1px solid var(--border-color);
}

.chat-message.user .message-bubble {
    background-color: var(--bg-chat-user);
    color: white;
    border-top-right-radius: 2px;
}

/* 热门提问快捷键 */
.quick-questions {
    padding: 12px 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border-color);
    max-height: 140px;
    overflow-y: auto;
}

.qq-btn {
    border: 1px solid var(--primary-border);
    background-color: var(--primary-light);
    color: var(--primary);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    text-align: left;
}

.qq-btn:hover {
    background-color: var(--primary);
    color: white;
}

/* 聊天底部输入框 */
.chat-input-area {
    padding: 10px 16px;
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

#chat-input {
    flex: 1;
    height: 38px;
    border: 1px solid var(--border-color);
    background-color: #f8fafc;
    border-radius: 20px;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

#chat-input:focus {
    border-color: var(--primary);
    background-color: white;
    box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.1);
}

.btn-send {
    width: 38px;
    height: 38px;
    border: none;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-send:hover {
    background-color: var(--primary-hover);
}

/* TAB 2: 一键投保产品展示 */
.products-container, .cases-container, .profile-container {
    padding: 20px 16px;
}

.section-header {
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.section-header p {
    font-size: 12px;
    color: var(--text-muted);
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.product-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 16px;
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: bold;
    padding: 4px 10px;
    border-bottom-left-radius: var(--radius-sm);
}

.product-badge.accent {
    background-color: var(--accent-gold);
}

.product-info h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
    padding-right: 60px;
}

.product-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.product-tags span {
    font-size: 10px;
    background-color: #f1f5f9;
    color: var(--text-muted);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
    margin-top: 4px;
}

.price-box {
    font-size: 12px;
    color: var(--text-muted);
}

.price-box span {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

/* TAB 3: 案例分享 */
.cases-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.case-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 16px;
}

.case-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.case-tag {
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
}

.case-tag.bones { background-color: #fef3c7; color: #d97706; }
.case-tag.child { background-color: #e0f2fe; color: #0284c7; }
.case-tag.lumbar { background-color: #fee2e2; color: #ef4444; }

.case-header h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.case-summary {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.comparison-highlight {
    display: flex;
    gap: 10px;
    background-color: #f8fafc;
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

.comp-col {
    flex: 1;
}

.comp-col.xinhua {
    border-right: 1px dashed #cbd5e1;
    padding-right: 10px;
}

.comp-col.rival {
    padding-left: 2px;
}

.comp-label {
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 4px;
}

.xinhua .comp-label { color: var(--primary); }
.rival .comp-label { color: var(--accent-gray); }

.comp-val {
    font-size: 11px;
    line-height: 1.4;
    color: var(--text-muted);
}

.comp-val b {
    color: var(--text-main);
}

.btn-text-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    display: flex;
    align-items: center;
}

.btn-text-link:hover {
    text-decoration: underline;
}

/* TAB 4: 顾问名片 */
.profile-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-card {
    background: linear-gradient(135deg, #0d5c56 0%, #115e59 100%);
    color: white;
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.profile-main {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}

.profile-avatar-big {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.8);
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.profile-info-text h3 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.badge-title {
    background-color: var(--accent-gold);
    color: white;
    font-size: 9px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
}

.company-tag {
    font-size: 11px;
    opacity: 0.85;
    margin-top: 2px;
    margin-bottom: 4px;
}

.motto {
    font-size: 10px;
    font-style: italic;
    opacity: 0.9;
    line-height: 1.4;
    border-left: 2px solid var(--accent-gold);
    padding-left: 6px;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    border-top: 1px solid rgba(255,255,255,0.15);
    padding-top: 16px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-num {
    font-size: 16px;
    font-weight: 700;
    color: #ccfbf1;
}

.stat-label {
    font-size: 10px;
    opacity: 0.8;
    margin-top: 2px;
}

.credentials-box h4, .qr-box h4, .message-board h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
    border-left: 3px solid var(--primary);
    padding-left: 8px;
}

.credential-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.credential-tags span {
    font-size: 11px;
    background-color: white;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.qr-box {
    background-color: white;
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.qr-box p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 12px;
}

.qr-img {
    width: 140px;
    height: 140px;
    border: 1px solid var(--border-color);
    padding: 4px;
    border-radius: var(--radius-sm);
    background-color: white;
}

.message-board {
    background-color: white;
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s ease;
    background-color: #f8fafc;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary);
    background-color: white;
}

.btn-submit {
    width: 100%;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-submit:hover {
    background-color: var(--primary-hover);
}

.form-success-alert {
    margin-top: 12px;
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 10px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    line-height: 1.4;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.hidden {
    display: none !important;
}

/* 全局 MODAL STYLING */
.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    justify-content: flex-end;
    flex-direction: column;
    animation: fadeInOverlay 0.2s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-sheet {
    background-color: white;
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    max-height: 85%;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.32, 0.94, 0.6, 1);
}

.modal-overlay.active {
    display: flex;
}

.modal-overlay.active .modal-sheet {
    transform: translateY(0);
}

.modal-header {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
}

.modal-close {
    border: none;
    background: none;
    font-size: 24px;
    line-height: 1;
    color: var(--text-light);
    cursor: pointer;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

/* 一键投保 WIZARD STEPS */
.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

.wizard-progress {
    font-size: 10px;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 16px;
    background-color: #f8fafc;
    padding: 6px;
    border-radius: 20px;
}

.wizard-progress .step-num {
    font-weight: bold;
}

.wizard-progress .step-num.active {
    color: var(--primary);
}

/* 试算器 */
.calc-field {
    margin-bottom: 16px;
}

.calc-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.calc-field input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
    cursor: pointer;
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-light);
    margin-top: 2px;
}

.btn-group {
    display: flex;
    gap: 8px;
}

.btn-tab-small {
    flex: 1;
    border: 1px solid var(--border-color);
    background-color: #f8fafc;
    color: var(--text-muted);
    padding: 6px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
}

.btn-tab-small.active {
    border-color: var(--primary);
    background-color: var(--primary-light);
    color: var(--primary);
    font-weight: bold;
}

.waiver-tip {
    background-color: #fffbeb;
    border: 1px solid #fef3c7;
    color: #b45309;
    font-size: 11px;
    padding: 10px;
    border-radius: var(--radius-sm);
    line-height: 1.4;
    margin-bottom: 16px;
}

.premium-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--primary-light);
    border: 1px solid var(--primary-border);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
}

.pr-label {
    font-size: 12px;
    font-weight: bold;
    color: var(--text-muted);
}

.pr-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.btn-primary-large {
    width: 100%;
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary-large:hover {
    background-color: var(--primary-hover);
}

/* 投保资料表单 */
.form-section {
    margin-bottom: 16px;
}

.form-section h5 {
    font-size: 12px;
    color: var(--primary);
    margin-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 4px;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.form-row input {
    flex: 1;
    border: 1px solid var(--border-color);
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    outline: none;
}

.form-row-check {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* 健康告知 */
.health-announcement {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
}

.health-announcement h4 {
    font-size: 12px;
    color: var(--text-main);
    margin-bottom: 6px;
}

.health-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.health-list {
    list-style-type: none;
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

.health-list li {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e2e8f0;
}

.health-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.health-btn-group {
    display: flex;
    gap: 10px;
}

.btn-danger-large {
    flex: 1;
    border: 1px solid #fca5a5;
    background-color: #fee2e2;
    color: #ef4444;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

/* 收银台 */
.checkout-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.checkout-summary {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-sm);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.summary-row:last-child {
    margin-bottom: 0;
    border-top: 1px solid #e2e8f0;
    padding-top: 8px;
}

.pay-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pay-method {
    border: 1px solid var(--border-color);
    padding: 12px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    position: relative;
}

.pay-method.active {
    border-color: var(--primary);
    background-color: var(--primary-light);
}

.pay-name {
    font-size: 12px;
    font-weight: 600;
}

.pay-tag-recommend {
    position: absolute;
    right: 12px;
    background-color: var(--accent-gold);
    color: white;
    font-size: 8px;
    padding: 1px 6px;
    border-radius: 10px;
    font-weight: bold;
}

/* 电子保单生成 */
.success-screen {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.success-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #10b981;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 12px;
}

.success-screen h3 {
    font-size: 16px;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 4px;
}

.success-msg {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.policy-details {
    width: 100%;
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-sm);
    text-align: left;
    margin-bottom: 16px;
}

.policy-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.policy-row:last-child {
    margin-bottom: 0;
}

.policy-row strong {
    color: var(--text-main);
}

.policy-status {
    color: #10b981;
    font-weight: bold;
}

.expert-sign {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    border-top: 1px dashed var(--border-color);
    padding-top: 12px;
    margin-bottom: 20px;
    width: 100%;
}

.sign-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.sign-text {
    font-size: 11px;
    color: var(--text-main);
}

.sign-sub {
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.3;
}

/* 案例弹窗 */
.case-detail-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.case-banner {
    background-color: #f8fafc;
    border: 1px solid var(--border-color);
    padding: 16px;
    border-radius: var(--radius-sm);
}

.case-badge {
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 8px;
}

.case-banner h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
}

.case-narrative h5, .case-clause-comparison h5, .timeline-box h5, .expert-opinion h5 {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.case-narrative p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.5;
}

.clauses-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.clause-card-small {
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.clause-card-small h6 {
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 4px;
}

.clause-card-small p {
    font-size: 10px;
    line-height: 1.4;
}

.clause-card-small.xinhua {
    border-color: var(--primary-border);
    background-color: var(--primary-light);
}

.clause-card-small.xinhua h6 { color: var(--primary); }
.clause-card-small.xinhua p { color: var(--text-muted); }

.clause-card-small.pingan {
    border-color: #fed7aa;
    background-color: #fff7ed;
}

.clause-card-small.pingan h6 { color: #c2410c; }
.clause-card-small.pingan p { color: #7c2d12; }

.clause-card-small.aia {
    border-color: #f5d0fe;
    background-color: #fdf4ff;
}

.clause-card-small.aia h6 { color: #a21caf; }
.clause-card-small.aia p { color: #701a75; }

/* 理赔时间轴 */
.timeline {
    list-style-type: none;
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background-color: var(--border-color);
}

.timeline li {
    position: relative;
    margin-bottom: 12px;
}

.timeline li:last-child {
    margin-bottom: 0;
}

.time-node {
    position: absolute;
    left: -20px;
    top: 2px;
    background-color: var(--primary);
    color: white;
    font-size: 8px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 4px;
}

.time-content {
    padding-left: 10px;
}

.time-content strong {
    display: block;
    font-size: 11px;
    color: var(--text-main);
}

.time-content p {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* 专家点评 */
.expert-opinion {
    background-color: #fffbeb;
    border: 1px solid #fef3c7;
    padding: 12px;
    border-radius: var(--radius-sm);
}

.eo-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.eo-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.eo-header strong {
    display: block;
    font-size: 11px;
    color: #b45309;
}

.eo-header span {
    font-size: 9px;
    color: #d97706;
}

.eo-text {
    font-size: 10px;
    color: #78350f;
    line-height: 1.4;
}

/* 移动端全屏响应式适配 */
@media (max-width: 480px) {
    body {
        background: var(--bg-app);
        padding: 0;
    }
    
    .app-wrapper {
        padding: 0;
        height: 100vh;
        width: 100vw;
    }
    
    .phone-frame {
        width: 100%;
        height: 100%;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }
    
    .phone-notch {
        display: none;
    }
    
    .wechat-header {
        padding-top: 0; /* 移动端没有刘海装饰 */
    }
}

/* 顾问后台入口样式 */
.admin-entry-box {
    margin-top: 20px;
    text-align: center;
    padding-bottom: 20px;
}

.btn-admin-entry {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background-color: #1e293b;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid #334155;
    transition: all 0.2s ease;
}

.btn-admin-entry:hover {
    background-color: #0f172a;
    color: #ffffff;
    border-color: var(--primary);
}



/* ==========================================================================
   美化：用户咨询与 AI 顾问回复富文本排版样式
   ========================================================================== */

.chat-message.assistant {
    max-width: 92%;
}

.chat-message.assistant .message-bubble {
    background: var(--bg-card);
    color: var(--text-main);
    border-top-left-radius: 4px;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.02);
    padding: 16px 18px;
    font-size: 14.5px;
    line-height: 1.7;
    letter-spacing: 0.2px;
}

[data-theme="dark"] .chat-message.assistant .message-bubble {
    background: #1e293b;
    border-color: rgba(212, 175, 55, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* 消息内部分段与标题 */
.chat-response-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-section-card {
    background: rgba(248, 250, 252, 0.8);
    border-radius: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .chat-section-card {
    background: rgba(15, 23, 42, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
}

.chat-h2, .chat-h3 {
    font-weight: 600;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 6px;
    font-size: 15px;
}

[data-theme="dark"] .chat-h2, [data-theme="dark"] .chat-h3 {
    color: #fbbf24;
}

.chat-h-icon {
    font-size: 16px;
}

/* 格式化加粗与条款强调 */
.chat-bold {
    font-weight: 600;
    color: var(--text-main);
}

.clause-highlight {
    color: #1e40af;
    background-color: rgba(59, 130, 246, 0.08);
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    border: 1px solid rgba(59, 130, 246, 0.15);
    display: inline-block;
    margin: 1px 0;
}

[data-theme="dark"] .clause-highlight {
    color: #93c5fd;
    background-color: rgba(59, 130, 246, 0.2);
    border-color: rgba(147, 197, 253, 0.3);
}

/* 标签徽章 Badges */
.chat-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-right: 6px;
    margin-bottom: 4px;
    line-height: 1.3;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.badge-xinhua {
    background: linear-gradient(135deg, #d97706, #b45309);
    color: #ffffff;
}

.badge-pingan {
    background: rgba(239, 68, 68, 0.12);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-aiob {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
    border: 1px solid rgba(100, 116, 139, 0.3);
}

[data-theme="dark"] .badge-aiob {
    color: #cbd5e1;
}

.badge-clause {
    background: rgba(37, 99, 235, 0.1);
    color: #2563eb;
    border: 1px solid rgba(37, 99, 235, 0.25);
}

[data-theme="dark"] .badge-clause {
    color: #60a5fa;
    background: rgba(37, 99, 235, 0.25);
}

.badge-warn {
    background: rgba(245, 158, 11, 0.12);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .badge-warn {
    color: #fbbf24;
}

.badge-tip {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* 列表排版 */
.chat-ul, .chat-ol {
    margin: 6px 0 10px 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chat-li {
    position: relative;
    list-style-type: disc;
}

.chat-ol .chat-li {
    list-style-type: decimal;
}

/* 引用块 / 条款原文呼应 */
.chat-callout {
    margin: 8px 0;
    padding: 10px 14px;
    background: rgba(212, 175, 55, 0.06);
    border-left: 3.5px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
    font-size: 13.5px;
    color: var(--text-muted);
}

[data-theme="dark"] .chat-callout {
    background: rgba(212, 175, 55, 0.1);
    color: #cbd5e1;
}

.chat-callout.callout-warning {
    background: rgba(239, 68, 68, 0.06);
    border-left-color: #ef4444;
}

/* 响应式条款对比表格 */
.chat-table-wrapper {
    overflow-x: auto;
    margin: 10px 0;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.chat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}

.chat-table th {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    color: #ffffff;
    font-weight: 600;
    padding: 8px 12px;
}

[data-theme="dark"] .chat-table th {
    background: linear-gradient(135deg, #0f172a, #1e293b);
}

.chat-table td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card);
}

.chat-table tr:nth-child(even) td {
    background: rgba(0, 0, 0, 0.015);
}

[data-theme="dark"] .chat-table tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.03);
}

/* 顾问名片与底部操作导流 */
.chat-advisor-footer {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed rgba(212, 175, 55, 0.4);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.advisor-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.advisor-mini-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--accent-color);
}

.btn-contact-quick {
    background: linear-gradient(135deg, var(--accent-color), #b45309);
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.3);
}

.btn-contact-quick:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.4);
}

/* ==========================================================================
   全新美化：智能 Markdown 排版与分段强化样式
   ========================================================================== */

.chat-p {
    margin-bottom: 10px;
    line-height: 1.65;
    word-break: break-word;
}

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

/* 独立粗体标题自动变为带左侧金边的主题小标题 */
.chat-p > .chat-bold:only-child {
    display: inline-flex;
    align-items: center;
    font-size: 14.5px;
    font-weight: 700;
    color: #0f172a;
    margin-top: 10px;
    margin-bottom: 4px;
    padding-left: 8px;
    border-left: 3.5px solid #d97706;
}

[data-theme="dark"] .chat-p > .chat-bold:only-child {
    color: #fbbf24;
    border-left-color: #fbbf24;
}

.chat-li-item {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 4px 0;
    line-height: 1.6;
}

.chat-li-item .bullet {
    color: #d97706;
    font-weight: bold;
    flex-shrink: 0;
    font-size: 14px;
    margin-top: -1px;
}

.chat-li-item .num-bullet {
    color: #d97706;
    font-weight: 600;
    flex-shrink: 0;
    font-size: 13.5px;
}


/* ==========================================================================
   全新美化：极简紧凑 Markdown 排版与间距控制
   ========================================================================== */

.chat-message.assistant .message-bubble {
    padding: 12px 14px !important;
}

.chat-p {
    margin-bottom: 6px !important;
    line-height: 1.55 !important;
    word-break: break-word;
}

.chat-p:last-child {
    margin-bottom: 0 !important;
}

/* 独立粗体标题自动变为带左侧金边的主题小标题 */
.chat-p > .chat-bold:only-child {
    display: inline-flex !important;
    align-items: center !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin-top: 6px !important;
    margin-bottom: 2px !important;
    padding-left: 6px !important;
    border-left: 3px solid #d97706 !important;
}

[data-theme="dark"] .chat-p > .chat-bold:only-child {
    color: #fbbf24 !important;
    border-left-color: #fbbf24 !important;
}

.chat-list-group {
    margin: 4px 0 6px 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.chat-li-item {
    display: flex !important;
    align-items: flex-start !important;
    gap: 6px !important;
    margin: 1px 0 !important;
    line-height: 1.5 !important;
}

.chat-li-item .bullet {
    color: #d97706 !important;
    font-weight: bold !important;
    flex-shrink: 0 !important;
    font-size: 13px !important;
}

.chat-li-item .num-bullet {
    color: #d97706 !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
    font-size: 13px !important;
}

.clause-highlight {
    color: #1e40af !important;
    background-color: rgba(59, 130, 246, 0.08) !important;
    padding: 0 4px !important;
    border-radius: 3px !important;
    font-weight: 600 !important;
    border: 1px solid rgba(59, 130, 246, 0.15) !important;
    display: inline !important; /* 保持行内流式排版，防止独占一行导致空行过多 */
}

[data-theme="dark"] .clause-highlight {
    color: #93c5fd !important;
    background-color: rgba(59, 130, 246, 0.2) !important;
    border-color: rgba(147, 197, 253, 0.3) !important;
}

.chat-advisor-footer {
    margin-top: 10px !important;
    padding-top: 8px !important;
    border-top: 1px dashed rgba(255, 255, 255, 0.12) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    flex-wrap: nowrap !important;
}

[data-theme="light"] .chat-advisor-footer {
    border-top-color: rgba(0, 0, 0, 0.08) !important;
}

.advisor-info-inline {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    flex: 1 !important;
}

.advisor-mini-avatar {
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    flex-shrink: 0 !important;
}

.advisor-name-tag {
    font-size: 12px !important;
    color: #475569 !important; /* 高对比深灰 */
    font-weight: 500 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

[data-theme="light"] .advisor-name-tag {
    color: #475569 !important;
}

.advisor-name-tag b {
    color: #0f172a !important; /* 极清晰近黑 */
    font-weight: 700 !important;
}

[data-theme="light"] .advisor-name-tag b {
    color: #0f172a !important;
}

.btn-contact-quick-inline {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border: none !important;
    padding: 4px 10px !important;
    border-radius: 20px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25) !important;
    transition: all 0.2s ease !important;
}

.btn-contact-quick-inline:active {
    transform: scale(0.95) !important;
    opacity: 0.9 !important;
}

/* 移动端聊天答复 Markdown 排版强化 */
.message-content {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

.message-content table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-collapse: collapse !important;
    margin: 10px 0 !important;
    font-size: 12px !important;
}

.message-content th, .message-content td {
    padding: 6px 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    white-space: nowrap !important;
}

.message-content p {
    margin-bottom: 8px !important;
    line-height: 1.6 !important;
}

.message-content ul, .message-content ol {
    padding-left: 18px !important;
    margin: 8px 0 !important;
}

.message-content li {
    margin-bottom: 6px !important;
    line-height: 1.5 !important;
}

@keyframes casesSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
