/* ═══════════════════════════════════════════════════════════════════════════
   校检通管理后台 · 主题层
   与「校检通 · 校园体检管理小程序 · 工作人员端」共用同一套设计规范：
   绿纸照片底 + 毛玻璃卡片 + 医疗信任绿 + 深墨绿文字
   ══════════════════════════════════════════════════════════════════════════ */

:root {
  --brand-50: #ecfdf5;
  --brand-100: #d1fae5;
  --brand-300: #34d399;
  --brand-500: #10b981;
  --brand-600: #059669;
  --brand-700: #047857;
  --ink: #0d1f1a;
  --ink-2: #33544a;
  --ink-3: #5b7269;
  --ink-4: #8aa096;
  --glass: rgba(255, 255, 255, 0.82);
  --glass-2: rgba(255, 255, 255, 0.62);
  --glass-line: rgba(255, 255, 255, 0.62);
  --shadow: 0 22px 44px -24px rgba(2, 38, 26, 0.55);
}

/* ── 底：绿纸照片（固定层，滚动时不跟着走） ───────────────────────── */
html, body { min-height: 100%; }
body {
  background: #2f7a52;
  color: var(--ink);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #43a062 url(assets/board-bg.jpg) center center / cover no-repeat;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg,
    rgba(0, 28, 20, 0.22) 0%,
    rgba(0, 24, 17, 0.06) 34%,
    rgba(0, 20, 14, 0.14) 100%);
}

/* ── 卡片：白玻璃，透出纸纹 ──────────────────────────────────────── */
.card,
.bg-white {
  background: var(--glass) !important;
  border-color: var(--glass-line) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.04);
  backdrop-filter: blur(16px) saturate(1.04);
  box-shadow: var(--shadow);
}
.card {
  border-width: 1px;
  border-style: solid;
  border-radius: 18px;
  transition: box-shadow 0.24s ease, transform 0.24s ease, background 0.24s ease;
}
.card:hover {
  background: rgba(255, 255, 255, 0.86) !important;
  box-shadow: 0 28px 54px -24px rgba(2, 38, 26, 0.6);
  transform: translateY(-2px);
}
.sheen::after { background: radial-gradient(140px 70px at 18% -12%, rgba(255, 255, 255, 0.5), transparent 72%); }

/* 卡内分隔线 */
.card .border-black\/\[\.04\],
.card .border-black\/\[\.03\],
.card [class*="border-black/"] { border-color: rgba(2, 38, 26, 0.08) !important; }

/* ── 文字：深墨绿一档，保证在照片上仍有 7:1 ─────────────────────── */
.text-ink-900 { color: var(--ink) !important; }
.text-ink-700 { color: var(--ink-2) !important; }
.text-ink-500 { color: var(--ink-3) !important; }
.text-ink-400 { color: #4d6a60 !important; }

/* ── 侧栏 / 顶栏：毛玻璃 ─────────────────────────────────────────── */
aside {
  background: rgba(255, 255, 255, 0.74) !important;
  -webkit-backdrop-filter: blur(20px) saturate(1.05);
  backdrop-filter: blur(20px) saturate(1.05);
  border-right: 1px solid rgba(255, 255, 255, 0.5) !important;
  box-shadow: 18px 0 44px -30px rgba(2, 38, 26, 0.5);
}
header.glass {
  background: rgba(255, 255, 255, 0.72) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5) !important;
  -webkit-backdrop-filter: blur(18px) saturate(1.05);
  backdrop-filter: blur(18px) saturate(1.05);
}

/* 导航项：浅色玻璃条，选中仍是品牌渐变 */
.nav-item {
  display: block;
  position: relative;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--ink-2);
  cursor: pointer;
}
.nav-item:hover {
  background: rgba(255, 255, 255, 0.72) !important;
  color: var(--brand-700) !important;
  transform: translateX(2px);
}
.nav-item.active {
  background: linear-gradient(90deg, #047857, #10b981) !important;
  color: #fff !important;
  box-shadow: 0 12px 26px -12px rgba(4, 120, 87, 0.85);
}

/* ── 表单控件 ────────────────────────────────────────────────────── */
input, select, textarea {
  background: rgba(255, 255, 255, 0.72) !important;
  border-color: rgba(255, 255, 255, 0.7) !important;
  color: var(--ink) !important;
  box-shadow: 0 1px 2px rgba(2, 38, 26, 0.04);
}
input::placeholder, textarea::placeholder { color: #6f8b80 !important; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: rgba(4, 120, 87, 0.45) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.16) !important;
  background: rgba(255, 255, 255, 0.88) !important;
}

/* 浅色 chip / 底填充 */
.bg-brand-50 { background: rgba(209, 250, 229, 0.78) !important; }
.bg-brand-50\/70 { background: rgba(255, 255, 255, 0.72) !important; }
.bg-ink-50 { background: rgba(255, 255, 255, 0.6) !important; }

/* ── 表格：横线改为半透明白，行悬浮提亮 ─────────────────────────── */
.card table { border-color: rgba(2, 38, 26, 0.08); }
.card table thead th,
.card table th {
  color: var(--ink-2);
  font-weight: 700;
  background: rgba(255, 255, 255, 0.42);
}
.card table tbody tr:hover { background: rgba(255, 255, 255, 0.6) !important; }
.row-hover:hover { background: rgba(255, 255, 255, 0.6) !important; }

/* 表格横向滚动条的轨道在玻璃上要淡 */
.table-scroll::-webkit-scrollbar { height: 8px; }
.table-scroll::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.25); border-radius: 999px; }
.table-scroll::-webkit-scrollbar-thumb { background: rgba(4, 120, 87, 0.28); border-radius: 999px; }

/* 全局滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(4, 120, 87, 0.26); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(4, 120, 87, 0.42); }
::-webkit-scrollbar-track { background: transparent; }

/* 侧栏滚动区在玻璃上不要出现深色槽 */
aside::-webkit-scrollbar { width: 6px; }
aside::-webkit-scrollbar-thumb { background: rgba(4, 120, 87, 0.18); }

/* ── 弹窗 / 遮罩层 ───────────────────────────────────────────────── */
.fixed.inset-0.bg-black\/40,
.fixed.inset-0[class*="bg-black/"] {
  background: rgba(6, 32, 25, 0.42) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* ── 页内小标题：压在照片上，用深墨绿 + 白色柔光，保证可读 ────────── */
.pg-sec h3 {
  color: #05261c !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
  letter-spacing: 0.2px;
}
.pg-sec p {
  display: inline-block;
  background: rgba(255, 255, 255, 0.56);
  border-radius: 7px;
  padding: 2px 8px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  color: #0a2b21 !important;
  text-shadow: none;
}

/* ── 裸表格（没有 .card 包裹的视图）：直接给一层玻璃面板 ─────────── */
.view > .table-scroll {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(16px) saturate(1.04);
  backdrop-filter: blur(16px) saturate(1.04);
}
/* 列多时按内容撑开并横向滚动，而不是把每列压成一两个字 */
.table-scroll > table { min-width: max-content; }
.table-scroll th,
.table-scroll td { white-space: nowrap; }
/* 表头吸顶/吸右那一列在玻璃上改成半透明 */
.table-scroll th[class*="bg-white"],
.card th[class*="bg-white"] { background: rgba(255, 255, 255, 0.86) !important; }

/* 只有真正会横向滚动的表格（名单记录 17 列，包在 .card 内）才固定操作列，
   其余表格列数少、不滚动，保持纯玻璃，不要贴一块白条 */
.card .table-scroll th[class*="right-0"] {
  background: #ffffff !important;
  border-left: 1px solid rgba(2, 38, 26, 0.08) !important;
  box-shadow: -14px 0 18px -16px rgba(2, 38, 26, 0.55);
}
.card .table-scroll td:last-child {
  position: sticky;
  right: 0;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: -14px 0 18px -16px rgba(2, 38, 26, 0.45);
}
/* 吸顶的「操作」表头与吸右的操作单元格同宽，避免两块白色错位 */
.card .table-scroll th[class*="right-0"],
.card .table-scroll td:last-child {
  width: 118px;
  min-width: 118px;
  text-align: center;
}

/* ── 登录页：照片上的一块白玻璃 ─────────────────────────────────── */
#loginScreen {
  background: transparent !important;
}
#loginScreen > div[class*="rounded"] {
  background: rgba(255, 255, 255, 0.88) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.06);
  backdrop-filter: blur(22px) saturate(1.06);
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow: 0 34px 70px -34px rgba(2, 34, 24, 0.8);
  color: var(--ink);
}

/* ── 图表卡片：画布底色透明，网格线调淡 ─────────────────────────── */
.chart-wrap canvas { background: transparent !important; }

/* ── 选中态 pill / 分段控件 ─────────────────────────────────────── */
.tab-pill {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--ink-2);
}
.tab-pill:hover { background: rgba(255, 255, 255, 0.82); }
.tab-pill.on,
.tab-pill.active {
  background: linear-gradient(135deg, #047857, #10b981) !important;
  color: #fff !important;
  border-color: transparent !important;
  box-shadow: 0 10px 22px -12px rgba(4, 120, 87, 0.8);
}
