/* labelcheck 统一主题 · 亮白 + 电光紫（欧美扁平风）
   规则：无渐变、无阴影、0.5px 细线、圆角克制、亮白底 + 电光紫主色 + 玫红差异 */

:root{
  --ink:#15111F;          /* 主文字 · 近黑带紫调 */
  --ink-2:#3A3350;        /* 次级文字 */
  --muted:#6E6784;        /* 弱化文字 */
  --line:#E5E0F0;         /* 细线 */
  --line-2:#D6CEE6;       /* 强调线 */
  --bg:#F6F4FA;           /* 页面底 */
  --surface:#FFFFFF;      /* 卡片面 */
  --surface-2:#FAF8FD;    /* 次级面 */
  --surface-3:#F1EDF8;    /* 三级面 */

  --accent:#7C3AED;       /* 主色 · 电光紫 */
  --accent-soft:#EFE8FE;  /* 浅紫底 */
  --accent-ink:#5B21B6;   /* 紫底上的文字 */

  --danger:#E11D48;       /* 差异 */
  --danger-soft:#FDE8EF;
  --warn:#B45309;         /* 需人工核对 */
  --warn-soft:#FBEEDC;
}

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:-apple-system,"PingFang SC","Microsoft YaHei",sans-serif;
  background:var(--bg);
  color:var(--ink);
  -webkit-font-smoothing:antialiased;
}

.wrap{ max-width:1040px; margin:0 auto; padding:20px 16px 60px; }

/* ---------- 顶栏 ---------- */
.topbar{ display:flex; align-items:center; gap:12px; padding:12px 0; }
.topbar .brand{ font-size:18px; color:var(--ink); font-weight:600; display:flex; align-items:center; }
.topbar .brand::before{ content:''; width:20px; height:20px; border-radius:5px;
                        background:var(--ink); margin-right:9px; flex:none; }
.topbar .sp{ flex:1; }

/* ---------- 统一页面表头（LOGO + 主标题 + 副标题 + 右侧菜单）---------- */
/* 全站各页面表头统一，结构与核验首页一致 */
.topbar.head{ padding:12px 0 14px; border-bottom:0.5px solid var(--line); margin-bottom:16px; }
.topbar.head #umenu{ align-self:flex-end; margin-bottom:3px; }
.topbar.head .ph-logo{ width:56px; height:56px; object-fit:contain; flex:none; }
.topbar.head .ph-text{ min-width:0; }
.topbar.head .ph-text h1{ margin:0 0 5px; font-size:22px; font-weight:600; color:var(--ink);
                          line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.topbar.head .ph-text p{ margin:0; color:var(--muted); font-size:13.5px; line-height:1.3;
                         white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
/* 窄屏时 LOGO 与字号略收，避免挤压 */
@media (max-width:600px){
  .topbar.head .ph-logo{ width:42px; height:42px; }
  .topbar.head .ph-text h1{ font-size:18px; }
  .topbar.head .ph-text p{ font-size:12.5px; white-space:normal; }
}

/* ---------- 标题 ---------- */
h2{ font-size:17px; color:var(--ink); margin:18px 0 10px; }
.card h2{ margin:0 0 12px; font-size:16px; color:var(--ink); }

/* ---------- 卡片 ---------- */
.card{
  background:var(--surface);
  border:0.5px solid var(--line);
  border-radius:12px;
  padding:18px 20px;
  margin:16px 0;
}

/* ---------- 按钮 ---------- */
.btn{
  background:var(--accent); color:#fff; border:0.5px solid var(--accent);
  padding:9px 16px; border-radius:8px; cursor:pointer;
  font-size:13px; font-family:inherit; text-decoration:none; display:inline-block;
}
.btn:hover{ background:var(--accent-ink); border-color:var(--accent-ink); }
.btn.gray{ background:var(--surface); color:var(--ink-2); border-color:var(--line-2); }
.btn.gray:hover{ background:var(--surface-2); }
.btn.danger{ background:var(--danger); border-color:var(--danger); }
.btn.danger:hover{ background:#A32020; border-color:#A32020; }
.btn.sm{ padding:6px 11px; font-size:12.5px; }
.btn:disabled{ opacity:.55; cursor:wait; }

/* ---------- 表单 ---------- */
.inp, .ta, select.inp{
  padding:9px 11px; border:0.5px solid var(--line-2); border-radius:8px;
  font-size:14px; font-family:inherit; background:var(--surface); color:var(--ink);
}
.inp:focus, .ta:focus, select.inp:focus{
  outline:none; border-color:var(--accent); box-shadow:0 0 0 2px var(--accent-soft);
}
.ta{ width:100%; min-height:150px; resize:vertical; line-height:1.6; }
.row2{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.row{ display:flex; align-items:center; gap:12px; margin-top:12px; }

/* ---------- 表格 ---------- */
table{ width:100%; border-collapse:collapse; font-size:13.5px; background:var(--surface); }
th,td{ border-bottom:0.5px solid var(--line); padding:9px 11px; text-align:left; vertical-align:middle; }
th{ background:var(--surface-2); color:var(--ink); text-align:center; }
td.center{ text-align:center; }
.mono{ font-family:ui-monospace,Consolas,Menlo,monospace; font-size:12.5px; word-break:break-all; }

/* ---------- 徽章 ---------- */
.badge{ display:inline-block; padding:1px 9px; border-radius:10px; font-size:11.5px; font-weight:600; }
.badge.none{ background:var(--surface-3); color:var(--muted); }
.badge.cat{ background:var(--surface-2); color:var(--ink-2); border:0.5px solid var(--line); }
.badge.ok{ background:var(--surface-2); color:var(--ink-2); }
.badge.bad{ background:var(--danger-soft); color:var(--danger); }
.badge.warn{ background:var(--warn-soft); color:var(--warn); }
.badge.on{ background:var(--accent-soft); color:var(--accent-ink); }
.badge.off{ background:var(--surface-3); color:var(--muted); }
.badge.r0{ background:var(--surface-3); color:var(--muted); }
.badge.r1{ background:var(--accent-soft); color:var(--accent-ink); }
.badge.r2{ background:var(--accent); color:#fff; }
.badge.force{ background:var(--warn-soft); color:var(--warn); }

/* ---------- 提示条 ---------- */
.hint{ color:var(--muted); font-size:12.5px; margin:8px 0 0; line-height:1.7; }
.err{ background:var(--danger-soft); border:0.5px solid #F0B9B9; color:var(--danger);
      border-radius:9px; padding:9px 12px; font-size:13px; margin-bottom:12px; }
.ok{ background:var(--accent-soft); border:0.5px solid var(--accent); color:var(--accent-ink);
     border-radius:9px; padding:9px 12px; font-size:13px; margin-bottom:12px; word-break:break-all; }

/* ---------- 分页 ---------- */
.pager{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; justify-content:center; margin:14px 0 4px; }
.pager a, .pager span{ padding:6px 11px; border-radius:8px; font-size:13px; text-decoration:none;
                       border:0.5px solid var(--line); background:var(--surface); color:var(--ink-2);
                       min-width:34px; text-align:center; }
.pager a:hover{ background:var(--surface-2); }
.pager .cur{ background:var(--accent); color:#fff; border-color:var(--accent); font-weight:600; }
.pager .dis{ color:#B8B8B4; background:var(--surface-2); }
.pager .info{ border:none; background:none; color:var(--muted); }

/* ---------- 行内图标按钮 ---------- */
.ops{ display:flex; gap:6px; justify-content:center; }
.ibtn{ width:30px; height:30px; padding:0; display:inline-flex; align-items:center; justify-content:center;
       border:0.5px solid transparent; border-radius:8px; cursor:pointer; font-size:14px;
       line-height:1; flex:none; background:none; }
.ibtn.edit{ background:var(--surface-2); color:var(--ink-2); border-color:var(--line); }
.ibtn.edit:hover{ background:var(--accent-soft); border-color:var(--accent); }
.ibtn.del{ background:var(--danger-soft); color:var(--danger); }
.ibtn.del:hover{ background:#F7D6D6; }

/* ---------- 弹窗 ---------- */
.mask{ position:fixed; inset:0; background:rgba(28,28,27,.45); display:none;
       align-items:center; justify-content:center; z-index:99; padding:16px; }
.mask.on{ display:flex; }
.modal{ background:var(--surface); border-radius:12px; width:100%; max-width:520px;
        border:0.5px solid var(--line); overflow:hidden; }
.modal_h{ background:var(--accent); color:#fff; font-size:15px; font-weight:600; padding:13px 18px; }
.modal_b{ padding:16px 18px; font-size:13.5px; line-height:1.7; }
.modal_b th, .modal_b td{ padding:6px 8px; }
.modal_b th{ background:var(--surface-2); width:88px; text-align:left; }
.modal_b .old{ color:var(--muted); text-decoration:line-through; }
.modal_b .new{ color:var(--danger); font-weight:600; }
.modal_b .same{ color:var(--ink-2); }
.modal_f{ display:flex; gap:10px; justify-content:flex-end; padding:12px 18px 16px; }

/* ---------- 用户名下拉菜单 ---------- */
#umenu{ position:relative; display:inline-block; font-family:inherit; }
#umenu .um_btn{ display:flex; align-items:center; gap:8px; background:var(--surface); color:var(--ink);
        border:0.5px solid var(--line-2); border-radius:22px; padding:5px 12px 5px 5px;
        font-size:13.5px; cursor:pointer; font-family:inherit; line-height:1; }
#umenu .um_btn:hover{ background:var(--surface-2); border-color:var(--accent); }
#umenu .um_av{ width:28px; height:28px; border-radius:50%; background:var(--accent); color:#fff;
       display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:600; flex:none; }
#umenu .um_name{ font-weight:600; color:var(--ink); max-width:160px; overflow:hidden;
        text-overflow:ellipsis; white-space:nowrap; }
#umenu .um_car{ color:var(--muted); font-size:11px; transition:transform .15s; }
#umenu:hover .um_car, #umenu.on .um_car{ transform:rotate(180deg); }
#umenu .um_drop{ position:absolute; right:0; top:100%; padding-top:12px; display:none; z-index:120; text-align:left; }
#umenu:hover .um_drop, #umenu.on .um_drop{ display:block; }
#umenu .um_panel{ min-width:200px; background:var(--surface); border:0.5px solid var(--line);
        border-radius:10px; padding:6px; }
#umenu .um_hd{ padding:8px 12px 7px; font-size:11.5px; color:var(--accent-ink);
       background:var(--accent-soft); border-radius:6px; margin-bottom:4px; }
#umenu .um_drop a{ display:block; padding:9px 12px; border-radius:7px; color:var(--ink-2);
       text-decoration:none; font-size:13.5px; background:none; }
#umenu .um_drop a:hover{ background:var(--surface-2); }
#umenu .um_drop a.cur{ background:var(--accent-soft); color:var(--ink); font-weight:600; }
#umenu .um_drop a.dg{ color:var(--danger); }
#umenu .um_drop a.dg:hover{ background:var(--danger-soft); }
#umenu .um_sp{ height:0.5px; background:var(--line); margin:4px 2px; }

/* ---------- 动画 ---------- */
.spin{ display:inline-block; width:14px; height:14px; margin-right:8px; vertical-align:-2px;
       border:2px solid var(--line-2); border-top-color:var(--accent); border-radius:50%;
       animation:spin .8s linear infinite; }
@keyframes spin{ to{ transform:rotate(360deg); } }
.dots i{ display:inline-block; font-style:normal; margin-left:1px; animation:blink 1.2s infinite both; }
.dots i:nth-child(2){ animation-delay:.2s; }
.dots i:nth-child(3){ animation-delay:.4s; }
@keyframes blink{ 0%,100%{ opacity:.25; } 50%{ opacity:1; } }
.pulse{ animation:pulse 1.6s ease-in-out infinite; }
@keyframes pulse{ 0%,100%{ opacity:1; } 50%{ opacity:.5; } }
.hidden{ display:none; }
