/* ========== 后台管理布局 ========== */
:root {
    /* Apple Design Tokens */
    --admin-primary: #007aff;
    --admin-primary-dark: #0062cc;
    --admin-primary-light: rgba(0,122,255,0.1);
    --admin-primary-glow: rgba(0,122,255,0.2);
    --admin-bg: #f5f5f7;
    --admin-sidebar-bg: #1a1a2e;
    --admin-sidebar-text: rgba(255,255,255,0.65);
    --admin-sidebar-hover: rgba(255,255,255,0.08);
    --admin-sidebar-active: rgba(0,122,255,0.2);
    --admin-card: #fff;
    --admin-border: rgba(60,60,67,0.12);
    --admin-border-strong: #d2d2d7;
    --admin-text: #1d1d1f;
    --admin-text-secondary: #6e6e73;
    --admin-text-tertiary: #86868b;
    --admin-bg-secondary: #f2f2f7;
    --admin-separator: rgba(60,60,67,0.12);
    --admin-danger: #ff3b30;
    --admin-danger-light: rgba(255,59,48,0.1);
    --apple-radius-sm: 8px;
    --apple-radius: 10px;
    --apple-radius-lg: 12px;
    --apple-radius-xl: 14px;
}

.admin-header {
    background: var(--admin-sidebar-bg);
    color: #fff; padding: 0; position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 16px rgba(0,0,0,0.12);
}
.admin-header .container {
    display: flex; justify-content: space-between; align-items: center;
    height: 60px; max-width: 100%; padding: 0 24px;
}
.admin-header h2 {
    font-size: 17px; font-weight: 700;
    display: flex; align-items: center; gap: 8px;
}
.admin-header h2::before {
    content: '⚙️'; font-size: 18px;
}
.admin-actions { display: flex; gap: 10px; }
.btn-outline-dark {
    background: transparent; color: rgba(255,255,255,0.8);
    border: 1px solid rgba(255,255,255,0.25); border-radius: 8px;
    font-size: 12px; padding: 6px 14px;
}
.btn-outline-dark:hover {
    background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.5); color: #fff;
}
.btn-outline {
    background: #fff; color: var(--admin-primary); border: 1px solid var(--admin-primary);
    border-radius: 6px; font-size: 12px; padding: 5px 12px; cursor: pointer;
    transition: all 0.2s;
}
.btn-outline:hover { background: #e8f0fe; }

/* 主体布局 */
.admin-layout { display: flex; min-height: calc(100vh - 60px); background: var(--admin-bg); }

/* 侧边栏 */
.admin-sidebar {
    width: 210px; background: var(--admin-sidebar-bg);
    padding: 12px 0; flex-shrink: 0; overflow-y: auto;
}
.admin-sidebar::before {
    content: '管理菜单'; display: block; padding: 8px 20px 16px;
    font-size: 11px; font-weight: 700; color: rgba(255,255,255,0.3);
    text-transform: uppercase; letter-spacing: 1px;
}

/* 侧边栏分组 */
.sidebar-group { margin-bottom: 4px; }
.sidebar-group-title {
    display: block; padding: 14px 20px 6px;
    font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.25);
    text-transform: uppercase; letter-spacing: 1.5px;
}
.sidebar-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px; color: var(--admin-sidebar-text);
    font-size: 13px; font-weight: 500; transition: all .2s;
    border-left: 3px solid transparent; text-decoration: none; position: relative;
}
.sidebar-icon { flex-shrink: 0; opacity: 0.7; transition: opacity .2s; }
.sidebar-item:hover .sidebar-icon { opacity: 1; }
.sidebar-item.active .sidebar-icon { opacity: 1; color: var(--admin-primary); }
.sidebar-item::after {
    content: ''; position: absolute; right: 16px;
    width: 6px; height: 6px; border-radius: 50%;
    background: transparent; transition: all .25s cubic-bezier(0.4,0,0.2,1);
}
.sidebar-item:hover {
    background: var(--admin-sidebar-hover); color: #fff;
}
.sidebar-item.active {
    background: var(--admin-sidebar-active); color: #fff;
    border-left-color: var(--admin-primary); font-weight: 600;
}
.sidebar-item.active::after { background: var(--admin-primary); box-shadow: 0 0 8px rgba(0,122,255,0.4); }
/* 独立体检后台跳转项上的"新页"小标签 */
.sidebar-ext {
    margin-left: auto; font-size: 10px; font-weight: 600;
    color: var(--admin-primary); background: rgba(26,115,232,0.12);
    padding: 1px 7px; border-radius: 8px; letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* ========== 仪表盘 ========== */
.dash-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.dash-stat-card {
    background: var(--admin-card);
    border-radius: 14px;
    padding: 22px 24px;
    border: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all .25s;
    position: relative;
    overflow: hidden;
}
.dash-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--stat-color, var(--admin-primary));
}
.dash-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
    border-color: var(--stat-color, var(--admin-primary));
}
.dash-stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    color: #fff;
    background: var(--stat-color, var(--admin-primary));
    box-shadow: 0 4px 14px var(--stat-shadow, rgba(26,115,232,0.3));
}
.dash-stat-info { flex: 1; min-width: 0; }
.dash-stat-info .num {
    font-size: 28px; font-weight: 800;
    color: #1a1a2e; line-height: 1;
    margin-bottom: 4px;
}
.dash-stat-info .lbl {
    font-size: 13px; color: var(--admin-text-secondary);
    font-weight: 500;
}
.dash-stat-info .trend {
    font-size: 11px; font-weight: 600;
    color: var(--stat-color, var(--admin-primary));
    margin-top: 2px;
}

.dash-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 16px;
}
@media (max-width: 900px) {
    .dash-bottom-grid { grid-template-columns: 1fr; }
}
.dash-panel {
    background: var(--admin-card);
    border-radius: 14px;
    border: 1px solid var(--admin-border);
    overflow: hidden;
}
.dash-panel-head {
    padding: 16px 22px;
    border-bottom: 1px solid var(--admin-border);
    display: flex; justify-content: space-between; align-items: center;
}
.dash-panel-head h4 {
    font-size: 15px; font-weight: 700; color: #1a1a2e;
}
.dash-quick-actions {
    padding: 18px 22px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}
.dash-qa-item {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 18px 12px;
    border-radius: 12px;
    text-decoration: none;
    background: #f8f9fb;
    border: 1px solid transparent;
    transition: all .2s;
    cursor: pointer;
}
.dash-qa-item:hover {
    background: #fff;
    border-color: var(--admin-border);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.dash-qa-item .ic {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
}
.dash-qa-item .lbl {
    font-size: 13px; font-weight: 600; color: #444;
}
.dash-recent-list { padding: 8px 12px; }
.dash-recent-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 12px;
    border-radius: 10px;
    transition: background .15s;
}
.dash-recent-item:hover { background: #f8f9fb; }
.dash-recent-item .avatar {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--admin-primary), #4a90d9);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
    flex-shrink: 0;
}
.dash-recent-item .info { flex: 1; min-width: 0; }
.dash-recent-item .info .name {
    font-size: 14px; font-weight: 600; color: #333;
}
.dash-recent-item .info .meta {
    font-size: 12px; color: var(--admin-text-secondary);
}
.dash-recent-item .date {
    font-size: 12px; color: var(--admin-text-secondary);
    white-space: nowrap;
    background: #f0f2f5;
    padding: 4px 10px;
    border-radius: 8px;
}
.dash-recent-empty {
    text-align: center; padding: 40px 20px;
    color: var(--admin-text-secondary); font-size: 14px;
}

/* 主内容 */
.admin-main {
    flex: 1; padding: 28px 32px; overflow-x: auto;
    background: var(--admin-bg); position: relative;
    min-height: 600px;
}
.tab-panel {
    display: block !important;
    opacity: 0; transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    position: absolute; top: 0; left: 0; width: 100%;
}
.tab-panel.active {
    opacity: 1; transform: translateY(0);
    pointer-events: auto; position: relative;
}

/* 面板头 */
.panel-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 24px; padding: 0 0 16px 0;
    border-bottom: 2px solid #e0e4e8;
}
.panel-header h3 {
    font-size: 18px; color: #1a1a2e; font-weight: 700;
    display: flex; align-items: center; gap: 8px;
}
.panel-header h3::before { content: '▎'; color: var(--admin-primary); font-size: 20px; }
.panel-body { background: var(--admin-card); border-radius: 12px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }

/* 数据表格 */
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }

/* 筛选栏 */
.filter-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin-bottom: 16px; padding: 12px 14px;
    background: #f8f9fb; border: 1px solid #e8ecf2; border-radius: 10px;
}
.filter-input {
    height: 34px; padding: 0 12px; font-size: 13px;
    border: 1px solid #d9e0ea; border-radius: 8px; background: #fff;
    outline: none; transition: border-color .2s;
}
.filter-input:focus { border-color: var(--admin-primary); }
.filter-input[type="text"] { width: 200px; }
.filter-input[type="date"] { width: 150px; }

/* 筛选栏按钮（浅色背景上的正常样式，替代深色 header 的 btn-outline-dark） */
.filter-bar .btn {
    height: 34px; line-height: 20px; padding: 0 14px;
    font-size: 13px; border-radius: 8px; cursor: pointer;
    border: 1px solid transparent; transition: all .2s;
}
.btn-filter {
    background: #fff; color: #444;
    border: 1px solid #d9e0ea;
}
.btn-filter:hover {
    border-color: var(--admin-primary); color: var(--admin-primary);
    background: #e8f0fe;
}
.btn-filter-outline {
    background: #fff; color: var(--admin-primary);
    border: 1px solid var(--admin-primary);
}
.btn-filter-outline:hover {
    background: #e8f0fe;
}
.btn-filter-danger {
    background: #fff; color: var(--danger, #e74c3c);
    border: 1px solid var(--danger, #e74c3c);
}
.btn-filter-danger:hover {
    background: #fdecea; color: #c0392b;
}
.filter-bar .btn:disabled {
    opacity: 0.45; cursor: not-allowed;
    color: #999; background: #fff;
    border-color: #d9e0ea;
}
.filter-divider {
    width: 1px; height: 22px; background: #dde3ea; margin: 0 2px;
}
.appt-check-col {
    width: 36px; text-align: center; padding: 8px 6px !important;
}
.appt-check-col input[type="checkbox"] {
    width: 15px; height: 15px; cursor: pointer; accent-color: var(--admin-primary);
}
.data-table th {
    background: #f5f6f8; padding: 12px 14px; text-align: left;
    font-weight: 600; color: #555; border-bottom: 2px solid #e0e4e8;
    white-space: nowrap; font-size: 12px; text-transform: uppercase; letter-spacing: 0.3px;
}
.data-table td {
    padding: 12px 14px; border-bottom: 0.5px solid var(--admin-separator);
    vertical-align: middle; color: var(--admin-text-secondary);
}
.data-table tbody tr { transition: background .15s; }
.data-table tbody tr:hover { background: var(--admin-bg-secondary); }
.data-table .avatar-cell {
    width: 44px; height: 44px; border-radius: 8px; object-fit: cover;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.data-table .td-desc { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table .actions { display: flex; gap: 6px; white-space: nowrap; }
.data-table .actions .btn { font-size: 12px; padding: 5px 12px; border-radius: 6px; }

/* 按钮增强 */
.btn { padding: 8px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: 5px; }
.btn-primary { background: var(--admin-primary); color: #fff; box-shadow: 0 2px 8px rgba(0,122,255,0.2); }
.btn-primary:hover { background: var(--admin-primary-dark); box-shadow: 0 4px 14px rgba(0,122,255,0.3); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-cancel { background: var(--admin-bg-secondary); color: var(--admin-text-secondary); }
.btn-cancel:hover { background: var(--admin-border); }
.btn-outline:hover { background: var(--admin-primary-light); }
.btn-danger { background: var(--admin-danger); color: #fff; box-shadow: 0 2px 8px rgba(255,59,48,0.2); }
.btn-danger:hover { background: #cc1a1a; box-shadow: 0 4px 14px rgba(255,59,48,0.3); }
.btn-success { background: #27ae60; color: #fff; box-shadow: 0 2px 8px rgba(39,174,96,0.2); }
.btn-success:hover { background: #219a52; box-shadow: 0 4px 14px rgba(39,174,96,0.3); }
.btn-export { background: var(--admin-primary); color: #fff; box-shadow: 0 2px 8px rgba(0,122,255,0.2); }
.btn-export:hover { background: var(--admin-primary-dark); }

/* 概况预览 Apple 风格 */
.info-card {
    background: var(--admin-card); border-radius: var(--apple-radius); padding: 20px 24px;
    margin-bottom: 14px; border: 1px solid var(--admin-border); transition: all .2s;
}
.info-card:hover { border-color: var(--admin-border-strong); }
.info-card h4 { font-size: 15px; margin-bottom: 10px; color: var(--admin-text); font-weight: 600; }
.info-card p { font-size: 14px; color: var(--admin-text-secondary); line-height: 1.8; margin-bottom: 4px; }

/* ========== Apple 风格弹窗 ========== */
.admin-modal {
    max-width: 640px; max-height: 85vh; overflow-y: auto;
    text-align: left; padding: 32px; border-radius: var(--apple-radius-xl);
    background: #fff; border: none;
    box-shadow: 0 8px 40px rgba(0,0,0,0.12), 0 0 0 0.5px rgba(0,0,0,0.08);
}
.admin-modal h3 {
    text-align: center; margin-bottom: 24px; font-size: 17px; font-weight: 600;
    color: var(--admin-text);
}
.admin-modal .form-group { margin-bottom: 14px; }
.admin-modal .form-group label {
    display: block; font-size: 12px; font-weight: 500;
    margin-bottom: 5px; color: var(--admin-text-secondary);
    letter-spacing: 0.1px;
}
.admin-modal .form-group input,
.admin-modal .form-group textarea,
.admin-modal .form-group select {
    width: 100%; padding: 10px 14px; border: 1px solid var(--admin-border-strong);
    border-radius: var(--apple-radius); font-size: 14px; font-family: inherit;
    transition: all .2s ease; background: #fff; color: var(--admin-text);
    box-sizing: border-box;
}
.admin-modal .form-group input:focus,
.admin-modal .form-group textarea:focus,
.admin-modal .form-group select:focus {
    outline: none; border-color: var(--admin-primary);
    box-shadow: 0 0 0 2px var(--admin-primary-glow); background: #fff;
}
.admin-modal .form-group textarea { resize: vertical; min-height: 80px; line-height: 1.6; }
.modal-actions {
    display: flex; gap: 10px; justify-content: flex-end;
    margin-top: 24px; padding-top: 16px;
    border-top: 0.5px solid var(--admin-separator);
}

/* 空状态 */
.empty-state {
    text-align: center; padding: 60px 20px; color: #bbb;
    font-size: 14px;
}
.empty-state::before {
    content: '📭'; display: block; font-size: 48px; margin-bottom: 12px;
}

/* ========== 科室图标选择器 - Apple 风格 ========== */
.dept-icon-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 10px; max-height: 320px; overflow-y: auto;
    padding: 12px; border: 1px solid var(--admin-border);
    border-radius: var(--apple-radius-lg); background: var(--admin-bg-secondary);
    margin-top: 6px;
}
.dept-icon-option {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 10px 6px; border: 1px solid transparent;
    border-radius: var(--apple-radius); cursor: pointer; transition: all .2s ease;
    background: #fff;
}
.dept-icon-option:hover {
    border-color: rgba(0,122,255,0.18); background: var(--admin-primary-light);
}
.dept-icon-option.selected {
    border-color: var(--admin-primary); background: var(--admin-primary-light);
}
.dept-icon-option img {
    width: 44px; height: 44px; border-radius: var(--apple-radius); object-fit: contain;
}
.dept-icon-option span {
    font-size: 12px; color: var(--admin-text-secondary); text-align: center;
    line-height: 1.3; word-break: keep-all;
}
.dept-icon-option.selected span { color: var(--admin-primary); font-weight: 600; }

/* 指南管理卡片 Apple 风格 */
.guide-card {
    background: var(--admin-card); border-radius: var(--apple-radius); padding: 18px 22px;
    margin-bottom: 12px; border: 1px solid var(--admin-border); transition: all .2s;
}
.guide-card:hover { border-color: var(--admin-border-strong); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }

/* 响应式 */
@media (max-width: 768px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar {
        width: 100%; border-right: none; padding: 4px 0;
        display: flex; overflow-x: auto; -webkit-overflow-scrolling: touch;
    }
    .admin-sidebar::before { display: none; }
    .sidebar-item {
        white-space: nowrap; border-left: none; border-bottom: 3px solid transparent;
        padding: 10px 14px; flex-shrink: 0;
    }
    .sidebar-item::after { display: none; }
    .sidebar-item.active {
        border-left-color: transparent; border-bottom-color: var(--admin-primary);
    }
    .admin-main { padding: 16px; }
    .panel-body { padding: 16px; }
    .data-table { font-size: 12px; }
    .data-table th, .data-table td { padding: 8px 10px; }
    .news-card-grid { grid-template-columns: 1fr; }
}

/* ========== 新闻管理卡片布局 ========== */
.news-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}
.news-admin-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--admin-border);
    transition: box-shadow .2s, transform .2s;
}
.news-admin-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-color: var(--admin-border-strong);
}
.news-admin-img {
    width: 100%; height: 160px; overflow: hidden;
    background: var(--admin-bg-secondary); position: relative;
}
.news-admin-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.news-img-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.news-admin-body {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.news-admin-date {
    font-size: 11px;
    color: var(--admin-primary);
    font-weight: 600;
    background: var(--admin-primary-light);
    padding: 3px 10px; border-radius: var(--apple-radius-sm);
    display: inline-block; align-self: flex-start;
}
.news-admin-title {
    font-size: 15px; font-weight: 600; color: var(--admin-text);
    line-height: 1.4; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.news-admin-summary {
    font-size: 13px; color: var(--admin-text-secondary); line-height: 1.5; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
    flex: 1;
}
.news-admin-actions {
    display: flex; gap: 8px; margin-top: 4px; padding-top: 8px;
    border-top: 0.5px solid var(--admin-separator);
}

/* ========== Apple 风格专家管理卡片 ========== */
.doctor-card-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px;
}
.doctor-admin-card {
    background: var(--admin-card); border: 1px solid var(--admin-border);
    border-radius: var(--apple-radius-xl); padding: 24px;
    display: flex; gap: 18px; align-items: flex-start;
    transition: all .3s ease; position: relative; overflow: hidden;
}
.doctor-admin-card::before {
    content: ''; position: absolute; left: 0; top: 0; bottom: 0;
    width: 4px; background: var(--admin-primary);
    border-radius: 4px 0 0 4px;
}
.doctor-admin-card:hover {
    border-color: var(--admin-border-strong);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.doc-card-avatar {
    flex-shrink: 0; width: 72px; height: 72px; border-radius: 50%;
    overflow: hidden; background: var(--admin-bg-secondary);
    display: flex; align-items: center; justify-content: center;
}
.doc-card-avatar img { width: 100%; height: 100%; object-fit: cover; }
.doc-card-body h4 { font-size: 16px; font-weight: 600; color: var(--admin-text); margin: 0 0 8px; }
.doc-badge-title {
    display: inline-block; background: var(--admin-primary-light);
    color: var(--admin-primary); font-size: 12px; font-weight: 500;
    padding: 3px 10px; border-radius: var(--apple-radius-sm);
}
.doc-badge-dept {
    display: inline-block; background: rgba(52,199,89,0.1);
    color: #34c759; font-size: 12px; font-weight: 500;
    padding: 3px 10px; border-radius: var(--apple-radius-sm);
}
.doc-card-desc { font-size: 13px; color: var(--admin-text-secondary); line-height: 1.5; margin: 0; }
.doc-card-schedule {
    font-size: 12px; color: var(--admin-primary); margin-top: 8px;
    padding: 6px 10px; background: var(--admin-primary-light);
    border-radius: var(--apple-radius-sm); display: inline-block;
}
.avatar-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--admin-bg-secondary);
    color: var(--admin-text-secondary);
    font-size: 24px;
}
.doc-card-body { flex: 1; min-width: 0; }
.doc-card-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.doc-card-actions {
    display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; margin-top: 4px;
}

/* ========== Apple 风格上传区域 ========== */
.upload-area {
    border: 1px solid var(--admin-border);
    border-radius: var(--apple-radius-lg); padding: 16px 20px;
    margin-top: 6px; display: flex; align-items: center; gap: 16px;
    background: #fafafa; transition: all .25s ease;
}
.upload-area:hover { border-color: var(--admin-primary-glow); background: rgba(0,122,255,0.02); }
.upload-preview-wrap {
    flex-shrink: 0; width: 72px; height: 72px; border-radius: 50%;
    overflow: hidden; background: var(--admin-bg-secondary);
    display: flex; align-items: center; justify-content: center;
}
.upload-preview-wrap img { width: 100%; height: 100%; object-fit: cover; }
.upload-actions { display: flex; flex-direction: column; gap: 8px; }
.upload-btn {
    cursor: pointer; display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 500; color: var(--admin-primary);
}
.upload-btn:hover { opacity: 0.8; }
.upload-hint { font-size: 12px; color: var(--admin-text-tertiary); }

/* ========== Apple 风格医院概况面板 ========== */
.about-admin-card {
    background: var(--admin-card); border: 1px solid var(--admin-border);
    border-radius: var(--apple-radius-xl); overflow: hidden; margin-bottom: 20px;
}
.about-admin-header {
    padding: 14px 20px; background: var(--admin-bg-secondary);
    border-bottom: 0.5px solid var(--admin-separator);
    display: flex; justify-content: space-between; align-items: center;
}
.about-admin-header h4 { font-size: 15px; font-weight: 600; color: var(--admin-text); margin: 0; }
.about-admin-label {
    font-size: 12px; background: var(--admin-primary-light);
    color: var(--admin-primary); padding: 3px 10px;
    border-radius: var(--apple-radius-sm); font-weight: 600;
}
.about-admin-body { padding: 20px; }
.about-admin-para {
    font-size: 14px; color: var(--admin-text-secondary);
    line-height: 1.8; margin-bottom: 12px;
}
.about-admin-features-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 20px; }
.about-admin-feature {
    display: flex; align-items: center; gap: 12px; padding: 14px;
    background: var(--admin-bg-secondary); border-radius: var(--apple-radius);
    border: 1px solid var(--admin-border);
}
.about-admin-ficon {
    font-size: 30px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    flex-shrink: 0;
}
.about-admin-finfo {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.about-admin-finfo strong {
    font-size: 14px;
    color: #1a1a2e;
}
.about-admin-finfo span {
    font-size: 12px;
    color: #888;
}

/* 编辑 - 段落移除按钮 */
.about-edit-para {
    display: flex; gap: 8px; align-items: center; margin-bottom: 8px;
}
.about-edit-para input {
    flex: 1; padding: 8px 12px;
    border: 1px solid var(--admin-border-strong); border-radius: var(--apple-radius-sm);
    font-size: 13px; background: #fff; font-family: inherit;
    color: var(--admin-text); transition: all .2s;
}
.about-edit-para input:focus {
    border-color: var(--admin-primary); outline: none;
    box-shadow: 0 0 0 2px var(--admin-primary-glow);
}
.about-remove-btn {
    padding: 4px 8px !important; font-size: 16px !important;
    line-height: 1; flex-shrink: 0;
}

/* 编辑 - 特色栏目 Apple 风格 */
.about-edit-feature {
    border: 1px solid var(--admin-border);
    border-radius: var(--apple-radius); padding: 16px;
    margin-bottom: 12px; background: var(--admin-bg-secondary);
}
.about-edit-feature legend {
    font-size: 12px; color: var(--admin-text-secondary); font-weight: 600; padding: 0 8px;
}
.about-remove-fbtn {
    background: var(--admin-danger); color: #fff;
    border: none; border-radius: 50%; width: 20px; height: 20px;
    font-size: 12px; cursor: pointer; margin-left: 6px;
    display: inline-flex; align-items: center; justify-content: center;
}
.add-inline-btn {
    margin-left: 8px; font-size: 12px !important; padding: 4px 12px !important;
    border-radius: var(--apple-radius-sm);
}
.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}

/* ========== 双列表单 ========== */
.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 500px) {
    .form-row-2 { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr; }
    .doctor-card-grid { grid-template-columns: 1fr; }
    .doctor-admin-card { flex-wrap: wrap; }
    .doc-card-actions { flex-direction: row; }
    .dept-admin-grid { grid-template-columns: 1fr; }
    .dept-admin-card { flex-wrap: wrap; }
    .dept-card-actions { flex-direction: row; }
    .about-admin-features-grid { grid-template-columns: 1fr; }
    .chk-admin-grid { grid-template-columns: 1fr; }
    .pkg-edit-fields { grid-template-columns: 1fr 1fr; }
    .chk-upload-inner { flex-direction: column; align-items: stretch; }
    .chk-upload-preview { width: 100%; height: 100px; }
}

/* ========== 科室管理卡片 ========== */
.dept-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}
.dept-admin-card {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    padding: 22px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.dept-admin-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}
.dept-admin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.1);
    border-color: var(--primary);
}
.dept-card-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 14px;
    overflow: hidden;
    background: #e8f0fe;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e8eaed;
}
.dept-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dept-card-info {
    flex: 1;
    min-width: 0;
}
.dept-card-info h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
}
.dept-card-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.dept-detail-badge {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 6px;
}
.dept-card-meta {
    font-size: 11px;
    color: #aaa;
    margin-top: 4px;
}
.dept-card-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-shrink: 0;
}

/* ========== 科室图标选择器 ========== */
.dept-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
    padding: 8px;
    border: 1px solid #eee;
    border-radius: 10px;
    background: #fafafa;
    max-height: 200px;
    overflow-y: auto;
}
.dept-icon-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: #fff;
}
.dept-icon-option:hover {
    border-color: var(--primary);
    background: #e8f0fe;
}
.dept-icon-option.selected {
    border-color: var(--primary);
    background: #d4e4fd;
}
.dept-icon-option img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 6px;
}
.dept-icon-option span {
    font-size: 10px;
    color: #666;
    text-align: center;
    line-height: 1.2;
}

/* 科室编辑弹窗图标预览 */
.dept-icon-preview {
    width: 64px;
    height: 64px;
    border-radius: 14px;
}

/* ========== 体检页面管理 ========== */

/* 预览卡片网格 */
.chk-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.chk-admin-card {
    background: #fff;
    border: 1px solid #e8ecf1;
    border-radius: 16px;
    padding: 26px;
    transition: all 0.3s ease;
    position: relative; overflow: hidden;
}
.chk-admin-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb, #10b981);
    opacity: 0; transition: opacity 0.3s;
}
.chk-admin-card:hover {
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    border-color: #d0d7e0;
}
.chk-admin-card:hover::before { opacity: 1; }
.chk-admin-card.chk-admin-wide {
    grid-column: 1 / -1;
}
.chk-admin-card h4 {
    font-size: 15px; font-weight: 700;
    color: #0f172a; margin: 0 0 16px;
    display: flex; align-items: center; gap: 10px;
}
.chk-card-icon {
    font-size: 16px; width: 34px; height: 34px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-radius: 10px; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(37,99,235,0.08);
}
/* 各类型图标颜色 */
.chk-admin-card:nth-child(1) .chk-card-icon { background: linear-gradient(135deg, #eff6ff, #dbeafe); }
.chk-admin-card:nth-child(2) .chk-card-icon { background: linear-gradient(135deg, #ecfdf5, #d1fae5); }
.chk-admin-card:nth-child(3) .chk-card-icon { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.chk-admin-card:nth-child(4) .chk-card-icon { background: linear-gradient(135deg, #fce7f3, #fbcfe8); }
.chk-admin-badge {
    font-size: 11px; font-weight: 600;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff; padding: 3px 12px;
    border-radius: 12px; margin-left: auto;
    box-shadow: 0 2px 8px rgba(37,99,235,0.15);
}
/* 统计概览条 */
.chk-stats-bar {
    display: flex; gap: 12px; margin-bottom: 10px;
    flex-wrap: wrap;
}
.chk-stat-item {
    flex: 1; min-width: 80px;
    background: #f8fafc; border: 1px solid #e2e8f0;
    border-radius: 10px; padding: 10px 14px; text-align: center;
}
.chk-stat-num {
    font-size: 22px; font-weight: 800; color: #2563eb; line-height: 1;
}
.chk-stat-label {
    font-size: 11px; color: #94a3b8; margin-top: 3px;
}
.chk-admin-row {
    display: flex; align-items: center;
    padding: 9px 0; border-bottom: 1px solid #f8fafc;
    font-size: 13px;
}
.chk-admin-row:last-child { border-bottom: none; }
.chk-admin-key {
    width: 80px; color: #94a3b8;
    font-weight: 500; flex-shrink: 0;
    font-size: 12px;
}
.chk-admin-val {
    color: #334155; font-weight: 600;
}
.chk-admin-img {
    border-radius: 10px; overflow: hidden;
    margin-bottom: 14px; border: 1px solid #f1f5f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.chk-admin-img img {
    width: 100%; height: 130px;
    object-fit: cover; display: block;
}
.chk-admin-desc {
    font-size: 13px; color: #475569; line-height: 1.8; margin: 0;
}
.chk-admin-notice {
    white-space: pre-wrap; font-family: inherit;
    color: #475569; font-size: 13px; line-height: 1.8;
    margin: 0; background: #f8fafc;
    padding: 14px 16px; border-radius: 10px;
    border: 1px solid #f1f5f9;
}
.chk-admin-empty {
    color: #cbd5e1; font-size: 13px;
    text-align: center; padding: 20px;
}

/* 预览套餐卡片 */
.chk-prev-pkg {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
    transition: all 0.25s;
    position: relative;
}
.chk-prev-pkg:hover {
    border-color: #cbd5e1;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}
.chk-prev-phead {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap; margin-bottom: 8px;
}
.chk-prev-price {
    font-size: 20px; font-weight: 800;
    letter-spacing: -0.5px;
}
.chk-prev-original {
    font-size: 12px; color: #94a3b8;
    text-decoration: line-through;
}
.chk-prev-pname {
    font-size: 14px; font-weight: 700; color: #1e293b;
    margin-left: auto;
}
.chk-prev-pdesc {
    font-size: 12px; color: #64748b;
    line-height: 1.7; margin: 0 0 10px;
}
.chk-prev-items {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.chk-prev-item {
    display: flex; align-items: center; gap: 5px;
    background: #f1f5f9; border-radius: 6px;
    padding: 4px 10px; font-size: 11px;
}
.chk-prev-iname { font-weight: 600; color: #334155; }
.chk-prev-iprice { color: #64748b; }
.chk-prev-idesc { color: #94a3b8; font-size: 10px; }

/* ========== 体检编辑弹窗 — 侧边栏布局 ========== */

/* 宽模态框 — 体检编辑专用 */
.chk-edit-modal-wide {
    max-width: 960px !important;
    height: 85vh;
    max-height: 85vh;
    padding: 0 !important;
    overflow: hidden !important;
    display: flex; flex-direction: column;
}
.chk-edit-modal-wide h3 {
    padding: 28px 32px 0;
    text-align: left !important;
    margin-bottom: 0 !important;
    flex-shrink: 0;
}
.chk-edit-modal-wide #editModalBody {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
}

/* 主布局：侧边栏 + 内容区 */
.chk-edit-layout {
    display: flex; flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* ---- 侧边导航 ---- */
.chk-edit-sidebar {
    width: 200px;
    flex-shrink: 0;
    background: #f2f2f7;
    border-right: 1px solid #e5e5ea;
    overflow-y: auto;
    padding: 8px 0;
}
.chk-edit-sidebar::-webkit-scrollbar { width: 4px; }
.chk-edit-sidebar::-webkit-scrollbar-track { background: transparent; }
.chk-edit-sidebar::-webkit-scrollbar-thumb { background: #d1d1d6; border-radius: 2px; }

/* 侧边栏分组标题 */
.chk-nav-group-title {
    font-size: 11px; font-weight: 700;
    color: #8e8e93; text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 20px 6px;
}

/* 侧边栏导航项 */
.chk-edit-nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 16px;
    margin: 1px 8px;
    font-size: 13px; font-weight: 500; color: #6e6e73;
    background: transparent; border: none;
    border-radius: 8px; cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left; width: calc(100% - 16px);
    font-family: inherit; user-select: none;
    position: relative;
}
.chk-edit-nav-item:hover {
    color: #1d1d1f;
    background: rgba(0,0,0,0.04);
    transform: translateX(2px);
}
.chk-edit-nav-item:active { transform: scale(0.97); }
.chk-edit-nav-item.active {
    color: #007aff;
    background: rgba(0,122,255,0.1);
    font-weight: 600;
    padding-left: 18px;
}
.chk-edit-nav-item .nav-icon {
    width: 22px; height: 22px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
    border-radius: 6px;
    transition: transform 0.2s ease;
}
.chk-edit-nav-item.active .nav-icon {
    color: #007aff;
    transform: scale(1.1);
}

/* 侧边栏底部分隔 */
.chk-nav-sep {
    height: 1px; background: #e5e5ea;
    margin: 8px 16px;
}

/* ---- 内容区域 ---- */
.chk-edit-content {
    flex: 1; min-width: 0;
    overflow-y: auto;
    padding: 24px 32px 32px;
    background: #ffffff;
    position: relative;
}
.chk-edit-content::-webkit-scrollbar { width: 5px; }
.chk-edit-content::-webkit-scrollbar-track { background: transparent; }
.chk-edit-content::-webkit-scrollbar-thumb { background: #d1d1d6; border-radius: 3px; }

/* 编辑区块 — 苹果风格 + 切换动画 */
.chk-edit-section {
    display: block !important;
    opacity: 0; transform: translateY(12px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
    position: absolute; top: 0; left: 0; width: 100%;
    border: none; border-radius: 0; padding: 0; margin-bottom: 0;
    background: transparent;
}
.chk-edit-section.chk-edit-section-active {
    opacity: 1; transform: translateY(0);
    pointer-events: auto; position: relative;
}
.chk-edit-section legend {
    display: none; /* 用内容区标题代替 */
}

/* 内容区标题 */
.chk-section-title {
    font-size: 20px; font-weight: 700;
    color: #1d1d1f; margin: 0 0 6px;
    letter-spacing: -0.3px;
}
.chk-section-desc {
    font-size: 13px; color: #8e8e93;
    margin: 0 0 24px;
    line-height: 1.5;
}

/* 表单字段 — Apple 风格 */
.chk-edit-section .form-group {
    margin-bottom: 18px;
}
.chk-edit-section .form-group label {
    display: block; font-size: 12px;
    font-weight: 600; color: #6e6e73;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}
.chk-edit-section textarea {
    width: 100%; padding: 10px 12px;
    border: 1px solid #d1d1d6; border-radius: 10px;
    font-size: 14px; resize: vertical;
    font-family: inherit; background: #ffffff;
    color: #1d1d1f;
    transition: all 0.2s ease;
    line-height: 1.6;
}
.chk-edit-section textarea:focus {
    border-color: #007aff; outline: none;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}
.chk-edit-section input[type="text"],
.chk-edit-section input[type="number"],
.chk-edit-section input[type="color"],
.chk-edit-section input:not([type]) {
    padding: 10px 12px;
    border: 1px solid #d1d1d6;
    border-radius: 10px; font-size: 14px;
    background: #ffffff; color: #1d1d1f;
    transition: all 0.2s ease;
    font-family: inherit;
}
.chk-edit-section input[type="color"] {
    padding: 4px 8px;
    height: 38px;
    width: 60px;
    cursor: pointer;
}
.chk-edit-section input:focus {
    border-color: #007aff; outline: none;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}
.chk-edit-section select {
    padding: 10px 12px;
    border: 1px solid #d1d1d6;
    border-radius: 10px; font-size: 14px;
    background: #ffffff; color: #1d1d1f;
    transition: all 0.2s ease;
    font-family: inherit;
    cursor: pointer;
}
.chk-edit-section select:focus {
    border-color: #007aff; outline: none;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.12);
}

/* 保存按钮栏 — 固定在底部 */
.chk-edit-save-bar {
    display: flex; justify-content: flex-end; gap: 12px;
    padding: 16px 32px;
    border-top: 1px solid #e5e5ea;
    background: #f9f9fb;
    flex-shrink: 0;
}
.chk-edit-save-bar .btn-primary {
    background: #007aff; border: none;
    color: #fff; font-size: 14px; font-weight: 600;
    padding: 10px 28px; border-radius: 10px;
    cursor: pointer; transition: all 0.2s;
    font-family: inherit;
}
.chk-edit-save-bar .btn-primary:hover {
    background: #0064d6;
}
.chk-edit-save-bar .btn-cancel {
    background: transparent; border: 1px solid #d1d1d6;
    color: #6e6e73; font-size: 14px; font-weight: 500;
    padding: 10px 28px; border-radius: 10px;
    cursor: pointer; transition: all 0.2s;
    font-family: inherit;
}
.chk-edit-save-bar .btn-cancel:hover {
    background: #f2f2f7; border-color: #aeaeb2;
}

/* 预览按钮（置于保存栏左侧） */
.chk-edit-save-bar .btn-preview {
    margin-right: auto;
    background: #ffffff; border: 1px solid #d1d1d6;
    color: #1d1d1f; font-size: 14px; font-weight: 600;
    padding: 10px 24px; border-radius: 10px;
    cursor: pointer; transition: all 0.2s;
    font-family: inherit;
}
.chk-edit-save-bar .btn-preview:hover {
    background: #f2f2f7; border-color: #aeaeb2;
}
.chk-edit-save-bar .btn-preview.on {
    background: #007aff; border-color: #007aff; color: #ffffff;
}

/* ===== 实时预览面板 ===== */
.chk-edit-modal-wide.chk-preview-on {
    max-width: 1440px !important;
}
.chk-preview-pane {
    display: none;
}
#editModalBody.chk-preview-on .chk-preview-pane {
    display: flex;
    flex-direction: column;
    width: 46%;
    min-width: 440px;
    flex-shrink: 0;
    border-left: 1px solid #e5e5ea;
    background: #f5f5f7;
    overflow: hidden;
}
.chk-preview-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px;
    background: #ffffff;
    border-bottom: 1px solid #e5e5ea;
    font-size: 13px; font-weight: 600; color: #1d1d1f;
    flex-shrink: 0;
}
.chk-preview-close {
    background: none; border: none;
    font-size: 20px; line-height: 1;
    color: #6e6e73; cursor: pointer;
    padding: 2px 6px; border-radius: 6px;
    font-family: inherit;
}
.chk-preview-close:hover {
    background: #f2f2f7; color: #1d1d1f;
}
.chk-preview-frame {
    flex: 1; width: 100%; border: none; background: #ffffff;
}

/* 响应式 — 移动端侧边栏折叠为顶部横条 */
@media (max-width: 768px) {
    .chk-edit-layout {
        flex-direction: column;
    }
    .chk-edit-sidebar {
        width: 100%; flex-shrink: 1;
        display: flex; overflow-x: auto;
        padding: 6px 12px;
        border-right: none; border-bottom: 1px solid #e5e5ea;
    }
    .chk-edit-sidebar::-webkit-scrollbar { height: 3px; }
    .chk-edit-nav-item {
        flex-shrink: 0; white-space: nowrap;
        padding: 7px 12px; margin: 0 2px;
        font-size: 12px; width: auto;
    }
    .chk-nav-group-title { display: none; }
    .chk-nav-sep { display: none; }
    .chk-edit-content {
        padding: 20px 16px 24px;
    }
    .chk-edit-save-bar {
        padding: 12px 16px;
    }
    .form-row-2 { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr 1fr; }
}

/* 扩展区块：列表行与分隔线 */
.chk-edit-divider {
    height: 1px; background: #e2e8f0;
    margin: 18px 0;
}
.chk-list-row {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    padding: 10px; margin-bottom: 8px;
    border: 1px solid #e5e5ea; border-radius: 10px;
    background: #f9f9fb;
    transition: all 0.2s ease;
}
.chk-list-row:hover { border-color: #d1d1d6; background: #ffffff; }
.chk-list-row input {
    flex: 1; min-width: 0; padding: 7px 10px;
    border: 1px solid #d1d1d6; border-radius: 8px;
    font-size: 13px; background: #fff; font-family: inherit;
    transition: border-color 0.2s;
}
.chk-list-row input:focus { border-color: #007aff; outline: none; box-shadow: 0 0 0 3px rgba(0,122,255,0.1); }
.chk-list-row .btn { flex: 0 0 auto; }
.chk-stats-row input.chk-hs-num { flex: 0 0 70px; }
.chk-stats-row input.chk-hs-unit { flex: 0 1 130px; }
.chk-stats-row input.chk-hs-label { flex: 2 1 200px; }
.chk-rec-opt-row input.chk-rec-opt-val { flex: 0 1 150px; }
.chk-rec-opt-row input.chk-rec-opt-label { flex: 2 1 240px; }
.chk-gallery-row select {
    flex: 0 0 auto; padding: 7px 10px;
    border: 1.5px solid #e2e8f0; border-radius: 8px;
    font-size: 13px; background: #fff;
}
.chk-gallery-row input.chk-gallery-src { flex: 2 1 260px; }
.chk-gallery-row input.chk-gallery-caption { flex: 1 1 160px; }
.chk-expert-row input.chk-ex-tag { flex: 0 1 130px; }
.chk-expert-row input.chk-ex-name { flex: 0 1 90px; }
.chk-expert-row input.chk-ex-title { flex: 0 1 180px; }
.chk-expert-row input.chk-ex-avatar { flex: 2 1 240px; }
.chk-expert-row input.chk-ex-desc { flex: 3 1 280px; }
.chk-reading-row input.chk-rd-name { flex: 0 1 110px; }
.chk-reading-row input.chk-rd-range { flex: 0 1 150px; }
.chk-reading-row .chk-rd-warn {
    flex: 0 1 84px; display: flex; align-items: center; gap: 4px;
    font-size: 12px; color: #64748b; white-space: nowrap;
}
.chk-reading-row input.chk-rd-normal { flex: 1 1 190px; }
.chk-reading-row input.chk-rd-desc { flex: 2 1 260px; }
.chk-faq-row input.chk-fq-q { flex: 1 1 240px; }
.chk-faq-row input.chk-fq-a { flex: 2 1 320px; }
.chk-testi-row input.chk-ts-avatar { flex: 0 1 56px; text-align: center; }
.chk-testi-row input.chk-ts-bg { flex: 0 1 220px; }
.chk-testi-row input.chk-ts-name { flex: 0 1 90px; }
.chk-testi-row input.chk-ts-meta { flex: 0 1 150px; }
.chk-testi-row input.chk-ts-text { flex: 2 1 280px; }

/* 头像预览（专家图片 / 口碑圆形头像） */
.chk-avatar-preview {
    flex: 0 0 auto; width: 42px; height: 42px;
    border-radius: 50%; overflow: hidden;
    background: linear-gradient(135deg, #1a73e8, #4a90d9);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 17px; font-weight: 600;
    border: 2px solid #fff; box-shadow: 0 1px 4px rgba(15,23,42,0.14);
    flex-shrink: 0;
}
.chk-avatar-preview img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.chk-avatar-preview img:not([src]),
.chk-avatar-preview img[src=""] {
    visibility: hidden;
}

/* 图片上传行 */
.chk-upload-row {
    margin-bottom: 14px;
}
.chk-upload-row > label {
    font-size: 12px; font-weight: 600;
    color: #64748b; display: block;
    margin-bottom: 6px; text-transform: uppercase;
    letter-spacing: 0.5px;
}
.chk-upload-inner {
    display: flex; gap: 14px; align-items: center;
    border: 2px dashed #d0d5dd; border-radius: 12px;
    padding: 14px 16px; transition: all 0.2s;
    background: #fafbfc;
}
.chk-upload-inner:hover {
    border-color: #2563eb;
    background: #eff6ff;
}
.chk-upload-preview {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0f0f0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chk-upload-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.chk-upload-placeholder {
    font-size: 24px;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #f5f5f5;
}
.chk-upload-actions {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.chk-upload-url {
    padding: 5px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    width: 100%;
}

/* ========== 套餐编辑卡片 ========== */
.pkg-edit-card {
    border: 1px solid #e5e5ea;
    border-radius: 14px;
    margin-bottom: 16px;
    background: #f9f9fb;
    overflow: hidden;
    transition: all 0.25s;
}
.pkg-edit-card:hover {
    border-color: #d1d1d6;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.pkg-edit-head {
    display: flex; justify-content: space-between;
    align-items: center; padding: 12px 18px;
    background: #f2f2f7;
    border-bottom: 1px solid #e5e5ea;
}
.pkg-edit-label {
    font-size: 14px; font-weight: 700;
    color: #1d1d1f;
}
.pkg-edit-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 12px; padding: 16px 18px;
}
.pkg-edit-field { display: flex; flex-direction: column; gap: 4px; }
.pkg-edit-field label {
    font-size: 11px; color: #8e8e93;
    font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.3px;
}
.pkg-edit-field input {
    padding: 8px 10px;
    border: 1px solid #d1d1d6;
    border-radius: 8px; font-size: 13px;
    background: #fff; transition: border-color 0.2s;
}
.pkg-edit-field input:focus {
    border-color: #007aff; outline: none;
    box-shadow: 0 0 0 3px rgba(0,122,255,0.08);
}
.pkg-edit-full {
    grid-column: 1 / -1;
}
.pkg-edit-field.pkg-edit-full input {
    width: 100%;
}
.pkg-items-wrap {
    padding: 0 18px 16px;
}
.pkg-edit-subtitle {
    font-size: 12px; font-weight: 700;
    color: #64748b; margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e2e8f0;
}

/* 套餐子项目行 */
.pkg-item-sub-row {
    display: flex; gap: 8px; align-items: center;
    margin-bottom: 8px; padding: 8px 12px;
    background: #fff; border-radius: 8px;
    border: 1px solid #e8ecf1;
    transition: border-color 0.2s;
}
.pkg-item-sub-row:hover { border-color: #cbd5e1; }
.pkg-item-sub-row input.pkg-item-name {
    width: 120px; padding: 6px 10px;
    border: 1px solid #e2e8f0; border-radius: 6px;
    font-size: 12px; transition: border-color 0.2s;
}
.pkg-item-sub-row input.pkg-item-price {
    width: 60px; padding: 6px 8px;
    border: 1px solid #e2e8f0; border-radius: 6px;
    font-size: 12px; transition: border-color 0.2s;
}
.pkg-item-sub-row input.pkg-item-desc {
    flex: 1; min-width: 120px;
    padding: 6px 10px; border: 1px solid #e2e8f0;
    border-radius: 6px; font-size: 12px;
    transition: border-color 0.2s;
}
.pkg-item-sub-row input:focus {
    border-color: #2563eb; outline: none;
    box-shadow: 0 0 0 2px rgba(37,99,235,0.06);
}
.pkg-item-del {
    padding: 3px 8px !important;
    font-size: 14px !important; line-height: 1;
    flex-shrink: 0; border-radius: 6px !important;
}
.pkg-items-actions {
    display: flex; gap: 10px; align-items: center;
    flex-wrap: wrap; margin-top: 10px;
}
.pkg-add-item {
    padding: 6px 16px !important;
    font-size: 12px !important; border-radius: 8px !important;
}
.pkg-excel-btn {
    padding: 6px 16px !important;
    font-size: 12px !important; cursor: pointer;
    border-radius: 8px !important;
}
.pkg-export-btn {
    padding: 6px 16px !important;
    font-size: 12px !important; border-radius: 8px !important;
}
.pkg-color-row {
    display: flex; align-items: center; gap: 8px;
}
.pkg-color-row input[type="color"] {
    width: 38px; height: 34px; padding: 2px;
    border: 2px solid #d0d5dd; border-radius: 8px;
    cursor: pointer; background: #fff;
    transition: border-color 0.2s;
}
.pkg-color-row input[type="color"]:hover { border-color: var(--primary); }
.pkg-color-hex {
    font-size: 13px; font-weight: 600;
    color: #555; font-family: monospace;
    background: #f8fafc; padding: 4px 10px;
    border-radius: 6px; border: 1px solid #e2e8f0;
}
.pkg-color-presets {
    display: flex; gap: 6px; margin-top: 8px;
    flex-wrap: wrap;
}
.pkg-color-preset {
    width: 24px; height: 24px; border-radius: 50%;
    cursor: pointer; border: 2px solid transparent;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.pkg-color-preset:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}
.pkg-color-preset.active {
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.1);
}
.add-section-btn {
    margin-top: 10px;
    width: 100%;
    text-align: center;
    padding: 10px !important;
    font-size: 13px !important;
    font-weight: 500;
    border: 1.5px dashed #007aff !important;
    color: #007aff !important;
    border-radius: 10px !important;
    background: rgba(0,122,255,0.04) !important;
    cursor: pointer;
    transition: all 0.2s ease;
}
.add-section-btn:hover {
    background: rgba(0,122,255,0.08) !important;
    border-style: solid !important;
}

/* ========== 就诊指南管理 ========== */

/* 预览卡片网格 */
.gm-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
.gm-admin-card {
    background: #fff;
    border: 1px solid var(--admin-border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    transition: all 0.3s ease;
}
.gm-admin-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}
.gm-card-accent {
    width: 5px;
    flex-shrink: 0;
    border-radius: 3px 0 0 3px;
}
.gm-card-body {
    flex: 1;
    padding: 20px 22px;
    min-width: 0;
}
.gm-card-head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}
.gm-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.gm-card-titles {
    flex: 1;
    min-width: 0;
}
.gm-card-titles h4 {
    font-size: 17px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 4px;
}
.gm-card-titles p {
    font-size: 13px;
    color: #888;
    margin: 0;
}
.gm-edit-btn {
    flex-shrink: 0;
    align-self: center;
}
.gm-card-sections {
    margin-bottom: 10px;
}
.gm-sections-count {
    font-size: 13px;
    font-weight: 600;
}

/* 预览段落列表 */
.gm-psections-wrap {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.gm-psection {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 8px 10px;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}
.gm-psection-index {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e8f0fe;
    color: #1a73e8;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.gm-psection-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gm-psection-title {
    font-size: 13px;
    color: #333;
}
.gm-psection-preview {
    font-size: 11px;
    color: #aaa;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ========== 编辑弹窗 ========== */
.gm-edit-wrap {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 4px;
}
.gm-edit-section {
    border: 1px solid #e0e3e7;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
    background: #fafbfc;
    transition: border-color 0.2s;
}
.gm-edit-section:hover { border-color: #b0b8c1; }
.gm-edit-sec-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.gm-edit-sec-num {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    padding: 3px 10px;
    border-radius: 10px;
}
.gm-sec-delete {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 6px;
}
.gm-edit-sec-head .gm-sec-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.gm-sec-move {
    background: none;
    border: 1px solid #d9e0ea;
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    font-size: 12px;
    padding: 3px 7px;
    transition: all .15s;
    line-height: 1;
}
.gm-sec-move:hover {
    background: #e8f0fe;
    border-color: var(--admin-primary);
    color: var(--admin-primary);
}
.gm-sec-move:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.gm-edit-section.dragging {
    opacity: 0.5;
    border-style: dashed;
    border-color: var(--admin-primary);
}
.gm-edit-section.drag-over {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 2px rgba(26,115,232,0.15);
}
.gm-sec-drag-handle {
    cursor: grab;
    color: #bbb;
    font-size: 14px;
    padding: 2px 4px;
    line-height: 1;
}
.gm-sec-drag-handle:active {
    cursor: grabbing;
}
.gm-edit-banner {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: 12px;
    margin-bottom: 16px; color: #fff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.gm-edit-banner-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: rgba(255,255,255,0.22);
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.gm-edit-banner-meta { display: flex; flex-direction: column; min-width: 0; }
.gm-edit-banner-meta strong { font-size: 16px; font-weight: 700; line-height: 1.3; }
.gm-edit-banner-meta span { font-size: 12px; opacity: 0.92; line-height: 1.4; margin-top: 2px; }

.gm-sec-preview {
    margin-top: 8px;
    padding: 8px 12px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #eef0f4;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    max-height: 80px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.gm-sec-preview-label {
    font-size: 10px; font-weight: 700;
    color: var(--admin-primary);
    letter-spacing: 0.5px;
}
.gm-sec-preview-text { color: #666; }
.gm-sec-preview:empty {
    display: none;
}

/* ========== 统计数据卡片预览 ========== */
.stat-cards-preview {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 0 4px;
}
.s-card {
    width: 160px;
    text-align: center;
    padding: 20px 14px 18px;
    border-radius: 16px;
    border: 2px solid;
    transition: transform 0.25s, box-shadow 0.25s;
    cursor: default;
}
.s-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.s-card-num {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
.s-card-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* ========== Emoji 输入框 + 选择器 ========== */
.emoji-input-wrap {
    display: flex;
    gap: 6px;
    align-items: center;
}
.emoji-input-wrap input {
    flex: 1;
    min-width: 0;
}
.emoji-pick-btn {
    width: 36px; height: 36px;
    border: 1px solid var(--admin-border);
    border-radius: var(--apple-radius-sm);
    background: var(--admin-bg-secondary); cursor: pointer;
    font-size: 16px; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; flex-shrink: 0;
}
.emoji-pick-btn:hover {
    background: var(--admin-primary-light);
    border-color: var(--admin-primary);
}

/* Emoji 弹窗 */
.emoji-picker-pop {
    display: none;
    position: absolute;
    z-index: 10000;
    width: 300px;
    max-height: 260px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    overflow: hidden;
}
.emoji-picker-arrow {
    display: none;
}
.emoji-picker-inner {
    max-height: 252px;
    overflow-y: auto;
    padding: 10px 12px;
}
.emoji-group {
    margin-bottom: 10px;
}
.emoji-group:last-child {
    margin-bottom: 0;
}
.emoji-group-label {
    font-size: 11px;
    color: #999;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.5px;
}
.emoji-group-items {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.emoji-item {
    width: 34px;
    height: 34px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    padding: 0;
}
.emoji-item:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
}
.emoji-item:active {
    transform: scale(0.9);
}

.gm-sec-title {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 8px;
    box-sizing: border-box;
}
.gm-sec-content {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}
.gm-add-section {
    margin-top: 8px;
    width: 100%;
    text-align: center;
    padding: 8px !important;
    font-size: 13px !important;
    border-style: dashed !important;
}

@media (max-width: 768px) {
    .gm-admin-grid { grid-template-columns: 1fr; }
}

/* ========== Apple 风格表单分区 ========== */
.form-section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 11px; font-weight: 600;
    color: var(--admin-text-secondary);
    margin: 24px 0 10px; padding-bottom: 8px;
    border-bottom: 0.5px solid var(--admin-separator);
    letter-spacing: 0.1px;
}
.form-section-title::before {
    content: ''; width: 4px; height: 4px;
    border-radius: 50%; background: var(--admin-primary);
    flex-shrink: 0;
}
.form-section-title.primary { color: var(--admin-primary); }
.form-section-title .add-inline-btn { margin-left: auto; }
.form-section-title:first-child { margin-top: 0; }

/* ========== 表单分隔线 ========== */
.form-divider {
    border: none; border-top: 0.5px solid var(--admin-separator);
    margin: 16px 0 12px;
}

/* ========== 必填项标记 ========== */
.form-required {
    color: var(--admin-danger); margin-left: 2px; font-weight: 500;
}

/* ========== 内联校验错误 ========== */
.admin-modal .form-group .field-invalid,
.admin-modal .pkg-edit-field .field-invalid {
    border-color: var(--admin-danger) !important;
    box-shadow: 0 0 0 2px var(--admin-danger-light) !important;
}
.admin-modal .form-group .field-error,
.admin-modal .pkg-edit-field .field-error {
    color: var(--admin-danger);
    font-size: 12px;
    margin-top: 4px;
    line-height: 1.4;
}

/* ========== 报告上传：字段识别状态 ========== */
.admin-modal .form-group .field-recognized {
    border-color: #27ae60 !important;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.15) !important;
}
.admin-modal .form-group .field-missing {
    border-color: var(--admin-danger) !important;
    box-shadow: 0 0 0 2px var(--admin-danger-light) !important;
}

/* ========== 字段提示文字 ========== */
.form-field-hint {
    font-size: 12px; color: var(--admin-text-tertiary);
    margin-top: 4px; line-height: 1.5;
}

/* ========== 字数统计 ========== */
.char-counter {
    font-size: 12px; color: var(--admin-text-tertiary);
    text-align: right; margin-top: 4px; font-variant-numeric: tabular-nums;
}
.char-counter.over-limit { color: var(--admin-danger); font-weight: 600; }

/* ========== 宽模态框 ========== */
.admin-modal-wide { max-width: 760px; }

/* ========== 模态框滚动区域 ========== */
.modal-scroll-body {
    max-height: 60vh; overflow-y: auto;
    padding-right: 8px;
    scrollbar-gutter: stable;
}

/* ========== Apple 风格新闻图片上传 ========== */
.news-upload-zone {
    border: 1px solid var(--admin-border);
    border-radius: var(--apple-radius-lg); padding: 16px;
    margin-top: 6px; background: #fafafa; transition: all .25s ease;
}
.news-upload-zone:hover { border-color: var(--admin-primary-glow); background: var(--admin-bg); }
.news-upload-previews {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-bottom: 12px; min-height: 50px; align-items: center;
}
.news-upload-previews:empty::after {
    content: '暂无图片，请上传或添加URL';
    color: var(--admin-text-tertiary); font-size: 13px;
    width: 100%; text-align: center;
}
.news-img-item { position: relative; display: inline-block; }
.news-img-item img {
    width: 80px; height: 80px; object-fit: cover;
    border-radius: var(--apple-radius-sm);
    border: 1px solid var(--admin-border); transition: all .2s;
}
.news-img-cover {
    position: absolute; bottom: 4px; left: 4px;
    padding: 2px 6px; border-radius: 4px;
    background: rgba(26,115,232,0.9); color: #fff;
    font-size: 10px; font-weight: 600; line-height: 1.2;
    pointer-events: none;
}
.news-img-item:hover img { border-color: var(--admin-primary); }
.news-img-remove {
    position: absolute; top: -8px; right: -8px;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--admin-danger); color: #fff;
    border: 1.5px solid #fff; font-size: 12px; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(255,59,48,0.25); transition: all .15s;
}
.news-img-remove:hover { transform: scale(1.15); }
.news-img-focus {
    position: absolute; top: -8px; left: -8px;
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--admin-primary); color: #fff;
    border: 1.5px solid #fff; font-size: 11px; line-height: 1;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 8px rgba(0,122,255,0.25); transition: all .15s;
    padding: 0;
}
.news-img-focus:hover { transform: scale(1.15); }
.news-upload-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.news-upload-actions input[type="file"] { font-size: 12px; }
.news-url-input {
    flex: 1; min-width: 200px; padding: 8px 12px;
    border: 1px solid var(--admin-border-strong); border-radius: var(--apple-radius-sm);
    font-size: 13px; background: #fff; transition: all .2s; font-family: inherit;
}
.news-url-input:focus {
    border-color: var(--admin-primary); outline: none;
    box-shadow: 0 0 0 2px var(--admin-primary-glow);
}

/* ========== 统计项编辑预览 ========== */
.stat-edit-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #0d1b4a 0%, #1a73e8 100%);
    border-radius: 14px;
    margin-bottom: 20px;
}
.stat-edit-preview-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.stat-edit-preview-num {
    font-size: 42px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -1px;
}
.stat-edit-preview-label {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    margin-top: 4px;
}
.stat-color-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.stat-color-option {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-color-option:hover {
    transform: scale(1.1);
}
.stat-color-option.selected {
    border-color: #fff;
    box-shadow: 0 0 0 2px var(--admin-primary);
}
.stat-color-option svg {
    width: 16px;
    height: 16px;
    color: #fff;
}

/* 统计项图标选择 */
.stat-icon-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #f5f6f8;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 18px;
    transition: all .2s;
    user-select: none;
}
.stat-icon-option:hover {
    background: #e8f0fe;
    transform: translateY(-2px);
}
.stat-icon-option.selected {
    border-color: var(--admin-primary);
    background: #e8f0fe;
    box-shadow: 0 2px 8px rgba(26,115,232,0.2);
}

/* ========== 保存按钮加载态 ========== */
.btn-primary.loading {
    pointer-events: none;
    opacity: 0.7;
}
.btn-primary.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btnSpin 0.6s linear infinite;
    margin-left: 4px;
}
@keyframes btnSpin {
    to { transform: rotate(360deg); }
}

/* ========== 表单输入增强 ========== */
.admin-modal .form-group input[readonly] {
    background: #f0f2f5;
    color: #888;
    cursor: not-allowed;
}
.admin-modal textarea {
    line-height: 1.7;
}

/* ============================================ */
/* ========== 点击即改 · 内联编辑系统 ========== */
/* ============================================ */

/* 可点击编辑的卡片 */
.editable-card {
    cursor: pointer;
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.editable-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.12);
    border-color: var(--admin-primary) !important;
}
.editable-card:hover::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(26, 115, 232, 0.04), rgba(26, 115, 232, 0.08));
    pointer-events: none;
    z-index: 0;
}

/* 悬停编辑浮层 */
.edit-hover-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--admin-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.25s ease;
    pointer-events: none;
    z-index: 5;
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.35);
    display: flex;
    align-items: center;
    gap: 4px;
}
.edit-hover-overlay svg {
    width: 12px;
    height: 12px;
}
.editable-card:hover .edit-hover-overlay {
    opacity: 1;
    transform: translateY(0);
}
/* 当卡片已有快捷操作按钮时，隐藏"点击编辑"文字浮层（按钮已表明可编辑） */
.editable-card:has(.card-quick-actions) .edit-hover-overlay {
    display: none;
}

/* 卡片操作按钮区（编辑/删除）停在右上角 */
.editable-card .card-quick-actions {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 6px;
    z-index: 10;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.25s ease;
    pointer-events: auto;
}
.editable-card:hover .card-quick-actions {
    opacity: 1;
    transform: translateY(0);
}
.card-quick-actions .btn-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.card-quick-actions .btn-icon:hover {
    transform: scale(1.1);
}
.card-quick-actions .btn-icon.btn-icon-edit {
    color: var(--admin-primary);
    width: auto;
    padding: 0 10px;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}
.card-quick-actions .btn-icon.btn-icon-edit svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}
.card-quick-actions .btn-icon.btn-icon-edit:hover {
    background: var(--admin-primary);
    color: #fff;
}
.card-quick-actions .btn-icon.btn-icon-delete {
    color: #e74c3c;
}
.card-quick-actions .btn-icon.btn-icon-delete:hover {
    background: #e74c3c;
    color: #fff;
}

/* 内联可编辑文本字段 */
.inline-editable {
    cursor: text;
    position: relative;
    border-radius: 4px;
    padding: 2px 6px;
    margin: -2px -6px;
    transition: background 0.2s;
    display: inline;
}
.inline-editable:hover {
    background: rgba(26, 115, 232, 0.08);
    box-shadow: 0 0 0 1px rgba(26, 115, 232, 0.2);
}
.inline-editable:hover::after {
    content: '✎';
    font-size: 11px;
    color: var(--admin-primary);
    margin-left: 4px;
    opacity: 0.6;
}
.inline-editable.editing {
    background: #fff;
    box-shadow: 0 0 0 2px var(--admin-primary);
    outline: none;
}
.inline-edit-input {
    font: inherit;
    color: inherit;
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    width: 100%;
    min-width: 60px;
}

/* 表格行可点击编辑 */
.data-table tbody tr.editable-row {
    cursor: pointer;
    transition: background 0.15s;
}
.data-table tbody tr.editable-row:hover {
    background: #f0f7ff;
}
.data-table tbody tr.editable-row:hover td:first-child {
    box-shadow: inset 3px 0 0 var(--admin-primary);
}

/* 信息卡片可点击编辑 */
.info-card.editable-card {
    cursor: pointer;
}
.info-card.editable-card:hover {
    border-color: var(--admin-primary);
    box-shadow: 0 4px 16px rgba(26, 115, 232, 0.1);
}
.info-card .info-edit-hint {
    float: right;
    font-size: 12px;
    color: var(--admin-primary);
    opacity: 0;
    transition: opacity 0.2s;
}
.info-card.editable-card:hover .info-edit-hint {
    opacity: 1;
}

/* 统计卡片可点击 */
.s-card.editable-card {
    cursor: pointer;
}

/* Toast 通知 */
.admin-toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #1a1a2e;
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    z-index: 99999;
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
.admin-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
.admin-toast.success {
    background: linear-gradient(135deg, #27ae60, #219a52);
}
.admin-toast.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}
.admin-toast svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* 面板头部优化 */
.panel-header {
    padding-bottom: 14px;
}
.panel-header h3 {
    font-size: 19px;
}

/* 卡片网格间距优化 */
.dept-admin-grid,
.doctor-card-grid,
.news-card-grid {
    gap: 18px;
}

/* 空状态美化 */
.empty-state {
    border-radius: 12px;
    background: #f8f9fb;
    border: 1px dashed #d9e0ea;
}

/* 响应式补充 */
@media (max-width: 768px) {
    .edit-hover-overlay {
        font-size: 10px;
        padding: 3px 8px;
    }
    .card-quick-actions {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 智能推荐：套餐推荐映射表（后台） ========== */
.chk-rec-guide {
    background: #f0f7ff; border: 1px solid #d6e8ff;
    border-radius: 10px; padding: 12px 14px;
    font-size: 13px; line-height: 1.7; color: #1d4e89;
    margin-bottom: 18px;
}
.chk-rec-table {
    border: 1px solid #e5e5ea; border-radius: 12px;
    overflow: hidden; background: #ffffff;
}
.chk-rec-table-head {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; background: #f2f2f7;
    font-size: 12px; font-weight: 700; color: #6e6e73;
    border-bottom: 1px solid #e5e5ea;
}
.chk-rec-table-head span:first-child { flex: 1 1 auto; }
.chk-rec-table-head span:last-child { flex: 0 0 200px; }
.chk-rec-group {
    padding: 12px 14px; margin: 0 !important;
    border-bottom: 1px solid #f0f0f5;
}
.chk-rec-group:last-child { border-bottom: none; }
.chk-rec-group-title {
    display: block; width: 100%;
    padding: 7px 10px; margin-bottom: 10px;
    border: none; border-left: 3px solid #007aff;
    background: #f8fafc; border-radius: 6px;
    font-size: 14px; font-weight: 700; color: #1d1d1f;
}
.chk-rec-opt-row { margin-bottom: 6px; }
.chk-rec-opt-row input.chk-rec-opt-label { flex: 1 1 auto; }
.chk-rec-opt-row select.chk-rec-opt-pkg { flex: 0 0 200px; }

/* ========== 通用编辑弹窗：实时预览（首页相关项） ========== */
#editModal.admin-preview-on {
    max-width: 1440px !important;
    height: 85vh; max-height: 85vh;
    display: flex; flex-direction: column;
    padding: 0; overflow: hidden;
}
#editModal.admin-preview-on h3 {
    padding: 20px 24px 0; text-align: left;
    margin-bottom: 0; flex-shrink: 0;
}
#editModal.admin-preview-on #editModalBody {
    flex: 1; min-height: 0; overflow: hidden;
}
#editModalBody.admin-preview-on {
    display: flex; align-items: stretch;
}
#editModalBody.admin-preview-on .admin-preview-form {
    flex: 1; min-width: 0; overflow-y: auto; padding: 24px;
}
#editModalBody.admin-preview-on .admin-preview-form .modal-scroll-body {
    max-height: none; overflow: visible; padding-right: 0;
}
#editModalBody.admin-preview-on .admin-preview-pane {
    display: flex; flex-direction: column;
    width: 46%; min-width: 420px; flex-shrink: 0;
    border-left: 1px solid #e5e5ea; background: #f5f5f7; overflow: hidden;
}
.admin-preview-pane { display: none; }
.admin-preview-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; background: #ffffff;
    border-bottom: 1px solid #e5e5ea;
    font-size: 13px; font-weight: 600; color: #1d1d1f; flex-shrink: 0;
}
.admin-preview-close {
    background: none; border: none; font-size: 20px; line-height: 1;
    color: #6e6e73; cursor: pointer; padding: 2px 6px; border-radius: 6px;
    font-family: inherit;
}
.admin-preview-close:hover { background: #f2f2f7; color: #1d1d1f; }
.admin-preview-frame { flex: 1; width: 100%; border: none; background: #ffffff; }
#editModal.admin-preview-on .modal-actions {
    margin: 0; padding: 14px 24px; border-top: 1px solid #e5e5ea; flex-shrink: 0;
}
/* 就诊指南编辑弹窗复用 userModal，补齐其侧边实时预览布局 */
#userModal.admin-preview-on {
    max-width: 1440px !important;
    height: 85vh; max-height: 85vh;
    display: flex; flex-direction: column;
    padding: 0; overflow: hidden;
}
#userModal.admin-preview-on h3 {
    padding: 20px 24px 0; text-align: left;
    margin-bottom: 0; flex-shrink: 0;
}
#userModal.admin-preview-on #userModalBody {
    flex: 1; min-height: 0; overflow: hidden;
}
#userModalBody.admin-preview-on {
    display: flex; align-items: stretch;
}
#userModalBody.admin-preview-on .admin-preview-form {
    flex: 1; min-width: 0; overflow-y: auto; padding: 24px;
}
/* 预览并排时由外层表单容器统一滚动，避免指南编辑区出现双重滚动条 */
#userModalBody.admin-preview-on .admin-preview-form .gm-edit-wrap {
    max-height: none; overflow: visible;
}
#userModalBody.admin-preview-on .admin-preview-pane {
    display: flex; flex-direction: column;
    width: 46%; min-width: 420px; flex-shrink: 0;
    border-left: 1px solid #e5e5ea; background: #f5f5f7; overflow: hidden;
}
#userModal.admin-preview-on .modal-actions {
    margin: 0; padding: 14px 24px; border-top: 1px solid #e5e5ea; flex-shrink: 0;
}
.modal-actions .btn-preview {
    margin-right: auto;
    background: #ffffff; border: 1px solid #d1d1d6;
    color: #1d1d1f; font-size: 13px; font-weight: 600;
    padding: 8px 18px; border-radius: 8px; cursor: pointer;
    transition: all 0.2s; font-family: inherit;
}
.modal-actions .btn-preview:hover { background: #f2f2f7; border-color: #aeaeb2; }
.modal-actions .btn-preview.on { background: #007aff; border-color: #007aff; color: #ffffff; }

/* ========== 图片焦点选择（拖拽平移 → object-position） ========== */
.img-focus-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,0.62);
    display: none; align-items: center; justify-content: center;
    padding: 24px;
}
.img-focus-overlay.active { display: flex; }
.img-focus-modal {
    background: #fff; border-radius: 14px;
    width: 100%; max-width: 680px; max-height: 92vh;
    display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.32);
}
.img-focus-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.img-focus-head h3 { font-size: 16px; font-weight: 700; margin: 0; color: #1d1d1f; }
.img-focus-close {
    border: none; background: transparent; font-size: 20px; cursor: pointer;
    color: #8e8e93; line-height: 1; padding: 4px; border-radius: 6px;
}
.img-focus-close:hover { color: #1d1d1f; background: #f2f2f7; }
.img-focus-tip {
    margin: 0; padding: 10px 20px; font-size: 12px; color: #6e6e73;
    background: #f5f5f7; border-bottom: 1px solid #eee; flex-shrink: 0;
}
.img-focus-stage { padding: 20px; display: flex; justify-content: center; flex-shrink: 0; }
.img-focus-viewport {
    position: relative; width: 100%; max-width: 560px;
    aspect-ratio: var(--focus-ar, 4 / 3);
    overflow: hidden; border-radius: 10px; background: #000;
    cursor: grab; touch-action: none; user-select: none;
    border: 2px solid #e5e5ea;
}
.img-focus-viewport.dragging { cursor: grabbing; }
.img-focus-viewport img {
    width: 100%; height: 100%; object-fit: cover;
    object-position: 50% 50%; display: block; pointer-events: none;
}
.img-focus-info {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px 12px; font-size: 13px; color: #6e6e73; flex-shrink: 0;
}
.img-focus-info b { color: #1d1d1f; }
.img-focus-actions {
    display: flex; justify-content: flex-end; gap: 10px;
    padding: 14px 20px; border-top: 1px solid #eee; flex-shrink: 0;
}

/* ========== 徽章（badge） ========== */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px; border-radius: 20px;
    font-size: 11px; font-weight: 600; line-height: 1.4;
    white-space: nowrap;
}
.badge-green { background: rgba(52,199,89,0.12); color: #1d9a4a; }
.badge-red { background: rgba(255,59,48,0.12); color: #d70015; }
.badge-blue { background: rgba(0,122,255,0.12); color: #0062cc; }
.badge-gray { background: rgba(120,120,128,0.14); color: #5b5b60; }
.badge-gold { background: rgba(255,159,10,0.15); color: #b26200; }
.badge-purple { background: rgba(175,82,222,0.12); color: #8540b8; }

.text-muted { color: #86868b; }

.user-name-cell, .role-name-cell {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.user-name-cell strong, .role-name-cell strong {
    color: var(--admin-text); font-weight: 600;
}

/* ========== 权限进度条 ========== */
.perm-progress {
    width: 160px; height: 6px; border-radius: 4px;
    background: #e9ecef; overflow: hidden; margin-bottom: 6px;
}
.perm-progress-bar {
    height: 100%; border-radius: 4px;
    background: linear-gradient(90deg, #007aff, #5ac8fa);
    transition: width .3s ease;
}
.perm-progress-text { font-size: 12px; color: var(--admin-text-tertiary); }

/* ========== 角色权限分组 ========== */
.perm-groups { display: flex; flex-direction: column; gap: 12px; }
.perm-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; background: #f5f6f8; border: 1px solid #e8ecf2;
    border-radius: 10px; font-size: 13px;
}
.perm-select-all { display: inline-flex; align-items: center; gap: 6px; color: #444; cursor: pointer; font-weight: 500; }
.perm-toolbar-tip { font-size: 12px; color: var(--admin-text-tertiary); }
.perm-group {
    border: 1px solid #e8ecf2; border-radius: 10px; overflow: hidden;
    background: #fff;
}
.perm-group-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 14px; background: #fafbfc; border-bottom: 1px solid #eef1f5;
}
.perm-group-title { font-size: 13px; font-weight: 600; color: var(--admin-text); }
.perm-group-all { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--admin-primary); cursor: pointer; }
.perm-group-body {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; padding: 8px 14px 12px;
}
.perm-item {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 8px; border-radius: 8px; cursor: pointer;
    transition: background .15s; font-size: 13px; color: var(--admin-text-secondary);
}
.perm-item:hover { background: var(--admin-primary-light); }
.perm-item input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--admin-primary); flex-shrink: 0; }
.perm-item-name { line-height: 1.3; }

/* ========== 警告按钮（停用） ========== */
.btn-warning { background: #ff9500; color: #fff; box-shadow: 0 2px 8px rgba(255,149,0,0.2); }
.btn-warning:hover { background: #e08600; box-shadow: 0 4px 14px rgba(255,149,0,0.3); }

/* 窄屏权限单列 */
@media (max-width: 640px) {
    .perm-group-body { grid-template-columns: 1fr; }
}

/* ========== 两步验证单元格（水平对齐） ========== */
.twofa-cell {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    white-space: nowrap;
}
.twofa-cell .btn { flex-shrink: 0; }
