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

/* ---- 基础重置 ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
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: #f0f2f5; 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 {
    --primary: #1a3a5c;
    --primary-light: #2b6cb0;
    --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, #1a3a5c 0%, #0d47a1 50%, #1a3a5c 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 h1 { font-size: 22px; color: var(--primary); font-weight: 700; }
.auth-header p { color: var(--gray-600); margin-top: 4px; font-size: 14px; }
.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; }
.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; }
.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; }

/* ---- 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); }

/* ---- 表单操作 ---- */
.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; }
.toast {
    padding: 12px 18px; border-radius: var(--radius); font-size: 14px;
    display: flex; align-items: center; gap: 8px;
    box-shadow: var(--shadow-md); transform: translateX(110%); opacity: 0;
    transition: all 0.3s ease; max-width: 360px; font-weight: 500;
}
.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%; }
}

@media (max-width: 480px) {
    .photo-grid { grid-template-columns: repeat(2, 1fr); }
    .auth-card { padding: 28px 18px; }
    .form-card { padding: 16px 14px; }
    .case-type-selector { flex-direction: column; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn-primary, .form-actions .btn-secondary { width: 100%; }
}

/* ---- 移动端触控优化 ---- */
@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;
}

/* ---- 病例详情页只读样式 ---- */
.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;
}

/* ---- 联系工作人员卡片 ---- */
.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 {
    position: fixed;
    top: 10px;
    right: 60px;
    cursor: pointer;
    font-size: 1.3rem;
    padding: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    box-shadow: none;
    transition: all 0.2s;
    z-index: 101;
}

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

.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-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 340px;
    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;
}

/* ---- 通知中心页面 ---- */
.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-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 {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    
    .notif-filters::-webkit-scrollbar {
        display: none;
    }
    
    .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;
    max-width: 780px; margin: 0 auto; width: 100%;
}
/* 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: 960px; 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; }
}

/* ---- 会员升级卡片 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; }
}
