/* ============================================================
   环境检测 LIMS 管理平台 - 统一样式 (无外部依赖)
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #2563eb; --primary-dark: #1d4ed8;
  --danger: #dc2626; --success: #16a34a; --warning: #d97706;
  --sidebar-bg: #111827; --sidebar-w: 216px;
  --bg: #f3f4f6; --card: #fff; --border: #e5e7eb;
  --text: #1f2937; --text-2: #6b7280;
}
body { font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar-w); background: var(--sidebar-bg); color: #d1d5db; flex-shrink: 0; position: fixed; top: 0; bottom: 0; display: flex; flex-direction: column; }
.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100vh; }
.content { flex: 1; padding: 5px; }
.footer { text-align: center; color: var(--text-2); font-size: 12px; padding: 12px; border-top: 1px solid var(--border); background: var(--card); }

.brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; border-bottom: 1px solid #1f2937; flex-shrink: 0; }
.brand-logo { width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; font-size: 20px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.brand-text { font-size: 16px; font-weight: 600; color: #fff; }
.sidebar-search { padding: 10px 12px 2px; flex-shrink: 0; }
.sidebar-search input { width: 100%; box-sizing: border-box; background: #1f2937; border: 1px solid #374151; border-radius: 8px; color: #e5e7eb; padding: 8px 12px; font-size: 13px; outline: none; }
.sidebar-search input::placeholder { color: #6b7280; }
.sidebar-search input:focus { border-color: var(--primary); }
.menu { flex: 1; overflow-y: auto; padding: 12px 10px; }
.sidebar-foot { border-top: 1px solid #1f2937; padding: 10px 14px 12px; background: #0d1420; flex-shrink: 0; }
.foot-approval { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 8px; background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; margin-bottom: 10px; }
.foot-approval:hover { opacity: .92; color: #fff; text-decoration: none; }
.fa-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .25); flex-shrink: 0; }
.foot-meta { font-size: 12px; color: #6b7280; line-height: 1.9; }
.menu-item { display: block; padding: 10px 14px; margin-bottom: 2px; border-radius: 8px; color: #cbd5e1; font-size: 14px; }
.menu-item:hover { background: #1f2937; color: #fff; text-decoration: none; }
.menu-item.active { background: var(--primary); color: #fff; font-weight: 600; position: relative; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.menu-item.active::after { content: ''; position: absolute; right: 0; top: 20%; bottom: 20%; width: 3px; border-radius: 3px 0 0 3px; background: #fff; }
.menu-item.active .menu-ico { color: #fff; }

.topbar { background: var(--card); border-bottom: 1px solid var(--border); padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 40; }
.topbar-title { font-size: 17px; font-weight: 600; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.topbar-clock { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; color: #374151; background: #f3f4f6; border: 1px solid #e5e7eb; border-radius: 6px; padding: 5px 10px; white-space: nowrap; letter-spacing: 0.2px; }
@media (max-width: 640px) { .topbar-clock { font-size: 12px; padding: 4px 8px; } }
.user-name em { color: var(--text-2); font-style: normal; font-size: 12px; }

/* ---------- 卡片与面板 ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 20px; }
.card-head { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.card-head h2 { font-size: 15px; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.stat-card .num { font-size: 28px; font-weight: 700; margin-top: 6px; }
.stat-card .label { color: var(--text-2); font-size: 13px; }
.stat-card.c1 .num { color: #2563eb; } .stat-card.c2 .num { color: #d97706; }
.stat-card.c3 .num { color: #7c3aed; } .stat-card.c4 .num { color: #16a34a; }
.stat-card.c5 .num { color: #db2777; }
.stat-card.c6 .num { color: #dc2626; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { background: #f9fafb; text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text-2); font-weight: 600; white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.table tr:hover td { background: #f8fafc; }
/* ---------- 操作列按钮统一样式 ---------- */
.table td.ops { white-space: nowrap; }
.table td.ops form { display: inline-block; margin: 0; }
.table td.ops a, .table td.ops button {
  display: inline-block; padding: 3px 10px; margin: 2px 4px 2px 0;
  font-size: 12px; line-height: 1.6; border-radius: 6px; cursor: pointer;
  border: 1px solid #93c5fd; background: #eff6ff; color: #1d4ed8;
  text-decoration: none; vertical-align: middle; font-family: inherit;
}
.table td.ops a:hover, .table td.ops button:hover { border-color: #2563eb; background: #dbeafe; text-decoration: none; color: #1e40af; }
.table td.ops a.danger, .table td.ops button.danger, .table td.ops .btn-danger { color: #b91c1c; border-color: #fca5a5; background: #fef2f2; }
.table td.ops a.danger:hover, .table td.ops button.danger:hover, .table td.ops .btn-danger:hover { background: #fee2e2; border-color: #dc2626; color: #991b1b; }
.table td.ops .btn-primary, .table td.ops .btn-success { color: #fff; border-color: #2563eb; background: #2563eb; }
.table td.ops .btn-success { border-color: #16a34a; background: #16a34a; }
.table td.ops .btn-primary:hover, .table td.ops .btn-success:hover { color: #fff; }

/* ---------- 徽章 ---------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.bg-gray { background: #f3f4f6; color: #4b5563; }
.bg-blue { background: #dbeafe; color: #1d4ed8; }
.bg-green { background: #dcfce7; color: #15803d; }
.bg-orange { background: #ffedd5; color: #c2410c; }
.bg-purple { background: #ede9fe; color: #6d28d9; }
.bg-pink { background: #fce7f3; color: #be185d; }
.bg-red { background: #fee2e2; color: #b91c1c; }
.bg-cyan { background: #cffafe; color: #0e7490; }

/* ---------- 按钮 ---------- */
.btn { display: inline-block; padding: 7px 14px; border-radius: 8px; border: 1px solid transparent; font-size: 13.5px; cursor: pointer; background: var(--primary); color: #fff; }
.btn:hover { background: var(--primary-dark); text-decoration: none; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; border-radius: 6px; }
.btn-xs { padding: 2px 8px; font-size: 12px; border-radius: 6px; }
.btn-outline { background: #fff; color: var(--text); border-color: var(--border); }
.btn-outline:hover { background: #f9fafb; color: var(--primary); }
.btn-success { background: var(--success); } .btn-success:hover { background: #15803d; }
.btn-danger { background: var(--danger); } .btn-danger:hover { background: #b91c1c; }
.btn-warning { background: var(--warning); } .btn-warning:hover { background: #b45309; }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: #eff6ff; }
/* 三个第三方登录按钮统一样式: 等高/等宽/统一间距/文字居中 */
.login-card .btn-wechat, .login-card .btn-wecom, .login-card .btn-dingtalk {
  display: block; width: 100%; box-sizing: border-box; text-align: center;
  padding: 11px 10px; font-size: 15px; line-height: 1.4; white-space: nowrap;
  margin: 10px 0 0;
}
.login-card .btn-wechat { background: #07c160; color: #fff; }
.login-card .btn-wechat:hover { background: #06ad56; }
.login-card .btn-wecom { background: #0082ef; color: #fff; }
.login-card .btn-wecom:hover { background: #0070d4; }
.login-card .btn-dingtalk { background: #1677ff; color: #fff; }
.login-card .btn-dingtalk:hover { background: #0e63e0; }
.login-divider { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 12px; margin: 14px 0; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

/* ---------- 全局输入控件统一 ---------- */
input[type="text"], input[type="number"], input[type="date"], input[type="password"], input[type="email"], input[type="tel"], select, textarea {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: #fff;
  font-family: inherit; box-sizing: border-box; color: var(--text); line-height: 1.5;
}
input[type="text"]:focus, input[type="number"]:focus, input[type="date"]:focus, input[type="password"]:focus, input[type="email"]:focus, input[type="tel"]:focus, select:focus, textarea:focus {
  outline: 2px solid #bfdbfe; border-color: var(--primary);
}
textarea { resize: vertical; }
/* 搜索条: 输入框+按钮 同行等高新式 */
.search-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-line input[type="text"] { width: 220px; }
.search-line .btn { height: 36px; display: inline-flex; align-items: center; white-space: nowrap; }
@media (max-width:720px){ .search-line input[type="text"] { width: 100%; } .search-line .btn { height: 38px; } }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px 18px; }
.form-item label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px; background: #fff;
}
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--primary); }
.form-item textarea { resize: vertical; min-height: 70px; }
.form-item .hint { font-size: 12px; color: var(--text-2); margin-top: 4px; }
.form-actions { margin-top: 20px; display: flex; gap: 10px; }
.form-item.form-full { grid-column: 1 / -1; }

/* ---------- 提示条 ---------- */
.flash { padding: 11px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.flash-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.flash-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.flash-warning { background: #ffedd5; color: #c2410c; border: 1px solid #fed7aa; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 6px; padding: 14px 20px; flex-wrap: wrap; }
.pager a, .pager .pager-cur { display: inline-block; min-width: 30px; height: 30px; line-height: 30px; text-align: center; border-radius: 6px; border: 1px solid var(--border); background: #fff; color: var(--text); padding: 0 6px; }
.pager .pager-cur { background: var(--primary); color: #fff; border-color: var(--primary); }
.pager-info { color: var(--text-2); margin-right: 8px; font-size: 13px; }

/* ---------- 页面头部(操作区横排) ---------- */
.page-head { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.page-head h2 { font-size: 18px; margin: 0; }
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 20px; border-bottom: 1px solid var(--border); }

/* ---------- 详情页 ---------- */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.detail-list { list-style: none; }
.detail-list li { display: flex; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.detail-list li .k { width: 120px; color: var(--text-2); flex-shrink: 0; }
.detail-list li .v { flex: 1; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }

/* ---------- 登录页 ---------- */
.login-body { background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { background: #fff; border-radius: 16px; padding: 40px 42px; width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.login-card h1 { font-size: 20px; text-align: center; margin-bottom: 6px; }
.login-card .sub { text-align: center; color: var(--text-2); font-size: 13px; margin-bottom: 26px; }
.login-card .form-item { margin-bottom: 16px; }
.login-card .btn { width: 100%; padding: 10px; font-size: 15px; }
.login-card .tip { margin-top: 16px; text-align: center; color: var(--text-2); font-size: 12px; }
.login-err { background: #fee2e2; color: #b91c1c; border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 14px; }
/* 登录页移动端适配: 卡片自适应屏宽, 防止小屏溢出错乱 */
@media (max-width: 480px) {
  .login-body { padding: 16px; align-items: flex-start; overflow-y: auto; }
  .login-card { width: 100%; max-width: 380px; padding: 26px 20px; }
  .login-card h1 { font-size: 18px; }
  .login-card .sub { font-size: 12px; margin-bottom: 20px; }
  .login-card .btn { font-size: 14px; padding: 11px 8px; }
  .login-card .tip { font-size: 11px; word-break: break-all; }
  .btn-wechat, .btn-wecom, .btn-dingtalk { white-space: nowrap; }
}

/* ---------- 报告打印 ---------- */
.report-page { background: #fff; max-width: 900px; margin: 20px auto; padding: 40px 48px; border: 1px solid var(--border); border-radius: 8px; }
.report-head { text-align: center; border-bottom: 3px double #111; padding-bottom: 14px; margin-bottom: 22px; }
.report-head h1 { font-size: 22px; letter-spacing: 4px; }
.report-head .report-no { font-size: 13px; margin-top: 6px; color: var(--text-2); }
.report-section { margin-bottom: 20px; }
.report-section h3 { font-size: 14px; border-left: 4px solid var(--primary); padding-left: 8px; margin-bottom: 10px; }
.report-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.report-table th, .report-table td { border: 1px solid #111; padding: 7px 8px; text-align: center; }
.report-table th { background: #f3f4f6; }
.report-table td.l, .report-table th.l { text-align: left; }
.report-sign { display: flex; justify-content: space-between; margin-top: 36px; font-size: 13px; }
.report-sign .sig { text-align: center; width: 160px; }
.report-sign .sig .line { border-bottom: 1px solid #111; height: 34px; margin-bottom: 6px; }
.report-toolbar { max-width: 900px; margin: 14px auto; display: flex; gap: 10px; }
.report-head { position: relative; }
.report-stamp-wrap { position: absolute; top: 6px; right: 8px; text-align: center; opacity: .92; }
.report-verify-line { margin-top: 18px; padding: 8px 12px; background: #fef9c3; border: 1px dashed #ca8a04; border-radius: 6px; font-size: 12px; color: #854d0e; text-align: center; }
.report-outside-warn { margin-top: 14px; padding: 10px 14px; background: #fef2f2; border: 1px solid #fca5a5; border-radius: 6px; font-size: 12px; color: #b91c1c; text-align: center; line-height: 1.7; }
.report-qr { margin-top: 16px; display: flex; align-items: center; gap: 18px; border: 1px dashed #94a3b8; border-radius: 8px; padding: 12px 16px; }
.report-qr-box { text-align: center; }
.report-qr-tip { font-size: 11px; color: #334155; margin-top: 4px; letter-spacing: 1px; }
.report-qr-text { font-size: 12px; color: #475569; line-height: 1.8; }
@media print {
  body { background: #fff; }
  .sidebar, .topbar, .footer, .report-toolbar, .no-print { display: none !important; }
  .main { margin-left: 0; }
  .report-page { border: none; margin: 0; padding: 0; box-shadow: none; }
}

/* ---------- 杂项 ---------- */
.empty { text-align: center; color: var(--text-2); padding: 40px 0; }
.mt10 { margin-top: 10px; } .mt20 { margin-top: 20px; }
.text-muted { color: var(--text-2); }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.progress-track { background: #e5e7eb; border-radius: 20px; height: 10px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 20px; background: var(--primary); }
.sub-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.sub-tabs a { padding: 6px 14px; border-radius: 20px; border: 1px solid var(--border); background: #fff; font-size: 13px; }
.sub-tabs a.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.hl-red { color: var(--danger); font-weight: 600; }

/* ---------- 样品流转 ---------- */
.flow-form { display: flex; flex-direction: column; gap: 8px; }
.flow-form input[type="text"] { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; width: 100%; box-sizing: border-box; }
.timeline { list-style: none; margin: 0; padding: 8px 0; }
.timeline li { position: relative; padding: 10px 0 10px 26px; border-bottom: 1px dashed var(--border); }
.timeline li::before { content: ''; position: absolute; left: 6px; top: 16px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.tl-action { font-weight: 600; margin-right: 10px; }
.photo-grid { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.photo-grid img { width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.inline-form summary { cursor: pointer; list-style: none; }
.inline-form summary::-webkit-details-marker { display: none; }
.inline-form form { padding: 14px; background: #f9fafb; border: 1px solid var(--border); border-radius: 10px; }

/* 附件预览弹窗 */
.pm-mask{display:none;position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:9999;align-items:center;justify-content:center;padding:16px;}
.pm-box{background:#fff;border-radius:12px;width:min(960px,96vw);height:85vh;max-height:92vh;min-height:320px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 20px 60px rgba(0,0,0,.3);}
.pm-head{display:flex;align-items:center;gap:10px;padding:10px 14px;border-bottom:1px solid #e5e7eb;flex-wrap:wrap;}
.pm-name{flex:1;min-width:0;font-size:14px;font-weight:600;color:#111827;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.pm-dl{font-size:13px;color:#1d4ed8;text-decoration:none;white-space:nowrap;}
.pm-close{border:none;background:#f3f4f6;color:#374151;width:30px;height:30px;border-radius:8px;font-size:18px;line-height:1;cursor:pointer;flex:none;}
.pm-close:hover{background:#e5e7eb;}
.pm-frame{flex:1;width:100%;border:none;min-height:0;background:#fff;}
@media (max-width:640px){.pm-mask{padding:8px;}.pm-box{width:98vw;max-height:96vh;}}

/* 必填红色星号提示 */
.req { color: #dc2626; font-style: normal; font-weight: 700; margin-left: 2px; }
label .req { font-size: 14px; }

/* ---------- 布局增强: 表单限宽 + 左右双栏 ---------- */
.form-limit { max-width: 900px; }
.cols { display: grid; grid-template-columns: 320px 1fr; gap: 20px; align-items: start; }
@media (max-width: 1000px) { .cols { grid-template-columns: 1fr; } }
.cols > .card { margin-bottom: 0; }
.page-head .text-muted { font-size: 13px; }

/* ---------- 多标签工作台 (frame.php) ---------- */
.menu-toggle { display: none; border: 1px solid #e5e7eb; background: #fff; border-radius: 8px; padding: 6px 10px; font-size: 16px; cursor: pointer; line-height: 1; margin-right: 8px; }
.tabbar { display: flex; align-items: center; background: #eef1f6; border-bottom: 1px solid #d7dce5; padding: 6px 12px; gap: 10px; }
.topbar-tabs { display: flex; align-items: center; gap: 10px; padding: 7px 16px; }
.topbar-tabs .menu-toggle { flex-shrink: 0; }
.topbar-tabs .tabs { flex: 1; min-width: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 1px; }
.topbar-tabs .tab-actions { flex-shrink: 0; display: flex; gap: 4px; }
.topbar-tabs .topbar-user { flex-shrink: 0; }
.tabs { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: thin; }
.tabs::-webkit-scrollbar { height: 5px; }
.tabs::-webkit-scrollbar-thumb { background: #c3c9d4; border-radius: 3px; }
.tab-item { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 7px 12px 7px 14px; font-size: 13px; cursor: pointer; white-space: nowrap; max-width: 220px; color: #475569; }
.tab-item:hover { background: #f8fafc; border-color: #cbd5e1; }
.tab-item.active { background: #fef2f2; border-color: #f30400; color: #f30400; font-weight: 600; box-shadow: 0 1px 4px rgba(243,4,0,.12); }
.tab-title { overflow: hidden; text-overflow: ellipsis; }
.tab-x { width: 18px; height: 18px; line-height: 16px; text-align: center; border-radius: 50%; color: #94a3b8; font-size: 14px; flex-shrink: 0; }
.tab-x:hover { background: #fee2e2; color: #dc2626; }
.tab-actions { display: flex; gap: 4px; flex-shrink: 0; }
.tab-btn { border: 1px solid #e2e8f0; background: #fff; border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer; color: #475569; }
.tab-btn:hover { border-color: #f30400; color: #f30400; }
.tabpane { flex: 1; position: relative; background: #fff; }
.tab-pane { display: none; position: absolute; inset: 0; }
.tab-pane iframe { width: 100%; height: 100%; border: 0; display: block; }
@media (max-width: 900px) {
  .menu-toggle { display: inline-flex; }
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; z-index: 100; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .topbar-tabs { padding: 5px 8px; gap: 6px; flex-wrap: nowrap; }
  .topbar-tabs .topbar-clock { display: none; }
  .tab-item { padding: 6px 8px 6px 10px; font-size: 12px; max-width: 150px; }
  .tab-btn { padding: 4px 7px; font-size: 11px; }
}

/* ---------- 用户折叠菜单 (frame.php topbar) ---------- */
.user-menu { position: relative; }
.user-menu-btn { display: flex; align-items: center; gap: 7px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 5px 11px 5px 6px; cursor: pointer; font-size: 13px; color: #334155; line-height: 1; transition: border-color .15s; }
.user-menu-btn:hover { border-color: #f30400; }
.user-avatar { width: 25px; height: 25px; border-radius: 50%; background: #f30400; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.user-name { font-weight: 500; white-space: nowrap; }
.user-caret { font-size: 10px; color: #94a3b8; }
.user-dropdown { display: none; position: absolute; right: 0; top: calc(100% + 8px); background: #fff; border: 1px solid #e5e7eb; border-radius: 10px; box-shadow: 0 12px 32px rgba(15,23,42,.14); min-width: 180px; z-index: 300; overflow: hidden; }
.user-dropdown.open { display: block; }
.ud-head { padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid #eef2f7; font-size: 13px; color: #475569; white-space: nowrap; }
.ud-head em { font-style: normal; color: #94a3b8; font-size: 12px; }
.user-dropdown a { display: flex; align-items: center; gap: 9px; padding: 11px 14px; font-size: 13px; color: #334155; text-decoration: none; white-space: nowrap; }
.user-dropdown a:hover { background: #fef2f2; color: #f30400; }
@media (max-width: 900px) {
  .user-name { max-width: 60px; overflow: hidden; text-overflow: ellipsis; }
}
.tab-pane.tab-empty { display: flex; align-items: center; justify-content: center; }


/* ---- 多标签工作台: 模块工具条 + 底部固定分页栏 ---- */
.modbar { display: flex; align-items: center; gap: 8px; padding: 7px 16px; background: #fff; border-bottom: 1px solid #eef0f4; }
.modbar .mod-refresh { border-radius: 8px; padding: 4px 10px; }
.modbar-title { font-size: 18px; font-weight: 700; color: #1e293b; }
.footbar { flex-shrink: 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 10px 16px; background: #f8fafc; border-top: 1px solid #e2e8f0; font-size: 13px; color: #475569; }
.fb-total { color: #334155; }
.fb-ctrl { display: inline-flex; align-items: center; gap: 8px; }
.fb-per select { border: 1px solid #e2e8f0; border-radius: 6px; padding: 3px 4px; font-size: 13px; color: #334155; background: #fff; }
.fb-btn { border: 1px solid #e2e8f0; background: #fff; border-radius: 6px; padding: 3px 11px; font-size: 13px; cursor: pointer; color: #334155; line-height: 1.5; }
.fb-btn:hover:not(:disabled) { border-color: #f30400; color: #f30400; }
.fb-btn:disabled { opacity: .45; cursor: not-allowed; }
.fb-pages { font-weight: 600; color: #1e293b; min-width: 52px; text-align: center; }
.fb-goto { display: inline-flex; align-items: center; gap: 5px; }
.fb-goto input { width: 52px; border: 1px solid #e2e8f0; border-radius: 6px; padding: 3px 6px; font-size: 13px; text-align: center; color: #334155; }
/* 分页条在 iframe 内固定显示于模块底部 */
.pager, .pagination { position: sticky; bottom: 0; z-index: 5; background: #fff; }
@media (max-width: 900px) {
  .modbar { padding: 6px 10px; }
  .footbar { justify-content: center; font-size: 11px; }
}

/* frame 模式: 固定视口高, 顶栏/模块条/底部分页栏固定, 内容区自适应 */
body.frame-body .layout { min-height: 0; }
body.frame-body .main { height: 100vh; overflow: hidden; }
body.frame-body .tabpane { overflow: hidden; }

/* ---------- 全站列表: 冻结表格(序号+操作列冻结, 完整边框) ---------- */
.table-frozen { border-collapse: separate !important; border-spacing: 0; }
.table-frozen th, .table-frozen td { border: none; border-right: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.table-frozen th:first-child, .table-frozen td:first-child { border-left: 1px solid #e5e7eb; }
.table-frozen th:first-child, .table-frozen td:first-child { width: 52px; }
.table-frozen th { background: #f9fafb; }
.table-frozen th:nth-child(1), .table-frozen td:nth-child(1) { position: sticky; left: 0; z-index: 3; background: #fff; }
.table-frozen th:nth-child(2), .table-frozen td:nth-child(2) { position: sticky; left: 52px; z-index: 3; background: #fff; }
.table-frozen th:nth-child(1), .table-frozen th:nth-child(2) { z-index: 5; background: #f9fafb; }
.table-frozen tr:hover td:nth-child(1), .table-frozen tr:hover td:nth-child(2) { background: #fff !important; }
.table-frozen td:first-child { overflow: visible !important; }
.table-frozen td:nth-child(2) { overflow: visible !important; }

/* ---------- 侧边栏菜单分组 ---------- */
.menu-group { font-size: 14px; color: #cbd5e1; padding: 11px 16px 4px; letter-spacing: 1px; font-weight: 500; }
.menu-item.sub { padding-left: 30px; font-size: 14px; }

/* 菜单分组折叠 */
.menu-group { cursor: pointer; user-select: none; display: flex; align-items: center; gap: 8px; }
.menu-group .group-folder { font-size: 14px; flex-shrink: 0; }
.menu-group .group-arrow { font-size: 16px; color: #8a94a6; transition: transform .18s; margin-left: auto; flex-shrink: 0; }
.menu-group.collapsed .group-arrow { transform: rotate(-90deg); }
.menu-group:hover { color: #fff; }
