/* ==================================================================
   太微量子 · 报价 / 合同一体化管理系统
   设计基调：高效 / 易用 / 美观 / 简洁 / 克制
   ================================================================== */
:root {
  --bg: #F2F5F9;
  --panel: #FFFFFF;
  --panel-2: #FAFCFF;
  --ink: #17212E;
  --ink-2: #3D4C5F;
  --sub: #6B7A8F;
  --mute: #94A3B8;
  --line: #E4E9F0;
  --line-2: #EFF3F8;
  --brand: #2E6FB7;
  --brand-d: #1F5A9C;
  --brand-l: #EAF2FB;
  --violet: #6D5BD0;
  --violet-l: #F0EDFC;
  --cyan: #0E9FB8;
  --ok: #17935C;
  --ok-l: #E7F6EF;
  --warn: #C97A0B;
  --warn-l: #FDF3E3;
  --danger: #D33A3A;
  --danger-l: #FDECEC;
  --radius: 8px;
  --radius-s: 6px;
  --shadow-1: 0 1px 2px rgba(20, 40, 70, .06), 0 1px 3px rgba(20, 40, 70, .04);
  --shadow-2: 0 4px 14px rgba(20, 40, 70, .09);
  --shadow-3: 0 18px 50px rgba(20, 40, 70, .18);
  --sidebar-w: 218px;
  --topbar-h: 54px;
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, "Courier New", monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); background: var(--bg); color: var(--ink);
  font-size: 13.5px; line-height: 1.6; -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
::selection { background: #CFE2F7; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 6px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #A9B8CC; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ==================================================================
   登录页
   ================================================================== */
.login-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
  background: #0D1626;
}
.login-art {
  position: relative; overflow: hidden; padding: 56px 60px; color: #fff;
  background:
    radial-gradient(1000px 600px at 8% 8%, rgba(62,132,214,.42), transparent 60%),
    radial-gradient(760px 520px at 92% 92%, rgba(109,91,208,.42), transparent 60%),
    radial-gradient(600px 400px at 70% 20%, rgba(14,159,184,.24), transparent 62%),
    linear-gradient(150deg, #0B1424 0%, #122238 48%, #0E1A2C 100%);
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-art::after {
  content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 40% 40%, #000 20%, transparent 78%);
}
.login-art > * { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand .mark {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(140deg, #4E9BE0, #6D5BD0); font-weight: 700; font-size: 17px;
  box-shadow: 0 6px 20px rgba(78,155,224,.4);
}
.login-brand b { font-size: 15.5px; font-weight: 600; letter-spacing: .4px; }
.login-brand span { display: block; font-size: 11px; color: #93B4D8; letter-spacing: 2.4px; }
.login-hero h1 { font-size: 33px; line-height: 1.28; margin: 0 0 16px; font-weight: 600; letter-spacing: .6px; }
.login-hero h1 em { font-style: normal; background: linear-gradient(96deg,#7CC0F7,#A99CF5 60%,#63D9EA); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-hero p { color: #A9C0DA; max-width: 470px; font-size: 13.5px; margin: 0; }
.login-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 22px; }
.login-feats div { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #B8CCE2; }
.login-feats i {
  width: 17px; height: 17px; border-radius: 5px; display: grid; place-items: center;
  background: rgba(124,192,247,.16); color: #7CC0F7; font-style: normal; font-size: 10px;
}
.login-panel { display: grid; place-items: center; padding: 40px; background: #fff; }
.login-card { width: 100%; max-width: 356px; }
.login-card h2 { margin: 0 0 6px; font-size: 21px; font-weight: 600; }
.login-card .tip { color: var(--sub); font-size: 12.5px; margin: 0 0 26px; }
.login-card .field { margin-bottom: 15px; }
.login-foot { margin-top: 22px; font-size: 11.5px; color: var(--mute); line-height: 1.9; }
.login-foot code { font-family: var(--mono); background: var(--line-2); padding: 1px 5px; border-radius: 4px; color: var(--ink-2); }

/* ==================================================================
   应用骨架
   ================================================================== */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w); background: #101B2C; color: #C7D5E6;
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40;
}
.brand {
  height: var(--topbar-h); display: flex; align-items: center; gap: 10px;
  padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.07); flex: 0 0 auto;
}
.brand .mark {
  width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(140deg,#4E9BE0,#6D5BD0); font-size: 13px; font-weight: 700; color: #fff;
}
.brand b { color: #fff; font-size: 13.5px; font-weight: 600; display: block; line-height: 1.25; }
.brand span { font-size: 9.5px; color: #7A93B2; letter-spacing: 1.7px; }
.nav { padding: 12px 10px 24px; overflow-y: auto; flex: 1; }
.nav-group { font-size: 10.5px; color: #5C7492; letter-spacing: 1.4px; padding: 14px 10px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8.5px 10px; border-radius: var(--radius-s);
  cursor: pointer; font-size: 13px; color: #B7C7DA; margin-bottom: 2px; user-select: none;
  transition: background .13s, color .13s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.on { background: linear-gradient(96deg, rgba(62,132,214,.26), rgba(109,91,208,.2)); color: #fff; font-weight: 500; }
.nav-item.on::before { content: ""; position: absolute; }
.nav-item svg { width: 16px; height: 16px; flex: 0 0 16px; opacity: .85; }
.nav-item .badge { margin-left: auto; font-size: 10.5px; background: rgba(255,255,255,.13); padding: 1px 6px; border-radius: 9px; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.07); font-size: 10.5px; color: #617897; }

.main { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 20px; gap: 14px; position: sticky; top: 0; z-index: 30;
}
.topbar h1 { font-size: 15px; font-weight: 600; margin: 0; }
.topbar .crumb { font-size: 12px; color: var(--mute); }
.topbar .spacer { flex: 1; }
.content { padding: 18px 20px 40px; flex: 1; }

.userchip { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border-radius: 20px; cursor: pointer; transition: background .13s; }
.userchip:hover { background: var(--line-2); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; background: linear-gradient(140deg,#3E84D6,#6D5BD0); }
.userchip b { font-size: 12.5px; font-weight: 500; display: block; line-height: 1.3; }
.userchip small { color: var(--mute); font-size: 10.5px; }

/* ==================================================================
   通用组件
   ================================================================== */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.card-h { padding: 12px 16px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.card-h h3 { margin: 0; font-size: 13.5px; font-weight: 600; }
.card-h .spacer { flex: 1; }
.card-b { padding: 16px; }
.card-b.tight { padding: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: var(--radius-s); border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 12.5px; font-family: inherit; cursor: pointer;
  transition: all .13s; white-space: nowrap; user-select: none;
}
.btn:hover { border-color: #C9D5E3; background: var(--panel-2); color: var(--ink); }
.btn:active { transform: translateY(.5px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { width: 14px; height: 14px; }
.btn.primary { background: linear-gradient(96deg, var(--brand), #3E7FCB); border-color: transparent; color: #fff; box-shadow: 0 2px 8px rgba(46,111,183,.28); }
.btn.primary:hover { background: linear-gradient(96deg, var(--brand-d), #356FB4); color: #fff; }
.btn.violet { background: linear-gradient(96deg, #6D5BD0, #8266E0); border-color: transparent; color: #fff; }
.btn.danger { color: var(--danger); border-color: #F0C9C9; background: #fff; }
.btn.danger:hover { background: var(--danger-l); border-color: #E4AFAF; }
.btn.sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn.lg { height: 40px; padding: 0 20px; font-size: 14px; }
.btn.block { width: 100%; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }

.field { display: block; }
.field > label { display: block; font-size: 12.6px; color: var(--ink-2); margin-bottom: 5px; font-weight: 600; letter-spacing: .2px; }
.field > label .req { color: var(--danger); margin-left: 2px; font-weight: 700; }
.field .hint { font-size: 11px; color: var(--mute); margin-top: 4px; }
input[type=text], input[type=password], input[type=number], input[type=date], input[type=email],
input[type=tel], select, textarea {
  width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius-s);
  font-family: inherit; font-size: 13px; color: var(--ink); background: #fff; transition: border-color .13s, box-shadow .13s;
}
textarea { height: auto; padding: 8px 10px; line-height: 1.65; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(46,111,183,.12); }
input[readonly] { background: var(--line-2); color: var(--sub); }
input::placeholder, textarea::placeholder { color: #AEBACB; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236B7A8F' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 26px; }

.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.spacer { flex: 1; }

/* ---------- 表格 ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 12.8px; }
table.tbl th {
  background: var(--panel-2); color: var(--sub); font-weight: 600; font-size: 11.8px;
  text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
  position: sticky; top: 0; z-index: 2;
}
table.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tbl tbody tr:hover { background: #F8FBFF; }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.tbl td.ctr, table.tbl th.ctr { text-align: center; }
table.tbl .mono { font-family: var(--mono); font-size: 12px; letter-spacing: .2px; }
/* 单据编号 / 金额一律不折行，避免 20 位编号被拆成多行 */
table.tbl td .mono { white-space: nowrap; }
table.tbl tfoot td { background: var(--panel-2); font-weight: 600; border-top: 1px solid var(--line); position: sticky; bottom: 0; }

/* 列较多的台账（报价 / 合同）：压缩内边距与徽标字号，把宽度留给「客户单位」 */
table.tbl.tbl-compact th, table.tbl.tbl-compact td { padding: 9px 8px; }
table.tbl.tbl-compact .tag { font-size: 10.8px; padding: 0 6px; height: 19px; }
table.tbl.tbl-compact .btn.sm { padding: 0 7px; }

/* ---------- 徽标 ---------- */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 10px; font-size: 11.2px; font-weight: 500; white-space: nowrap; }
.tag.draft { background: #EEF2F7; color: #5A6B80; }
.tag.issued { background: var(--ok-l); color: var(--ok); }
.tag.wasted { background: var(--danger-l); color: var(--danger); }
.tag.std { background: var(--brand-l); color: var(--brand-d); }
.tag.cus { background: var(--violet-l); color: #5A48BE; }
.tag.ok { background: var(--ok-l); color: var(--ok); }
.tag.warn { background: var(--warn-l); color: var(--warn); }
.tag.danger { background: var(--danger-l); color: var(--danger); }
.tag.info { background: #E8F4FA; color: #0E7A93; }
.tag.mute { background: #EEF2F7; color: #6B7A8F; }

/* ---------- 统计卡 ---------- */
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-1); position: relative; overflow: hidden; }
.stat::after { content: ""; position: absolute; right: -22px; top: -22px; width: 78px; height: 78px; border-radius: 50%; background: var(--brand-l); opacity: .6; }
.stat.v::after { background: var(--violet-l); }
.stat.o::after { background: var(--ok-l); }
.stat.w::after { background: var(--warn-l); }
.stat.d::after { background: var(--danger-l); }
.stat .k { font-size: 11.8px; color: var(--sub); position: relative; z-index: 1; }
.stat .v { font-size: 25px; font-weight: 650; letter-spacing: -.4px; margin-top: 3px; position: relative; z-index: 1; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 12.5px; font-weight: 500; color: var(--sub); margin-left: 3px; }
.stat .d { font-size: 11.5px; color: var(--mute); position: relative; z-index: 1; margin-top: 2px; }

/* ---------- 空态 ---------- */
.empty { padding: 46px 20px; text-align: center; color: var(--mute); }
.empty .ic { font-size: 30px; opacity: .4; margin-bottom: 8px; }
.empty p { margin: 0 0 4px; font-size: 13px; }
.empty small { font-size: 11.5px; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 8px; padding: 11px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--sub); }
.pager .pages { display: flex; gap: 4px; margin-left: auto; }
.pager .pages button { min-width: 28px; height: 28px; border: 1px solid var(--line); background: #fff; border-radius: 5px; cursor: pointer; font-size: 12.5px; font-family: inherit; color: var(--ink-2); }
.pager .pages button:hover { border-color: #C9D5E3; }
.pager .pages button.on { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ---------- 弹窗 ---------- */
.mask { position: fixed; inset: 0; background: rgba(14,24,39,.5); backdrop-filter: blur(2px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 22px; animation: fade .14s ease; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99) } to { opacity: 1; transform: none } }
.modal { background: #fff; border-radius: 10px; box-shadow: var(--shadow-3); width: 100%; max-width: 560px; max-height: 90vh; display: flex; flex-direction: column; animation: pop .16s ease; }
.modal.wide { max-width: 880px; }
.modal.xwide { max-width: 1120px; }
.modal-h { padding: 15px 18px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.modal-h h3 { margin: 0; font-size: 14.5px; font-weight: 600; }
.modal-h .x { margin-left: auto; width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; cursor: pointer; color: var(--mute); border: none; background: transparent; font-size: 17px; }
.modal-h .x:hover { background: var(--line-2); color: var(--ink); }
.modal-b { padding: 18px; overflow-y: auto; flex: 1; }
.modal-f { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; gap: 9px; justify-content: flex-end; background: var(--panel-2); border-radius: 0 0 10px 10px; }

/* ---------- 提示 ---------- */
#toasts { position: fixed; top: 16px; right: 16px; z-index: 300; display: flex; flex-direction: column; gap: 9px; }
.toast { min-width: 240px; max-width: 400px; background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 8px; padding: 11px 14px; box-shadow: var(--shadow-2); font-size: 12.8px; color: var(--ink-2); animation: slidein .2s ease; display: flex; gap: 9px; }
@keyframes slidein { from { opacity: 0; transform: translateX(16px) } to { opacity: 1; transform: none } }
.toast.ok { border-left-color: var(--ok); }
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
.toast b { display: block; font-size: 12.8px; font-weight: 600; color: var(--ink); margin-bottom: 1px; }

/* ---------- 下拉联想 ---------- */
.suggest { position: absolute; z-index: 200; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-2); max-height: 268px; overflow-y: auto; min-width: 260px; }
.suggest .it { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--line-2); font-size: 12.6px; position: relative; padding-right: 86px; }
.suggest .it:last-child { border-bottom: none; }
.suggest .it:hover, .suggest .it.on { background: var(--brand-l); }
.suggest .it b { font-weight: 600; display: block; }
.suggest .it small { color: var(--sub); font-size: 11.5px; display: block; margin-top: 1px; }
.suggest .it .rt { position: absolute; right: 12px; top: 17px; transform: translateY(-50%); color: var(--brand); font-size: 11.5px; white-space: nowrap; }
.suggest .hd { padding: 6px 12px; font-size: 10.8px; color: var(--mute); background: var(--panel-2); letter-spacing: .6px; }

/* ---------- 报价编辑器 ---------- */
.quote-editor { display: grid; grid-template-columns: 1fr; gap: 14px; }
/* 明细表严格锁定在容器宽度内：列宽全百分比 + table-layout:fixed，
   确保与台账等其它表格等宽，杜绝横向溢出导致观感不齐 */
table.tbl.item-tbl { table-layout: fixed; width: 100%; }
.item-tbl th, .item-tbl td { overflow: hidden; }
.item-tbl input, .item-tbl textarea.spec-inp { width: 100%; box-sizing: border-box; }
.item-tbl input { height: 30px; font-size: 12.6px; padding: 0 7px; }
/* 参数 / 规格：多行文本域，等宽小字、可纵向拉伸但锁定横向 */
.item-tbl textarea.spec-inp {
  min-height: 52px; max-height: 190px;
  font-size: 12.2px; line-height: 1.6; padding: 5px 7px; resize: vertical;
  font-family: inherit; overflow-y: auto;
}
.item-tbl td { padding: 5px 6px; }
.item-tbl td.spec-cell { vertical-align: top; }
.item-tbl .idx { color: var(--mute); font-size: 12px; text-align: center; font-family: var(--mono); }
.item-tbl .drag { cursor: grab; color: #C3CEDA; text-align: center; user-select: none; }
.item-tbl tr.dragging { opacity: .4; }
.item-tbl tr.over td { border-top: 2px solid var(--brand); }
.item-tbl .amt { text-align: right; font-family: var(--mono); font-weight: 600; color: var(--ink); padding-right: 10px; }
.item-tbl .del { color: var(--mute); cursor: pointer; border: none; background: none; font-size: 15px; line-height: 1; padding: 4px 6px; border-radius: 5px; }
.item-tbl .del:hover { background: var(--danger-l); color: var(--danger); }
.item-tbl tr.mark-new td { background: #FFFCF2; }
.item-tbl tr.mark-custom td:first-child { box-shadow: inset 3px 0 0 var(--violet); }

.sum-bar { display: flex; align-items: center; gap: 22px; padding: 12px 16px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); flex-wrap: wrap; }
.sum-bar .kv { font-size: 12.5px; color: var(--sub); }
.sum-bar .kv b { font-family: var(--mono); font-size: 14px; color: var(--ink); margin-left: 5px; font-variant-numeric: tabular-nums; }
.sum-bar .total b { font-size: 19px; color: var(--brand-d); }
.sum-bar .upper { flex: 1 1 100%; font-size: 12.3px; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 9px; }

/* ---------- 提示条 ---------- */
.notice { display: flex; gap: 10px; padding: 10px 13px; border-radius: var(--radius-s); font-size: 12.5px; line-height: 1.65; border: 1px solid; }
.notice.info { background: var(--brand-l); border-color: #CFE0F3; color: #1F5A9C; }
.notice.warn { background: var(--warn-l); border-color: #F3DFBB; color: #8A5A08; }
.notice.err { background: var(--danger-l); border-color: #F3CFCF; color: #A62B2B; }
.notice.ok { background: var(--ok-l); border-color: #C6E8D7; color: #0E6B43; }
.notice b { font-weight: 600; }

/* ---------- 对比框（备注修改） ---------- */
.cmp { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cmp .box { border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.cmp .box .hd { padding: 7px 11px; font-size: 11.8px; font-weight: 600; background: var(--panel-2); border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 6px; }
.cmp .box .bd { padding: 10px 12px; font-size: 12.3px; line-height: 1.85; max-height: 240px; overflow-y: auto; white-space: pre-wrap; color: var(--ink-2); background: #fff; }
.cmp .box.old .hd { color: var(--sub); }
.cmp .box.new .hd { color: var(--brand-d); background: var(--brand-l); }
.cmp .box.new .bd { background: #FBFDFF; }
.cmp .diff-add { background: #E4F6EC; border-radius: 3px; padding: 0 2px; }
.cmp .diff-del { background: #FDECEC; text-decoration: line-through; color: #A62B2B; }

/* ---------- 水印预览 ---------- */
.wasted-mark { position: relative; }
.wasted-mark::after {
  content: "WASTED"; position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 62px; font-weight: 700; color: rgba(211,58,58,.13); letter-spacing: 8px;
  transform: rotate(-22deg); pointer-events: none;
}

/* ---------- 骨架 ---------- */
.skel { background: linear-gradient(90deg, #EEF2F7 25%, #F6F9FC 37%, #EEF2F7 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 6px; }
@keyframes sk { from { background-position: 100% 50% } to { background-position: 0 50% } }

/* ---------- 权限矩阵 ---------- */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.perm-cell { display: flex; align-items: center; gap: 7px; font-size: 12.2px; padding: 6px 9px; border-radius: var(--radius-s); background: var(--panel-2); border: 1px solid var(--line-2); }
.perm-cell.y { background: var(--ok-l); border-color: #C6E8D7; color: #0E6B43; }
.perm-cell.n { background: #F7F9FC; border-color: var(--line-2); color: var(--mute); }

/* ---------- 详情键值 ---------- */
.kv-list { display: grid; grid-template-columns: 100px 1fr; gap: 7px 14px; font-size: 12.8px; }
.kv-list dt { color: var(--sub); font-size: 12.3px; }
.kv-list dd { margin: 0; color: var(--ink); word-break: break-all; }
.kv-list.wide { grid-template-columns: 132px 1fr; }

/* ---------- 条目说明列表 ---------- */
.doc-list { margin: 0; padding-left: 18px; font-size: 12.6px; color: var(--sub); line-height: 1.95; }
.doc-list li { margin-bottom: 3px; }
.doc-list b { color: var(--ink); }

/* ---------- 配色预览（彩色 / 黑白） ---------- */
.pm-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pm-opt { flex: 1 1 190px; border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 10px 12px; cursor: pointer; background: var(--panel); transition: border-color .15s, box-shadow .15s; }
.pm-opt:hover { border-color: var(--brand); }
.pm-opt.on { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-l, #E8F3FD); }
.pm-opt .t { font-size: 12.8px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.pm-opt .d { font-size: 11.6px; color: var(--mute); margin-top: 3px; }
.pm-chip { display: inline-flex; gap: 3px; margin-top: 6px; }
.pm-chip i { width: 16px; height: 8px; border-radius: 2px; display: block; border: 1px solid rgba(0,0,0,.06); }

/* ---------- 步骤 ---------- */
.steps { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 7px; font-size: 12.3px; color: var(--mute); }
.step i { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-size: 11px; background: var(--line-2); color: var(--sub); font-weight: 600; }
.step.on { color: var(--brand-d); font-weight: 600; }
.step.on i { background: var(--brand); color: #fff; }
.step.done i { background: var(--ok); color: #fff; }
.step-arrow { color: #CFD9E5; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) { .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 980px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .cmp { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; width: 218px; }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .g3, .g4 { grid-template-columns: 1fr 1fr; }
}
@media print {
  .sidebar, .topbar, #toasts, .no-print { display: none !important; }
  .main { margin-left: 0; }
  body { background: #fff; }
}
