/* ============================================================
   供应商管理 · 设计系统
   ============================================================ */
:root {
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-50: #eff4ff;
  --primary-100: #dbe6ff;
  --ink: #16203a;
  --text: #2b3550;
  --muted: #6b7690;
  --faint: #9aa3b8;
  --bg: #f4f6fb;
  --surface: #ffffff;
  --border: #e5e9f2;
  --border-strong: #d5dbe8;
  --green: #16a34a;
  --green-50: #e9f9ef;
  --amber: #b45309;
  --amber-50: #fff5e6;
  --red: #dc2626;
  --red-50: #fdecec;
  --orange: #ea580c;
  --orange-50: #fff1e7;
  --gray: #64748b;
  --gray-50: #f1f4f9;
  --dark: #1f2937;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(22, 32, 58, .05);
  --shadow: 0 6px 20px rgba(22, 32, 58, .07);
  --shadow-lg: 0 22px 60px rgba(22, 32, 58, .18);
  --sidebar-w: 236px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; }
::selection { background: var(--primary-100); }

/* ---------- 启动占位 ---------- */
.boot-loading {
  height: 100vh; display: flex; flex-direction: column; gap: 14px;
  align-items: center; justify-content: center; color: var(--muted);
}
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid var(--primary-100); border-top-color: var(--primary);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   按钮
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 38px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--gray-50); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .22); }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn-danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--gray-50); }
.btn-sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn-block { width: 100%; }
.btn-link {
  border: 0; background: none; color: var(--primary); cursor: pointer;
  padding: 0 2px; font-size: 13px; font-weight: 500;
}
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--red); }
.icon-btn {
  width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; background: transparent; border-radius: 8px; cursor: pointer; color: var(--muted);
}
.icon-btn:hover { background: var(--gray-50); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

/* ============================================================
   表单
   ============================================================ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 13px; font-weight: 550; color: var(--text); }
.field .hint { font-size: 12px; color: var(--faint); }
.req { color: var(--red); margin-left: 2px; }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: #fff; color: var(--text);
  font-size: 14px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.6; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50);
}
.input:disabled, .select:disabled { background: var(--gray-50); color: var(--muted); }
.input::placeholder, .textarea::placeholder { color: var(--faint); }
.form-error {
  display: none; margin-top: 12px; padding: 9px 12px; border-radius: 8px;
  background: var(--red-50); color: var(--red); font-size: 13px; border: 1px solid #f7caca;
}
.form-error.show { display: block; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ============================================================
   徽标 / 标签
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .75; }
.badge.no-dot::before { display: none; }
.badge-green { background: var(--green-50); color: var(--green); }
.badge-blue { background: var(--primary-50); color: var(--primary); }
.badge-amber { background: var(--amber-50); color: var(--amber); }
.badge-orange { background: var(--orange-50); color: var(--orange); }
.badge-red { background: var(--red-50); color: var(--red); }
.badge-gray { background: var(--gray-50); color: var(--gray); }
.badge-dark { background: #111827; color: #fff; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 6px; background: var(--gray-50); color: var(--muted);
  font-size: 12px; font-weight: 500;
}
.tag-blue { background: var(--primary-50); color: var(--primary); }
.tag-amber { background: var(--amber-50); color: var(--amber); }
.tag-orange { background: var(--orange-50); color: var(--orange); }
.tag-green { background: var(--green-50); color: var(--green); }
.role-pill {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 6px; background: var(--primary-50); color: var(--primary);
  font-size: 12px; font-weight: 600;
}

/* ============================================================
   应用外壳
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 16px; border-bottom: 1px solid var(--border);
}
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8); color: #fff;
  font-size: 17px; font-weight: 700; box-shadow: 0 6px 14px rgba(37, 99, 235, .28);
}
.brand-name { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: .2px; }
.brand-sub { font-size: 11px; color: var(--faint); margin-top: 1px; }
.nav { flex: 1; overflow-y: auto; padding: 12px 10px 20px; }
.nav-group + .nav-group { margin-top: 14px; }
.nav-group-title {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--faint);
  padding: 0 10px 6px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px;
  border-radius: 8px; color: var(--text); font-size: 13.5px; font-weight: 500;
  cursor: pointer; user-select: none; position: relative;
}
.nav-item svg { width: 17px; height: 17px; color: var(--muted); flex: 0 0 auto; }
.nav-item:hover { background: var(--gray-50); }
.nav-item.active { background: var(--primary-50); color: var(--primary); }
.nav-item.active svg { color: var(--primary); }
.nav-item.active::before {
  content: ""; position: absolute; left: -10px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--primary);
}
.nav-item.soon { color: var(--muted); }
.nav-item .soon-tag {
  margin-left: auto; font-size: 10px; font-weight: 600; color: var(--faint);
  background: var(--gray-50); border-radius: 4px; padding: 1px 5px;
}
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; z-index: 39;
  background: rgba(15, 23, 42, .38); backdrop-filter: blur(1px);
}
.sidebar-foot { border-top: 1px solid var(--border); padding: 12px 14px; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #60a5fa, #2563eb); color: #fff;
  font-size: 13px; font-weight: 700; flex: 0 0 auto;
}
.user-chip .meta { min-width: 0; }
.user-chip .name { font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.user-chip .role { font-size: 11.5px; color: var(--muted); }
.user-chip .icon-btn { margin-left: auto; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px;
  padding: 0 26px; position: sticky; top: 0; z-index: 30;
}
.topbar-title { font-size: 15px; font-weight: 650; color: var(--ink); }
.topbar-crumb { font-size: 12.5px; color: var(--faint); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.menu-btn { display: none; }
.content { padding: 26px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ============================================================
   卡片 / 统计
   ============================================================ */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card-pad { padding: 20px; }
.card-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-head h3 { font-size: 14.5px; font-weight: 650; color: var(--ink); }
.card-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.section + .section { margin-top: 22px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.section-head h2 { font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: .2px; }
.section-head .desc { font-size: 13px; color: var(--muted); }
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: .2px; }
.page-head .desc { margin-top: 4px; font-size: 13px; color: var(--muted); }
.page-head .actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.stat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.stat .label { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.stat .label svg { width: 16px; height: 16px; color: var(--primary); flex: 0 0 auto; }
.stat.accent .label svg { color: rgba(255, 255, 255, .85); }
.stat .value { font-size: 26px; font-weight: 700; color: var(--ink); margin-top: 6px; letter-spacing: .2px; }
.stat .value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.stat .foot { font-size: 12px; color: var(--faint); margin-top: 4px; }
.stat.accent { background: linear-gradient(135deg, #2563eb, #1e40af); border-color: transparent; color: #fff; }
.stat.accent .label, .stat.accent .foot { color: rgba(255, 255, 255, .78); }
.stat.accent .value { color: #fff; }

.hero {
  border-radius: 16px; padding: 24px 26px; color: #fff; position: relative; overflow: hidden;
  background: radial-gradient(1200px 300px at 100% -20%, rgba(255, 255, 255, .22), transparent 60%),
              linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  box-shadow: 0 16px 40px rgba(30, 58, 138, .22);
}
.hero h2 { font-size: 20px; font-weight: 700; letter-spacing: .3px; }
.hero .sub { margin-top: 6px; font-size: 13px; color: rgba(255, 255, 255, .82); }
.hero .hero-meta { margin-top: 18px; display: flex; gap: 22px; flex-wrap: wrap; }
.hero .hero-meta div { font-size: 12.5px; color: rgba(255, 255, 255, .78); }
.hero .hero-meta strong { display: block; font-size: 15px; color: #fff; font-weight: 650; margin-top: 2px; }

/* ============================================================
   表格
   ============================================================ */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 12px; font-weight: 600; color: var(--muted);
  background: #fafbfe; padding: 10px 14px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid #eff2f8; color: var(--text); vertical-align: middle; }
.table tbody tr:hover { background: #fafcff; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .t-right { text-align: right; }
.table .t-center { text-align: center; }
.table .nowrap { white-space: nowrap; }
.table .strong { font-weight: 600; color: var(--ink); }
.table .muted { color: var(--muted); }
.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user .avatar { width: 30px; height: 30px; font-size: 12px; }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }

/* ============================================================
   空状态 / 提示
   ============================================================ */
.empty { padding: 46px 20px; text-align: center; color: var(--muted); }
.empty .icon { width: 46px; height: 46px; margin: 0 auto 12px; color: var(--faint); }
.empty .icon svg { width: 100%; height: 100%; }
.empty h4 { font-size: 14.5px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.empty p { font-size: 13px; color: var(--faint); max-width: 460px; margin: 0 auto; }
.callout {
  display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px;
  background: var(--primary-50); border: 1px solid var(--primary-100);
  color: #1e40af; font-size: 13px;
}
.callout svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.callout.warn { background: var(--amber-50); border-color: #fde3b8; color: #92400e; }
.callout.danger { background: var(--red-50); border-color: #f7caca; color: #991b1b; }
.callout.green { background: var(--green-50); border-color: #c6f0d5; color: #166534; }

/* ============================================================
   阶段进度
   ============================================================ */
.phase-list { display: flex; flex-direction: column; }
.phase-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px dashed var(--border); }
.phase-row:last-child { border-bottom: 0; }
.phase-dot {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--gray-50); color: var(--muted); border: 1px solid var(--border);
}
.phase-row.done .phase-dot { background: var(--green-50); color: var(--green); border-color: #c6f0d5; }
.phase-row.current .phase-dot { background: var(--primary); color: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-50); }
.phase-row .p-title { font-size: 13.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.phase-row .p-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.phase-row .p-items { margin-top: 6px; display: flex; gap: 6px; flex-wrap: wrap; }

/* ============================================================
   权限矩阵
   ============================================================ */
.matrix-wrap { overflow-x: auto; }
.matrix { border-collapse: collapse; font-size: 12.5px; width: 100%; }
.matrix th, .matrix td { padding: 8px 10px; border-bottom: 1px solid #eff2f8; text-align: center; white-space: nowrap; }
.matrix th:first-child, .matrix td:first-child { text-align: left; position: sticky; left: 0; background: var(--surface); }
.matrix thead th { background: #fafbfe; color: var(--muted); font-weight: 600; font-size: 11.5px; }
.matrix .yes { color: var(--green); font-weight: 700; }
.matrix .no { color: #d6dbe6; }
.matrix tbody tr:hover td { background: #fafcff; }
.matrix tbody tr:hover td:first-child { background: #fafcff; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ============================================================
   登录
   ============================================================ */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.auth-brand {
  position: relative; overflow: hidden; color: #fff; padding: 54px 56px;
  background: radial-gradient(900px 500px at 90% 0%, rgba(96, 165, 250, .35), transparent 55%),
              radial-gradient(700px 500px at 0% 100%, rgba(14, 165, 233, .25), transparent 55%),
              linear-gradient(150deg, #0f172a 0%, #1e3a8a 58%, #1d4ed8 100%);
  display: flex; flex-direction: column;
}
.auth-brand::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .10) 1px, transparent 1px);
  background-size: 22px 22px; opacity: .35; pointer-events: none;
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-logo { display: flex; align-items: center; gap: 12px; }
.auth-logo .brand-mark { width: 42px; height: 42px; border-radius: 12px; font-size: 20px; background: rgba(255, 255, 255, .16); box-shadow: none; border: 1px solid rgba(255, 255, 255, .22); }
.auth-logo .name { font-size: 17px; font-weight: 700; letter-spacing: .4px; }
.auth-logo .sub { font-size: 12px; color: rgba(255, 255, 255, .68); }
.auth-hero { margin-top: auto; margin-bottom: auto; max-width: 460px; padding: 40px 0; }
.auth-hero h1 { font-size: 34px; line-height: 1.28; font-weight: 800; letter-spacing: .5px; }
.auth-hero h1 em { font-style: normal; color: #93c5fd; }
.auth-hero p { margin-top: 14px; font-size: 14px; color: rgba(255, 255, 255, .76); line-height: 1.75; }
.auth-points { margin-top: 26px; display: grid; gap: 10px; }
.auth-point { display: flex; align-items: center; gap: 10px; font-size: 13px; color: rgba(255, 255, 255, .82); }
.auth-point .dot { width: 20px; height: 20px; border-radius: 50%; background: rgba(255, 255, 255, .14); display: grid; place-items: center; flex: 0 0 auto; }
.auth-point .dot svg { width: 12px; height: 12px; color: #bfdbfe; }
.auth-foot { font-size: 11.5px; color: rgba(255, 255, 255, .5); }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 40px 28px; background: var(--surface); }
.auth-form { width: 100%; max-width: 370px; }
.auth-form h2 { font-size: 24px; font-weight: 700; color: var(--ink); }
.auth-form .desc { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.auth-form form { margin-top: 28px; display: flex; flex-direction: column; gap: 16px; }
.auth-form .btn { height: 42px; font-size: 14.5px; }
.auth-hint {
  margin-top: 22px; font-size: 12.5px; color: var(--muted); background: var(--gray-50);
  border: 1px dashed var(--border-strong); border-radius: 10px; padding: 12px 14px; line-height: 1.7;
}
.auth-hint code { background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; font-size: 12px; color: var(--ink); }
.auth-error { display: none; padding: 10px 12px; border-radius: 8px; background: var(--red-50); border: 1px solid #f7caca; color: var(--red); font-size: 13px; }
.auth-error.show { display: block; }

/* ============================================================
   弹窗 / 轻提示
   ============================================================ */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; padding: 6vh 20px 20px; z-index: 100;
  animation: fadeIn .15s ease;
}
.modal {
  width: 100%; max-width: 520px; background: var(--surface); border-radius: 14px;
  box-shadow: var(--shadow-lg); animation: pop .16s ease; max-height: 88vh; display: flex; flex-direction: column;
}
.modal-lg { max-width: 720px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px 14px; }
.modal-head h3 { font-size: 16px; font-weight: 650; color: var(--ink); }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 4px 22px 20px; overflow-y: auto; }
.modal-foot { padding: 14px 22px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.modal-foot .left { margin-right: auto; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } }

.toast-root { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 200; }
.toast {
  display: flex; align-items: center; gap: 10px; min-width: 220px; max-width: 420px;
  background: #111827; color: #fff; padding: 12px 16px; border-radius: 10px;
  box-shadow: var(--shadow-lg); font-size: 13.5px; animation: slideUp .18s ease;
}
.toast svg { width: 17px; height: 17px; flex: 0 0 auto; }
.toast.success svg { color: #4ade80; }
.toast.error svg { color: #f87171; }
.toast.info svg { color: #93c5fd; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } }

/* ============================================================
   工具类
   ============================================================ */
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.strong { font-weight: 600; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.hidden { display: none !important; }
.text-right { text-align: right; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1080px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form-side { min-height: 100vh; }
}
@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%);
    transition: transform .2s ease; box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .sidebar-backdrop { display: block; }
  body.nav-open { overflow: hidden; }
  .menu-btn { display: inline-flex; }
  .content { padding: 16px; }
  .topbar { padding: 0 14px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 19px; }
  .hero { padding: 20px; }
}

/* ============================================================
   进度条 / 步骤 / 岗位卡片
   ============================================================ */
.progress { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .22); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: #bfdbfe; transition: width .4s ease; }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step; display: flex; gap: 12px; align-items: flex-start;
  padding: 13px 0; border-bottom: 1px dashed var(--border);
}
.steps li:last-child { border-bottom: 0; }
.steps li::before {
  content: counter(step); width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  background: var(--primary-50); color: var(--primary); font-size: 12px; font-weight: 700;
  display: grid; place-items: center; margin-top: 2px;
}
.steps li > div { flex: 1; }
.steps li .badge { flex: 0 0 auto; }

.role-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 12px; }
.role-card {
  border: 1px solid var(--border); border-radius: 10px; padding: 13px 14px; background: #fbfcff;
}
.role-card:hover { border-color: var(--border-strong); background: #fff; }

.callout code, .auth-hint code {
  background: #fff; border: 1px solid var(--border); border-radius: 4px;
  padding: 1px 5px; font-size: 12px; color: var(--ink);
}

/* ============================================================
   阶段 2：筛选、达人标签、详情页
   ============================================================ */
.filters { display: flex; flex-direction: column; gap: 14px; }
.filter-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.filter-field { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.filter-field.grow { flex: 1 1 260px; min-width: 240px; }
.filter-field > label { font-size: 12.5px; font-weight: 550; color: var(--muted); }
.filter-btns { flex-direction: row; gap: 8px; }
.input-icon { position: relative; }
.input-icon > svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--faint); pointer-events: none;
}
.input-icon .input { padding-left: 34px; }
.creator-filter-row { padding-top: 12px; border-top: 1px dashed var(--border); }

.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 30px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: #fff; color: var(--text);
  font-size: 12.5px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.active { background: var(--primary-50); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.chip.danger.active { background: var(--red-50); border-color: var(--red); color: var(--red); }

.table tr.clickable { cursor: pointer; }
.table tr.row-blacklist { background: #fdf6f6; }
.table tr.row-blacklist:hover { background: #fbeaea; }
.tag-dark { background: #111827; color: #fff; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }

.pager-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-top: 1px solid var(--border);
}

.tabs-card { padding: 6px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0; background: transparent; padding: 9px 14px; border-radius: 8px;
  font-size: 13.5px; font-weight: 550; color: var(--muted); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
}
.tab:hover { background: var(--gray-50); color: var(--text); }
.tab.active { background: var(--primary-50); color: var(--primary); }
.tab-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--primary-100); color: var(--primary); font-size: 11px;
}

.detail-head { padding: 22px 24px; }
.detail-title { font-size: 23px; font-weight: 700; color: var(--ink); letter-spacing: .2px; }
.detail-head .actions { margin-left: auto; align-items: center; }

.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.kv .k { font-size: 12px; color: var(--faint); }
.kv .v { font-size: 13.5px; color: var(--text); margin-top: 2px; word-break: break-word; }

.timeline { position: relative; padding-left: 2px; }
.timeline-item { position: relative; display: flex; gap: 12px; padding-bottom: 20px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ""; position: absolute; left: 5px; top: 16px; bottom: 0;
  width: 1px; background: var(--border);
}
.timeline-item:last-child::before { display: none; }
.tl-dot {
  width: 11px; height: 11px; border-radius: 50%; background: var(--primary);
  margin-top: 5px; flex: 0 0 auto; box-shadow: 0 0 0 3px var(--primary-50);
}
.tl-body { flex: 1; min-width: 0; }
.tl-title { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }

@media (max-width: 720px) {
  .kv-grid { grid-template-columns: 1fr; }
  .filter-field.grow { min-width: 100%; }
  .detail-title { font-size: 19px; }
}

@media (max-width: 900px) {
  .table { min-width: 720px; }
  .table-wrap { -webkit-overflow-scrolling: touch; }
  .card-head { flex-wrap: wrap; }
  .detail-head .actions { width: 100%; margin-left: 0; }
}

/* ============================================================
   2R：三类供应商库
   ============================================================ */
.modal-xl { max-width: 900px; }
.form-section-title {
  font-size: 13px; font-weight: 700; color: var(--ink);
  padding-top: 6px; margin-top: 2px; border-top: 1px dashed var(--border);
}
.form-section-title:first-child { border-top: 0; padding-top: 0; }
.pre-wrap { white-space: pre-wrap; word-break: break-word; }

.summary-card h3 { margin: 0; }
.ratio-list { display: flex; flex-direction: column; gap: 10px; }
.ratio-row {
  display: grid; grid-template-columns: 56px 110px 1fr 110px; gap: 10px;
  align-items: center; font-size: 12.5px; color: var(--muted);
}
.ratio-label { font-weight: 600; color: var(--text); }
.ratio-count { font-variant-numeric: tabular-nums; }
.ratio-target { text-align: right; color: var(--faint); }
.ratio-track {
  position: relative; height: 8px; border-radius: 999px; background: var(--gray-50);
  overflow: visible; order: 0;
}
.ratio-row .ratio-track { grid-column: 3; grid-row: 1; }
.ratio-row .ratio-target { grid-column: 4; grid-row: 1; }
.ratio-track i {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
}
.ratio-track b {
  position: absolute; top: -3px; width: 2px; height: 14px;
  background: var(--ink); border-radius: 2px; opacity: .55;
}
.tier-big .badge { height: 34px; padding: 0 14px; font-size: 15px; }

@media (max-width: 720px) {
  .ratio-row { grid-template-columns: 48px 1fr; }
  .ratio-track { grid-column: 1 / -1; grid-row: 2; }
  .ratio-target { grid-column: 2; grid-row: 1; }
}


/* ============================================================
   达人库：CreatorScreener 内嵌
   ============================================================ */
.screener-wrap { margin-top: 14px; }
.screener-frame {
  width: 100%; height: calc(100vh - 245px); min-height: 620px;
  border: 1px solid var(--border); border-radius: 12px; background: #fff;
  box-shadow: var(--shadow-sm);
}
.code-block {
  margin-top: 6px; padding: 12px 14px; border-radius: 8px;
  background: #0f172a; color: #e2e8f0; font-size: 12px; line-height: 1.7;
  overflow-x: auto; white-space: pre;
}
@media (max-width: 900px) {
  .screener-frame { height: calc(100vh - 220px); min-height: 480px; }
}

/* ============================================================
   2C-1：MCN + 独立达人库
   ============================================================ */
.ratio-track { display: flex; overflow: hidden; background: var(--gray-50); }
.ratio-track .ratio-s { background: #f59e0b; height: 100%; }
.ratio-track .ratio-a { background: #2563eb; height: 100%; }
.ratio-track .ratio-b { background: #94a3b8; height: 100%; }
.score-line { margin-bottom: 14px; }
.score-line-head { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.score-bar { height: 7px; border-radius: 999px; background: var(--gray-50); margin-top: 5px; overflow: hidden; }
.score-bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #60a5fa, #2563eb); }
.risk-list { display: flex; flex-direction: column; gap: 10px; }
.risk-item { border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.risk-item.high { border-left-color: var(--red); background: #fff8f8; }
.risk-item.medium { border-left-color: #f59e0b; background: #fffdf5; }
.risk-item.low { border-left-color: #10b981; }
.note-item { padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.note-item:last-child { border-bottom: 0; }
.creator-audience { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.audience-box { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.audience-row { display: grid; grid-template-columns: 64px 1fr 44px; gap: 8px; align-items: center; font-size: 12px; margin-top: 6px; color: var(--muted); }
.audience-row .bar { height: 6px; border-radius: 999px; background: var(--gray-50); overflow: hidden; }
.audience-row .bar span { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
@media (max-width: 900px) { .creator-audience { grid-template-columns: 1fr; } }

.text-danger { color: var(--red); }
