/* ============================================================
 * ZQR™ 数智云平台 · 诊所端 v12.3
 * 专业医疗表单 · Mobile-first · 触控友好
 * ============================================================ */

/* ---- 基础重置 ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; touch-action: manipulation; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-page); color: #1a1a2e; line-height: 1.6; min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { color: #2b6cb0; text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }

/* ---- 颜色系统 ---- */
:root {
    /* ZQR™ 统一设计令牌（T-029 B1 品牌基线） */
    --brand-900: #102A43;
    --brand-800: #1A3A5C;
    --brand-700: #234E73;
    --brand-600: #2B6CB0;
    --brand-500: #3B82C4;
    --ai-accent: #0EA5E9;
    --member-gold: #B8860B;
    --member-gold-2: #D4AF37;
    --member-gold-3: #C8A96A;
    --member-gold-bg: #FBF3DE;
    --bg-page: #F0F2F5;
    --bg-card: #FFFFFF;
    --primary: var(--brand-800);
    --primary-light: var(--brand-600);
    --primary-bg: #ebf4ff;
    --accent: #8B1A2B;
    --accent-light: #a83248;
    --accent-bg: #fdf2f4;
    --success: #2e7d32;
    --success-bg: #e8f5e9;
    --warning: #e65100;
    --warning-bg: #fff3e0;
    --danger: #c62828;
    --danger-bg: #fce4ec;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #eeeeee;
    --gray-300: #e0e0e0;
    --gray-400: #bdbdbd;
    --gray-500: #9e9e9e;
    --gray-600: #757575;
    --gray-700: #616161;
    --gray-800: #424242;
    --gray-900: #1a1a2e;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --transition: 0.2s ease;
}

/* ---- 认证页面 ---- */
.auth-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-600) 55%, var(--brand-900) 100%); }
.auth-card { background: #fff; border-radius: var(--radius-xl); padding: 40px 28px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header svg { display: block; margin: 0 auto 12px; }
.auth-header h1 { font-size: 22px; color: var(--primary); font-weight: 700; }
.auth-header p { color: var(--member-gold-3); margin-top: 4px; font-size: 14px; font-weight: 600; }
.auth-footer { text-align: center; margin-top: 20px; color: var(--gray-600); font-size: 14px; }

/* ---- 表单通用 ---- */
.auth-form, .stage-form { display: flex; flex-direction: column; gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--gray-700); letter-spacing: 0.02em; }
.form-group label .required { color: #e74c3c; margin-left: 2px; font-weight: 400; }
.form-group label .optional { color: var(--gray-400); font-weight: 400; font-size: 12px; margin-left: 2px; }
.form-group input, .form-group select, .form-group textarea {
    padding: 12px 14px; border: 1.5px solid var(--gray-300); border-radius: var(--radius);
    font-size: 16px; line-height: 1.5; color: var(--gray-900);
    background: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none; appearance: none;
    width: 100%;
}
.form-group select {
    /* 自定义下拉箭头 */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23757575'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    padding-right: 36px;
    cursor: pointer;
    min-height: 48px;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--primary-light); outline: none;
    box-shadow: 0 0 0 3px rgba(43,108,176,0.15);
}
.form-group input::placeholder, .form-group textarea::placeholder {
    color: var(--gray-400);
}
.form-group input:read-only, .form-group select:disabled {
    background: var(--gray-100); color: var(--gray-600); cursor: not-allowed;
}
.password-wrapper { position: relative; }
.password-wrapper input { width: 100%; padding-right: 48px; }
.btn-toggle-pw { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: none; font-size: 18px; cursor: pointer; color: var(--gray-500); }

/* ---- 按钮 ---- */
.btn-primary { background: var(--primary); color: #fff; border: none; padding: 13px 28px; border-radius: var(--radius); font-size: 16px; font-weight: 600; cursor: pointer; transition: background var(--transition); min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-primary:hover { background: var(--primary-light); }
.btn-primary:active { transform: scale(0.98); }
.btn-secondary { background: #fff; color: var(--gray-700); border: 1.5px solid var(--gray-300); padding: 11px 22px; border-radius: var(--radius); font-size: 15px; font-weight: 500; cursor: pointer; transition: all var(--transition); min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.btn-secondary:hover { border-color: var(--gray-400); background: var(--gray-50); }
.btn-block { width: 100%; }
.btn-text { background: none; border: none; color: var(--gray-500); font-size: 14px; cursor: pointer; padding: 4px 8px; }
.btn-text:hover { color: var(--gray-700); }
.btn-back { background: none; border: none; font-size: 16px; cursor: pointer; padding: 6px 10px; color: var(--gray-600); border-radius: var(--radius-sm); transition: background var(--transition); }
.btn-back:hover { background: var(--gray-200); }
.btn-icon { background: none; border: none; font-size: 18px; cursor: pointer; padding: 6px; border-radius: var(--radius-sm); transition: background var(--transition); }
.btn-icon:hover { background: var(--gray-200); }
.btn-close { position: absolute; top: 14px; right: 14px; background: rgba(0,0,0,0.5); color: #fff; border: none; border-radius: 50%; width: 36px; height: 36px; font-size: 18px; cursor: pointer; z-index: 10; }

/* ---- 页面容器 ---- */
.page-container { max-width: 100%; margin: 0; padding: 0; }
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--gray-200);
    background: #f0f2f5; z-index: 50;
}
.header-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; }
.header-left h1 { font-size: 18px; color: var(--primary); font-weight: 700; }
.header-right { display: flex; align-items: center; gap: 8px; }
.clinic-name { font-size: 13px; color: var(--gray-500); }

/* ---- 筛选栏 ---- */
.filter-bar { display: flex; gap: 8px; padding: 14px 0; flex-wrap: wrap; }
.filter-bar select, .filter-bar input {
    padding: 10px 36px 10px 12px; border: 1.5px solid var(--gray-300); border-radius: var(--radius);
    font-size: 14px; background: #fff; min-height: 44px;
    -webkit-appearance: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M6 8L1 3h10z' fill='%23757575'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 12px;
}
.filter-bar select { cursor: pointer; }

/* ---- 病例卡片 ---- */
.case-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; padding: 14px 0; }
.case-card {
    background: #fff; border-radius: var(--radius-lg); padding: 18px;
    box-shadow: var(--shadow-sm); cursor: pointer;
    transition: box-shadow var(--transition), transform 0.15s;
    border: 1px solid var(--gray-200);
}
.case-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.case-card:active { transform: translateY(0); }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.case-type-badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: 0.03em; }
.type-complete_denture { background: var(--primary-bg); color: var(--primary); }
.type-tmd { background: var(--warning-bg); color: var(--warning); }
.type-early_ortho { background: var(--success-bg); color: var(--success); }
.case-status { font-size: 11px; padding: 3px 10px; border-radius: 20px; font-weight: 600; }
.status-draft { background: var(--gray-100); color: var(--gray-500); }
.status-submitted { background: var(--primary-bg); color: var(--primary-light); }
.status-reviewing { background: var(--warning-bg); color: var(--warning); }
.status-progress, .status-in_progress { background: #fff3e0; color: #e65100; }
.status-revision_needed, .status-revision { background: var(--danger-bg); color: var(--danger); }
.status-approved { background: var(--success-bg); color: var(--success); }
.status-completed { background: #e0f2f1; color: #00695c; }
.status-delivered { background: #e8eaf6; color: #283593; }
.status-archived { background: #efebe9; color: #4e342e; }
.card-patient { font-size: 18px; font-weight: 700; margin: 4px 0; color: var(--gray-900); }
.card-case-no { font-size: 12px; color: var(--gray-500); font-family: 'SF Mono', 'Consolas', monospace; margin-bottom: 2px; }
.case-no { font-size: 12px; color: var(--gray-500); font-family: 'SF Mono', 'Consolas', monospace; margin-left: 8px; }
.card-meta { font-size: 12px; color: var(--gray-500); display: flex; gap: 14px; margin-top: 4px; }

/* ---- 阶段进度条 ---- */
.stage-progress { display: flex; align-items: center; justify-content: center; gap: 0; margin: 16px 0 8px; }
.stage-step { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.step-circle { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.stage-step.pending .step-circle { background: var(--gray-200); color: var(--gray-500); }
.stage-step.active .step-circle { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(26,58,92,0.3); }
.stage-step.completed .step-circle { background: var(--success); color: #fff; }
.step-label { font-size: 11px; color: var(--gray-500); font-weight: 500; }
.step-line { width: 48px; height: 2px; background: var(--gray-300); margin: 0 6px; margin-bottom: 18px; }

/* ---- 阶段标签页 ---- */
.stage-tabs {
    display: flex; gap: 4px; margin: 10px 0 14px;
    background: var(--gray-100); border-radius: var(--radius-lg); padding: 4px;
}
.stage-tab {
    flex: 1; padding: 11px 8px; text-align: center; border: none;
    background: none; border-radius: var(--radius); font-size: 14px; font-weight: 600;
    cursor: pointer; transition: all var(--transition); color: var(--gray-600);
    min-height: 44px;
}
.stage-tab.active { background: var(--primary); color: #fff; box-shadow: var(--shadow-sm); }
.stage-tab:not(.active):hover { background: var(--gray-200); }
.stage-tab:active { transform: scale(0.97); }

/* ---- 表单卡片 ---- */
.form-card {
    background: #fff; border-radius: var(--radius-lg); padding: 20px 18px;
    margin: 12px 0; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200);
}
.card-title {
    font-size: 15px; font-weight: 700; color: var(--primary);
    margin-bottom: 14px; padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-bg);
    display: flex; align-items: center; gap: 6px;
}
.card-title .section-icon { font-size: 16px; }
.card-title.collapsible { cursor: pointer; user-select: none; display: flex; align-items: center; justify-content: space-between; }
.card-title.collapsible::after { content: '▾'; font-size: 14px; color: var(--gray-400); transition: transform 0.25s ease; flex-shrink: 0; margin-left: auto; }
.card-title.collapsible.collapsed::after { transform: rotate(-90deg); }
.form-card.collapsed .form-grid,
.form-card.collapsed .conditional-field { display: none; }
.form-card.collapsed .card-title { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.form-grid.section-hidden { display: none; }
/* ---- 区块折叠控制栏 ---- */
.section-collapse-toggle {
    display: none; /* PC端默认隐藏，移动端480px以下显示 */
    justify-content: flex-end; padding: 0 4px 8px; gap: 12px;
}
.section-collapse-toggle button {
    background: none; border: none; color: var(--primary); font-size: 13px;
    font-weight: 500; cursor: pointer; padding: 4px 0;
}
.section-collapse-toggle button:hover { text-decoration: underline; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* ---- 多选下拉组件 ---- */
.multi-select-group { position: relative; }
.multi-select-group label { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.multi-hint { font-size: 11px; color: var(--gray-400); font-weight: normal; margin-left: 4px; }
.ms-trigger {
    display: flex; align-items: center; gap: 6px;
    min-height: 48px; padding: 8px 36px 8px 12px;
    border: 1.5px solid var(--gray-300); border-radius: var(--radius);
    background: #fff; cursor: pointer; position: relative;
    transition: border-color var(--transition), box-shadow var(--transition);
    flex-wrap: wrap;
}
.ms-trigger:hover { border-color: var(--primary-light); }
.multi-select-group:focus-within .ms-trigger,
.ms-trigger:focus { border-color: var(--primary-light); box-shadow: 0 0 0 3px rgba(43,108,176,0.15); outline: none; }
.ms-arrow {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    font-size: 14px; color: var(--gray-500); pointer-events: none;
    transition: transform 0.2s;
}
.ms-dropdown.open ~ .ms-trigger .ms-arrow,
.multi-select-group .ms-dropdown.open ~ * .ms-arrow { transform: translateY(-50%) rotate(180deg); }
.ms-tags { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-height: 28px; align-items: center; }
.ms-placeholder { color: var(--gray-400); font-size: 16px; }
.ms-tag {
    display: inline-flex; align-items: center; gap: 2px;
    padding: 3px 8px; background: var(--primary-bg); color: var(--primary);
    border-radius: 4px; font-size: 12px; font-weight: 500; line-height: 1.4;
    border: 1px solid rgba(43,108,176,0.2);
}
.ms-tag-remove {
    background: none; border: none; color: var(--primary-light);
    font-size: 14px; font-weight: 700; cursor: pointer; padding: 0 2px;
    line-height: 1; margin-left: 2px; border-radius: 2px;
}
.ms-tag-remove:hover { color: var(--danger); background: var(--danger-bg); }
.ms-dropdown {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    margin-top: 4px; background: #fff; border: 1.5px solid var(--gray-300);
    border-radius: var(--radius); box-shadow: var(--shadow-md);
    max-height: 240px; overflow-y: auto; z-index: 100;
    padding: 6px 0;
}
.ms-dropdown.open { display: block; animation: msFadeIn 0.15s ease; }
@keyframes msFadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.ms-option {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; cursor: pointer; font-size: 14px;
    transition: background 0.1s;
}
.ms-option:hover { background: var(--primary-bg); }
.ms-option input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--primary);
    flex-shrink: 0; cursor: pointer;
}
.ms-option input:checked + span { color: var(--primary); font-weight: 600; }
.ms-option span { flex: 1; }

/* 只读状态下多选下拉 */
.multi-select-group.readonly .ms-trigger {
    background: var(--gray-100); cursor: not-allowed; border-color: var(--gray-200);
}
.multi-select-group.readonly .ms-tag-remove { display: none; }

/* 保留旧checkbox-group兼容（其他地方可能用到） */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 6px; }
.checkbox-item {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 13px; padding: 7px 12px;
    background: var(--gray-50); border: 1.5px solid var(--gray-200);
    border-radius: var(--radius-sm); cursor: pointer;
    transition: all var(--transition); min-height: 40px;
}
.checkbox-item:hover { border-color: var(--primary-light); }
.checkbox-item:has(input:checked) {
    background: var(--primary-bg); color: var(--primary);
    border-color: var(--primary-light); font-weight: 500;
}
.checkbox-item input { width: 16px; height: 16px; accent-color: var(--primary); flex-shrink: 0; }

/* ---- 滑块评分 ---- */
.rating-card { border-left: 4px solid var(--primary); }
.rating-group label { font-size: 13px; font-weight: 500; }
.slider-row { display: flex; align-items: center; gap: 12px; }
.rating-slider {
    flex: 1; -webkit-appearance: none; appearance: none;
    height: 6px; border-radius: 3px; background: var(--gray-200);
    outline: none; min-height: 28px;
}
.rating-slider::-webkit-slider-thumb {
    -webkit-appearance: none; width: 24px; height: 24px;
    border-radius: 50%; background: var(--primary);
    cursor: pointer; border: 3px solid #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,0.2);
}
.slider-value { font-size: 22px; font-weight: 800; color: var(--primary); min-width: 32px; text-align: center; }

/* ---- 照片槽位 ---- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.photo-slot {
    background: var(--gray-50); border: 2px dashed var(--gray-300);
    border-radius: var(--radius); padding: 8px; text-align: center;
    transition: border-color var(--transition), background var(--transition);
    position: relative;
}
.photo-slot:hover { border-color: var(--primary-light); background: var(--primary-bg); }
.photo-slot.has-file { border-style: solid; border-color: var(--success); background: var(--success-bg); }
.slot-label { font-size: 11px; font-weight: 600; color: var(--gray-600); margin-bottom: 6px; line-height: 1.3; }
.slot-placeholder {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 14px 4px; cursor: pointer; min-height: 80px;
}
.slot-icon { font-size: 28px; }
.slot-hint { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.slot-preview {
    width: 100%; height: 96px; background-size: cover;
    background-position: center; border-radius: var(--radius-sm);
    cursor: pointer; transition: opacity var(--transition);
}
.slot-preview:hover { opacity: 0.85; }
.slot-file { padding: 10px 4px; }
.file-icon-large { font-size: 28px; }
.file-name-small { display: block; font-size: 10px; color: var(--gray-600); margin-top: 3px; word-break: break-all; }
.btn-slot-remove {
    position: absolute; top: 4px; right: 4px;
    background: rgba(198,40,40,0.85); color: #fff; border: none;
    border-radius: 50%; width: 22px; height: 22px;
    font-size: 12px; cursor: pointer; line-height: 1;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
}
.btn-slot-remove:hover { background: var(--danger); }

/* ---- 上传进度条 ---- */
.upload-progress { padding: 8px 0; }
.progress-bar { height: 8px; background: var(--gray-200); border-radius: 4px; overflow: hidden; position: relative; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary-light), var(--success)); border-radius: 4px; transition: width 0.3s; }
.progress-text { font-size: 12px; color: var(--gray-600); margin-top: 4px; text-align: center; }
/* 上传状态增强 */
.upload-progress.uploading .progress-fill {
    background: linear-gradient(90deg, var(--primary-light), var(--success));
    animation: progress-shimmer 1.5s ease-in-out infinite;
}
.upload-progress.verifying .progress-fill {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.upload-progress.upload-error .progress-fill {
    background: var(--danger);
}
.upload-actions { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.btn-upload-retry, .btn-upload-cancel {
    font-size: 12px; padding: 4px 12px; border-radius: 6px; border: none; cursor: pointer;
    min-height: 32px; font-weight: 600;
}
.btn-upload-retry { background: var(--primary); color: #fff; }
.btn-upload-cancel { background: var(--gray-200); color: var(--gray-700); }
@keyframes progress-shimmer {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* ---- 3D/CT上传区 ---- */
.scan-upload-area { margin-top: 8px; }
.scan-file-list { margin-bottom: 8px; }
.scan-file-item {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; background: var(--gray-50);
    border-radius: var(--radius-sm); margin-bottom: 4px;
    border: 1px solid var(--gray-200);
}
.scan-file-item .file-icon { font-size: 20px; }
.scan-file-item .file-name { flex: 1; font-size: 13px; word-break: break-all; }
.scan-file-item .file-size { font-size: 12px; color: var(--gray-500); }
.file-actions { display: flex; gap: 4px; }
.btn-upload-scan {
    display: flex; align-items: center; gap: 6px;
    padding: 12px 20px; background: var(--primary); color: #fff;
    border: none; border-radius: var(--radius); font-size: 14px;
    font-weight: 600; cursor: pointer; width: 100%;
    justify-content: center; min-height: 48px;
    transition: background var(--transition);
}
.btn-upload-scan:hover { background: var(--primary-light); }

/* ---- 交付物 ---- */
.delivery-item {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; background: var(--primary-bg);
    border-radius: var(--radius-sm); margin-bottom: 6px;
    border: 1px solid rgba(43,108,176,0.1);
}
.delivery-item .file-name { flex: 1; font-size: 13px; font-weight: 500; }
.delivery-item .file-date { font-size: 12px; color: var(--gray-500); }
.file-cat-badge {
    display: inline-block;
    font-size: 11px;
    padding: 1px 6px;
    background: #e6f7ff;
    color: #1890ff;
    border-radius: 4px;
    margin-right: 6px;
    font-weight: 400;
}
.delivery-mobile-tip {
    font-size: 16px;
    cursor: default;
}
.delivered-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin: -12px -12px 8px -12px;
    cursor: pointer;
}
.delivered-banner .banner-icon { font-size: 20px; }
.delivered-banner .banner-text { font-size: 13px; color: #1890ff; font-weight: 500; }

/* T-036-05：设计数据包下载入口（模式 B 自产） */
.delivery-package-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    flex-wrap: wrap;
    padding: 10px 14px; margin-bottom: 10px;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0efff 100%);
    border: 1px solid rgba(43,108,176,0.25);
    border-radius: var(--radius-sm);
}
.delivery-package-info { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #1a3a5c; font-weight: 500; }
.delivery-package-icon { font-size: 18px; }
.delivery-package-no { color: #1890ff; font-weight: 600; }
.delivery-package-btn {
    padding: 7px 14px; font-size: 13px; font-weight: 500;
    color: #fff; background: linear-gradient(135deg, #1a3a5c 0%, #2563a8 100%);
    border: none; border-radius: 8px; cursor: pointer;
    box-shadow: 0 2px 6px rgba(26,58,92,0.25);
    transition: transform .12s ease, box-shadow .12s ease;
}
.delivery-package-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(26,58,92,0.32); }
.delivery-package-btn:active { transform: translateY(0); }

/* ---- 专业视频播放器（v20d: 医患沟通级） ---- */
.vp-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; animation: vpFadeIn .2s ease; }
@keyframes vpFadeIn { from { opacity: 0; } to { opacity: 1; } }
.vp-container { width: 92vw; max-width: 860px; background: #1a1a2e; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.6); display: flex; flex-direction: column; }
.vp-header { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%); border-bottom: 1px solid rgba(43,108,176,0.3); }
.vp-brand { display: flex; align-items: baseline; gap: 8px; }
.vp-logo { font-size: 20px; font-weight: 800; color: #4fc3f7; letter-spacing: 1px; }
.vp-subtitle { font-size: 13px; color: rgba(255,255,255,0.6); }
.vp-case-info { flex: 1; display: flex; gap: 6px; justify-content: center; }
.vp-info-tag { font-size: 11px; padding: 2px 8px; background: rgba(79,195,247,0.15); color: #4fc3f7; border-radius: 4px; border: 1px solid rgba(79,195,247,0.25); }
.vp-close { background: none; border: none; color: rgba(255,255,255,0.5); font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: all .15s; }
.vp-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
.vp-stage-bar { display: flex; align-items: center; justify-content: center; gap: 0; padding: 10px 20px; background: rgba(255,255,255,0.03); }
.vp-stage-dot { display: flex; align-items: center; gap: 4px; }
.vp-stage-num { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.4); }
.vp-stage-dot.done .vp-stage-num { background: #4fc3f7; color: #1a1a2e; }
.vp-stage-dot.current .vp-stage-num { background: #4fc3f7; color: #1a1a2e; box-shadow: 0 0 8px rgba(79,195,247,0.5); }
.vp-stage-label { font-size: 11px; color: rgba(255,255,255,0.4); }
.vp-stage-dot.done .vp-stage-label, .vp-stage-dot.current .vp-stage-label { color: rgba(255,255,255,0.8); }
.vp-stage-line { width: 32px; height: 1px; background: rgba(255,255,255,0.15); margin: 0 4px; }
.vp-tabs { display: flex; gap: 4px; padding: 6px 20px; background: rgba(255,255,255,0.02); }
.vp-tab { padding: 5px 14px; font-size: 12px; border: 1px solid rgba(79,195,247,0.25); border-radius: 6px; background: transparent; color: rgba(255,255,255,0.6); cursor: pointer; transition: all .15s; }
.vp-tab.active { background: rgba(79,195,247,0.2); color: #4fc3f7; border-color: #4fc3f7; }
.vp-tab:hover:not(.active) { background: rgba(79,195,247,0.08); }
.vp-player-wrap { position: relative; background: #000; flex: 1; min-height: 280px; display: flex; align-items: center; justify-content: center; }
.vp-video { width: 100%; max-height: 60vh; object-fit: contain; display: block; outline: none; }
.vp-video-label { position: absolute; bottom: 8px; left: 12px; font-size: 11px; padding: 2px 8px; background: rgba(0,0,0,0.65); color: rgba(255,255,255,0.7); border-radius: 4px; pointer-events: none; }
.vp-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; background: #16213e; border-top: 1px solid rgba(43,108,176,0.2); }
.vp-tip { font-size: 11px; color: rgba(255,255,255,0.35); }
.vp-fullscreen-btn { padding: 5px 14px; font-size: 12px; background: rgba(79,195,247,0.15); color: #4fc3f7; border: 1px solid rgba(79,195,247,0.3); border-radius: 6px; cursor: pointer; transition: all .15s; }
.vp-fullscreen-btn:hover { background: rgba(79,195,247,0.3); }
/* 手机端适配 */
@media (max-width: 640px) {
    .vp-container { width: 100vw; max-width: 100vw; border-radius: 0; height: 100vh; max-height: 100vh; }
    .vp-header { padding: 10px 14px; flex-wrap: wrap; }
    .vp-case-info { order: 3; width: 100%; justify-content: flex-start; margin-top: 4px; }
    .vp-player-wrap { min-height: 200px; }
    .vp-video { max-height: 55vh; }
    .vp-stage-bar { padding: 8px 14px; }
    .vp-tabs { padding: 4px 14px; overflow-x: auto; }
}
/* 视频播放按钮高亮 */
.video-play-btn { position: relative; }
.video-play-btn::after { content: ''; position: absolute; top: -2px; right: -2px; width: 6px; height: 6px; background: #4fc3f7; border-radius: 50%; animation: vpPulse 1.5s infinite; }
@keyframes vpPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ---- 表单操作 ---- */
.form-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    padding: 16px 0; position: sticky; bottom: 0;
    background: linear-gradient(transparent, #f0f2f5 30%);
    z-index: 10;
}

/* ---- 模态框 ---- */
.modal { display: none; position: fixed; inset: 0; z-index: 1000; }
.modal.show { display: flex; align-items: center; justify-content: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.7); }
.modal-body { position: relative; background: #fff; border-radius: var(--radius-xl); padding: 24px; max-width: 90vw; max-height: 90vh; overflow: auto; }
.viewer-body { background: transparent; box-shadow: none; max-width: 95vw; max-height: 95vh; padding: 0; }
.viewer-image { width: 90vw; height: 80vh; background-size: contain; background-position: center; background-repeat: no-repeat; border-radius: var(--radius); }

/* ---- Toast ---- */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; max-width: calc(100vw - 32px); }
.toast {
    box-sizing: border-box; width: max-content; max-width: min(360px, calc(100vw - 32px));
    padding: 12px 18px; border-radius: var(--radius); font-size: 14px; line-height: 1.5;
    display: flex; align-items: flex-start; gap: 8px;
    box-shadow: var(--shadow-md); transform: translateX(110%); opacity: 0;
    transition: all 0.3s ease; font-weight: 500; overflow-wrap: anywhere; word-break: break-word;
}
.toast-icon { flex: 0 0 auto; }
.toast-msg { min-width: 0; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
.toast.show { transform: translateX(0); opacity: 1; }
.toast-success { background: var(--success-bg); color: var(--success); }
.toast-error { background: var(--danger-bg); color: var(--danger); }
.toast-warning { background: var(--warning-bg); color: var(--warning); }
.toast-info { background: var(--primary-bg); color: var(--primary); }

/* ---- 统计 ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; padding: 18px 0; }
.stat-card { background: #fff; border-radius: var(--radius-lg); padding: 22px; text-align: center; box-shadow: var(--shadow-sm); border: 1px solid var(--gray-200); }
.stat-value { font-size: 34px; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.stats-page .section-bar h1 { font-size: 20px; font-weight: 700; color: var(--gray-900); margin: 0; }
.stats-detail-section { margin-top: 8px; max-width: 600px; }
.stats-status-list { display: flex; flex-direction: column; gap: 0; }
.stats-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; color: var(--gray-700); }
.stats-row:last-child { border-bottom: none; }
.stats-row span:last-child { font-weight: 700; color: var(--primary); font-size: 16px; }

/* ---- 状态/提示 ---- */
.loading { text-align: center; padding: 48px; color: var(--gray-500); font-size: 16px; }
.empty-state { text-align: center; padding: 48px; color: var(--gray-400); }
.error-state { text-align: center; padding: 48px; color: var(--danger); }
.empty-files { text-align: center; padding: 18px; color: var(--gray-400); font-size: 14px; }
.conditional-field { transition: all 0.3s ease; }
.link-primary { color: var(--primary-light); font-weight: 500; }

/* ---- 新建病例内联表单 ---- */
.create-case-inline {
    background: #fff; border: 2px solid var(--accent);
    border-radius: var(--radius-lg); padding: 20px;
    margin-bottom: 16px; animation: slideDown 0.25s ease;
    box-shadow: var(--shadow-md);
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}
.create-case-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.create-case-header h3 { margin: 0; font-size: 16px; color: var(--gray-800); font-weight: 700; }
.create-case-body { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.create-case-field { flex: 1; min-width: 180px; }
.create-case-field label { display: block; font-size: 13px; color: var(--gray-600); margin-bottom: 6px; font-weight: 600; }
.create-case-actions { display: flex; align-items: flex-end; padding-top: 22px; }

/* 病例类型选择器 */
.case-type-selector { display: flex; gap: 8px; flex-wrap: wrap; }
.case-type-option {
    display: flex; align-items: center; gap: 6px;
    padding: 9px 14px; border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm); cursor: pointer;
    transition: all var(--transition); font-size: 13px;
    font-weight: 500; min-height: 44px;
}
.case-type-option:hover { border-color: var(--accent); background: var(--accent-bg); }
.case-type-option input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
.case-type-option input[type="radio"]:checked + .type-option-label { color: var(--accent); font-weight: 700; }
.case-type-option:has(input:checked) { border-color: var(--accent); background: var(--accent-bg); }
.type-option-label { color: var(--gray-700); }

/* ---- 响应式 ---- */
@media (min-width: 640px) {
    .form-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .page-header { flex-direction: column; gap: 8px; align-items: flex-start; }
    .header-right { width: 100%; justify-content: flex-end; }
    .photo-grid { grid-template-columns: repeat(3, 1fr); }
    .case-list { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .filter-bar { flex-direction: column; }
    .filter-bar select, .filter-bar input { width: 100%; }
    /* 移动端表单区默认折叠（除了第一个和照片区） */
    .form-card:not(:first-of-type):not(.photo-card):not(.scan-card) .card-title.collapsible {  }
    /* 移动端表单卡片更紧凑 */
    .form-card { margin: 8px 0; padding: 14px 12px; }
}

@media (max-width: 480px) {
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
    .auth-card { padding: 28px 18px; }
    .form-card { padding: 12px 10px; }
    .case-type-selector { flex-direction: column; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn-primary, .form-actions .btn-secondary { width: 100%; }
    /* 移动端表单区折叠控制按钮 */
    .section-collapse-toggle { display: flex; }
    /* 更小的标题字号 */
    .card-title { font-size: 14px; }
    /* 移动端底部操作栏固定 */
    .case-detail-page .form-actions {
        position: sticky; bottom: 0; background: #fff; z-index: 10;
        padding: 12px 0 8px; border-top: 1px solid var(--gray-200);
        box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
        }
    }

/* ============================================================
 * r88P183.27 诊所成长激励体系 · 批次1
 * ============================================================ */

/* 病例卡片阶段完整度小徽标（阶段1✓ 阶段2○ 阶段3○） */
.stage-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    background: #f4f8fc;
    border: 1px solid #dbe7f3;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    color: #2c5282;
}
.stage-badge-label { color: #718096; margin-right: 2px; }
.stage-badge-step { font-weight: 600; letter-spacing: 0.5px; }
.stage-badge-step.done { color: #27ae60; }
.stage-badge-step.review { color: #d69e2e; }
.stage-badge-step.todo { color: #a0aec0; }

/* 病例详情页顶部：阶段2/3 提示条（可关闭） */
.stage-hint-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 12px 0;
    padding: 10px 14px;
    background: linear-gradient(90deg, #fff7e6, #fffbe6);
    border: 1px solid #ffd591;
    border-radius: 10px;
    color: #8a6d1a;
    font-size: 14px;
}
.stage-hint-close {
    background: none;
    border: none;
    color: #b7791f;
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

/* 交付弹窗内嵌奖励提示行 */
.delivery-incentive-line {
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #f0f9ff;
    border: 1px solid #bae0fd;
    border-radius: 8px;
    color: #1c6ea4;
    font-size: 13px;
    line-height: 1.6;
}

/* 「我的」页成长中心（常驻可展开） */
.growth-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.growth-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    cursor: pointer;
    user-select: none;
}
.growth-card-head:hover { background: #fafcff; }
.growth-summary-inline {
    flex: 1;
    text-align: right;
    color: #718096;
    font-size: 13px;
}
.growth-toggle {
    color: #a0aec0;
    font-size: 12px;
    transition: transform 0.2s;
}
.growth-card.open .growth-toggle { transform: rotate(180deg); }
.growth-card-body { padding: 0 14px 14px; }
.growth-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
.growth-stat {
    background: #f7fafc;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    padding: 10px 12px;
}
.growth-stat-value { font-size: 20px; font-weight: 700; color: #1a365d; }
.growth-stat-label { font-size: 12px; color: #718096; margin-top: 2px; }
.growth-progress-wrap { margin: 12px 0 4px; }
.growth-progress-bar {
    height: 8px;
    background: #edf2f7;
    border-radius: 999px;
    overflow: hidden;
}
.growth-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1890ff, #52c41a);
    border-radius: 999px;
    transition: width 0.4s ease;
}
.growth-pending-item,
.growth-reward-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid #f0f4f8;
    font-size: 13px;
    color: #2d3748;
}
.growth-pending-empty,
.growth-reward-empty { padding: 8px 10px; font-size: 13px; color: #999; }

/* ---- 批次2：积分兑换 ---- */
.growth-redeem-list { display: flex; flex-direction: column; gap: 8px; }
.growth-redeem-item {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 9px 10px; border: 1px solid var(--gray-100); border-radius: 10px;
    background: #fbfdff; font-size: 13px;
}
.growth-redeem-label { color: #2d3748; flex: 1; }
.growth-redeem-cost { color: #8a6d1a; font-weight: 600; white-space: nowrap; }
.btn-redeem {
    border: 1px solid var(--brand-300, #b8cfe8); background: #eef4fb; color: var(--brand-700);
    padding: 5px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.btn-redeem:hover:not(:disabled) { background: #dbe8f7; }
.btn-redeem:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 480px) {
    .growth-redeem-item { flex-wrap: wrap; }
}
.growth-reward-status {
    font-size: 12px;
    padding: 1px 8px;
    border-radius: 999px;
    background: #edf2f7;
    color: #4a5568;
    flex-shrink: 0;
    margin-left: 8px;
}
.growth-reward-status.effective { background: #e6f7e6; color: #1a7f37; }
.growth-reward-status.pending_effective { background: #fff7e6; color: #ad6800; }
.growth-reward-status.used,
.growth-reward-status.redeemed { background: #edf2f7; color: #718096; }
.growth-reward-status.expired { background: #fef2f2; color: #c0392b; }

/* 通知置顶成长提醒（未读高亮 + 红点） */
.notif-item.pinned,
.notif-card.pinned {
    border: 1px solid #ffd591;
    background: #fffaf0;
}
.notif-item.pinned:hover,
.notif-card.pinned:hover { background: #fff5e0; }
.notif-red-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff4d4f;
    margin-left: 6px;
    box-shadow: 0 0 0 2px #fff;
    vertical-align: middle;
}

/* ---- 移动端触控优化 ---- */
@media (pointer: coarse) {
    .form-group select, .form-group input, .form-group textarea {
        min-height: 48px; font-size: 16px;
    }
    .checkbox-item { min-height: 44px; padding: 8px 14px; }
    .stage-tab { min-height: 48px; }
    .btn-primary, .btn-secondary { min-height: 48px; }
}

/* ---- 打印样式 ---- */
@media print {
    .page-header, .stage-tabs, .form-actions, .btn-slot-remove, .filter-bar { display: none; }
    .form-card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
}

/* ---- 只读/退回横幅 ---- */
.readonly-banner {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100; padding: 12px 16px; border-radius: var(--radius);
    font-size: 14px; font-weight: 600; text-align: center;
    margin: 10px 0; display: flex; align-items: center;
    justify-content: center; gap: 8px;
    border: 1px solid #ffcc80;
}
.revision-banner {
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
    color: #c62828; padding: 12px 16px; border-radius: var(--radius);
    font-size: 14px; font-weight: 600; text-align: center;
    margin: 10px 0; display: flex; align-items: center;
    justify-content: center; gap: 8px;
    border: 1px solid #f48fb1;
}

/* P1-282（张主任 2026-09-26「补显示」）：退回横幅里显示"退回原因"——原因单独占一行、不与主体挤在一行 */
.revision-banner { flex-wrap: wrap; }
.revision-reason {
    flex-basis: 100%;
    font-weight: 400;
    font-size: 13px;
    color: #b71c1c;
    margin-top: 4px;
    line-height: 1.5;
}

/* ---- 病例详情页只读样式 ---- */
.case-detail-page .form-group select:disabled,
.case-detail-page .form-group input:read-only {
    background: var(--gray-100); color: var(--gray-600);
    border-color: var(--gray-200); opacity: 0.8;
}
.case-detail-page .checkbox-item:has(input:disabled) {
    opacity: 0.6; cursor: not-allowed;
}
.case-detail-page .multi-select-group .ms-trigger {
    background: var(--gray-100); cursor: not-allowed; border-color: var(--gray-200); opacity: 0.8;
}
.case-detail-page .multi-select-group .ms-tag-remove { display: none; }
.case-detail-page .multi-select-group .ms-trigger:hover { border-color: var(--gray-200); }

/* ---- 患者姓名样式 ---- */
.patient-name {
    font-size: 17px; font-weight: 700; color: var(--gray-900);
}

/* ============================================================
 * ZQR™ v12.2 通知设置页面样式
 * ============================================================ */

/* ---- 表单提示文字 ---- */
.form-hint {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
    padding-left: 4px;
}

/* ---- 设置页面容器 ---- */
.settings-container {
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.settings-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.section-desc {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 20px;
}

/* ---- 我的页子 Tab（r88P183.27 P1-83 方案A：会员中心/成长中心/设置） ---- */
.settings-subtabs {
    display: flex;
    gap: 8px;
    max-width: 600px;
    margin: 0 auto;
    padding: 4px 16px 12px;
}
.settings-subtab {
    flex: 1;
    padding: 10px 6px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all .15s ease;
}
.settings-subtab.active {
    background: #eef4fb;
    color: var(--brand-700);
    border-color: var(--brand-300, #b8cfe8);
    box-shadow: 0 2px 8px rgba(26, 58, 92, .10);
}
.settings-subpage { display: none; }
.settings-subpage.active { display: block; }
@media (max-width: 480px) {
    .settings-subtab { font-size: 13px; padding: 9px 4px; }
}

/* ---- 联系工作人员卡片 ---- */
.contact-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--gray-200);
}
.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.contact-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
}
.contact-phone {
    font-size: 15px;
    color: var(--primary);
}
.contact-phone a {
    color: var(--primary);
    text-decoration: none;
}
.contact-wechat {
    font-size: 13px;
    color: var(--gray-500);
}
.btn-call {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.btn-call:hover {
    opacity: 0.9;
}

/* ---- Webhook表单 ---- */
.webhook-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.webhook-field {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 16px;
    border: 1px solid var(--gray-200);
}

.webhook-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 15px;
}

.webhook-icon {
    font-size: 18px;
}

.webhook-name {
    flex: 1;
    color: var(--gray-800);
}

.webhook-status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.webhook-status.configured {
    background: var(--success-bg);
    color: var(--success);
}

.webhook-status.not-configured {
    background: var(--gray-100);
    color: var(--gray-500);
}

.webhook-field input[type="url"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    background: white;
    transition: border-color 0.2s;
}

.webhook-field input[type="url"]:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
}

.webhook-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

.btn-test {
    background: var(--primary-bg);
    color: var(--primary-light);
    border: 1px solid var(--primary-light);
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-test:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

/* ---- 配置教程 ---- */
.tutorial-card {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid var(--gray-200);
}

.tutorial-card:last-child {
    margin-bottom: 0;
}

.tutorial-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 12px;
}

.tutorial-steps {
    padding-left: 20px;
    margin-bottom: 12px;
}

.tutorial-steps li {
    font-size: 14px;
    color: var(--gray-700);
    margin-bottom: 6px;
    line-height: 1.5;
}

.tutorial-note {
    background: var(--warning-bg);
    color: var(--warning);
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    border-left: 3px solid var(--warning);
}

/* ---- 测试结果 ---- */
.test-result-section {
    background: var(--gray-50);
}

.test-result-content {
    padding: 12px;
}

.test-success {
    background: var(--success-bg);
    color: var(--success);
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--success);
}

.test-error {
    background: var(--danger-bg);
    color: var(--danger);
    padding: 14px 16px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--danger);
}

/* ---- 设置页面响应式 ---- */
@media (max-width: 480px) {
    .settings-container {
        padding: 12px;
    }
    .settings-section {
        padding: 16px;
    }
    .webhook-label {
        flex-wrap: wrap;
    }
    .webhook-status {
        width: 100%;
        margin-top: 4px;
        text-align: center;
    }
}

/* ============================================================
 * ZQR™ v12.3 通知系统样式
 * ============================================================ */

/* ---- 通知铃铛 ---- */
.notification-bell {
    cursor: pointer;
    font-size: 1.1rem;
    padding: 4px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    box-shadow: none;
    transition: all 0.2s;
}

.notification-bell:hover {
    background: var(--primary-bg);
    transform: scale(1.05);
}

.tab-badge {
    background: #e74c3c;
    color: #fff;
    font-size: 0.65rem;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 3px;
    margin-left: 2px;
    vertical-align: middle;
}
.notif-badge {
    position: absolute;
    top: -4px;
    right: -2px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.65rem;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border: 2px solid #fff;
}

/* ---- 通知下拉面板 ---- */
#notif-bell-container {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 300px;
    max-height: 420px;
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
    animation: panelFadeIn 0.2s ease;
}

@keyframes panelFadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.notif-panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gray-50);
}

.notif-panel-body {
    max-height: 320px;
    overflow-y: auto;
}

.notif-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.notif-item:hover {
    background: var(--gray-50);
}

.notif-item.unread {
    background: #f0f7ff;
}

.notif-item.unread:hover {
    background: #e6f0ff;
}

.notif-type-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-item-content {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-size: 0.9rem;
    color: var(--gray-800);
    line-height: 1.4;
}

.notif-item.unread .notif-title {
    font-weight: 600;
}

.notif-time {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 4px;
}

.notif-panel-footer {
    padding: 10px 16px;
    text-align: center;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.notif-panel-footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.notif-panel-footer a:hover {
    text-decoration: underline;
}

/* ---- T-037-03b 维护/升级公告置顶通栏（P0 强制） ---- */
.w78-maint-topbar {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f59e0b 0%, #e74c3c 100%);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.35);
    border-bottom: 2px solid #c0392b;
}
.w78-maint-topbar .w78-mt-icon {
    font-size: 17px;
    flex-shrink: 0;
    animation: w78MtPulse 2s ease-in-out infinite;
}
@keyframes w78MtPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}
.w78-maint-topbar .w78-mt-body {
    flex: 1;
    min-width: 0;
}
.w78-maint-topbar .w78-mt-title {
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.w78-maint-topbar .w78-mt-content {
    font-size: 12px;
    opacity: 0.92;
    margin-top: 2px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.w78-maint-topbar .w78-mt-badge {
    flex-shrink: 0;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.28);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.w78-maint-topbar .w78-mt-toggle {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    padding: 0;
}
.w78-maint-topbar.collapsed .w78-mt-content {
    display: none;
}
.w78-maint-topbar.collapsed {
    padding: 6px 16px;
}

/* ---- T-037-03b 普通公告横幅（分级配色 + 关闭按钮） ---- */
.w78-announcement-banner .w78-banner-icon {
    font-size: 18px;
    flex-shrink: 0;
}
.w78-announcement-banner .w78-banner-label {
    flex-shrink: 0;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.w78-announcement-banner .w78-banner-body {
    flex: 1;
    min-width: 0;
}
.w78-announcement-banner .w78-banner-title {
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.w78-announcement-banner .w78-banner-text {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.w78-announcement-banner .w78-banner-count {
    flex-shrink: 0;
    font-size: 11px;
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: 10px;
}
.w78-announcement-banner .w78-banner-close {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.w78-announcement-banner .w78-banner-close:hover {
    background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 640px) {
    .w78-maint-topbar {
        padding: 7px 12px;
        gap: 8px;
    }
    .w78-maint-topbar .w78-mt-content {
        -webkit-line-clamp: 1;
    }
    .w78-announcement-banner {
        padding: 9px 12px;
        gap: 8px;
    }
    .w78-announcement-banner .w78-banner-text {
        display: none;
    }
}

/* ---- 通知中心页面 ---- */
.notifications-page {
    padding: 0;
}
.notifications-page .page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
}
.notifications-page .page-header h1 {
    flex: 1;
    margin: 0;
    font-size: 1.2rem;
}
.notifications-page .btn-back {
    background: none;
    border: 1px solid #d9d9d9;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #666;
    white-space: nowrap;
}
.notifications-page .btn-back:hover {
    border-color: #1890ff;
    color: #1890ff;
}

.notif-filters {
    display: flex;
    gap: 8px;
    margin: 16px 0;
    flex-wrap: wrap;
}

.notif-filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    border: 1.5px solid var(--gray-300);
    background: #fff;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    color: var(--gray-600);
}

.notif-filter-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
}

.notif-filter-btn.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.notif-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.15s;
    border: 1px solid var(--gray-200);
}

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

.notif-card:active {
    transform: translateY(0);
}

.notif-card.unread {
    border-left: 4px solid var(--primary);
    background: #fff;
}

.notif-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.notif-type-tag {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

.notif-type-tag.review_result {
    background: #e6f7e6;
    color: #52c41a;
}

.notif-type-tag.revision {
    background: #fff7e6;
    color: #fa8c16;
}

.notif-type-tag.delivery {
    background: #e6f0ff;
    color: #1890ff;
}

.notif-type-tag.system {
    background: var(--gray-100);
    color: var(--gray-600);
}

.notif-card-title {
    font-size: 0.95rem;
    color: var(--gray-900);
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 6px;
}

.notif-card.unread .notif-card-title {
    font-weight: 600;
}

.notif-card-content {
    font-size: 0.85rem;
    color: var(--gray-600);
    line-height: 1.5;
    margin-bottom: 6px;
}

.notif-reason {
    display: inline-block;
    max-width: 100%;
    margin: 2px 0 6px;
    padding: 3px 8px;
    border-radius: 6px;
    background: #fff1f0;
    border: 1px solid #ffccc7;
    color: #b42318;
    font-size: 0.82rem;
    line-height: 1.45;
    word-break: break-word;
}
.notif-item .notif-reason {
    font-size: 0.78rem;
    margin: 2px 0 4px;
    padding: 2px 6px;
}

.notif-case-ref {
    font-size: 0.8rem;
    color: var(--primary-light);
    font-weight: 500;
}

.mark-all-read {
    background: none;
    border: 1.5px solid var(--gray-300);
    padding: 6px 14px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--gray-600);
    transition: all 0.2s;
    font-weight: 500;
}

.mark-all-read:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
    background: var(--primary-bg);
}

/* ---- 通知中心页面响应式 ---- */
@media (max-width: 480px) {
    .notif-panel {
        width: calc(100vw - 20px);
        right: -8px;
    }
    
    .notif-filters {
        flex-wrap: wrap; /* r48：手机端改为换行，避免筛选按钮横向溢出不可见 */
        row-gap: 8px;
    }
    
    .notif-filter-btn {
        flex-shrink: 0;
        padding: 8px 14px;
    }
    
    .notifications-page {
        padding: 0 12px 100px;
    }
    
    .page-header {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .header-right {
        width: 100%;
        justify-content: flex-end;
    }
    
    .mark-all-read {
        font-size: 0.8rem;
        padding: 5px 12px;
    }
}

/* ---- 通知页面空状态和加载状态 ---- */
.notifications-page .loading,
.notifications-page .empty-state,
.notifications-page .error-state {
    padding: 60px 20px;
}


/* ============================================================
 * ZQR™ v12.4 教程功能与底部导航样式
 * ============================================================ */

/* ============================================================
 * ZQR™ v13 固定框架布局（类管理端）
 * 顶部header固定 + 中间内容区独立滚动 + 底部导航固定
 * ============================================================ */

/* ---- 主框架 ---- */
.app-frame { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.frame-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 16px; background: var(--primary); color: #fff;
    flex-shrink: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.frame-header-left { display: flex; align-items: center; gap: 8px; }
.frame-logo { font-size: 18px; font-weight: 800; letter-spacing: 1px; }
.frame-title { font-size: 14px; opacity: 0.9; }
.frame-header .clinic-name { font-size: 12px; opacity: 0.7; }
.frame-header-right { display: flex; align-items: center; gap: 6px; }
.frame-header-right .btn-secondary {
    background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 12px; font-size: 13px; min-height: 34px; border-radius: 8px;
}
.frame-header-right .btn-secondary:hover { background: rgba(255,255,255,0.25); }
.frame-header-right .btn-text { color: rgba(255,255,255,0.8); font-size: 13px; }
.frame-header-right .btn-text:hover { color: #fff; }

/* ---- 中间内容区 ---- */
.frame-content {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    -webkit-overflow-scrolling: touch; padding: 16px;
    width: 100%; max-width: 100%; margin: 0;
}
.frame-content > * { max-width: 780px; margin: 0 auto; }
.frame-content.case-detail-page > * { max-width: 1100px; margin: 0 auto; }
/* case-detail等全宽页面 */
.frame-content.case-detail-page { max-width: 100%; padding: 0; }

/* ---- 底部导航 ---- */
.frame-nav {
    display: flex; background: #fff; border-top: 1px solid var(--gray-200);
    flex-shrink: 0; z-index: 100; padding: 4px 0 env(safe-area-inset-bottom, 8px);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

/* ---- 宽屏电脑端适配 ---- */
.desktop-nav { display: none; }
.desktop-nav-tab {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 10px 20px; font-size: 14px; font-weight: 500;
    color: var(--gray-500); text-decoration: none; cursor: pointer;
    border-bottom: 2px solid transparent; transition: all 0.15s;
}
.desktop-nav-tab:hover { color: var(--primary); background: var(--gray-50); }
.desktop-nav-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

@media (min-width: 1024px) {
    /* 桌面端：显示顶部水平导航，隐藏底部导航 */
    .desktop-nav {
        display: flex; background: #fff; border-bottom: 1px solid var(--gray-200);
        flex-shrink: 0; padding: 0 24px;
    }
    .frame-nav { display: none; }

    /* 普通页面内容区加宽 */
    .frame-content { max-width: 100%; padding: 24px 32px; }

    /* 病例详情页：浅灰背景 + 白色居中卡片 */
    .frame-content.case-detail-page {
        max-width: 100%; padding: 0; background: var(--gray-100);
    }
    .case-detail-page {
        max-width: 840px; margin: 0 auto; padding: 24px 24px 48px;
        background: #fff; border-radius: var(--radius-lg);
        box-shadow: var(--shadow-md); margin-top: 20px; margin-bottom: 20px;
    }
    .case-detail-page .page-header { border-bottom: 1px solid var(--gray-200); }
    .case-detail-page .form-actions {
        padding-top: 16px; border-top: 1px solid var(--gray-200);
    }

    /* header内容居中 */
    .frame-header { padding: 10px 24px; }
}
.frame-nav-tab {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    padding: 4px 0; text-decoration: none; color: var(--gray-500);
    font-size: 11px; cursor: pointer; transition: color 0.15s;
}
.frame-nav-tab.active { color: var(--primary); }
.frame-nav-tab .tab-icon { font-size: 20px; margin-bottom: 2px; }
.frame-nav-tab .tab-label { font-size: 11px; }

/* ---- 旧底部导航兼容（废弃但保留防报错） ---- */
.bottom-nav { display: none; }
.has-bottom-nav { padding-bottom: 0; }

/* ---- 教程页 ---- */
.tutorials-page .tutorial-categories { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; }
.tutorial-category { background: #fff; border-radius: 12px; padding: 20px; text-align: center; cursor: pointer; border: 1px solid var(--gray-200); transition: all 0.2s; }
.tutorial-category:active { transform: scale(0.97); background: var(--gray-50); }
.category-icon { font-size: 32px; margin-bottom: 8px; }
.category-label { font-size: 14px; font-weight: 600; color: var(--gray-700); }
.tutorial-list { padding: 0 16px; }
.tutorial-item { display: flex; gap: 12px; padding: 14px; background: #fff; border-radius: 10px; margin-bottom: 10px; border: 1px solid var(--gray-200); cursor: pointer; }
.tutorial-item:active { background: var(--gray-50); }
.tutorial-thumb { width: 48px; height: 48px; background: var(--primary-bg); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.tutorial-info { flex: 1; min-width: 0; }
.tutorial-info .tutorial-title { font-weight: 600; font-size: 14px; color: var(--gray-800); margin-bottom: 4px; }
.tutorial-info .tutorial-desc { font-size: 12px; color: var(--gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- 教程播放器 ---- */
.player-body { max-width: 640px; }
.player-title { font-size: 16px; font-weight: 600; margin-bottom: 12px; }
.player-video { width: 100%; border-radius: 8px; background: #000; }

/* Loading overlay */
.loading-overlay { display: none; position: fixed; inset: 0; z-index: 9999; background: rgba(255,255,255,0.8); align-items: center; justify-content: center; flex-direction: column; }
.loading-overlay.show { display: flex; }
.loading-spinner { width: 40px; height: 40px; border: 4px solid var(--gray-200, #e5e7eb); border-top-color: var(--primary, #3b82f6); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
 * ZQR™ v13 内容区组件样式
 * ============================================================ */

/* ---- settings-page（我的页面） ---- */
.settings-page .section-bar h1 { font-size: 20px; font-weight: 700; color: var(--gray-900); margin: 0; }

/* ---- section-bar（替代page-header的内容区标题栏） ---- */
.section-bar {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 0 12px; border-bottom: 1px solid var(--gray-200); margin-bottom: 12px;
}
.section-title { font-size: 17px; font-weight: 700; color: var(--primary); }
.section-actions { display: flex; align-items: center; gap: 6px; }
.btn-sm { padding: 6px 14px; font-size: 13px; min-height: 34px; }

/* ---- case-list-page ---- */
.case-list-page .filter-bar { padding: 10px 0; }
.case-list-page .filter-bar select,
.case-list-page .filter-bar input { min-height: 38px; font-size: 13px; padding: 8px 32px 8px 10px; }

/* ---- 移动端优化 ---- */
@media (max-width: 480px) {
    .frame-header { padding: 8px 12px; }
    .frame-logo { font-size: 16px; }
    .frame-title { font-size: 12px; }
    .frame-content { padding: 12px; }
    .section-bar { padding: 6px 0 10px; }
    .section-title { font-size: 15px; }
    .btn-sm { padding: 5px 10px; font-size: 12px; min-height: 30px; }
    .case-list-page .filter-bar { gap: 6px; }
    .case-list-page .filter-bar select,
    .case-list-page .filter-bar input { min-height: 34px; font-size: 12px; }
    /* A4: 移动端照片网格更紧凑 */
    .photo-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .slot-preview { height: 80px; }
    .slot-placeholder { padding: 10px 4px; min-height: 70px; }
    .slot-icon { font-size: 24px; }
    /* A4: 触控优化——更大的点击区域 */
    .btn-slot-remove { width: 26px; height: 26px; font-size: 13px; }
    .btn-icon { min-width: 36px; min-height: 36px; font-size: 16px; }
    .form-group label { min-height: 24px; padding-top: 2px; }
    .form-group select, .form-group input[type="text"],
    .form-group input[type="date"], .form-group input[type="tel"],
    .form-group input[type="number"], .form-group textarea {
        min-height: 44px; font-size: 16px; /* 16px防止iOS自动缩放 */
    }
    .form-group textarea { min-height: 80px; }
    /* A4: 滑块评分触控增强 */
    .rating-slider { height: 36px; }
    .rating-slider::-webkit-slider-thumb { width: 28px; height: 28px; }
    .slider-value { font-size: 20px; min-width: 28px; }
    /* A2: 上传进度条移动端增强 */
    .progress-bar { height: 10px; }
    .progress-text { font-size: 13px; }
    .btn-upload-retry, .btn-upload-cancel { min-height: 36px; font-size: 13px; padding: 6px 16px; }
}

/* ---- 会员升级卡片 v14 ---- */
.member-upgrade-card {
    background: linear-gradient(135deg, #fffbe6 0%, #fff3cd 100%) !important;
    border: 1.5px solid #f0d060 !important;
}
.member-upgrade-card .section-title { color: #b8860b; }
.member-benefits { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.benefit-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #5a4a00; }
.benefit-icon { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; }
.upgrade-cta { margin-top: 16px; padding-top: 12px; border-top: 1px dashed #e0c860; }
.upgrade-cta p { font-size: 13px; color: #8a7a30; margin-bottom: 12px; }
.member-badge-card {
    background: linear-gradient(135deg, #fef9e7 0%, #fdebd0 100%) !important;
    border: 1.5px solid #f0d060 !important;
    text-align: center;
}
.member-badge-header { font-size: 20px; font-weight: 700; color: #b8860b; }

/* ---- 会员锁定教程 v14 ---- */
.tutorial-item.member-locked { opacity: 0.85; }
.tutorial-item.member-locked .tutorial-thumb { filter: grayscale(0.3); }
/* ---- 会员等级标识 ---- */
#level-badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
}
#level-badge.member-badge {
    background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
    color: #7c4700;
    box-shadow: 0 1px 4px rgba(253,160,133,0.4);
}
#level-badge.upgrade-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    cursor: pointer;
    animation: pulse-badge 2s ease-in-out infinite;
    box-shadow: 0 1px 4px rgba(118,75,162,0.4);
}
@keyframes pulse-badge {
    0%,100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.08); opacity: 0.9; }
}

/* ---- 升级横幅 ---- */
#upgrade-banner {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f6d365 100%);
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
    color: #fff;
    text-align: center;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: 0.5px;
}
#upgrade-banner:active {
    opacity: 0.85;
}
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 移动端适配 */
@media (max-width: 768px) {
    #level-badge { font-size: 10px; padding: 1px 6px; }
    #upgrade-banner { font-size: 12px; padding: 5px 10px; }
}

/* ---- A3: 页面内返回按钮 ---- */
.page-back-btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 6px 12px; font-size: 14px; font-weight: 500;
    color: var(--primary-light); background: none; border: none;
    cursor: pointer; min-height: 40px; margin-bottom: 4px;
    -webkit-tap-highlight-color: transparent;
}
.page-back-btn:active { opacity: 0.6; }
.page-back-btn::before { content: '‹'; font-size: 22px; font-weight: 700; line-height: 1; }

/* ---- A3: 底部导航安全区域增强 ---- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .frame-nav { padding-bottom: env(safe-area-inset-bottom); }
}

/* ---- A4: 触控通用优化 ---- */
@media (pointer: coarse) {
    .btn-primary, .btn-secondary, .btn-danger, .btn-outline {
        min-height: 44px; /* Apple HIG最小触控目标 */
    }
    .photo-slot { min-height: 100px; }
    .slot-placeholder { min-height: 80px; }
    .ms-trigger { min-height: 44px; }
    .form-group select { min-height: 44px; }
    .btn-upload-scan { min-height: 52px; }
    /* 铃铛和头部图标按钮保持原始尺寸，不放大 */
    .notification-bell { min-height: unset; font-size: 1.1rem; padding: 4px; }
    .header-right .btn-icon { min-height: unset; font-size: 18px; padding: 6px; }
    /* 拨打电话按钮紧凑显示 */
    .btn-call { min-height: unset; padding: 6px 12px; font-size: 13px; }
    /* 移动端取消sticky操作栏，避免输入时遮挡 */
    .form-actions,
    .case-detail-page .form-actions {
        position: relative !important;
        bottom: auto !important;
        box-shadow: none !important;
    }
}

/* ====== 文档查看模式 v17.1 ====== */
.doc-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px 20px;
    padding: 8px 0;
}
.doc-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.doc-info-item .doc-label {
    font-size: 12px;
    color: #888;
    line-height: 1.2;
}
.doc-info-item .doc-value {
    font-size: 15px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
    word-break: break-all;
}
/* 只读模式下的照片槽位 */
.photo-slot.empty.readonly {
    border-style: dashed;
    opacity: 0.6;
    background: #f9f9f9;
}
.photo-slot.empty.readonly .slot-placeholder {
    cursor: default;
}
/* 查看模式banner */
.readonly-banner {
    background: linear-gradient(135deg, #e8f4fd, #f0f7ff);
    border: 1px solid #b8daff;
    color: #1a5276;
}

/* ===== v18: 必填标记 + 视频slot + 格式提示 ===== */
.required-mark {
    color: #e74c3c;
    font-size: 12px;
    font-weight: bold;
}
.photo-slot.required-slot {
    border-color: #e74c3c !important;
}
.photo-slot.required-slot .slot-placeholder {
    color: #c0392b;
}
.format-hint {
    font-size: 12px;
    color: #888;
    padding: 4px 12px 8px;
    line-height: 1.4;
}
.slot-video-preview {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
}
.slot-video-preview video {
    width: 100%;
    height: 80px;
    object-fit: cover;
    opacity: 0.7;
}
.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #fff;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: none;
}
.scan-card .empty-files.doc-empty {
    color: #999;
    font-style: italic;
}
/* v18.0.2: 电脑端上传卡片 */
.desktop-upload-card {
    background: linear-gradient(135deg, #e8f4f8 0%, #f0f7ff 100%);
    border: 1px dashed #4a9eff;
    text-align: center;
    padding: 16px;
}
.desktop-upload-card .btn-secondary {
    margin-top: 8px;
    background: #4a9eff;
    color: #fff;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
}
.desktop-upload-card .btn-secondary:active {
    background: #3a8eef;
}
.desktop-upload-hint {
    color: #666;
    font-size: 13px;
    margin: 0 0 4px 0;
    line-height: 1.5;
}

/* ============================================================
 * v19.x 四步向导录入（New Case Wizard）
 * ============================================================ */

/* 向导容器 - PC宽屏适配 */
.wizard-page { max-width: 1000px; margin: 0 auto; padding: 0 16px 80px; }
.wizard-page .page-back { display: inline-flex; align-items: center; gap: 4px; color: #1a73e8; font-size: 14px; cursor: pointer; margin-bottom: 12px; border: none; background: none; padding: 4px 0; }
.wizard-page .page-back:hover { text-decoration: underline; }

/* 进度步骤条 */
.wizard-progress { background: #fff; padding: 20px 24px; border-radius: 12px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.wizard-steps { display: flex; justify-content: center; gap: 0; max-width: 700px; margin: 0 auto; position: relative; }
.wizard-steps::before { content: ''; position: absolute; top: 20px; left: 10%; right: 10%; height: 2px; background: #e0e0e0; z-index: 0; }
.wizard-step { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; flex: 1; cursor: pointer; }
.wizard-step-num { width: 40px; height: 40px; border-radius: 50%; background: #e0e0e0; color: #999; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 16px; transition: all 0.3s; }
.wizard-step.active .wizard-step-num { background: #1a73e8; color: #fff; box-shadow: 0 2px 8px rgba(26,115,232,0.4); }
.wizard-step.completed .wizard-step-num { background: #27ae60; color: #fff; }
.wizard-step-label { margin-top: 8px; font-size: 13px; color: #999; text-align: center; transition: color 0.3s; }
.wizard-step.active .wizard-step-label { color: #1a73e8; font-weight: 500; }
.wizard-step.completed .wizard-step-label { color: #27ae60; }

/* 步骤面板 */
.wizard-panel { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); display: none; }
.wizard-panel.active { display: block; }
.wizard-panel-title { font-size: 18px; font-weight: 600; color: #333; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2px solid #e0e0e0; }

/* 向导表单网格 */
.wizard-form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.wizard-form-grid .full-width { grid-column: 1 / -1; }
.wizard-form-grid label { font-size: 14px; color: #333; font-weight: 500; display: flex; flex-direction: column; gap: 6px; }
.wizard-form-grid label .req { color: #e74c3c; margin-left: 2px; }
.wizard-form-grid input, .wizard-form-grid select, .wizard-form-grid textarea { padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; transition: border-color 0.2s; background: #fff; }
.wizard-form-grid input:focus, .wizard-form-grid select:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26,115,232,0.1); }
.wizard-form-grid input[readonly] { background: #f5f5f5; }

/* 向导专科侧栏 */
.wizard-specialty-layout { display: flex; gap: 20px; }
.wizard-specialty-sidebar { width: 200px; flex-shrink: 0; position: sticky; top: 20px; height: fit-content; }
.wizard-specialty-nav { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.wizard-specialty-nav-item { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; cursor: pointer; font-size: 14px; color: #666; transition: all 0.2s; }
.wizard-specialty-nav-item:last-child { border-bottom: none; }
.wizard-specialty-nav-item:hover { background: #f5f5f5; }
.wizard-specialty-nav-item.active { background: #e3f2fd; color: #1a73e8; font-weight: 500; border-left: 3px solid #1a73e8; }
.wizard-specialty-content { flex: 1; min-width: 0; }

/* 向导卡片 */
.wizard-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 8px; margin-bottom: 16px; overflow: hidden; }
.wizard-card.collapsed .wizard-card-body { display: none; }
.wizard-card-title { padding: 12px 16px; background: #f8f9fa; font-size: 15px; font-weight: 600; color: #333; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.wizard-card-title::after { content: '▼'; font-size: 12px; color: #999; transition: transform 0.2s; }
.wizard-card-title.collapsed::after { transform: rotate(-90deg); }
.wizard-card-body { padding: 16px; }
.wizard-card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.wizard-card-grid label { font-size: 13px; color: #555; display: flex; flex-direction: column; gap: 4px; }
.wizard-card-grid select, .wizard-card-grid input[type="number"] { padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; }
.wizard-card-grid select:focus, .wizard-card-grid input:focus { outline: none; border-color: #1a73e8; }

/* 多选标签 */
.wizard-multi-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.wizard-multi-tag { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; background: #e3f2fd; border: 1px solid #1a73e8; border-radius: 4px; font-size: 13px; color: #1a73e8; cursor: pointer; transition: all 0.2s; }
.wizard-multi-tag:hover { background: #bbdefb; }
.wizard-multi-tag.selected { background: #1a73e8; color: #fff; border-color: #1a73e8; }

/* 滑块 */
.wizard-slider-row { display: flex; align-items: center; gap: 12px; }
.wizard-slider-row input[type="range"] { flex: 1; }
.wizard-slider-val { min-width: 32px; text-align: center; font-weight: 600; color: #1a73e8; }

/* 上传网格 */
.wizard-upload-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.wizard-upload-slot { background: #f8f9fa; border: 2px dashed #ddd; border-radius: 8px; padding: 16px; text-align: center; cursor: pointer; transition: all 0.2s; min-height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.wizard-upload-slot:hover { border-color: #1a73e8; background: #e3f2fd; }
.wizard-upload-slot.has-file { border-style: solid; border-color: #27ae60; background: #e8f5e9; }
.wizard-upload-slot.required:not(.has-file) { border-color: #e74c3c; }
.wizard-slot-icon { font-size: 36px; margin-bottom: 8px; }
.wizard-slot-label { font-size: 14px; color: #333; margin-bottom: 4px; }
.wizard-slot-hint { font-size: 12px; color: #999; }
.wizard-slot-preview { max-width: 100%; max-height: 120px; object-fit: contain; border-radius: 4px; }
.wizard-slot-video { max-width: 100%; max-height: 120px; border-radius: 4px; }
.wizard-slot-remove { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; background: rgba(0,0,0,0.5); color: #fff; border-radius: 50%; border: none; cursor: pointer; font-size: 14px; line-height: 24px; }
.wizard-slot-remove:hover { background: rgba(231,76,60,0.9); }
.wizard-slot-group { grid-column: 1 / -1; font-size: 14px; font-weight: 600; color: #1a73e8; padding: 8px 0; border-bottom: 1px solid #e0e0e0; margin-top: 8px; }

/* 扫描/CT上传区域 */
.wizard-scan-area { background: #f8f9fa; border: 2px dashed #ddd; border-radius: 8px; padding: 24px; text-align: center; margin-bottom: 16px; transition: all 0.2s; cursor: pointer; }
.wizard-scan-area:hover { border-color: #1a73e8; background: #e3f2fd; }
.wizard-scan-area.dragover { border-color: #1a73e8; background: #e3f2fd; }
.wizard-scan-area .scan-icon { font-size: 48px; margin-bottom: 12px; }
.wizard-scan-area .scan-label { font-size: 16px; font-weight: 600; color: #333; margin-bottom: 8px; }
.wizard-scan-area .scan-hint { font-size: 13px; color: #666; }

/* 已上传文件列表 */
.wizard-file-list { margin-top: 12px; }
.wizard-file-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; background: #e8f5e9; border-radius: 6px; margin-bottom: 8px; }
.wizard-file-item .fname { flex: 1; font-size: 14px; color: #333; word-break: break-all; }
.wizard-file-item .fsize { font-size: 12px; color: #999; margin: 0 12px; white-space: nowrap; }
.wizard-file-item .fremove { color: #e74c3c; cursor: pointer; font-size: 18px; }
.wizard-file-item .fremove:hover { color: #c0392b; }

/* 确认提交区 */
.wizard-review-section { background: #f8f9fa; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.wizard-review-title { font-size: 15px; font-weight: 600; color: #1a73e8; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #e0e0e0; display: flex; align-items: center; gap: 8px; }
.wizard-review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.wizard-review-item { display: flex; gap: 8px; }
.wizard-review-label { font-size: 13px; color: #666; min-width: 80px; }
.wizard-review-value { font-size: 13px; color: #333; font-weight: 500; flex: 1; }
.wizard-review-value.missing { color: #e74c3c; background: #ffebee; padding: 2px 6px; border-radius: 4px; }
.wizard-completeness-bar { background: #e0e0e0; height: 8px; border-radius: 4px; overflow: hidden; margin-top: 8px; }
.wizard-completeness-fill { height: 100%; background: linear-gradient(90deg, #1a73e8, #27ae60); transition: width 0.3s; }

/* 向导按钮区 */
.wizard-btn-area { display: flex; justify-content: space-between; margin-top: 24px; padding-top: 16px; border-top: 1px solid #e0e0e0; }
.wizard-btn { padding: 12px 24px; border-radius: 6px; border: none; cursor: pointer; font-size: 14px; font-weight: 500; transition: all 0.2s; }
.wizard-btn-primary { background: #1a73e8; color: #fff; }
.wizard-btn-primary:hover { background: #1557b0; }
.wizard-btn-primary:disabled { background: #ccc; cursor: not-allowed; }
.wizard-btn-secondary { background: #f5f5f5; color: #333; border: 1px solid #ddd; }
.wizard-btn-secondary:hover { background: #e8e8e8; }
.wizard-btn-success { background: #27ae60; color: #fff; }
.wizard-btn-success:hover { background: #1e8449; }

/* 向导手机端适配 */
@media (max-width: 768px) {
    .wizard-form-grid, .wizard-review-grid { grid-template-columns: 1fr; }
    .wizard-specialty-layout { flex-direction: column; }
    .wizard-specialty-sidebar { width: 100%; position: static; }
    .wizard-specialty-nav { display: flex; flex-wrap: wrap; gap: 8px; padding: 8px; }
    .wizard-specialty-nav-item { border: 1px solid #e0e0e0; border-radius: 4px; flex: 1; min-width: 80px; text-align: center; }
    .wizard-upload-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
/* ==================== v20e: 会员体系样式 ==================== */

/* 推荐码展示区 */
.referral-code-display {
    padding: 8px 0;
}
.referral-code {
    font-family: monospace;
    letter-spacing: 3px;
}
.btn-copy {
    padding: 6px 16px;
    background: #1890ff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 8px;
}
.referral-link-box {
    background: #f5f5f5;
    padding: 12px;
    border-radius: 8px;
    margin-top: 12px;
}
.referral-link {
    font-size: 12px;
    color: #666;
    word-break: break-all;
    margin-bottom: 8px;
}
.referral-progress {
    margin-top: 16px;
}
.referral-rewards {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
}
.reward-tier {
    font-size: 12px;
    color: #999;
    padding: 4px 8px;
    background: #f5f5f5;
    border-radius: 4px;
}
.reward-tier.achieved {
    color: #52c41a;
    background: #f6ffed;
}

/* 会员状态卡片 */
.member-status-card {
    padding: 16px;
    border-radius: 8px;
    background: #f5f5f5;
}
.member-status-card.member {
    background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
}
.member-status-card.trial {
    background: linear-gradient(135deg, #fff7e6 0%, #ffd591 100%);
}
.member-level {
    font-size: 18px;
    font-weight: 600;
}
.member-expires {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
}
.member-path {
    font-size: 12px;
    color: #888;
    margin-top: 8px;
}

/* 升级路径卡片 */
.upgrade-paths {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.upgrade-path-card {
    padding: 14px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
}
.upgrade-path-card.qualified {
    border-color: #52c41a;
    background: #f6ffed;
}
.path-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.path-icon { font-size: 18px; }
.path-name { font-weight: 600; font-size: 14px; flex: 1; }
.path-badge { font-size: 11px; background: #52c41a; color: #fff; padding: 2px 6px; border-radius: 4px; }
.path-requirement { font-size: 12px; color: #666; }
.path-progress-bar {
    height: 6px;
    background: #e8e8e8;
    border-radius: 3px;
    margin: 8px 0;
    overflow: hidden;
}
.path-progress-fill {
    height: 100%;
    background: #1890ff;
    border-radius: 3px;
    transition: width 0.3s;
}
.path-progress-fill.referral { background: #52c41a; }
.path-status { font-size: 12px; color: #888; }
.path-reward { font-size: 11px; color: #fa8c16; margin-top: 6px; }

/* 会员权益网格 */
.member-benefits-full h3 {
    margin: 0 0 12px 0;
    font-size: 15px;
}
.benefit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.benefit-item {
    padding: 8px 10px;
    background: #f5f5f5;
    border-radius: 6px;
    font-size: 13px;
    color: #666;
}
.benefit-item.highlight {
    background: #fff7e6;
    color: #fa8c16;
}

/* 会员升级卡片 */
.member-upgrade-card {
    background: linear-gradient(135deg, #f0f7ff 0%, #bae7ff 100%);
    border-radius: 12px;
}
.member-upgrade-card .section-title {
    color: #1890ff;
}
/* ZQR 诊所端样式 · 本地还原占位版 */
/* 注意: 原始 clinic/style.css 不在交接包内，此为从 root-index.html 提取的同源样式基础，
   正式交付前需从 NAS 补充原始文件，避免与生产存在细微差异。 */
/* v19.0: 病例详情Tab布局样式 */
        .case-tabs {
            display: flex;
            gap: 4px;
            background: #f5f5f5;
            padding: 8px 12px;
            border-radius: 8px 8px 0 0;
            border-bottom: 1px solid #e0e0e0;
        }
        .case-tab {
            padding: 10px 20px;
            border: none;
            background: transparent;
            color: #666;
            font-size: 14px;
            cursor: pointer;
            border-radius: 6px 6px 0 0;
            transition: all 0.2s;
        }
        .case-tab:hover {
            background: #e8e8e8;
            color: #333;
        }
        .case-tab.active {
            background: #fff;
            color: #1890ff;
            font-weight: 600;
            box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
        }
        .case-tab-content {
            background: #fff;
            padding: 20px;
            min-height: 400px;
        }
        .loading-state {
            text-align: center;
            padding: 60px;
            color: #999;
        }
        .error-state {
            text-align: center;
            padding: 60px;
            color: #ff4d4f;
        }
        
        /* 临床数据Tab样式 */
        .clinical-data-tab {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }
        .clinical-stage-nav {
            display: flex;
            gap: 8px;
            padding-bottom: 16px;
            border-bottom: 1px solid #eee;
        }
        .stage-switch-btn {
            padding: 8px 16px;
            border: 1px solid #d9d9d9;
            background: #fff;
            color: #666;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .stage-switch-btn:hover {
            border-color: #1890ff;
            color: #1890ff;
        }
        .stage-switch-btn.active {
            background: #1890ff;
            border-color: #1890ff;
            color: #fff;
        }
        .clinical-section {
            margin-bottom: 20px;
        }
        .clinical-section-title {
            font-size: 15px;
            font-weight: 600;
            color: #333;
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid #eee;
        }
        .clinical-fields-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 12px;
        }
        .clinical-field-item {
            padding: 10px 12px;
            background: #fafafa;
            border-radius: 6px;
        }
        .clinical-field-label {
            font-size: 12px;
            color: #888;
            margin-bottom: 4px;
        }
        .clinical-field-value {
            font-size: 14px;
            color: #333;
            word-break: break-all;
        }
        
        /* 照片Tab样式 */
        .photo-group-card {
            margin-bottom: 20px;
            border: 1px solid #eee;
            border-radius: 8px;
            overflow: hidden;
        }
        .photo-group-header {
            padding: 12px 16px;
            background: #fafafa;
            border-bottom: 1px solid #eee;
        }
        .photo-group-title {
            font-size: 14px;
            font-weight: 600;
            color: #333;
        }
        .photo-group-body {
            padding: 16px;
        }
        
        /* 评分Tab样式 */
        .score-tab {
            padding: 0;
        }
        .score-cards {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 16px;
        }
        .score-card {
            border: 1px solid #e8e8e8;
            border-radius: 8px;
            overflow: hidden;
        }
        .score-card.active {
            border-color: #1890ff;
            box-shadow: 0 0 0 2px rgba(24,144,255,0.1);
        }
        .score-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            background: #fafafa;
            border-bottom: 1px solid #eee;
        }
        .score-card-title {
            font-size: 14px;
            font-weight: 600;
            color: #333;
        }
        .current-badge {
            font-size: 11px;
            padding: 2px 8px;
            background: #1890ff;
            color: #fff;
            border-radius: 10px;
        }
        .score-card-body {
            padding: 16px;
        }
        .score-items {
            display: flex;
            flex-direction: column;
            gap: 8px;
            margin-bottom: 16px;
        }
        .score-item {
            display: flex;
            justify-content: space-between;
            padding: 6px 0;
            border-bottom: 1px dashed #f0f0f0;
        }
        .score-item:last-child {
            border-bottom: none;
        }
        .score-item-label {
            color: #666;
            font-size: 13px;
        }
        .score-item-value {
            color: #333;
            font-weight: 500;
            font-size: 13px;
        }
        .score-avg {
            text-align: center;
            padding: 16px;
            background: #f5f5f5;
            border-radius: 6px;
        }
        .score-avg.has-score {
            background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
        }
        .score-avg-label {
            display: block;
            font-size: 12px;
            color: #888;
            margin-bottom: 4px;
        }
        .score-avg-value {
            font-size: 28px;
            font-weight: 700;
            color: #1890ff;
        }
        .score-card-footer {
            padding: 12px 16px;
            background: #fafafa;
            border-top: 1px solid #eee;
            text-align: center;
        }
        
        /* 治疗方案Tab样式 */
        .treatment-plan-tab, .deliverables-tab {
            padding: 0;
        }
        .treatment-plan-header, .deliverables-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        .treatment-plan-header h3, .deliverables-header h3 {
            margin: 0;
            font-size: 16px;
            color: #333;
        }
        .treatment-plan-list, .deliverables-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .plan-card {
            border: 1px solid #e8e8e8;
            border-radius: 8px;
            overflow: hidden;
        }
        .plan-card-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 12px 16px;
            background: #fafafa;
            border-bottom: 1px solid #eee;
        }
        .plan-title {
            font-size: 14px;
            font-weight: 600;
            color: #333;
        }
        .plan-status {
            font-size: 12px;
            padding: 2px 10px;
            border-radius: 10px;
            background: #f0f0f0;
            color: #666;
        }
        .plan-status.sent {
            background: #e6f7ff;
            color: #1890ff;
        }
        .plan-status.approved {
            background: #f6ffed;
            color: #52c41a;
        }
        .plan-card-body {
            padding: 16px;
        }
        .plan-detail {
            font-size: 14px;
            color: #666;
            line-height: 1.6;
            margin-bottom: 8px;
            white-space: pre-wrap;
        }
        .plan-meta {
            font-size: 12px;
            color: #999;
        }
        .plan-card-footer {
            padding: 12px 16px;
            background: #fafafa;
            border-top: 1px solid #eee;
        }
        
        /* 交付物Tab样式 */
        .delivery-item {
            display: flex;
            align-items: center;
            padding: 12px 16px;
            border: 1px solid #e8e8e8;
            border-radius: 8px;
            gap: 12px;
        }
        .delivery-icon {
            font-size: 24px;
        }
        .delivery-info {
            flex: 1;
        }
        .delivery-name {
            font-size: 14px;
            color: #333;
            font-weight: 500;
        }
        .delivery-meta {
            font-size: 12px;
            color: #999;
            margin-top: 2px;
        }
        .btn-icon-sm {
            padding: 6px 10px;
            border: 1px solid #d9d9d9;
            background: #fff;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
        }
        .btn-icon-sm:hover {
            color: #1890ff;
            border-color: #1890ff;
        }

        /* v20d: 多文件分类上传样式 */
        .upload-category-list {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .upload-category-row {
            display: flex;
            align-items: center;
            padding: 10px 12px;
            border: 1px solid #e8e8e8;
            border-radius: 8px;
            gap: 12px;
            background: #fafafa;
        }
        .upload-category-row:hover {
            border-color: #1890ff;
            background: #f0f7ff;
        }
        .upload-cat-label {
            display: flex;
            align-items: center;
            gap: 8px;
            cursor: pointer;
            min-width: 160px;
            font-size: 14px;
            color: #333;
        }
        .upload-cat-check {
            width: 16px;
            height: 16px;
            cursor: pointer;
        }
        .upload-cat-icon {
            font-size: 18px;
        }
        .upload-cat-file {
            flex: 1;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .upload-filename {
            flex: 1;
            font-size: 13px;
            color: #888;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .upload-filename.has-file {
            color: #52c41a;
            font-weight: 500;
        }
        
        /* v20d: 交付物分类分组样式 */
        .deliverables-cat-group {
            margin-bottom: 16px;
        }
        .deliverables-cat-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: #f5f5f5;
            border-radius: 6px 6px 0 0;
            font-size: 14px;
            font-weight: 600;
            color: #333;
            border: 1px solid #e8e8e8;
            border-bottom: none;
        }
        .cat-icon { font-size: 18px; }
        .cat-label { color: #333; }
        .cat-count { color: #999; font-size: 12px; font-weight: normal; }
        .deliverables-cat-group .deliverable-items {
            border: 1px solid #e8e8e8;
            border-radius: 0 0 8px 8px;
            overflow: hidden;
        }
        .deliverables-cat-group .delivery-item {
            border-radius: 0;
            border-left: none;
            border-right: none;
            border-bottom: none;
        }
        .deliverables-cat-group .delivery-item:last-child {
            border-bottom: 1px solid #e8e8e8;
        }
        .deliverables-cat-group .delivery-item:hover {
            background: #fafafa;
        }

        /* 创建方案模态框 */
        .create-plan-modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1000;
        }
        .create-plan-modal .modal-content {
            background: #fff;
            border-radius: 8px;
            width: 500px;
            max-width: 90%;
            max-height: 90vh;
            overflow: auto;
        }
        .create-plan-modal .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px;
            border-bottom: 1px solid #eee;
        }
        .create-plan-modal .modal-header h3 {
            margin: 0;
            font-size: 16px;
        }
        .create-plan-modal .modal-close {
            border: none;
            background: none;
            font-size: 24px;
            cursor: pointer;
            color: #999;
        }
        .create-plan-modal .modal-body {
            padding: 20px;
        }
        .create-plan-modal .modal-footer {
            padding: 16px 20px;
            border-top: 1px solid #eee;
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }
        .create-plan-modal textarea {
            width: 100%;
            padding: 10px;
            border: 1px solid #d9d9d9;
            border-radius: 6px;
            resize: vertical;
            font-size: 14px;
        }
        .create-plan-modal input[type="text"] {
            width: 100%;
            padding: 10px;
            border: 1px solid #d9d9d9;
            border-radius: 6px;
            font-size: 14px;
        }
        /* ---- 专业视频播放器（v20d: 管理端演示用） ---- */
        .vp-overlay { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,0.85); display: flex; align-items: center; justify-content: center; animation: vpFadeIn .2s ease; }
        @keyframes vpFadeIn { from { opacity: 0; } to { opacity: 1; } }
        .vp-container { width: 92vw; max-width: 860px; background: #1a1a2e; border-radius: 16px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.6); display: flex; flex-direction: column; }
        .vp-header { display: flex; align-items: center; gap: 12px; padding: 14px 20px; background: linear-gradient(135deg, #16213e 0%, #1a1a2e 100%); border-bottom: 1px solid rgba(43,108,176,0.3); }
        .vp-brand { display: flex; align-items: baseline; gap: 8px; }
        .vp-logo { font-size: 20px; font-weight: 800; color: #4fc3f7; letter-spacing: 1px; }
        .vp-subtitle { font-size: 13px; color: rgba(255,255,255,0.6); }
        .vp-case-info { flex: 1; display: flex; gap: 6px; justify-content: center; }
        .vp-info-tag { font-size: 11px; padding: 2px 8px; background: rgba(79,195,247,0.15); color: #4fc3f7; border-radius: 4px; border: 1px solid rgba(79,195,247,0.25); }
        .vp-close { background: none; border: none; color: rgba(255,255,255,0.5); font-size: 20px; cursor: pointer; padding: 4px 8px; border-radius: 6px; transition: all .15s; }
        .vp-close:hover { color: #fff; background: rgba(255,255,255,0.1); }
        .vp-stage-bar { display: flex; align-items: center; justify-content: center; gap: 0; padding: 10px 20px; background: rgba(255,255,255,0.03); }
        .vp-stage-dot { display: flex; align-items: center; gap: 4px; }
        .vp-stage-num { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.4); }
        .vp-stage-dot.done .vp-stage-num, .vp-stage-dot.current .vp-stage-num { background: #4fc3f7; color: #1a1a2e; }
        .vp-stage-dot.current .vp-stage-num { box-shadow: 0 0 8px rgba(79,195,247,0.5); }
        .vp-stage-label { font-size: 11px; color: rgba(255,255,255,0.4); }
        .vp-stage-dot.done .vp-stage-label, .vp-stage-dot.current .vp-stage-label { color: rgba(255,255,255,0.8); }
        .vp-stage-line { width: 32px; height: 1px; background: rgba(255,255,255,0.15); margin: 0 4px; }
        .vp-tabs { display: flex; gap: 4px; padding: 6px 20px; background: rgba(255,255,255,0.02); }
        .vp-tab { padding: 5px 14px; font-size: 12px; border: 1px solid rgba(79,195,247,0.25); border-radius: 6px; background: transparent; color: rgba(255,255,255,0.6); cursor: pointer; transition: all .15s; }
        .vp-tab.active { background: rgba(79,195,247,0.2); color: #4fc3f7; border-color: #4fc3f7; }
        .vp-tab:hover:not(.active) { background: rgba(79,195,247,0.08); }
        .vp-player-wrap { position: relative; background: #000; flex: 1; min-height: 280px; display: flex; align-items: center; justify-content: center; }
        .vp-video { width: 100%; max-height: 60vh; object-fit: contain; display: block; outline: none; }
        .vp-video-label { position: absolute; bottom: 8px; left: 12px; font-size: 11px; padding: 2px 8px; background: rgba(0,0,0,0.65); color: rgba(255,255,255,0.7); border-radius: 4px; pointer-events: none; }
        .vp-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 20px; background: #16213e; border-top: 1px solid rgba(43,108,176,0.2); }
        .vp-tip { font-size: 11px; color: rgba(255,255,255,0.35); }
        .vp-fullscreen-btn { padding: 5px 14px; font-size: 12px; background: rgba(79,195,247,0.15); color: #4fc3f7; border: 1px solid rgba(79,195,247,0.3); border-radius: 6px; cursor: pointer; transition: all .15s; }
        .vp-fullscreen-btn:hover { background: rgba(79,195,247,0.3); }
        /* v20e: 会员管理样式 */
        .stats-cards {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
            gap: 16px;
            margin-bottom: 20px;
        }
        .stat-card {
            background: #fff;
            border: 1px solid #e8e8e8;
            border-radius: 8px;
            padding: 16px;
            text-align: center;
        }
        .stat-card.highlight {
            background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%);
            border-color: #91d5ff;
        }
        .stat-value {
            font-size: 28px;
            font-weight: 700;
            color: #1890ff;
        }
        .stat-card.highlight .stat-value {
            color: #096dd9;
        }
        .stat-label {
            font-size: 13px;
            color: #666;
            margin-top: 4px;
        }
        .filter-bar {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            background: #fafafa;
            border-radius: 8px;
            margin-bottom: 16px;
        }
        .filter-bar label {
            font-size: 14px;
            color: #666;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .filter-bar select {
            padding: 6px 12px;
            border: 1px solid #d9d9d9;
            border-radius: 4px;
            font-size: 14px;
        }
        .badge {
            display: inline-block;
            padding: 2px 8px;
            border-radius: 10px;
            font-size: 12px;
        }
        .badge.regular { background: #f0f0f0; color: #666; }
        .badge.trial { background: #fff7e6; color: #fa8c16; }
        .badge.member { background: #e6f7ff; color: #1890ff; }
        .status-badge.trial { background: #fff7e6; color: #fa8c16; }
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: #999;
        }
        .page-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }
        .page-header h2 { margin: 0; }
        .page-actions { display: flex; gap: 12px; }
        
        @media (max-width: 640px) {
            .vp-container { width: 100vw; max-width: 100vw; border-radius: 0; height: 100vh; max-height: 100vh; }
            .vp-header { padding: 10px 14px; flex-wrap: wrap; }
            .vp-case-info { order: 3; width: 100%; justify-content: flex-start; margin-top: 4px; }
            .vp-player-wrap { min-height: 200px; }
            .vp-video { max-height: 55vh; }
        }
        .video-play-btn { position: relative; }
        .video-play-btn::after { content: ''; position: absolute; top: -2px; right: -2px; width: 6px; height: 6px; background: #4fc3f7; border-radius: 50%; animation: vpPulse 1.5s infinite; }
        @keyframes vpPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ============================================================
 * v21.2 五步新建病例向导样式补全（T-030, 2026-08-15）
 * wizard.js v21.2 渲染类与历史 CSS 不匹配，此处补齐缺失类；
 * 视觉风格与旧版向导（wizard-panel 白卡片 + 蓝色主按钮）保持一致。
 * ============================================================ */
.wizard-container { max-width: 820px; margin: 0 auto; padding: 16px 16px 40px; }
.wizard-progress { display: flex; align-items: flex-start; justify-content: center; background: #fff; padding: 18px 20px; border-radius: 12px; margin-bottom: 16px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.wizard-step .step-circle { background: #e0e0e0; color: #999; border-radius: 50%; width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; transition: all .3s; }
.wizard-step.active .step-circle { background: #1a73e8; color: #fff; box-shadow: 0 2px 8px rgba(26,115,232,0.4); }
.wizard-step.done .step-circle { background: #27ae60; color: #fff; }
.wizard-step .step-label { margin-top: 8px; font-size: 13px; color: #999; text-align: center; transition: color .3s; }
.wizard-step.active .step-label { color: #1a73e8; font-weight: 500; }
.wizard-step.done .step-label { color: #27ae60; }
.wizard-step .step-line { width: 52px; height: 2px; background: #e0e0e0; margin: 0 4px 18px; }
.wizard-step .step-line.done { background: #27ae60; }
.wizard-body { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.wizard-title { font-size: 18px; font-weight: 600; color: #333; margin: 0 0 20px; padding-bottom: 12px; border-bottom: 2px solid #e0e0e0; }
.wizard-type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.wizard-type-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: #fff; border: 1px solid #e0e0e0; border-radius: 12px; padding: 26px 16px; cursor: pointer; transition: all .2s; text-align: center; }
.wizard-type-card:hover { border-color: #1a73e8; box-shadow: 0 4px 12px rgba(26,115,232,0.12); transform: translateY(-2px); }
.wizard-type-card.selected { border-color: #1a73e8; background: #e8f0fe; box-shadow: 0 2px 8px rgba(26,115,232,0.18); }
.type-icon { font-size: 38px; line-height: 1; }
.type-label { font-size: 14px; font-weight: 500; color: #333; }
.wizard-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.wizard-select, .form-input { width: 100%; padding: 10px 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 14px; background: #fff; color: #333; transition: border-color .2s; box-sizing: border-box; }
.wizard-select:focus, .form-input:focus { outline: none; border-color: #1a73e8; box-shadow: 0 0 0 3px rgba(26,115,232,0.1); }
.wizard-form { display: flex; flex-direction: column; }
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 14px; color: #333; font-weight: 500; }
.form-row-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wizard-confirm { background: #f9f9f9; border-radius: 10px; padding: 6px 18px; }
.confirm-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid #eee; }
.confirm-row:last-child { border-bottom: none; }
.confirm-label { color: #888; font-size: 13px; flex-shrink: 0; }
.confirm-value { font-weight: 500; color: #333; text-align: right; word-break: break-all; }
.wizard-done { text-align: center; padding: 46px 20px; }
.done-icon { font-size: 56px; margin-bottom: 14px; }
.wizard-done h3 { margin: 0 0 8px; color: #27ae60; font-size: 20px; }
.wizard-done p { color: #666; font-size: 14px; margin: 4px 0; }
@media (max-width: 640px) {
    .wizard-type-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .wizard-body { padding: 16px; }
    .wizard-actions { justify-content: center; }
    .wizard-actions .btn-primary, .wizard-actions .btn-secondary { flex: 1; min-width: 120px; }
    .form-row-2col { grid-template-columns: 1fr; gap: 0; }
}

/* ============================================================
 * ZModal 全局弹窗组件样式（T-031, 2026-08-15）
 * ============================================================ */
#zmodal-root .zmodal-mask { position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 16px; }
#zmodal-root .zmodal-card { background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.22); max-width: 420px; width: 100%; max-height: 88vh; display: flex; flex-direction: column; padding: 18px 22px 14px; animation: zmodalIn .18s ease-out; }
#zmodal-root .zmodal-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 17px; font-weight: 600; color: #1f2937; margin-bottom: 10px; flex-shrink: 0; }
#zmodal-root .zmodal-x { border: none; background: transparent; font-size: 20px; line-height: 1; color: #6b7280; cursor: pointer; padding: 2px 7px; border-radius: 6px; }
#zmodal-root .zmodal-x:hover { background: #eef0f3; color: #111827; }
#zmodal-root .zmodal-body { font-size: 14px; line-height: 1.7; color: #4b5563; white-space: pre-line; word-break: break-word; }
#zmodal-root .zmodal-content { overflow-y: auto; min-height: 0; flex: 1 1 auto; padding-right: 2px; }
#zmodal-root .zmodal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef0f3; flex-shrink: 0; }
@media (max-width: 480px) {
    #zmodal-root .zmodal-mask { padding: 10px; }
    #zmodal-root .zmodal-card { max-height: 92vh; padding: 14px 16px 12px; }
    #zmodal-root .zmodal-title { font-size: 16px; }
    #zmodal-root .zmodal-actions .zmodal-btn { flex: 1 1 0; min-width: 0; }
}
#zmodal-root .zmodal-btn { min-width: 88px; }
@keyframes zmodalIn { from { opacity: 0; transform: scale(0.94) translateY(8px); } to { opacity: 1; transform: none; } }
/* P1-458 弹窗全量复核：键盘焦点、可点击尺寸与移动端可用性统一 */
#zmodal-root .zmodal-card:focus { outline: none; }
#zmodal-root .zmodal-x { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
#zmodal-root .zmodal-btn { min-height: 44px; }
#zmodal-root .zmodal-x:focus-visible,
#zmodal-root .zmodal-btn:focus-visible,
#zmodal-root .zmodal-input:focus-visible { outline: 3px solid rgba(43,108,176,.32); outline-offset: 2px; }

/* ============================================================
 * T-029 B3 诊所端全面改版（品牌统一 · 纯 CSS 覆盖 · 不动 JS）
 * 版本：v33.14.0（2026-08-15）
 * ============================================================ */

/* ---- 顶部栏微调 ---- */
.frame-header { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.frame-logo { letter-spacing: 1.5px; }
.frame-title { opacity: 0.92; }

/* ---- 桌面导航：激活项品牌蓝 + 底部指示条 ---- */
.desktop-nav { background: var(--bg-card); border-bottom: 1px solid var(--gray-100); }
.desktop-nav-tab { position: relative; }
.desktop-nav-tab:hover { background: var(--primary-bg); }
.desktop-nav-tab.active {
    color: var(--brand-800); border-bottom-color: var(--brand-600); font-weight: 600;
}

/* ---- 底部导航（移动） ---- */
.frame-nav { background: var(--bg-card); border-top: 1px solid var(--gray-100); }
.frame-nav-tab.active { color: var(--brand-600); }
.frame-nav-tab.active .tab-icon { transform: translateY(-1px); }

/* ---- 页面与卡片 ---- */
.page-container { padding: 18px 20px 28px; }
.section-title { color: var(--brand-900); }
.case-card {
    border: 1px solid var(--gray-100); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.case-card:hover { box-shadow: var(--shadow-md); }
.form-card {
    border: 1px solid var(--gray-100); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.card-title { color: var(--brand-900); }
.filter-bar select, .filter-bar input { border-radius: var(--radius); }

/* ---- 统计卡片 ---- */
.stat-card {
    border: 1px solid var(--gray-100); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.stat-value { color: var(--brand-800); }

/* ---- 向导步骤条品牌化（已完成=品牌蓝、当前=蓝底白字、未到=灰） ---- */
.wizard-progress {
    border: 1px solid var(--gray-100); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}
.wizard-step.active .step-circle {
    background: var(--brand-600); color: #fff;
    box-shadow: 0 3px 10px rgba(43, 108, 176, 0.35);
}
.wizard-step.completed .step-circle { background: var(--brand-700); color: #fff; }
.wizard-step.active .step-label { color: var(--brand-700); font-weight: 600; }
.wizard-step.completed .step-label { color: var(--brand-600); }

/* ---- 上传区 ---- */
.photo-slot { border-color: var(--gray-300); border-radius: var(--radius); }
.photo-slot:hover { border-color: var(--brand-600); }
.upload-progress .progress-fill { background: var(--brand-600); }

/* ---- 通知中心 ---- */
.notif-item { border-radius: var(--radius); }
.notif-item.unread {
    background: var(--primary-bg); border-left: 3px solid var(--brand-600);
}
.notif-item.unread .notif-title { color: var(--brand-800); font-weight: 600; }

/* ---- 设置 ---- */
.settings-section {
    border: 1px solid var(--gray-100); border-radius: var(--radius-lg); box-shadow: var(--shadow);
}

/* ---- 会员卡（金色氛围，B4 将做 body class 联动） ---- */
.member-upgrade-card {
    border: 1px solid #e8cf8a;
    background: linear-gradient(180deg, #fffdf5 0%, var(--member-gold-bg) 100%);
}
.member-upgrade-card .section-title, .member-badge-header { color: var(--member-gold); }
.upgrade-cta { border-top-color: #e8cf8a; }
.upgrade-cta p { color: #8a6d1a; }

/* ---- 状态徽章微调 ---- */
.status-submitted { background: var(--primary-bg); color: var(--brand-700); }
.status-progress, .status-in_progress { background: #fff3e0; color: var(--warning); }

/* ---- 移动端 ---- */
@media (max-width: 640px) {
    .page-container { padding: 12px 12px 20px; }
    .frame-nav-tab.active .tab-icon { transform: none; }
}

/* ============================================================
 * T-029 B4 会员差异化（body class 纯 CSS 金色主题）
 * 版本：v33.15.0（2026-08-15）
 * ============================================================ */

/* ---- T-035 二期：阶段状态徽章 ---- */
.section-bar { position: sticky; top: 0; z-index: 42; background: var(--bg-page); padding: 8px 0; }
.case-list-page .filter-bar { position: sticky; top: 44px; z-index: 40; background: var(--bg-page); padding: 10px 0; }
.create-case-page .section-bar { position: sticky; top: 0; z-index: 42; }
.page-container > .page-header { position: sticky; top: 0; z-index: 42; background: var(--bg-card); padding: 8px 0; }
.notifications-page .page-header { position: sticky; top: 0; z-index: 42; background: var(--bg-card); padding: 8px 0; }
.notifications-page .notif-filters { position: sticky; top: 56px; z-index: 40; background: var(--bg-page); padding: 8px 0; }
.case-detail-page .page-header { position: sticky; top: 0; z-index: 50; background: var(--bg-card); padding: 8px 0; }
.case-detail-page .stage-tabs { position: sticky; top: 46px; z-index: 45; background: var(--bg-page); padding: 6px 0; }
.stage-status-badge {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 16px;
    vertical-align: middle;
}
.stage-status-badge.stage-badge-pending { background: var(--gray-100); color: var(--gray-600); }
.stage-status-badge.stage-badge-submitted { background: #dbeafe; color: var(--brand-700); }
.stage-status-badge.stage-badge-approved { background: #d1fae5; color: #065f46; }
.stage-status-badge.stage-badge-rejected { background: #fee2e2; color: #991b1b; }

/* ---- 普通成员：升级徽章金色 CTA ---- */
#level-badge.upgrade-badge {
    background: linear-gradient(135deg, #fff7e6 0%, var(--member-gold-bg) 100%);
    color: var(--member-gold); border: 1px solid #e8cf8a; font-weight: 600;
}

/* ---- 正式会员：金色渐变徽章 + 微光动画 ---- */
body.member-mode #level-badge.member-badge {
    background: linear-gradient(135deg, var(--member-gold) 0%, var(--member-gold-2) 100%);
    color: #fff; border: none;
    animation: memberGlow 2.4s ease-in-out infinite;
}
@keyframes memberGlow {
    0%, 100% { box-shadow: 0 2px 8px rgba(212, 175, 55, 0.35); }
    50%      { box-shadow: 0 2px 16px rgba(212, 175, 55, 0.65); }
}

/* ---- 会员状态卡 / 权益卡：金色氛围 ---- */
body.member-mode .member-status-card.member {
    border: 1px solid #e8cf8a;
    background: linear-gradient(180deg, #fffdf5 0%, var(--member-gold-bg) 100%);
}
body.member-mode .member-status-card.member .member-level { color: var(--member-gold); font-weight: 700; }
body.member-mode .member-status-card.member .member-expires { color: #8a6d1a; }
body.member-mode .member-upgrade-card { border-color: #e8cf8a; }
body.member-mode .member-benefits {
    border: 1px solid #e8cf8a; border-radius: var(--radius);
    background: #fffdf5; padding: 12px;
}
body.member-mode .member-benefits .benefit-item { color: #7a5f12; }

/* ---- 体验期：金色倒计时横幅 ---- */
body.trial-mode #upgrade-banner {
    background: linear-gradient(90deg, #fff7e6 0%, var(--member-gold-bg) 100%);
    border: 1px solid #e8cf8a; color: #8a6d1a;
}
body.trial-mode #upgrade-banner .trial-badge,
body.trial-mode #upgrade-banner .upgrade-badge {
    background: #fff; color: var(--member-gold); border: 1px solid #e8cf8a;
}

/* ---- 锁定功能：会员专属水印 ---- */
.btn-secondary[title*="会员专属"], .member-locked {
    border: 1px dashed #e8cf8a; background: #fffdf5; color: #8a6d1a;
}

/* ---- 升级 CTA 卡：金色渐变按钮氛围 ---- */
.upgrade-cta .btn-primary {
    background: linear-gradient(135deg, var(--member-gold) 0%, var(--member-gold-2) 100%);
    border: none; color: #fff; font-weight: 600;
}

/* ==================== 文件预览弹窗（T-035 诊所端，源自管理端 T-022） ==================== */
        .zqr-stl-hint {
            position: absolute;
            left: 14px;
            bottom: 10px;
            z-index: 5;
            font-size: 12px;
            color: rgba(255,255,255,0.72);
            background: rgba(0,0,0,0.45);
            padding: 4px 10px;
            border-radius: 12px;
            pointer-events: none;
        }

        /* ==================== 文件预览弹窗（T-022-06） ==================== */
        .zqr-preview-modal {
            position: fixed;
            inset: 0;
            z-index: 10000;
        }
        .zqr-preview-overlay {
            position: absolute;
            inset: 0;
            background: rgba(0,0,0,0.55);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
        }
        .zqr-preview-box {
            background: var(--bg-card);
            border-radius: 12px;
            width: 92vw;
            max-width: 1100px;
            height: 86vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .zqr-preview-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            border-bottom: 1px solid var(--gray-200);
            background: var(--gray-50);
        }
        .zqr-preview-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--gray-800);
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }
        .zqr-preview-close {
            border: none;
            background: transparent;
            font-size: 20px;
            line-height: 1;
            color: var(--gray-600);
            cursor: pointer;
            padding: 4px 8px;
            border-radius: 6px;
        }
        .zqr-preview-close:hover {
            background: #f0f0f0;
            color: var(--gray-800);
        }
        .zqr-preview-body {
            flex: 1;
            overflow: hidden;
            position: relative;
            display: flex;
            flex-direction: column;
        }
        .zqr-preview-body iframe {
            width: 100%;
            height: 100%;
            border: none;
        }
        .zqr-stl-toolbar,
        .zqr-dicom-toolbar {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            align-items: center;
            padding: 10px 14px;
            border-bottom: 1px solid var(--gray-200);
            background: var(--gray-50);
            font-size: 13px;
            color: var(--gray-700);
        }
        .zqr-stl-toolbar label,
        .zqr-dicom-toolbar label {
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }
        .zqr-stl-info {
            margin-left: auto;
            color: var(--gray-500);
        }
        .zqr-stl-canvas-wrap,
        .zqr-dicom-canvas-wrap {
            flex: 1;
            position: relative;
            background: #111;
            min-height: 0;
        }
        .zqr-stl-canvas-wrap canvas,
        .zqr-dicom-canvas-wrap canvas {
            width: 100%;
            height: 100%;
            display: block;
            outline: none;
        }
        .zqr-stl-loading {
            position: absolute;
            inset: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--bg-card);
            background: rgba(17,17,17,0.75);
            font-size: 14px;
            pointer-events: none;
        }
        .zqr-pdf-fallback,
        .zqr-dicom-fallback {
            padding: 40px;
            text-align: center;
            color: var(--gray-600);
        }

        @media (max-width: 640px) {
            .action-bar-desktop {
                display: none;
            }
            .action-bar-mobile {
                display: flex;
                position: fixed;
                left: 0;
                right: 0;
                bottom: 0;
                background: var(--bg-card);
                border-top: 1px solid #e0e0e0;
                padding: 8px 10px;
                gap: 6px;
                overflow-x: auto;
                z-index: 100;
                box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
            }
            .action-bar-mobile .btn-secondary,
            .action-bar-mobile .btn-success,
            .action-bar-mobile .btn-warning,
            .action-bar-mobile .btn-danger {
                flex: 0 0 auto;
                padding: 8px 12px;
                font-size: 13px;
            }
            .case-detail-container {
                padding-bottom: 60px;
            }
            .case-detail-sections {
                padding: 12px;
            }
            .case-section {
                padding: 12px 14px;
            }
            .zqr-preview-overlay {
                padding: 0;
            }
            .zqr-preview-box {
                width: 100vw;
                height: 100vh;
                max-width: none;
                border-radius: 0;
            }
        }

/* P1-436（张主任 2026-10-16「小尾巴做」）：全平台唯一分页条的样式
   —— 「← 上一页　1 / 5（共 56 篇）　下一页 →」
   与 `zqr-admin/style.css` 的同名规则**逐字一致**；改的时候两端一起改（AGENTS §5#20）。 */
.pager-bar { display: flex; align-items: center; gap: 10px; padding: 12px 0 4px; flex-wrap: wrap; justify-content: center; }
.pager-bar .page-btn { min-width: 32px; height: 32px; padding: 0 12px; border: 1px solid var(--gray-300);
    border-radius: 6px; background: var(--bg-card); color: var(--gray-700); font-size: 13px; cursor: pointer; transition: all .15s; }
.pager-bar .page-btn:hover:not(:disabled) { border-color: var(--brand-600); color: var(--brand-600); }
.pager-bar .page-btn:disabled { opacity: .4; cursor: not-allowed; }
.pager-bar .pager-info { font-size: 12.5px; color: var(--gray-600, #606266); }
.pager-bar .pager-jump { display: inline-flex; align-items: center; gap: 5px; color: var(--gray-600, #606266); font-size: 12.5px; }
.pager-bar .pager-jump input { width: 64px; height: 32px; padding: 0 7px; border: 1px solid var(--gray-300);
    border-radius: 6px; background: var(--bg-card); color: var(--gray-700); font-size: 13px; box-sizing: border-box; }
.pager-bar .pager-jump-btn { min-width: 48px; }
@media (max-width: 600px) {
    .pager-bar { gap: 6px; padding-top: 10px; }
    .pager-bar .page-btn { min-width: 30px; height: 31px; padding: 0 9px; font-size: 12px; }
    .pager-bar .pager-jump input { width: 56px; height: 31px; }
}

/* P1-437② 批 B：视频槽位「转码中 / 转码失败」提示（不占预览空间，紧贴预览下方一行小字） */
.slot-video-note { font-size: 11.5px; color: var(--gray-600, #606266); margin-top: 4px; text-align: center; }
.slot-video-note.warn { color: #b45309; }
