/* ============================================================
   数据要素服务中台 V1.0 · 设计系统（深蓝商务风 · Light）
   主色 #1F3864 / 强调金 #C9A063 / 背景 #F5F6F8
   ============================================================ */
:root {
  --navy: #1F3864;
  --navy-700: #2a4a80;
  --navy-500: #3c5f9e;
  --navy-50: #eef2f9;
  --gold: #C9A063;
  --gold-50: #faf5ea;
  --bg: #F5F6F8;
  --panel: #ffffff;
  --line: #e3e6ec;
  --line-2: #eef0f4;
  --text: #1c2333;
  --text-2: #5a6478;
  --text-3: #8b93a5;
  --ok: #2f9e6b;
  --ok-bg: #e9f7f0;
  --warn: #d98a13;
  --warn-bg: #fdf4e3;
  --danger: #c8453a;
  --danger-bg: #fdecea;
  --info: #2c6fb5;
  --info-bg: #e9f2fb;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(28, 35, 51, .06), 0 1px 2px rgba(28, 35, 51, .04);
  --shadow-lg: 0 8px 28px rgba(28, 35, 51, .12);
  --font: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy-500); text-decoration: none; }
a:hover { color: var(--navy); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cfd5e0; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: #b6bece; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  padding: 8px 16px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: #fff; color: var(--text); font-size: 14px; font-weight: 500;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--navy-500); color: var(--navy); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; }
.btn-gold:hover { background: #b98e4e; border-color: #b98e4e; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--navy-50); color: var(--navy); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-danger { background: #fff; border-color: #e8c4c0; color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }

.input, .select, .textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--navy-500); box-shadow: 0 0 0 3px rgba(60, 95, 158, .12);
}
.textarea { resize: vertical; min-height: 78px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; font-weight: 500; }
.field label .req { color: var(--danger); }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line-2);
}
.card-hd h3 { font-size: 15px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 8px; }
.card-hd h3::before { content: ""; width: 3px; height: 15px; background: var(--gold); border-radius: 2px; }
.card-bd { padding: 18px; }
.card-bd.tight { padding: 0; }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 20px;
  font-size: 12px; font-weight: 500; line-height: 1.8; white-space: nowrap;
}
.tag-navy { background: var(--navy-50); color: var(--navy); }
.tag-gold { background: var(--gold-50); color: #9a7433; }
.tag-ok { background: var(--ok-bg); color: var(--ok); }
.tag-warn { background: var(--warn-bg); color: var(--warn); }
.tag-danger { background: var(--danger-bg); color: var(--danger); }
.tag-info { background: var(--info-bg); color: var(--info); }
.tag-grey { background: #f0f1f4; color: var(--text-2); }

.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; padding: 10px 14px; background: #f8f9fb; color: var(--text-2);
  font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); color: var(--text); vertical-align: middle; }
.table tbody tr:hover { background: #fafbfd; }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { font-variant-numeric: tabular-nums; }
.table .right { text-align: right; }
.table .center { text-align: center; }

.empty { text-align: center; padding: 46px 20px; color: var(--text-3); }
.empty .ico { font-size: 34px; opacity: .5; margin-bottom: 8px; }
.empty p { font-size: 13.5px; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--navy); }
.kpi.gold::after { background: var(--gold); }
.kpi.ok::after { background: var(--ok); }
.kpi.warn::after { background: var(--warn); }
.kpi .k-label { font-size: 12.5px; color: var(--text-3); margin-bottom: 6px; }
.kpi .k-val { font-size: 25px; font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.kpi .k-val small { font-size: 13px; font-weight: 500; color: var(--text-2); margin-left: 3px; }
.kpi .k-sub { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- 登录 / 门户 ---------- */
.auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #16294d 0%, #1F3864 45%, #2a4a80 100%);
  padding: 24px; position: relative; overflow: hidden;
}
.auth-wrap::before {
  content: ""; position: absolute; width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,160,99,.16), transparent 68%);
  top: -220px; right: -160px;
}
.auth-wrap::after {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  background: radial-gradient(circle, rgba(120,170,255,.14), transparent 70%);
  bottom: -180px; left: -120px;
}
.auth-card {
  position: relative; z-index: 2; width: 940px; max-width: 100%; background: #fff;
  border-radius: 14px; box-shadow: 0 24px 70px rgba(0,0,0,.34); display: grid;
  grid-template-columns: 1.02fr .98fr; overflow: hidden; min-height: 552px;
}
@media (max-width: 820px) { .auth-card { grid-template-columns: 1fr; } .auth-side { display: none !important; } }
.auth-side {
  background: linear-gradient(160deg, #1F3864, #2f5390); color: #fff; padding: 44px 40px;
  display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.auth-side::after {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  border: 1px solid rgba(201,160,99,.28); bottom: -140px; right: -110px;
}
.auth-side .brand { display: flex; align-items: center; gap: 12px; margin-bottom: 34px; }
.auth-side .brand .mark {
  width: 44px; height: 44px; border-radius: 10px; background: var(--gold); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px;
}
.auth-side .brand b { font-size: 17px; letter-spacing: .5px; }
.auth-side .brand span { display: block; font-size: 11.5px; opacity: .68; letter-spacing: 2.5px; font-weight: 400; }
.auth-side h2 { font-size: 23px; font-weight: 700; line-height: 1.4; margin-bottom: 14px; }
.auth-side h2 em { color: var(--gold); font-style: normal; }
.auth-side p.lead { font-size: 13.5px; opacity: .82; line-height: 1.85; margin-bottom: 26px; }
.auth-side .feat { list-style: none; display: grid; gap: 12px; }
.auth-side .feat li { display: flex; gap: 10px; font-size: 13px; opacity: .92; align-items: flex-start; }
.auth-side .feat li i {
  flex: 0 0 18px; height: 18px; border-radius: 50%; background: rgba(201,160,99,.25);
  color: var(--gold); font-style: normal; font-size: 11px; display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.auth-side .foot { margin-top: auto; font-size: 11.5px; opacity: .55; position: relative; z-index: 2; }
.auth-main { padding: 46px 42px; display: flex; flex-direction: column; }
.auth-main h1 { font-size: 21px; font-weight: 700; margin-bottom: 6px; }
.auth-main .sub { font-size: 13px; color: var(--text-3); margin-bottom: 26px; }
.quick-login { margin-top: 22px; border-top: 1px dashed var(--line); padding-top: 16px; }
.quick-login .qt { font-size: 12px; color: var(--text-3); margin-bottom: 9px; }
.quick-login .qb { display: flex; flex-wrap: wrap; gap: 7px; }
.quick-login .qb button {
  font-size: 12.5px; padding: 5px 11px; border-radius: 20px; border: 1px solid var(--line);
  background: #fbfcfd; color: var(--text-2); transition: all .15s;
}
.quick-login .qb button:hover { border-color: var(--navy-500); color: var(--navy); background: var(--navy-50); }
.auth-msg { font-size: 13px; color: var(--danger); min-height: 20px; margin-bottom: 8px; }

/* ---------- 应用外壳 ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, #1a2f55, #1F3864 40%); color: #cdd8ea;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.sidebar .sb-brand { padding: 20px 20px 16px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar .sb-brand .mark {
  width: 36px; height: 36px; border-radius: 9px; background: var(--gold); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; flex: 0 0 36px;
}
.sidebar .sb-brand b { color: #fff; font-size: 14.5px; display: block; line-height: 1.3; }
.sidebar .sb-brand span { font-size: 10.5px; opacity: .6; letter-spacing: 1.5px; }
.sb-nav { flex: 1; overflow-y: auto; padding: 12px 10px; }
.sb-nav .grp { font-size: 11px; color: rgba(255,255,255,.42); padding: 14px 12px 6px; letter-spacing: 1px; font-weight: 600; }
.sb-nav a {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px;
  color: #cdd8ea; font-size: 13.5px; margin-bottom: 2px; transition: all .15s;
}
.sb-nav a .ic { width: 18px; text-align: center; font-size: 15px; opacity: .9; }
.sb-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sb-nav a.on { background: var(--gold); color: #fff; font-weight: 500; box-shadow: 0 3px 10px rgba(201,160,99,.35); }
.sb-nav a.on .ic { opacity: 1; }
.sb-foot { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11.5px; }
.sb-foot .role-badge { display: inline-flex; align-items: center; gap: 6px; color: var(--gold); font-weight: 600; margin-bottom: 3px; }
.sb-foot .scope { opacity: .5; font-size: 10.5px; line-height: 1.5; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 24px;
  position: sticky; top: 0; z-index: 30;
}
.topbar .tb-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar .tb-left h2 { font-size: 16px; font-weight: 600; white-space: nowrap; }
.topbar .tb-left .crumb { font-size: 12.5px; color: var(--text-3); }
.topbar .tb-right { display: flex; align-items: center; gap: 10px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 22px; border: 1px solid var(--line); background: #fbfcfd; }
.user-chip .av {
  width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 600;
}
.user-chip .nm { font-size: 13px; font-weight: 500; }
.user-chip .rl { font-size: 11px; color: var(--text-3); }
.content { padding: 22px 24px 40px; flex: 1; }
.page-hd { margin-bottom: 18px; }
.page-hd h1 { font-size: 19px; font-weight: 700; margin-bottom: 4px; }
.page-hd p { font-size: 13px; color: var(--text-3); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; }

/* ---------- 商品卡（前台） ---------- */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.prod {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; transition: all .18s; cursor: pointer;
}
.prod:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: #d6dbe6; }
.prod .p-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.prod .p-cat { font-size: 11.5px; font-weight: 600; color: var(--navy-500); background: var(--navy-50); padding: 2px 9px; border-radius: 20px; }
.prod h4 { font-size: 15px; font-weight: 600; line-height: 1.5; margin-bottom: 8px; }
.prod .p-desc { font-size: 13px; color: var(--text-2); line-height: 1.7; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.prod .p-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.prod .p-foot { display: flex; align-items: flex-end; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--line-2); }
.prod .p-price { font-size: 21px; font-weight: 700; color: #b8763a; font-variant-numeric: tabular-nums; }
.prod .p-price small { font-size: 12px; font-weight: 500; color: var(--text-3); }
.prod .p-org { font-size: 12px; color: var(--text-3); }

/* 环节流水线 */
.flow { display: flex; align-items: center; gap: 0; overflow-x: auto; padding: 4px 0; }
.flow .step {
  flex: 1; min-width: 96px; text-align: center; padding: 10px 6px; position: relative; font-size: 12px;
}
.flow .step .dot {
  width: 30px; height: 30px; border-radius: 50%; margin: 0 auto 7px; display: flex; align-items: center; justify-content: center;
  background: #eef0f4; color: var(--text-3); font-weight: 700; font-size: 12.5px; border: 2px solid #e3e6ec;
}
.flow .step.done .dot { background: var(--navy); color: #fff; border-color: var(--navy); }
.flow .step.cur .dot { background: var(--gold); color: #fff; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201,160,99,.2); }
.flow .step .st { font-weight: 600; color: var(--text-2); font-size: 12px; }
.flow .step.done .st, .flow .step.cur .st { color: var(--navy); }
.flow .step .sd { font-size: 10.5px; color: var(--text-3); }
.flow .step::after { content: ""; position: absolute; top: 25px; right: -1px; width: 12px; height: 2px; background: #e3e6ec; }
.flow .step:last-child::after { display: none; }

/* 模态 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20, 27, 42, .5); backdrop-filter: blur(2px);
  z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 48px 20px; overflow-y: auto;
  animation: fade .18s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: #fff; border-radius: 12px; width: 620px; max-width: 100%; box-shadow: 0 24px 70px rgba(0,0,0,.35);
  animation: pop .2s ease; overflow: hidden;
}
.modal.wide { width: 820px; }
@keyframes pop { from { transform: translateY(14px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-hd { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-hd h3 { font-size: 16px; font-weight: 600; }
.modal-hd .x { border: none; background: none; font-size: 20px; color: var(--text-3); line-height: 1; padding: 2px 6px; border-radius: 6px; }
.modal-hd .x:hover { background: #f0f1f4; color: var(--text); }
.modal-bd { padding: 20px; max-height: 62vh; overflow-y: auto; }
.modal-ft { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; background: #fbfcfd; }

/* Toast */
#toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  padding: 10px 18px; border-radius: 8px; background: #1c2333; color: #fff; font-size: 13.5px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: pop .2s ease; display: flex; align-items: center; gap: 8px;
}
.toast.ok { background: #1f7a52; } .toast.err { background: #b23a30; } .toast.warn { background: #b7791f; }

/* 描述列表 */
.dl { display: grid; grid-template-columns: 130px 1fr; gap: 9px 14px; font-size: 13.5px; }
.dl dt { color: var(--text-3); }
.dl dd { color: var(--text); }
.dl dd.mono { font-variant-numeric: tabular-nums; }

.divider { height: 1px; background: var(--line-2); margin: 16px 0; }
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.mb0 { margin-bottom: 0 !important; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.price { color: #b8763a; font-weight: 700; font-variant-numeric: tabular-nums; }
.notice {
  background: var(--gold-50); border: 1px solid #eddfc4; border-radius: 8px; padding: 11px 14px;
  font-size: 12.5px; color: #8a6a2f; display: flex; gap: 8px; line-height: 1.7;
}
.notice.info { background: var(--info-bg); border-color: #cfe0f2; color: #1f558c; }

/* 入口通道标识（P1 通道隔离） */
.ch-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--navy);
  background: var(--navy-50); border: 1px solid #dbe4f2; border-radius: 999px; padding: 4px 12px;
  white-space: nowrap;
}
.ch-chip.sm { font-size: 12px; padding: 3px 10px; }
.ch-chip b, .ch-chip strong { font-weight: 700; }
.auth-main .ch-chip { margin-bottom: 12px; }
