/* ===== 技能实操平台 · 设计系统 ===== */
:root{
  --ink:#333A44; --ink-2:#4E5864; --muted:#7C8794; --faint:#A8B2BE;
  --line:#DCE9F5; --line-2:#EDF4FA;
  --bg:#F7FBFF; --surface:#FFFFFF; --surface-2:#EFF6FD;
  --primary:#2E8BE0; --primary-600:#1F74C8; --primary-700:#185FA8;
  --primary-50:#EFF6FD; --primary-100:#DCE9F5;
  --accent:#E45C5C; --accent-50:#FDEDED;
  --ok:#2E9E5B; --ok-50:#EAF7EF;
  --warn:#C08A16; --warn-50:#FDF6E3;
  --r-sm:4px; --r:6px; --r-lg:8px;
  --shadow-1:0 1px 2px rgba(20,32,48,.05);
  --shadow-2:0 6px 24px -8px rgba(20,32,48,.14);
  --shadow-3:0 18px 48px -16px rgba(20,32,48,.24);
  --font:"PingFang SC","Microsoft YaHei","Hiragino Sans GB",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  --mono:"SF Mono","JetBrains Mono",ui-monospace,Menlo,Consolas,monospace;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:var(--font); background:var(--bg); color:var(--ink);
  font-size:14px; line-height:1.6; -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,p{margin:0}
a{color:var(--primary); text-decoration:none}
button{font-family:inherit}
::selection{background:var(--primary-100)}
.num{font-variant-numeric:tabular-nums; font-feature-settings:"tnum"}

/* ---------- 基础控件 ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  height:38px; padding:0 16px; border-radius:10px; border:1px solid transparent;
  font-size:14px; font-weight:500; cursor:pointer; white-space:nowrap;
  transition:background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}
.btn:disabled{opacity:.5; cursor:not-allowed}
.btn-primary{background:var(--primary); color:#fff}
.btn-primary:hover:not(:disabled){background:var(--primary-600)}
.btn-primary:active:not(:disabled){background:var(--primary-700)}
.btn-ghost{background:var(--surface); color:var(--ink-2); border-color:var(--line)}
.btn-ghost:hover:not(:disabled){border-color:#A9D2F5; color:var(--ink)}
.btn-quiet{background:transparent; color:var(--ink-2)}
.btn-quiet:hover:not(:disabled){background:var(--line-2)}
.btn-danger{background:var(--accent); color:#fff}
.btn-danger:hover:not(:disabled){background:#A84441}
.btn-lg{height:46px; padding:0 22px; font-size:15px; border-radius:12px}
.btn-sm{height:32px; padding:0 12px; font-size:13px; border-radius:8px}
.btn-block{width:100%}

.field{display:flex; flex-direction:column; gap:7px}
.field label{font-size:13px; color:var(--ink-2); font-weight:500}
.input,.textarea,.select{
  width:100%; border:1px solid var(--line); border-radius:10px; background:var(--surface);
  padding:10px 12px; font-size:14px; font-family:inherit; color:var(--ink);
  transition:border-color .15s ease, box-shadow .15s ease; outline:none;
}
.input{height:44px}
.input:focus,.textarea:focus,.select:focus{border-color:var(--primary); box-shadow:0 0 0 3px var(--primary-50)}
.textarea{resize:vertical; min-height:88px; line-height:1.7}
.input::placeholder,.textarea::placeholder{color:var(--faint)}
.hint{font-size:12px; color:var(--muted)}
.err{font-size:12px; color:var(--accent)}

/* ---------- 卡片 ---------- */
.card{background:var(--surface); border:1px solid var(--line); border-radius:var(--r); box-shadow:var(--shadow-1)}
.card-pad{padding:20px}
.section-title{font-size:15px; font-weight:600; color:var(--ink); display:flex; align-items:center; gap:8px}
.section-title .bar{width:3px; height:14px; border-radius:2px; background:var(--primary)}
.divider{height:1px; background:var(--line-2); margin:16px 0}

/* ---------- 标签 ---------- */
.tag{display:inline-flex; align-items:center; gap:4px; height:22px; padding:0 8px; border-radius:6px; font-size:12px; font-weight:500; background:var(--line-2); color:var(--ink-2)}
.tag-primary{background:var(--primary-50); color:var(--primary)}
.tag-ok{background:var(--ok-50); color:var(--ok)}
.tag-warn{background:var(--warn-50); color:var(--warn)}
.tag-accent{background:var(--accent-50); color:var(--accent)}
.dot{width:6px; height:6px; border-radius:50%; background:currentColor}

/* ---------- 表格 ---------- */
.table{width:100%; border-collapse:separate; border-spacing:0; font-size:13px}
.table th{
  text-align:left; font-weight:500; color:var(--muted); font-size:12px;
  padding:9px 12px; background:var(--surface-2); border-bottom:1px solid var(--line);
  white-space:nowrap;
}
.table th:first-child{border-top-left-radius:8px}
.table th:last-child{border-top-right-radius:8px}
.table td{padding:11px 12px; border-bottom:1px solid var(--line-2); color:var(--ink-2)}
.table tbody tr:last-child td{border-bottom:none}
.table tbody tr:hover td{background:var(--surface-2)}
.table .strong{color:var(--ink); font-weight:500}

/* ---------- 空态 ---------- */
.empty{display:flex; flex-direction:column; align-items:center; justify-content:center; gap:8px; padding:48px 20px; text-align:center}
.empty .ico{width:44px; height:44px; border-radius:12px; background:var(--line-2); display:grid; place-items:center; color:var(--faint)}
.empty p{color:var(--muted); font-size:13px}

/* ---------- 进度条 ---------- */
.bar-track{height:6px; border-radius:99px; background:var(--line-2); overflow:hidden}
.bar-fill{height:100%; border-radius:99px; background:var(--primary); transition:width .3s ease}

/* ---------- Toast ---------- */
#toast-wrap{position:fixed; top:20px; left:50%; transform:translateX(-50%); z-index:9999; display:flex; flex-direction:column; gap:8px; align-items:center; pointer-events:none}
.toast{
  display:flex; align-items:center; gap:8px; padding:10px 16px; border-radius:10px;
  background:var(--ink); color:#fff; font-size:13px; box-shadow:var(--shadow-2);
  animation:toastIn .2s ease;
}
.toast.ok{background:#1E5C46}
.toast.err{background:#9E3F3C}
@keyframes toastIn{from{opacity:0; transform:translateY(-6px)}to{opacity:1; transform:none}}

/* ---------- Modal ---------- */
.overlay{position:fixed; inset:0; background:rgba(18,35,58,.42); backdrop-filter:blur(2px); z-index:9000; display:grid; place-items:center; padding:24px}
.modal{background:var(--surface); border-radius:var(--r-lg); box-shadow:var(--shadow-3); width:100%; max-width:520px; max-height:86vh; overflow:auto}
.modal-head{padding:20px 22px 0; font-size:16px; font-weight:600}
.modal-body{padding:16px 22px 20px; color:var(--ink-2); font-size:14px}
.modal-foot{padding:0 22px 20px; display:flex; gap:10px; justify-content:flex-end}

/* ---------- 顶栏 ---------- */
.topbar{
  height:60px; background:var(--surface); border-bottom:1px solid var(--line);
  display:flex; align-items:center; gap:16px; padding:0 24px; position:sticky; top:0; z-index:100;
}
.brand{display:flex; align-items:center; gap:9px; font-weight:600; font-size:15px; color:var(--ink); letter-spacing:-.01em}
.brand-mark{
  width:28px; height:28px; border-radius:8px; background:var(--primary); color:#fff;
  display:grid; place-items:center; font-size:13px; font-weight:700; letter-spacing:.02em;
}
.spacer{flex:1}
.avatar{width:30px; height:30px; border-radius:50%; background:var(--primary-100); color:var(--primary); display:grid; place-items:center; font-size:12px; font-weight:600}

/* ---------- 工具类 ---------- */
.row{display:flex; align-items:center; gap:10px}
.col{display:flex; flex-direction:column}
.between{justify-content:space-between}
.wrap{flex-wrap:wrap}
.g4{gap:4px}.g8{gap:8px}.g12{gap:12px}.g16{gap:16px}.g24{gap:24px}
.muted{color:var(--muted)}
.small{font-size:12px}
.center{text-align:center}
.hidden{display:none !important}
.mono{font-family:var(--mono)}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar{width:10px; height:10px}
::-webkit-scrollbar-thumb{background:#DCE9F5; border-radius:99px; border:3px solid transparent; background-clip:content-box}
::-webkit-scrollbar-thumb:hover{background:#BCC7D4; background-clip:content-box; border:3px solid transparent}
::-webkit-scrollbar-track{background:transparent}

/* ===== 选择控件统一主题蓝 ===== */
/* 原生勾选框/单选框：不再跟随系统灰/系统强调色 */
input[type="checkbox"], input[type="radio"] { accent-color: #2E8BE0; }

/* 原生下拉弹层皮肤（lib.js 渲染，全站统一）：选中项蓝底白字 */
.bs-pop{position:fixed;z-index:4000;background:#fff;border:1px solid #DCE9F5;border-radius:4px;
  box-shadow:0 10px 26px rgba(24,95,168,.16);padding:4px;max-height:288px;overflow:auto;
  font-size:13px;font-family:inherit;box-sizing:border-box}
.bs-opt{height:30px;line-height:30px;padding:0 10px;border-radius:3px;color:#17324D;
  cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bs-opt:hover{background:#EFF6FD;color:#185FA8}
.bs-opt.on{background:#2E8BE0;color:#fff}
.bs-opt.on:hover{background:#1F74C8;color:#fff}
.bs-opt.ph{color:#909399}
.bs-opt.ph.on{color:#fff}
