/* ════════════════════════════════════════════
   广垦畜牧检测报告解读平台 — 主样式表 v1.0
   配色：绿主蓝辅，沉稳专业
   ════════════════════════════════════════════ */

/* ── CSS 变量 ── */
:root {
    --green-700: #1B5E20;
    --green-600: #2E7D32;
    --green-500: #388E3C;
    --green-400: #4CAF50;
    --green-200: #A5D6A7;
    --green-100: #E8F5E9;
    --green-50: #F1F8E9;
    --blue-600: #1976D2;
    --blue-500: #2196F3;
    --blue-100: #E3F2FD;
    --blue-50: #F5F9FF;
    --gray-50: #F8F9FA;
    --gray-100: #EEEEEE;
    --gray-200: #E0E0E0;
    --gray-300: #BDBDBD;
    --gray-400: #9E9E9E;
    --gray-500: #757575;
    --gray-600: #616161;
    --gray-700: #424242;
    --gray-800: #37474F;
    --gray-900: #263238;
    --red-500: #E53935;
    --red-100: #FFEBEE;
    --red-50: #FFF5F5;
    --orange-500: #FB8C00;
    --orange-100: #FFF3E0;
    --orange-50: #FFF8F0;
    --yellow-700: #F57F17;
    --yellow-100: #FFF8E1;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition: all 0.2s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--gray-900);
    background: var(--gray-50);
    min-height: 100vh;
    line-height: 1.6;
}

a { color: var(--green-600); text-decoration: none; }
a:hover { color: var(--green-500); }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── 头部导航 ── */
.site-header {
    background: linear-gradient(135deg, var(--green-700), var(--green-600));
    color: var(--white);
    padding: 0 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    align-items: center;
    height: 60px;
}

.logo { flex-shrink: 0; }
.logo a { color: var(--white); display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 1.5rem; }
.logo-text { font-size: 1.1rem; font-weight: 700; letter-spacing: 0.5px; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 30px;
    flex: 1;
}

.nav-link {
    color: rgba(255,255,255,0.85);
    padding: 6px 14px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.15); }
.nav-link.active { color: var(--white); background: rgba(255,255,255,0.2); font-weight: 600; }

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.user-info { font-size: 0.85rem; opacity: 0.9; }

.logout-link {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.75);
    padding: 4px 10px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
}

.logout-link:hover { color: var(--white); border-color: var(--white); }

/* ── 主要内容 ── */
.main-content {
    padding: 30px 20px;
    min-height: calc(100vh - 60px - 80px);
}

/* ── 登录页 ── */
.login-page {
    background: linear-gradient(135deg, var(--green-50), var(--blue-50));
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-header {
    text-align: center;
    padding: 40px 30px 20px;
}

.login-logo { font-size: 3rem; margin-bottom: 10px; }
.login-header h1 { font-size: 1.3rem; color: var(--green-700); margin-bottom: 6px; }
.login-desc { color: var(--gray-500); font-size: 0.9rem; }

.login-error {
    margin: 0 30px 10px;
    padding: 10px 14px;
    background: var(--red-100);
    color: var(--red-500);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.login-form { padding: 20px 30px; }

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

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
}

.form-group input:focus {
    border-color: var(--green-400);
    box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--green-600);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-login:hover { background: var(--green-700); }

.login-footer {
    text-align: center;
    padding: 20px 30px;
    font-size: 0.8rem;
    color: var(--gray-400);
}

/* ── 首页 Hero ── */
.hero {
    text-align: center;
    padding: 40px 0 20px;
}

.hero h1 {
    font-size: 1.8rem;
    color: var(--green-700);
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 1rem;
    color: var(--gray-500);
}

/* ── 功能卡片 ── */
.app-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.app-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    border: 1px solid var(--gray-100);
}

.app-card:hover { box-shadow: var(--shadow-md); }

.card-active { border-left: 4px solid var(--green-400); }

.card-icon { font-size: 2.2rem; margin-bottom: 12px; }

.app-card h2 { font-size: 1.15rem; margin-bottom: 8px; color: var(--gray-800); }

.card-desc { font-size: 0.9rem; color: var(--gray-500); line-height: 1.5; margin-bottom: 14px; }

.card-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-green { background: var(--green-100); color: var(--green-700); }

.card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--gray-100);
}

.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.dot-green { background: var(--green-400); }
.site-stats { font-size: 0.85rem; color: var(--gray-500); }

.card-action-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 24px;
    background: var(--green-600);
    color: var(--white);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.card-action-btn:hover {
    background: var(--green-700);
    color: var(--white);
    transform: translateY(-1px);
}

/* ── 统计栏 ── */
.quick-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 30px 0;
}

.stat-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--green-600);
    display: block;
}

.stat-label { font-size: 0.85rem; color: var(--gray-500); margin-top: 4px; }

/* ── 首页关于说明 ── */
.about-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    margin: 30px 0;
}

.about-section h3 { font-size: 1rem; color: var(--gray-700); margin-bottom: 12px; }
.about-section ul { list-style: none; }
.about-section li { padding: 6px 0; font-size: 0.9rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.about-section li:last-child { border-bottom: none; }

/* ── 页头 ── */
.page-header { padding: 10px 0 20px; }
.page-header h1 { font-size: 1.5rem; color: var(--gray-800); }
.page-desc { color: var(--gray-500); font-size: 0.9rem; margin-top: 4px; }

/* ── 基地 Tab ── */
.base-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 0;
}

.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius) var(--radius) 0 0;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-btn:hover { color: var(--green-600); background: var(--green-50); }

.tab-btn.active {
    color: var(--green-700);
    border-bottom-color: var(--green-500);
    font-weight: 600;
}

.tab-count {
    background: var(--gray-200);
    color: var(--gray-600);
    font-size: 0.75rem;
    padding: 1px 8px;
    border-radius: 10px;
}

.tab-btn.active .tab-count {
    background: var(--green-100);
    color: var(--green-700);
}

/* ── 报告列表 ── */
.base-section { display: none; }
.base-section.active { display: block; }

.report-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.report-card {
    display: block;
    background: var(--white);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-100);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    color: var(--gray-900);
}

.report-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

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

/* 风险色条 */
.risk-red::before { background: var(--red-500); }
.risk-orange::before { background: var(--orange-500); }
.risk-green::before { background: var(--green-400); }
.risk-blue::before { background: var(--blue-500); }
.risk-unknown::before { background: var(--gray-300); }

.risk-red:hover { border-color: var(--red-100); }
.risk-orange:hover { border-color: var(--orange-100); }
.risk-green:hover { border-color: var(--green-100); }

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

.risk-badge {
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.report-id {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray-800);
}

.report-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.report-date { font-size: 0.85rem; color: var(--gray-500); }

.report-source {
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.report-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid var(--gray-100);
}

.disease-tags {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.disease-tag {
    background: var(--blue-100);
    color: var(--blue-600);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
}

.disease-tag.more {
    background: var(--gray-100);
    color: var(--gray-500);
}

.report-status {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.status-published { color: var(--green-600); }

/* ── 空状态 ── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon { font-size: 3rem; margin-bottom: 16px; }

.empty-state h3 { font-size: 1.2rem; color: var(--gray-600); margin-bottom: 8px; }

.empty-state p { color: var(--gray-400); font-size: 0.9rem; }

/* ── 报告详情页 ── */
.report-detail { max-width: 1000px; margin: 0 auto; }

.detail-header { margin-bottom: 24px; }

.detail-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.detail-title-row h1 { font-size: 1.5rem; color: var(--gray-800); }

.risk-level-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.risk-big-red { background: var(--red-100); color: var(--red-500); }
.risk-big-orange { background: var(--orange-100); color: var(--orange-500); }
.risk-big-green { background: var(--green-100); color: var(--green-700); }
.risk-big-blue { background: var(--blue-100); color: var(--blue-600); }
.risk-big-unknown { background: var(--gray-100); color: var(--gray-500); }

.detail-base { font-size: 1.1rem; color: var(--gray-600); font-weight: 500; }

.detail-summary {
    margin-top: 8px;
    padding: 12px 16px;
    background: var(--green-50);
    border-radius: var(--radius);
    border-left: 4px solid var(--green-400);
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.6;
}

.detail-updated {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--gray-400);
}

/* ── 元信息网格 ── */
.detail-meta {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--gray-100);
}

.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 0.8rem; color: var(--gray-400); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.meta-value { font-size: 0.95rem; color: var(--gray-800); font-weight: 500; }
.source-tag { display: inline-block; }
.source-chat { color: var(--green-600); }

/* ── 免疫背景 ── */
.immunization-section { margin-bottom: 24px; }
.immunization-content {
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius);
    padding: 16px 20px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--gray-700);
}

/* ── 通用区块 ── */
.detail-section { margin-bottom: 28px; }

.section-title {
    font-size: 1.1rem;
    color: var(--gray-700);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--green-100);
}

/* ── 图表卡片 ── */
.chart-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    border: 1px solid var(--gray-100);
    overflow: hidden;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

.chart-header h4 { font-size: 0.95rem; color: var(--gray-700); }
.chart-meta { font-size: 0.8rem; color: var(--gray-400); }
.chart-container { padding: 10px; }

/* ── 数据表格 ── */
.table-wrapper {
    overflow-x: auto;
    margin: 0 0 16px;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    background: var(--gray-50);
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.data-table td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--green-50); }

.data-table-sm { font-size: 0.85rem; }
.data-table-sm th,
.data-table-sm td { padding: 6px 10px; }

.rate-value { font-weight: 600; }
.rate-high { color: var(--red-500); }

.risk-row-red td:first-child { border-left: 3px solid var(--red-500); }
.risk-row-orange td:first-child { border-left: 3px solid var(--orange-500); }
.risk-row-green td:first-child { border-left: 3px solid var(--green-400); }
.risk-row-blue td:first-child { border-left: 3px solid var(--blue-400); }

/* ── 解读卡片 ── */
.interpretation-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    border: 1px solid var(--gray-100);
    overflow: hidden;
    border-left: 4px solid var(--gray-300);
}

.risk-border-red { border-left-color: var(--red-500); }
.risk-border-orange { border-left-color: var(--orange-500); }
.risk-border-green { border-left-color: var(--green-400); }
.risk-border-blue { border-left-color: var(--blue-500); }
.risk-border-unknown { border-left-color: var(--gray-300); }

.interp-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

.risk-badge-sm { font-size: 1rem; }

.interp-header h4 { font-size: 0.95rem; color: var(--gray-700); flex: 1; }

.interp-method { font-size: 0.8rem; color: var(--gray-400); }

.interp-body {
    padding: 16px 20px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--gray-700);
}

.interp-body p { margin-bottom: 8px; }
.interp-body ul, .interp-body ol { margin: 8px 0 8px 20px; }
.interp-body li { margin-bottom: 4px; }
.interp-body strong { color: var(--gray-800); }

.interp-tables { padding: 0 20px 16px; }

/* ── 综合评估 ── */
.assessment-section { margin-bottom: 28px; }

.assessment-content {
    background: var(--green-50);
    border: 1px solid var(--green-100);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--gray-700);
}

.assessment-content p { margin-bottom: 8px; }
.assessment-content ul { margin: 8px 0 8px 20px; }

/* ── 底部操作 ── */
.detail-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    padding: 20px 0;
    border-top: 1px solid var(--gray-200);
    margin-top: 20px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-outline {
    background: var(--white);
    color: var(--green-600);
    border: 2px solid var(--green-200);
}

.btn-outline:hover { border-color: var(--green-500); background: var(--green-50); }

.btn-primary {
    background: var(--green-600);
    color: var(--white);
    border: 2px solid var(--green-600);
}

.btn-primary:hover { background: var(--green-700); border-color: var(--green-700); }

.file-info {
    font-size: 0.85rem;
    color: var(--gray-400);
}

/* ── 关于页 ── */
.about-content {
    max-width: 700px;
    margin: 0 auto;
}

.about-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
    border: 1px solid var(--gray-100);
}

.about-card h3 {
    font-size: 1rem;
    color: var(--green-700);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--green-100);
}

.about-card p { font-size: 0.9rem; color: var(--gray-600); line-height: 1.7; }
.about-card ul { list-style: none; margin: 0; }
.about-card li { padding: 6px 0; font-size: 0.9rem; color: var(--gray-600); border-bottom: 1px solid var(--gray-100); }
.about-card li:last-child { border-bottom: none; }

/* ── 页脚 ── */
.site-footer {
    text-align: center;
    padding: 20px;
    color: var(--gray-400);
    font-size: 0.8rem;
    border-top: 1px solid var(--gray-200);
    margin-top: 20px;
}

.site-footer p { margin-bottom: 2px; }

/* ── 响应式 ── */
@media (max-width: 768px) {
    .site-header .container { flex-wrap: wrap; height: auto; padding: 10px 16px; }
    .main-nav { margin-left: 0; width: 100%; justify-content: center; margin-top: 8px; }
    .header-right { width: 100%; justify-content: center; margin-top: 8px; }
    .hero h1 { font-size: 1.4rem; }
    .app-cards { grid-template-columns: 1fr; }
    .quick-stats { grid-template-columns: 1fr 1fr; }
    .report-cards { grid-template-columns: 1fr; }
    .meta-grid { grid-template-columns: 1fr; }
    .detail-title-row h1 { font-size: 1.2rem; }
    .base-tabs { gap: 4px; }
    .tab-btn { padding: 8px 12px; font-size: 0.85rem; }
}

@media (max-width: 480px) {
    .quick-stats { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════
   v1.1 新增样式 — 管理员控制 / 角色标识
   ══════════════════════════════════════════════════════ */

/* ── 角色标识徽章 ── */
.role-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    margin-left: 6px;
    vertical-align: middle;
}
.role-badge.role-farm {
    background: rgba(76,175,80,0.3);
}

/* ── 管理员操作栏 ── */
.admin-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0;
    padding: 12px 20px;
    background: var(--blue-50);
    border: 1px solid var(--blue-100);
    border-radius: var(--radius);
}
.select-all-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
    user-select: none;
}
.select-all-label input[type=checkbox] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.btn-delete-batch {
    padding: 6px 18px;
    border: 1px solid var(--red-500);
    background: var(--white);
    color: var(--red-500);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}
.btn-delete-batch:hover:not(:disabled) {
    background: var(--red-500);
    color: var(--white);
}
.btn-delete-batch:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: var(--gray-300);
    color: var(--gray-400);
}

/* ── 报告卡片复选框 + 删除按钮 ── */
.report-card-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0;
    position: relative;
}
.report-check {
    display: flex;
    align-items: center;
    padding: 0 8px 0 4px;
    background: var(--white);
    border-radius: var(--radius) 0 0 var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.report-check input[type=checkbox] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}
.report-card-wrapper .report-card {
    border-radius: 0 var(--radius) var(--radius) 0;
    flex: 1;
}

/* ── 单份报告删除按钮 ── */
.report-card-header {
    position: relative;
}
.delete-single {
    position: absolute;
    right: -4px;
    top: -4px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--red-100);
    color: var(--red-500);
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
    z-index: 5;
}
.report-card:hover .delete-single {
    opacity: 1;
}
.delete-single:hover {
    background: var(--red-500);
    color: var(--white);
    transform: scale(1.15);
}

.role-badge.role-viewer {
    background: rgba(33,150,243,0.3);
}/* ── 提交入口CTA按钮 ── */
.submit-cta {
    margin-bottom: 24px;
}
.btn-submit-cta {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 28px;
    background: linear-gradient(135deg, var(--primary, #2563eb), #3b82f6);
    color: var(--white);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(37,99,235,0.3);
}
.btn-submit-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(37,99,235,0.4);
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}
.cta-icon {
    font-size: 32px;
    line-height: 1;
}
.cta-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.cta-text strong {
    font-size: 18px;
    font-weight: 600;
}
.cta-text small {
    font-size: 13px;
    opacity: 0.85;
    margin-top: 2px;
}
.cta-arrow {
    font-size: 28px;
    opacity: 0.7;
    transition: all 0.2s ease;
}
.btn-submit-cta:hover .cta-arrow {
    transform: translateX(4px);
    opacity: 1;
}
/* ── 提交表单容器 ── */
.submit-form-container {
    max-width: 800px;
    margin: 0 auto;
}
.form-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 24px 28px;
    margin-bottom: 20px;
}
.form-section-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--green-100);
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 640px) {
    .form-grid { grid-template-columns: 1fr; }
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}
.form-label .required {
    color: var(--red-500);
}
.form-hint {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 10px;
}
.form-input, .form-select {
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--gray-800);
    background: var(--white);
    transition: all 0.2s ease;
}
.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}
.form-textarea {
    padding: 10px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    color: var(--gray-800);
    width: 100%;
    resize: vertical;
    font-family: inherit;
    transition: all 0.2s ease;
}
.form-textarea:focus {
    outline: none;
    border-color: var(--green-500);
    box-shadow: 0 0 0 3px rgba(76,175,80,0.15);
}
/* ── 疾病勾选网格 ── */
.disease-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.disease-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: var(--gray-700);
    user-select: none;
}
.disease-checkbox:hover {
    border-color: var(--green-400);
    background: var(--green-50);
}
.disease-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--green-500);
    cursor: pointer;
}
.disease-checkbox:has(input:checked) {
    border-color: var(--green-500);
    background: var(--green-100);
    color: var(--green-700);
    font-weight: 500;
}
/* ── 文件上传区域 ── */
.upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}
.upload-area:hover, .upload-area.drag-over {
    border-color: var(--green-500);
    background: var(--green-50);
}
.upload-area input[type="file"] {
    display: none;
}
.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--gray-500);
}
.upload-icon {
    font-size: 48px;
    opacity: 0.5;
}
.upload-sub {
    font-size: 12px;
    color: var(--gray-400);
}
.file-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
    margin-top: 8px;
}
.file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--gray-50);
    border-radius: var(--radius);
    font-size: 13px;
}
.file-icon { font-size: 18px; }
.file-name { flex: 1; color: var(--gray-800); word-break: break-all; }
.file-size { color: var(--gray-500); font-size: 12px; white-space: nowrap; }
/* ── 表单操作按钮 ── */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}
.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
}
.btn-secondary:hover {
    background: var(--gray-200);
}
.btn-primary {
    background: var(--green-600);
    color: var(--white);
}
.btn-primary:hover {
    background: var(--green-500);
    transform: translateY(-1px);
}
.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}
.btn-submit {
    padding: 14px 36px;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(46,125,50,0.3);
}
/* ── 模态弹窗 ── */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.modal-dialog {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    animation: modalSlideIn 0.2s ease;
}
@keyframes modalSlideIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.modal-header {
    padding: 20px 24px 12px;
    border-bottom: 1px solid var(--gray-100);
}
.modal-header h3 {
    font-size: 18px;
    color: var(--gray-800);
}
.modal-header.success-header h3 {
    color: var(--green-600);
}
.modal-body {
    padding: 20px 24px;
}
.modal-body p {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 12px;
}
.modal-footer {
    padding: 12px 24px 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
/* ── 确认信息表 ── */
.confirm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.confirm-table td {
    padding: 8px 10px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: top;
}
.confirm-label {
    width: 100px;
    font-weight: 500;
    color: var(--gray-600);
    white-space: nowrap;
}
.confirm-notes {
    color: var(--gray-700);
    white-space: pre-wrap;
    font-style: italic;
}
/* ── 免疫信息并排表格 ── */
.imm-tables-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}
.imm-tables-grid .imm-table-wrap {
    flex: 1 1 0;
    min-width: 320px;
}
.imm-subtitle {
    font-size: 15px;
    font-weight: 600;
    color: var(--green-700);
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid var(--green-100);
}
.imm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.imm-table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--green-50);
    color: var(--green-700);
    font-weight: 600;
    border-bottom: 2px solid var(--green-200);
}
.imm-table td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}
.imm-disease {
    width: 140px;
    font-weight: 500;
    color: var(--gray-700);
    white-space: nowrap;
}
.imm-input {
    width: 180px;
}
.imm-date, .imm-age {
    width: 100%;
    max-width: 160px;
    padding: 6px 10px;
    font-size: 13px;
}
.imm-age {
    max-width: 100px;
}
.imm-table tbody tr:hover {
    background: var(--gray-50);
}
/* ── 上传重要提示 ── */
.upload-notice {
    background: var(--yellow-100);
    border-left: 4px solid var(--yellow-700);
    padding: 12px 16px;
    margin-bottom: 12px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray-800);
}
.upload-notice strong {
    color: var(--yellow-700);
}
/* ════════════════════════════════════════════════════════
   场长管理后台样式
   插入位置：style.css 末尾
   ════════════════════════════════════════════════════════ */

/* ── 管理后台动作栏 ── */
.admin-actions {
    margin-bottom: 20px;
}
.btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary, #2563eb);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-primary:hover {
    background: var(--primary-dark, #1d4ed8);
}
.btn-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: var(--gray-200, #e5e7eb);
    color: var(--gray-700, #374151);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
}
.btn-back {
    display: inline-block;
    padding: 6px 12px;
    color: var(--primary, #2563eb);
    text-decoration: none;
    font-size: 14px;
}
.btn-back:hover {
    text-decoration: underline;
}

/* ── 管理表格 ── */
.table-container {
    overflow-x: auto;
    background: var(--card-bg, #fff);
    border-radius: 12px;
    border: 1px solid var(--border, #e5e7eb);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.admin-table th {
    background: var(--gray-50, #f9fafb);
    padding: 12px 14px;
    text-align: left;
    font-weight: 600;
    color: var(--gray-600, #4b5563);
    border-bottom: 2px solid var(--border, #e5e7eb);
    white-space: nowrap;
}
.admin-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    vertical-align: middle;
}
.admin-table tr:hover {
    background: var(--gray-50, #f9fafb);
}
.admin-table tr.row-inactive {
    opacity: 0.6;
}
.count-cell {
    text-align: center;
}
.base-names-cell {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.actions-cell {
    white-space: nowrap;
}
.actions-cell .btn-sm {
    margin-right: 4px;
}

/* ── 标准按钮变体 ── */
.btn-sm {
    display: inline-block;
    padding: 4px 10px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-edit {
    background: var(--blue-50, #eff6ff);
    color: var(--primary, #2563eb);
}
.btn-edit:hover {
    background: var(--blue-100, #dbeafe);
}
.btn-reset {
    background: var(--yellow-50, #fffbeb);
    color: var(--yellow-700, #a16207);
}
.btn-reset:hover {
    background: var(--yellow-100, #fef3c7);
}
.btn-danger {
    background: var(--red-50, #fef2f2);
    color: var(--red-600, #dc2626);
}
.btn-danger:hover {
    background: var(--red-100, #fee2e2);
}

/* ── 状态徽章 ── */
.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}
.status-ok {
    background: var(--green-50, #f0fdf4);
    color: var(--green-700, #15803d);
}
.status-warn {
    background: var(--yellow-50, #fffbeb);
    color: var(--yellow-700, #a16207);
}

/* ── 管理表单 ── */
.form-admin {
    max-width: 600px;
    background: var(--card-bg, #fff);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border, #e5e7eb);
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--gray-700, #374151);
}
.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    font-size: 14px;
    color: var(--gray-800, #1f2937);
    background: var(--input-bg, #fff);
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary, #2563eb);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.form-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--gray-500, #6b7280);
}
.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 24px;
}

/* ── 基地多选（checkbox 组） ── */
.base-checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    background: var(--gray-50, #f9fafb);
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.15s;
}
.checkbox-label:hover {
    background: var(--gray-100, #f3f4f6);
}
.checkbox-label input[type="checkbox"] {
    width: auto;
    flex-shrink: 0;
}

/* ── 单选框组 ── */
.radio-group {
    display: flex;
    gap: 20px;
    padding: 8px 0;
}
.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* ── 修改密码表单 ── */
.form-change-pwd {
    max-width: 450px;
    background: var(--card-bg, #fff);
    padding: 24px;
    border-radius: 12px;
    border: 1px solid var(--border, #e5e7eb);
}
.pwd-tips {
    max-width: 450px;
    margin-top: 20px;
    padding: 16px 20px;
    background: var(--blue-50, #eff6ff);
    border: 1px solid var(--blue-100, #dbeafe);
    border-radius: 10px;
}
.pwd-tips h4 {
    margin: 0 0 10px 0;
    color: var(--primary, #2563eb);
}
.pwd-tips ul {
    margin: 0;
    padding-left: 18px;
    color: var(--gray-600, #4b5563);
    font-size: 13px;
    line-height: 1.8;
}

/* ── 基地筛选条 ── */
.base-filter-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.filter-label {
    font-weight: 500;
    font-size: 13px;
    color: var(--gray-600, #4b5563);
    white-space: nowrap;
}
.base-filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    font-size: 14px;
    color: var(--gray-700, #374151);
    background: var(--input-bg, #fff);
    min-width: 200px;
    cursor: pointer;
}
.base-filter-select:focus {
    outline: none;
    border-color: var(--primary, #2563eb);
}
.filter-clear {
    color: var(--gray-500, #6b7280);
    text-decoration: none;
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
}
.filter-clear:hover {
    color: var(--red-600, #dc2626);
    background: var(--red-50, #fef2f2);
}
.clear-filter {
    color: var(--primary, #2563eb);
    font-size: 13px;
    text-decoration: none;
    margin-left: 8px;
}
.clear-filter:hover {
    text-decoration: underline;
}

/* ── 警示框 ── */
.alert {
    max-width: 600px;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}
.alert p {
    margin: 6px 0 0;
}
.alert-error {
    background: var(--red-50, #fef2f2);
    border: 1px solid var(--red-200, #fecaca);
    color: var(--red-700, #b91c1c);
}
.alert-warning {
    background: var(--yellow-50, #fffbeb);
    border: 1px solid var(--yellow-200, #fde68a);
    color: var(--yellow-800, #92400e);
}
.alert-success {
    background: var(--green-50, #f0fdf4);
    border: 1px solid var(--green-200, #bbf7d0);
    color: var(--green-800, #166534);
}

/* ── 修改密码链接 ── */
.change-pwd-link {
    font-size: 16px !important;
    text-decoration: none !important;
    padding: 4px 8px !important;
    opacity: 0.7;
    transition: opacity 0.2s;
}
.change-pwd-link:hover {
    opacity: 1;
}
