/* ============================================================
   菌株管理平台 - 样式 v2（美化版）
   设计语言：科研绿 + 柔和卡片 + 圆角 + 细腻阴影
   ============================================================ */
:root {
  --primary: #1e6f4d;
  --primary-dark: #14532d;
  --primary-light: #e6f4ec;
  --accent: #d97706;
  --bg: #f2f6f4;
  --surface: #ffffff;
  --text: #1f2937;
  --text-2: #6b7280;
  --border: #e5e7eb;
  --danger: #dc2626;
  --radius: 12px;
  --shadow-sm: 0 1px 3px rgba(16, 40, 30, .07);
  --shadow-md: 0 4px 16px rgba(16, 40, 30, .09);
  --shadow-lg: 0 12px 32px rgba(16, 40, 30, .14);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", -apple-system, "Segoe UI", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.65; font-size: 15px;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }

/* ---------------- 页脚版本号 ---------------- */
.version {
  text-align: center; color: var(--text-light, #8b9aa5); font-size: 12px;
  padding: 18px 0 10px; user-select: none;
}

/* ---------------- 文件库选择（共用文件关联） ---------------- */
.file-lib {
  margin-top: 8px; padding: 10px 12px;
  background: #f4f8f5; border: 1px dashed #a8c8b2; border-radius: 8px;
}
.file-lib .lbl { font-size: 13px; color: #47624e; margin-bottom: 6px; }
.file-lib-list {
  max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
}
.file-lib-item {
  font-size: 13px; padding: 4px 8px; background: #fff;
  border: 1px solid #dde7e0; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; gap: 8px; word-break: break-all;
}
.file-lib-item:hover { border-color: var(--primary); }
.file-lib-codes { color: #8b9aa5; font-size: 12px; }

/* ---------------- 顶部导航 ---------------- */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 70%, #2b8a5e 100%);
  color: #fff; box-shadow: var(--shadow-md);
}
.nav-inner {
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between; height: 60px;
}
.brand {
  color: #fff; font-size: 19px; font-weight: 700; letter-spacing: .5px;
  display: flex; align-items: center; gap: 8px;
}
.brand:hover { opacity: .9; }
.nav-links { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.nav-links > a {
  color: rgba(255,255,255,.85); padding: 7px 14px; border-radius: 8px;
  font-size: 14px; transition: all .18s;
}
.nav-links > a:hover { color: #fff; background: rgba(255,255,255,.14); }
.nav-user {
  color: rgba(255,255,255,.6); font-size: 13px; margin-left: 10px;
  padding-left: 16px; border-left: 1px solid rgba(255,255,255,.2);
  display: inline-flex; align-items: center; gap: 4px;
}
.nav-user b { color: #fff; font-weight: 600; }
.nav-user a { color: rgba(255,255,255,.75); padding: 4px 8px; border-radius: 6px; }
.nav-user a:hover { color: #fff; background: rgba(255,255,255,.14); }

.container { max-width: 1240px; margin: 28px auto; padding: 0 24px; }

/* ---------------- 页头 ---------------- */
.page-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}
.page-head h2 { font-size: 24px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.page-head h2::before {
  content: ""; display: inline-block; width: 5px; height: 24px;
  background: linear-gradient(180deg, var(--primary), #4ade80);
  border-radius: 3px;
}
.page-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 8px 18px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text); cursor: pointer;
  font-size: 14px; font-weight: 500; transition: all .18s; box-shadow: var(--shadow-sm);
}
.btn:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn.primary {
  background: linear-gradient(135deg, var(--primary) 0%, #2b8a5e 100%);
  border-color: transparent; color: #fff;
}
.btn.primary:hover { filter: brightness(1.08); color: #fff; }
.btn.danger { color: var(--danger); border-color: #fecaca; background: #fff5f5; }
.btn.danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.sm { padding: 4px 12px; font-size: 13px; border-radius: 7px; }
.btn.full { width: 100%; }
.btn.ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn.ghost:hover { background: rgba(30, 111, 77, .08); box-shadow: none; }
.inline { display: inline; }

/* ---------------- 消息提示 ---------------- */
.flashes { position: fixed; top: 74px; left: 50%; transform: translateX(-50%); z-index: 200; width: max-content; max-width: 92%; }
.flash {
  padding: 12px 26px; border-radius: 10px; margin-bottom: 10px;
  background: var(--text); color: #fff; box-shadow: var(--shadow-lg);
  font-size: 14px; animation: toast 4s forwards; display: flex; align-items: center; gap: 8px;
}
.flash::before { content: "✔"; color: #4ade80; }
.flash.ok { background: var(--primary-dark); }
@keyframes toast { 0% { opacity: 0; transform: translateY(-12px); } 6%, 82% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-8px); } }

/* ---------------- 统计条 ---------------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat {
  background: var(--surface); border-radius: var(--radius); padding: 16px 20px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 2px;
}
.stat b { font-size: 26px; color: var(--primary); font-weight: 700; }
.stat span { font-size: 13px; color: var(--text-2); }

/* ---------------- 表格 ---------------- */
.tbl-wrap { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); border: 1px solid var(--border); overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; min-width: 860px; }
.tbl th, .tbl td { padding: 12px 14px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--border); }
.tbl th {
  background: var(--primary-light); color: var(--primary-dark); font-weight: 600;
  white-space: nowrap; font-size: 13px; letter-spacing: .3px;
}
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: #f8fbf9; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl td a b { color: var(--primary-dark); }
.ops { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--text-2); }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px;
  border-radius: 999px; font-size: 12px; background: var(--primary-light); color: var(--primary-dark);
}
.badge.gray { background: #f3f4f6; color: var(--text-2); }
.badge.amber { background: #fef3c7; color: #92400e; }

/* ---------------- 搜索 ---------------- */
.searchbar { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.searchbar input {
  flex: 1; max-width: 520px; padding: 10px 16px; border: 1px solid var(--border);
  border-radius: 10px; font-size: 14px; background: var(--surface);
  box-shadow: var(--shadow-sm); transition: all .18s;
}
.searchbar input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30, 111, 77, .12); }

/* ---------------- 表单 ---------------- */
.card {
  background: var(--surface); border-radius: var(--radius); padding: 26px 28px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border); margin-bottom: 24px;
}
label { display: block; margin: 16px 0 6px; font-weight: 600; font-size: 13.5px; color: var(--text); }
label .req { color: var(--danger); }
.form input[type=text], .form input[type=password], .form input[type=date], .form textarea,
input[type=text], input[type=password], textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 9px;
  font-size: 14px; font-family: inherit; background: #fafbfa; transition: all .18s;
}
.form textarea { resize: vertical; line-height: 1.7; }
.form input:focus, .form textarea:focus {
  outline: none; border-color: var(--primary); background: #fff;
  box-shadow: 0 0 0 3px rgba(30, 111, 77, .12);
}
.form input[type=file] {
  width: 100%; padding: 9px 12px; border: 1.5px dashed #cbd5d0; border-radius: 9px;
  background: #f8fbf9; font-size: 13px; color: var(--text-2); transition: border-color .18s;
}
.form input[type=file]:hover { border-color: var(--primary); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0 22px; }
.actions { margin-top: 26px; display: flex; gap: 12px; padding-top: 18px; border-top: 1px dashed var(--border); }
.narrow { max-width: 440px; margin: 0 auto; }
.inline-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form input[type=text], .inline-form input[type=password] { width: auto; min-width: 170px; }
.chk {
  font-weight: 500; display: inline-flex; align-items: center; gap: 6px;
  margin: 0; font-size: 14px; cursor: pointer; color: var(--text-2);
}
.chk input { accent-color: var(--primary); width: 16px; height: 16px; }
.section-title { margin: 22px 0 10px; font-size: 14px; color: var(--primary-dark); font-weight: 700; letter-spacing: .4px; display: flex; align-items: center; gap: 8px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------------- 详情页 ---------------- */
.info-grid div { padding: 8px 0; font-size: 15px; display: flex; align-items: baseline; }
.k {
  color: var(--text-2); font-size: 13px; margin-right: 14px; min-width: 96px;
  flex-shrink: 0;
}
.latin { font-style: italic; color: var(--primary-dark); font-size: 16px; }
.notes { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; }
h3.sec { margin: 30px 0 14px; font-size: 17px; color: var(--text); font-weight: 700; display: flex; align-items: center; gap: 8px; }
h3.sec .cnt { font-size: 12px; color: var(--text-2); font-weight: 500; background: #f3f4f6; padding: 1px 9px; border-radius: 999px; }

/* ---------------- 图片画廊 & 灯箱 ---------------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.shot {
  background: var(--surface); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  display: block; transition: all .2s; position: relative;
}
.shot:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.shot .img-box { height: 170px; overflow: hidden; background: #eef2ef; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s; }
.shot:hover img { transform: scale(1.06); }
.shot span {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; font-size: 12.5px; color: var(--text-2);
}
.shot span .zoom { opacity: 0; transition: opacity .2s; color: var(--primary); font-size: 12px; }
.shot:hover span .zoom { opacity: 1; }

/* 灯箱 */
.lightbox {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: rgba(10, 20, 15, .88); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; flex-direction: column; gap: 14px;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 84vh; border-radius: 10px; box-shadow: 0 24px 80px rgba(0,0,0,.5); }
.lightbox .lb-cap { color: rgba(255,255,255,.85); font-size: 14px; }
.lightbox .lb-close {
  position: absolute; top: 20px; right: 28px; color: #fff; font-size: 34px;
  cursor: pointer; line-height: 1; opacity: .8;
}
.lightbox .lb-close:hover { opacity: 1; }

/* ---------------- 序列 ---------------- */
.seq-wrap { position: relative; }
.seq {
  background: #10241a; color: #a7f3d0; border-radius: 10px; padding: 18px 20px;
  font-family: Consolas, "Courier New", monospace; font-size: 13px; line-height: 1.8;
  word-break: break-all; white-space: pre-wrap; max-height: 340px; overflow: auto;
  box-shadow: inset 0 2px 8px rgba(0,0,0,.35);
}
.seq-wrap .copy-btn { position: absolute; top: 12px; right: 12px; }
.seq-wrap .copy-btn.btn { background: rgba(255,255,255,.12); color: #d1fae5; border-color: rgba(255,255,255,.25); box-shadow: none; }
.seq-wrap .copy-btn.btn:hover { background: rgba(255,255,255,.22); color: #fff; }

/* ---------------- 文件列表 ---------------- */
.filelist { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.filelist li {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 16px; display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-sm); transition: all .18s;
}
.filelist li:hover { border-color: var(--primary); box-shadow: var(--shadow-md); }
.filelist li .f-ico { font-size: 20px; }
.filelist a { flex: 1; font-weight: 500; }

/* ---------------- 附件 chips ---------------- */
.att-list { margin-top: 10px; font-size: 13px; }
.att-list .lbl { color: var(--text-2); margin-right: 6px; }
.att-chip {
  display: inline-flex; align-items: center; gap: 2px; background: var(--primary-light);
  color: var(--primary-dark); border-radius: 999px; padding: 3px 6px 3px 12px;
  margin: 3px 6px 3px 0; font-size: 12.5px; border: 1px solid #cbe7d8;
}
.link-danger {
  background: none; border: none; color: var(--danger); cursor: pointer;
  font-weight: bold; padding: 0 6px; font-size: 14px; border-radius: 999px;
}
.link-danger:hover { background: #fee2e2; }

/* ---------------- 空状态 ---------------- */
.empty {
  text-align: center; padding: 56px 20px; color: var(--text-2);
  background: var(--surface); border-radius: var(--radius); border: 1px dashed #d1d5db;
}
.empty .big { font-size: 42px; display: block; margin-bottom: 10px; }
.empty.small { padding: 18px; font-size: 14px; box-shadow: none; background: transparent; border: none; }

/* ---------------- 登录页 ---------------- */
.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(ellipse at 15% 20%, rgba(74, 222, 128, .18) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 80%, rgba(217, 119, 6, .12) 0%, transparent 50%),
    linear-gradient(150deg, #0e2b1d 0%, #14532d 45%, #1e6f4d 100%);
  padding: 20px;
}
.login-card {
  background: rgba(255,255,255,.97); border-radius: 20px; padding: 46px 44px 40px;
  width: 400px; box-shadow: 0 30px 80px rgba(0,0,0,.4);
  animation: rise .5s ease-out;
}
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.login-card .logo {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 18px;
  background: linear-gradient(135deg, var(--primary) 0%, #4ade80 130%);
  display: flex; align-items: center; justify-content: center; font-size: 32px;
  box-shadow: 0 10px 24px rgba(30, 111, 77, .35);
}
.login-card h1 { font-size: 21px; text-align: center; margin-bottom: 4px; letter-spacing: 1px; }
.login-card .sub { text-align: center; color: var(--text-2); margin-bottom: 26px; font-size: 13.5px; }
.login-card label { margin-top: 16px; }
.login-card input {
  width: 100%; padding: 11px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: #fafbfa; transition: all .18s;
}
.login-card input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(30, 111, 77, .14); }
.login-card button { margin-top: 28px; padding: 12px; font-size: 15px; font-weight: 600; border-radius: 10px; }
.login-card .tip { margin-top: 18px; text-align: center; font-size: 12px; color: var(--text-2); }

/* ---------------- 用户管理 ---------------- */
.user-table input[type=password] { min-width: 160px; width: auto; padding: 5px 10px; font-size: 13px; }

/* ---------------- 功能验证 ---------------- */
.fn-checks {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px;
  background: #f8fbf9; border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px;
}
.fn-chk {
  margin: 0; padding: 6px 14px; border: 1.5px solid #cbd5d0; border-radius: 999px;
  font-size: 14px; cursor: pointer; transition: all .15s; background: #fff; font-weight: 500;
}
.fn-chk:hover { border-color: var(--primary); }
.fn-chk:has(input:checked) {
  background: var(--primary); border-color: var(--primary); color: #fff;
}
.fn-chk:has(input:checked)::after { content: " ✓"; }

/* 列表页功能筛选下拉 */
.fn-filter {
  padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); font-size: 14px; box-shadow: var(--shadow-sm);
  cursor: pointer; font-family: inherit;
}
.fn-filter:focus { outline: none; border-color: var(--primary); }
.fn-cell { max-width: 220px; display: flex; gap: 4px; flex-wrap: wrap; }

/* 详情页功能徽章 */
.fn-detail { margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.fn-badge { font-size: 13px; padding: 4px 14px; }

/* ---------------- 抑菌记录（表单） ---------------- */
.inhib-tip {
  font-size: 12.5px; color: var(--text-2); background: #f8faf9;
  border: 1px dashed var(--border); border-radius: 8px; padding: 7px 12px;
  margin: -2px 0 10px;
}
.inhib-row {
  display: grid; gap: 10px;
  align-items: center; margin-bottom: 10px; padding: 12px;
  background: #fff9f2; border: 1px solid #f3e0c8; border-radius: 10px;
}
/* 抑菌记录卡片：一个病原菌一张卡片，三行重复数值 */
.inhib-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px;
  margin-bottom: 12px; background: #fff;
}
.inhib-card-top {
  display: grid; grid-template-columns: 1.6fr 0.8fr auto auto; gap: 8px;
  align-items: center; margin-bottom: 8px;
}
.inhib-card-top input[type=text] { background: #fff; }
.inhib-reps { display: grid; gap: 6px; margin-bottom: 8px; }
.inhib-rep {
  display: grid; grid-template-columns: 52px 1fr 18px 1fr; gap: 8px;
  align-items: center;
}
.rep-tag {
  font-size: 12px; font-weight: 600; color: var(--primary-dark);
  background: #ede9fe; border-radius: 6px; text-align: center; padding: 3px 0;
}
.inhib-rep .arrow { color: var(--text-3); text-align: center; }
.inhib-rep input[type=number] { background: #fff; }
.fld.grow { flex: 1; }
.fld.grow input { width: 100%; }

/* 详情页重复值展示 */
.reps-line { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; align-items: center; }
.rep-pill {
  display: inline-flex; align-items: baseline; gap: 3px; padding: 4px 10px;
  border-radius: 8px; background: var(--surface); border: 1px solid var(--line);
  font-size: 13px;
}
.rep-pill em { font-style: normal; color: var(--text-2); font-size: 12px; }
.rep-pill.avg { background: #ecfdf5; border-color: #a7f3d0; }
.rep-pill.avg b { color: #047857; }
.muted { color: var(--text-3); }

/* 八列布局（旧版行式录入，已由卡片替代，保留兼容） */
.inhib-row { grid-template-columns: 1.3fr 0.75fr 0.65fr 0.65fr 0.75fr auto 1fr auto; }
.inhib-row input[type=text], .inhib-row input[type=number], .inhib-row select { background: #fff; }
#inhib-add { margin-top: 2px; }
.att-chip.wide { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 6px 12px; border-radius: 10px; }
.att-chip.wide em { font-style: normal; color: var(--text-2); }

/* 明显抑菌圈红*标记与轮次徽章 */
.red-star { color: #dc2626; font-weight: 700; font-style: normal; }
.red-star.big { font-size: 20px; line-height: 1; }
.inhib-mark { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.inhib-mark input { width: 15px; height: 15px; accent-color: #dc2626; cursor: pointer; }
.trial-badge { background: #ede9fe; color: #5b21b6; font-weight: 600; }

/* 编辑页：已有抑菌记录（可修改） */
.inhib-edit-block { margin-top: 16px; }
.inhib-edit-row {
  background: #fff9f2; border: 1px solid #f3e0c8; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 12px;
}
.inhib-edit-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px 14px; margin-bottom: 8px;
}
label.mini { margin: 0 0 4px; font-size: 12px; color: var(--text-2); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- 用户管理：组织权限表单 ---------------- */
.user-table td { vertical-align: top; }
.org-access-form select { width: auto; min-width: 130px; padding: 5px 10px; font-size: 13px; margin-top: 2px; }
.org-access-form .chk { margin: 2px 12px 2px 0; font-size: 13px; }
.org-access-form .btn { margin-top: 8px; }
.inhib-edit-row .att-chip a { color: var(--primary-dark); }

/* 详情页病原菌分组 */
.pathogen-group { margin-bottom: 22px; }
.pathogen-head {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
  padding: 10px 16px; background: linear-gradient(90deg, #fff9f2, #fff);
  border-left: 4px solid var(--accent); border-radius: 8px; font-size: 14.5px;
  flex-wrap: wrap;
}
.pathogen-head .latin { color: #92400e; }
.rate-pill {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fee2e2; color: #991b1b; border-radius: 999px;
  padding: 3px 14px; font-size: 13px; font-weight: 500;
}
.rate-pill b { font-size: 15px; }

/* ---------------- 权限横幅与申请 ---------------- */
.perm-banner {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  background: linear-gradient(90deg, #fffbeb, #fff); border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b; border-radius: 10px; padding: 12px 18px;
  margin-bottom: 18px; flex-wrap: wrap; font-size: 14px;
}
.perm-apply summary { list-style: none; cursor: pointer; white-space: nowrap; }
.perm-apply summary::-webkit-details-marker { display: none; }
.perm-form { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.perm-form input { min-width: 320px; width: auto; }

/* ---------------- 视图模式切换 ---------------- */
.mode-switch {
  display: inline-flex; background: #e6ede9; border-radius: 10px; padding: 4px;
  gap: 4px; margin-bottom: 16px;
}
.mode-btn {
  padding: 7px 18px; border-radius: 8px; font-size: 14px; color: var(--text-2);
  font-weight: 500; transition: all .18s;
}
.mode-btn:hover { color: var(--primary-dark); }
.mode-btn.active {
  background: var(--surface); color: var(--primary-dark); box-shadow: var(--shadow-sm);
  font-weight: 600;
}

/* ---------------- 批量操作栏（列表勾选行） ---------------- */
.batch-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 10px 16px; margin-bottom: 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line);
  transition: border-color .18s, box-shadow .18s;
}
.batch-bar.active {
  border-color: var(--primary); box-shadow: var(--shadow-sm);
}
.batch-count { font-size: 14px; color: var(--text-2); }
.batch-count b { color: var(--primary-dark); font-size: 16px; }
.batch-sep { width: 1px; height: 20px; background: var(--line); margin: 0 2px; }
a.btn.disabled {
  opacity: .45; pointer-events: none; cursor: default;
}
/* 勾选列：窄列不占空间，复选框加大便于点击 */
.chk-col { width: 34px; padding-left: 10px !important; padding-right: 0 !important; white-space: nowrap; }
.row-check {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary);
  vertical-align: middle;
}
@media (max-width: 720px) {
  .batch-bar { position: sticky; top: 8px; z-index: 20; }
  .batch-sep { display: none; }
}

/* ---------------- 按用户分组视图 ---------------- */
.user-group { margin-bottom: 26px; }
.user-group-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
  padding: 12px 18px; background: linear-gradient(90deg, var(--primary-light), #fff);
  border-left: 4px solid var(--primary); border-radius: 8px; font-size: 15px; font-weight: 600;
}

/* ---------------- 申请审批（用户管理页） ---------------- */
.req-card { border: 1px solid #fde68a; background: #fffdf5; }
.req-item {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  padding: 12px 4px; border-bottom: 1px dashed #fde68a; flex-wrap: wrap;
}
.req-item:last-child { border-bottom: none; }
.req-ops { display: flex; gap: 8px; }
.req-reason { color: var(--text-2); font-size: 13.5px; }
.req-history { list-style: none; font-size: 13.5px; color: var(--text-2); }
.req-history li { padding: 5px 0; border-bottom: 1px dashed var(--border); }

/* ---------------- 列表页筛选卡片（功能/属/种组合筛选） ---------------- */
.filter-card { padding: 18px 22px; margin-bottom: 16px; }
.filter-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 7px 0;
}
.filter-row + .filter-row { border-top: 1px dashed var(--border); }
.filter-label {
  font-size: 13.5px; font-weight: 600; color: var(--primary-dark);
  flex-shrink: 0; min-width: 44px; margin: 0;
}
.filter-card .fn-checks.flat { padding: 0; border: none; background: none; flex: 1; }
.filter-card .fn-chk { padding: 5px 13px; font-size: 13.5px; }
.filter-card .fn-filter { width: auto; min-width: 150px; max-width: 260px; padding: 8px 12px; }
.filter-card input[type=text] { flex: 1; min-width: 220px; width: auto; max-width: 480px; }
.seg {
  display: inline-flex; background: #e6ede9; border-radius: 9px; padding: 3px;
  gap: 3px; flex-shrink: 0;
}
.seg-btn {
  margin: 0; padding: 5px 14px; font-size: 13px; color: var(--text-2);
  cursor: pointer; border-radius: 7px; transition: all .15s; font-weight: 500;
  display: inline-flex; align-items: center;
}
.seg-btn input { display: none; }
.seg-btn:has(input:checked) { background: var(--surface); color: var(--primary-dark); font-weight: 600; box-shadow: var(--shadow-sm); }

/* 已启用筛选 chips */
.active-filters {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px; font-size: 13.5px;
}
.active-filters .att-chip { cursor: pointer; }
.active-filters .att-chip:hover { background: #d5ecdf; }
.small { font-size: 12.5px; }

/* 分类浏览统计 */
.taxa-card { padding: 14px 22px; margin-bottom: 22px; }
.taxa-line {
  display: flex; align-items: baseline; gap: 14px; padding: 7px 0; flex-wrap: wrap;
}
.taxa-line + .taxa-line { border-top: 1px dashed var(--border); }
.taxa-label { font-size: 13.5px; font-weight: 700; color: var(--primary-dark); flex-shrink: 0; }
.taxa-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.taxa-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--primary-light); color: var(--primary-dark);
  border: 1px solid #cbe7d8; border-radius: 999px;
  padding: 3px 14px; font-size: 13px; transition: all .15s;
}
.taxa-chip b { font-size: 14px; }
.taxa-chip:hover { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 720px) {
  .nav-inner { height: auto; padding: 10px 16px; flex-direction: column; gap: 8px; }
  .container { padding: 0 14px; margin: 18px auto; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .filter-card .fn-filter { max-width: none; flex: 1; }
  .filter-card input[type=text] { max-width: none; }
  .filter-label { min-width: auto; }
  .card { padding: 20px 16px; }
  .inhib-row { grid-template-columns: 1fr; }
  .inhib-edit-grid { grid-template-columns: 1fr; }
}

/* ================= v2.1 新增样式 ================= */

/* 详情页：序列操作按钮行（复制 + BLAST） */
.seq-actions { display: flex; gap: 10px; justify-content: flex-end; margin-bottom: 10px; flex-wrap: wrap; }
.seq-actions .copy-btn { position: static; }

/* 详情页：二维码小图 */
.qr-mini { width: 34px; height: 34px; display: block; border-radius: 4px; }

/* ---------------- 抑菌图表 ---------------- */
.chart-card { padding: 16px 20px; }
.chart-card .pathogen-head { margin-bottom: 10px; }
.bar-svg { width: 100%; height: auto; display: block; max-width: 900px; }
.bar-svg .bar-label { font-size: 12px; fill: #374151; font-family: Consolas, "Courier New", monospace; }
.bar-svg .bar-rect { fill: var(--primary); }
.bar-svg .bar-val { font-size: 12px; fill: var(--primary-dark); font-weight: 600; }

/* 热图矩阵 */
.heat-wrap { margin-bottom: 12px; }
.heat-table { min-width: 640px; }
.heat-th { max-width: 110px; white-space: normal; font-size: 12px; line-height: 1.4; }
.heat-cell { text-align: center; font-weight: 600; min-width: 52px; }
.heat-na { color: #9ca3af; background: #f3f4f6; font-weight: 400; }
.heat-row-head { white-space: nowrap; text-align: left; font-size: 13px; }

/* ---------------- 打印标签页 ---------------- */
.labels-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.label-card {
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  padding: 18px 20px; display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-sm); page-break-inside: avoid;
}
.label-qr { width: 108px; height: 108px; flex-shrink: 0; border: 1px solid var(--border); border-radius: 6px; }
.label-info { display: flex; flex-direction: column; gap: 3px; word-break: break-all; }
.label-code { font-size: 24px; font-weight: 700; color: var(--primary-dark); font-family: Consolas, "Courier New", monospace; }
.label-taxon { font-style: italic; color: var(--text-2); font-size: 15px; }
.label-loc, .label-acc { font-size: 13.5px; color: var(--text); }

/* 打印时隐藏工具栏/导航/页脚，仅保留标签卡片 */
@media print {
  .topnav, .flashes, .no-print, footer.version { display: none !important; }
  .container { margin: 0; padding: 0; max-width: none; }
  body { background: #fff; }
  .labels-grid { gap: 10px; }
  .label-card { box-shadow: none; border: 1px solid #999; }
}

/* 地点聚合行末尾的地图外链 */
.taxa-chip.map-link { background: #fff; border-color: #c8dbe5; color: #1d4ed8; }
.taxa-chip.map-link:hover { background: #1d4ed8; border-color: #1d4ed8; color: #fff; }

/* 批量导入结果 */
.import-summary { font-size: 15px; }
.ok-num { color: var(--primary); font-size: 20px; }
.fail-num { color: var(--danger); font-size: 20px; }

/* 审计日志详情列 */
.audit-detail { word-break: break-all; font-size: 13.5px; }
