/* 楚渊电商项目管理系统
   视觉系统「楚渊 · 2026」（依据《楚渊电商项目管理系统_前端原型》）：
   深藏青 #254F75 / 墨色 #172E41 / 弱化 #75818C / 边框 #E4E9EC / 画布 #F4F6F7 /
   金饰 #B4A078 / 绿色 #327864
   白色侧边栏 240px / 页头标题 28px / 控件 42px / 面板圆角 11px / 弹窗圆角 13px */
:root {
  --blue: #254f75;
  --blue-deep: #1c3d55;
  --blue-hover: #163b59;
  --ink: #172e41;
  --muted: #75818c;
  --line: #e4e9ec;
  --canvas: #f4f6f7;
  --green: #327864;
  --gold: #b4a078;
  --red: #a76250;
  --red-bg: #fff0ed;
}
* { box-sizing: border-box; }
/* hidden 属性必须始终生效（防止 .login-wrap 等 display 规则覆盖它） */
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.55;
}
button, input, select, textarea { font: inherit; }
button {
  cursor: pointer; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  color: var(--ink); padding: 9px 15px; line-height: 20px; min-height: 42px;
  transition: background .15s, color .15s, border-color .15s;
}
button:hover { background: #f3f6f8; border-color: #cdd7df; }
button:disabled { opacity: .55; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #799bb5; outline-offset: 2px; }
.primary { background: #214c70; color: #fff; border-color: #214c70; box-shadow: 0 3px 7px #153c5812; }
.primary:hover { background: var(--blue-hover); color: #fff; border-color: var(--blue-hover); }
.danger { color: #a04938; border-color: #eed3cb; background: #fffdfc; }
.danger:hover { background: #fdf1ed; border-color: #dcb0a2; }
.link { padding: 0; border: 0; background: none; color: var(--blue); font-size: 13px; min-height: 32px; }
.link:hover { background: none; text-decoration: underline; }
.link.danger { color: #a04938; }

/* ---------- 侧栏（浅色） ---------- */
aside {
  position: fixed; inset: 0 auto 0 0; width: 240px; background: #fff; color: #5f7180;
  border-right: 1px solid var(--line); display: flex; flex-direction: column;
  padding: 36px 18px 22px; z-index: 40;
}
.brand { color: #183950; padding: 0 12px 30px; }
.brand > span { font-size: 26px; letter-spacing: 5px; font-weight: 650; }
.brand small { display: block; font-size: 10px; font-weight: 400; letter-spacing: 1.4px; color: #7c8992; margin-top: 1px; }
.workspace { border-top: 1px solid #edf0f2; border-bottom: 1px solid #edf0f2; margin: 0 7px 12px; padding: 14px 3px; font-size: 12px; color: #7a8995; }
.workspace span { float: right; font-size: 11px; color: #a18a61; }
#nav { flex: 1; overflow: auto; }
nav label { display: block; padding: 20px 15px 7px; font-size: 10px; color: #98a3ab; letter-spacing: 1.5px; }
nav button {
  width: 100%; border: none; display: flex; align-items: center; gap: 13px; background: transparent;
  color: #667986; text-align: left; margin: 2px 0; padding: 11px 15px; font-size: 13px;
  border-radius: 7px; min-height: 44px;
}
nav button svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.6; flex-shrink: 0; }
nav button:hover { background: #f3f6f8; color: #204c70; }
nav button.active { background: #eaf0f4; color: #224b68; box-shadow: none; font-weight: 650; }
nav button.active:after { content: ''; height: 6px; width: 6px; border-radius: 50%; background: var(--gold); margin-left: auto; }
.sidefoot { margin-top: 24px; border-top: 1px solid var(--line); padding: 19px 8px 0; display: flex; gap: 10px; align-items: center; color: #425b6d; }
.avatar { background: #edf2f5; color: #47657b; border-radius: 50%; height: 34px; width: 34px; display: inline-grid; place-items: center; flex-shrink: 0; }
.sidefoot-info { min-width: 0; }
.sidefoot-info span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidefoot small { display: block; color: #8c9aa4; font-size: 11px; }
.online { margin-left: auto; color: #6b9984; font-size: 9px; }

/* ---------- 主区 ---------- */
main { margin-left: 240px; display: flex; flex-direction: column; min-height: 100vh; }
header {
  height: 80px; background: #ffffffba; border-bottom: 1px solid var(--line); padding: 0 42px;
  display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; flex-shrink: 0;
}
header em { font-style: normal; margin: 0 14px; color: #c3ccd4; }
header strong { font-weight: 500; color: #365165; }
header > div { display: flex; align-items: center; gap: 24px; }
.headerdate { font-size: 12px; color: #8996a0; }
.headlogout { font-size: 13px; color: var(--muted); }
.headlogout:hover { color: var(--ink); }
#content { padding: 34px 42px 38px; flex: 1; width: 100%; max-width: 1640px; margin: 0 auto; min-height: calc(100vh - 128px); }
footer { padding: 0 42px 26px; color: #98a4ad; font-size: 10px; display: flex; justify-content: space-between; flex-shrink: 0; }

/* ---------- 页头 ---------- */
.pagehead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 27px; gap: 16px; }
.pagehead h1 { font-size: 28px; font-weight: 600; letter-spacing: 1px; line-height: 1.3; margin: 0; color: #18364c; }
.pagehead p { margin: 9px 0 0; color: #81909b; font-size: 12px; }
.actions { display: flex; gap: 12px; align-items: center; }
.actions select { width: auto; }
.actions button, .actions select { font-size: 12px; padding: 10px 17px; }

/* ---------- 看板横幅（经营总览） ---------- */
.executive {
  position: relative; overflow: hidden; background: #173c55; border-radius: 12px; padding: 26px 32px;
  margin-bottom: 25px; color: #fff; display: flex; justify-content: space-between; align-items: center; min-height: 118px;
}
.executive-copy { position: relative; z-index: 1; }
.executive p { font-size: 14px; color: #d3e0e6; margin: 0; }
.executive p span { border-left: 1px solid #4d6b7d; margin-left: 18px; padding-left: 18px; }
.executive button {
  position: relative; z-index: 1; background: #ffffff0c; border: 1px solid #ffffff30; color: #e6eef1;
  font-size: 12px; padding: 10px 18px; min-height: 42px;
}
.executive button:hover { background: #ffffff1c; color: #fff; }
.executive button span { margin-left: 24px; }
.hero-seal {
  position: absolute; right: 160px; bottom: -41px; color: #ffffff05; font-size: 136px;
  font-family: "STSong", "SimSun", serif; letter-spacing: 10px; transform: rotate(-9deg); pointer-events: none;
}

/* ---------- 看板 ---------- */
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; background: none; border: 0; border-radius: 0; margin-bottom: 21px; }
.summary.single { grid-template-columns: 1fr; }
.metric {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 22px 23px;
  position: relative; min-width: 0;
}
.metric:after { content: ''; position: absolute; top: 25px; right: 23px; width: 7px; height: 7px; border-radius: 2px; border: 1px solid #a8b7c2; }
.metric:first-child:after { background: var(--gold); border-color: var(--gold); }
.metric .label { font-size: 12px; color: #7b8b96; }
.metric .num { font-size: 32px; font-weight: 550; letter-spacing: -1.4px; color: #203e54; margin: 10px 0; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.metric .num small { font-size: 18px; margin-right: 6px; color: #8b9da9; }
.metric .sub { font-size: 10px; color: #8c9aa4; }
.metric .sub b { color: var(--green); font-weight: 500; }
.minorstats { display: flex; gap: 23px; padding: 0 3px 25px; color: var(--muted); font-size: 11px; flex-wrap: wrap; }
.minorstats b { margin-left: 10px; color: #425e71; font-weight: 550; font-variant-numeric: tabular-nums; }
.chartgrid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr); gap: 22px; margin-bottom: 25px; }
.chartgrid > .panel.wide { grid-column: 1 / -1; }
.productbox { max-height: 382px; overflow-y: auto; }
.panel { border: 1px solid var(--line); background: #fff; border-radius: 11px; box-shadow: 0 2px 4px #20344802; overflow: hidden; }
.panelhead { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 25px 26px 14px; }
.panelhead h2 { font-size: 15px; font-weight: 600; margin: 0; color: #254257; }
.panelhead p { color: #94a0a9; font-size: 10px; margin: 7px 0 0; }
.panelhead > .muted { font-size: 10px; }
.legend { display: flex; gap: 12px; font-size: 10px; color: var(--muted); }
.legend i { display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: #476e91; margin-right: 6px; }
.legend i.promo { background: #e0534a; }
.chart { padding: 0 25px 10px; }
.chart svg { width: 100%; height: 230px; display: block; }
.chart polyline[stroke="#285ae6"] { stroke: #416e91; }
.chart circle { stroke: #416e91; }
.chart text { fill: #97a3ac; font-size: 10px; }
.ranklist { padding: 0 26px 17px; }
.rankrow { margin: 19px 0; }
.rankrow > div { display: flex; justify-content: space-between; font-size: 12px; }
.rankrow > div b { font-variant-numeric: tabular-nums; font-weight: 500; }
.track { height: 5px; background: #f0f3f5; border-radius: 2px; margin-top: 11px; }
.track > div { height: 100%; background: #b9c9d3; border-radius: 2px; }
.rankrow:first-child .track > div { background: #557c94; }

/* ---------- 工具条 / 筛选 ---------- */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 18px 0 20px; flex-wrap: wrap; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters input { width: 290px; }
.filters select { width: auto; }
.filters input, .filters select { font-size: 12px; background: #fafcfd; border-color: #e6ecef; }
.toolbar > button { font-size: 12px; }
.tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); padding: 0 26px; }
.tabs button { border: 0; border-radius: 0; padding: 15px 0; color: var(--muted); background: transparent; font-size: 12px; min-height: 44px; }
.tabs button:hover { background: transparent; color: var(--ink); }
.tabs button.selected { color: var(--blue); box-shadow: inset 0 -2px #264f6c; }

/* ---------- 表单控件 ---------- */
input, select, textarea { border: 1px solid #dbe1e9; background: #fff; color: #344054; border-radius: 6px; padding: 9px 12px; outline: none; max-width: 100%; min-height: 40px; }
input:focus, select:focus, textarea:focus { border-color: #7d9bb8; box-shadow: 0 0 0 3px #254f7512; }
input[readonly] { background: #f6f8fb; color: #667085; }
input[type="checkbox"] { min-height: unset; width: 16px; height: 16px; accent-color: #2d5978; }
input[type="date"], input[type="datetime-local"] { min-width: 170px; }

/* ---------- 表格 ---------- */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 13px; }
th { color: #8a98a1; font-size: 11px; font-weight: 500; background: #f8fafb; text-align: left; padding: 15px 24px; border-bottom: 1px solid var(--line); }
td { padding: 19px 24px; border-bottom: 1px solid #edf0f5; font-variant-numeric: tabular-nums; font-size: 12px; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafbfe; }
.numcell { text-align: right; }
.person { display: flex; align-items: center; gap: 10px; }
.person .avatar { font-size: 12px; width: 30px; height: 30px; }
.muted { color: var(--muted); }
.status { display: inline-block; border-radius: 4px; background: #eff6f2; color: #54816b; padding: 4px 9px; font-size: 10px; white-space: nowrap; }
.status:before { content: '●'; font-size: 6px; margin-right: 6px; vertical-align: middle; }
.status.idle { background: #f0f3f8; color: #758299; }
.status.off { background: var(--red-bg); color: var(--red); }
.status.blue { background: #eef3f6; color: var(--blue); }
.rowactions { display: flex; gap: 14px; }
.tablefoot { padding: 17px 24px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: #8692a1; font-size: 10px; align-items: center; flex-wrap: wrap; gap: 10px; }
.notice { padding: 15px 19px; border: 1px solid #dfe7ed; background: #eef3f6; color: #6b8293; border-radius: 6px; margin-bottom: 20px; font-size: 12px; }
.notice.warn { border-color: #eadfc2; background: #fbf7ec; color: #8a6420; }
.empty { text-align: center; color: #8290a1; padding: 55px; white-space: normal; }
.badge { font-size: 11px; color: #7b8797; padding: 3px 8px; border: 1px solid #e4e9ec; border-radius: 4px; white-space: nowrap; }
.sortnum { display: inline-block; min-width: 26px; text-align: center; padding: 3px 8px; border-radius: 5px; background: #eef3f6; color: #557c94; font-size: 11px; font-variant-numeric: tabular-nums; }
.badge.blue { color: var(--blue); border-color: #c9d8e8; background: #eef3f6; }
.badge.warn { color: #8a6420; border-color: #eadfc2; background: #fbf7ec; }
.badge.green { color: var(--green); border-color: #c8e0d4; background: #eff6f2; }
.masked { color: #8692a1; cursor: help; }
.overviewline { display: flex; background: #fff; border: 1px solid var(--line); padding: 25px; border-radius: 10px; margin: 4px 0 24px; }
.overviewline > div { flex: 1; padding-left: 25px; border-right: 1px solid var(--line); font-size: 12px; color: #7b8797; }
.overviewline > div:first-child { padding-left: 0; }
.overviewline > div:last-child { border: 0; }
.overviewline b { display: block; font-size: 30px; font-weight: 500; color: var(--ink); margin-top: 4px; font-variant-numeric: tabular-nums; }

/* ---------- 加载 / 错误 / 无权 ---------- */
.skeleton { padding: 0 22px 18px; }
.skeleton .sk-row { height: 56px; border-bottom: 1px solid #edf0f5; display: flex; align-items: center; gap: 26px; }
.skeleton .sk { height: 12px; border-radius: 3px; background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 50%, #eef1f6 75%); background-size: 200% 100%; animation: sk 1.3s infinite; }
.skeleton .sk-head { height: 34px; display: flex; align-items: center; gap: 26px; margin-bottom: 4px; }
.skeleton .sk-head .sk { height: 10px; background-color: #e6eaf1; animation: none; }
@keyframes sk { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.statebox { text-align: center; padding: 60px 20px; color: #8290a1; }
.statebox .state-icon { font-size: 30px; color: #c3ccd9; margin-bottom: 10px; }
.statebox p { margin: 6px 0; }
.statebox button { margin-top: 14px; }

/* ---------- 弹窗 / 抽屉 ---------- */
dialog { border: 0; padding: 0; border-radius: 13px; width: 520px; max-width: calc(100vw - 28px); color: var(--ink); box-shadow: 0 20px 70px #15213130; }
dialog::backdrop { background: #101e3650; backdrop-filter: blur(2px); }
dialog.drawer { margin: 0 0 0 auto; height: 100vh; max-height: 100vh; border-radius: 0; width: 570px; }
dialog.wide { width: 760px; }
#modal-form { min-height: 100%; display: flex; flex-direction: column; max-height: 100vh; }
.dialoghead { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 30px 32px; flex-shrink: 0; }
.dialoghead small { font-size: 10px; color: #94a0a9; letter-spacing: 2px; }
.dialoghead h2 { font-size: 24px; margin: 4px 0 0; color: #294a62; font-weight: 550; }
.iconbutton { font-size: 24px; border: 0; color: #7d8999; background: transparent; line-height: 1; padding: 4px 8px; min-height: 44px; min-width: 44px; }
.iconbutton:hover { background: transparent; color: var(--ink); }
#dialog-body { padding: 28px 32px; overflow-y: auto; flex: 1; }
.dialogfoot { padding: 21px 32px; border-top: 1px solid var(--line); background: #fafcfd; display: flex; justify-content: flex-end; gap: 10px; margin-top: auto; flex-shrink: 0; }
.dialogfoot button { min-width: 95px; }
.field { margin-bottom: 25px; }
.field > label { display: block; margin-bottom: 10px; font-size: 12px; color: #627887; }
.field input, .field select, .field textarea { width: 100%; }
.field input, .field select { padding: 12px 14px; min-height: 47px; border-color: #dfe7eb; border-radius: 7px; }
.field textarea { min-height: 94px; resize: vertical; }
.field input[readonly] { background: #f4f7f8; }
.field small { font-size: 12px; color: #8792a1; display: block; margin-top: 6px; }
.field .field-error { font-size: 12px; color: #a04938; display: block; margin-top: 6px; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #c0593f; }
.fieldrow { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.total { background: #f4f7fc; padding: 18px; display: flex; align-items: center; justify-content: space-between; margin-top: 20px; border-radius: 8px; }
.total b { font-size: 24px; color: var(--blue); font-variant-numeric: tabular-nums; }
.calcgrid { background: #f4f7fc; padding: 16px 18px; margin-top: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; border-radius: 8px; }
.calcgrid > div > span { display: block; font-size: 12px; color: #8792a1; margin-bottom: 3px; }
.calcgrid > div > b { font-size: 16px; color: var(--blue); font-variant-numeric: tabular-nums; }
.calcgrid .calc-hint { grid-column: 1 / -1; font-size: 12px; color: #8792a1; margin: 0; }
.detailgrid { display: grid; grid-template-columns: 110px 1fr; row-gap: 14px; font-size: 13px; }
.detailgrid dt { color: #7b8797; margin: 0; }
.detailgrid dd { margin: 0; color: var(--ink); word-break: break-all; }
.logjson { background: #f8f9fc; border: 1px solid var(--line); border-radius: 6px; padding: 12px; font-size: 12px; margin: 8px 0 4px; white-space: pre-wrap; word-break: break-all; max-height: 320px; overflow-y: auto; }
.detailgrid + .logjson { margin-top: 16px; }
.dialogbody-note { margin: 0 0 16px; color: var(--muted); font-size: 13px; line-height: 1.9; }
.dialogbody-error { margin: 0 0 16px; padding: 12px 14px; background: #fdf0ee; border: 1px solid #e3b3a9; border-radius: 8px; color: #a04938; font-size: 13px; line-height: 1.7; }
.dialogbody-error[hidden] { display: none; }
#dialog-body > p.muted { font-size: 11px; line-height: 1.9; }

/* ---------- 权限配置 ---------- */
.accountgrid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.userlist { padding: 12px; max-height: 720px; overflow-y: auto; }
.usercard { border: 0; width: 100%; display: flex; gap: 12px; text-align: left; margin: 5px 0; padding: 14px; align-items: center; min-height: auto; }
.usercard.active { background: #edf3f6; }
.usercard small { display: block; color: #8692a1; margin-top: 2px; }
.usercard .avatar { font-size: 12px; width: 30px; height: 30px; }
.permissionbody { padding: 0 24px 22px; }
.permissionbody h3 { font-size: 13px; margin-top: 23px; color: #4d6576; }
.permissionbody table td, .permissionbody table th { padding: 13px 12px; }
.permissionbody input[type=checkbox] { accent-color: #2d5978; }
.permrow { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid #f0f3f8; gap: 12px; flex-wrap: wrap; }
.permrow .permname { font-size: 13px; }
.permrow .permcode { color: #9aa5b5; font-size: 11px; margin-left: 8px; }
.permright { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.permhint { font-size: 11px; color: #9aa5b5; }
.permstate { min-width: 74px; text-align: center; font-size: 12px; border-radius: 5px; padding: 5px 10px; border: 1px solid var(--line); background: #fff; color: var(--muted); min-height: 34px; }
.permstate.allow { background: #eff6f2; color: #54816b; border-color: #bfe3d2; }
.permstate.deny { background: var(--red-bg); color: var(--red); border-color: #eed3cb; }
.permgroup { margin-bottom: 8px; }
.permgroup h4 { font-size: 13px; color: #435065; margin: 18px 0 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.checks { display: flex; flex-wrap: wrap; gap: 22px; font-size: 12px; }
.checks label { display: flex; gap: 7px; align-items: center; }
.scopeblock { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid #f0f3f8; }
.scopeblock .scopetitle { font-size: 13px; color: #435065; margin-bottom: 8px; }
.memberchecks { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.memberchecks label { display: flex; gap: 6px; align-items: center; font-size: 13px; color: #556377; }
.permissionfoot { display: flex; justify-content: flex-end; padding: 18px 24px; border-top: 1px solid var(--line); gap: 10px; }

/* ---------- 时间线 ---------- */
.timeline { padding: 20px 26px; }
.timeline article { padding: 0 0 26px 25px; border-left: 1px solid #dae1ea; position: relative; }
.timeline article:before { content: ''; position: absolute; left: -4px; top: 6px; width: 7px; height: 7px; border-radius: 50%; background: #839dd9; }
.timeline h3 { margin: 0 0 6px; font-size: 15px; }
.timeline p { font-size: 13px; color: #6d7a8b; margin: 5px 0; }
.timeline .closed:before { background: #b9c2cf; }
.timeline .closed h3 { color: #8290a1; }

/* ---------- 预留模块 ---------- */
.moduleintro { max-width: 780px; padding: 36px; }
.moduleintro h2 { font-size: 23px; margin: 0 0 14px; font-weight: 500; color: #284b63; }
.moduleintro p { color: #748194; line-height: 1.9; }
.moduleintro ul { padding-left: 18px; color: #556377; line-height: 2.3; }

/* ---------- 提示条 ---------- */
#toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); padding: 12px 22px; background: #23475e; color: #fff; border-radius: 7px; box-shadow: 0 6px 24px #15213120; display: none; z-index: 100; max-width: 90vw; text-align: center; font-size: 12px; }
#toast.success { background: #2c5f52; }
#toast.error { background: #8f3a2c; }
#toast.show { display: block; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; background: linear-gradient(160deg, #173c55 0%, #142f46 55%, #0e2235 100%); display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { width: 400px; max-width: 100%; background: #fff; border-radius: 12px; padding: 38px 36px 28px; box-shadow: 0 24px 80px #0a142480; }
.login-brand { margin-bottom: 12px; }
.login-brand > span { font-size: 24px; font-weight: 650; letter-spacing: 4px; color: #183950; }
.login-brand small { display: block; font-size: 10px; font-weight: 400; letter-spacing: 1.4px; color: #7c8992; margin-top: 1px; }
.login-sub { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.login-error { background: var(--red-bg); color: #8f3a2c; border: 1px solid #eed3cb; border-radius: 6px; padding: 10px 13px; font-size: 13px; margin-bottom: 16px; }
.login-submit { width: 100%; margin-top: 8px; padding: 11px; font-size: 15px; letter-spacing: 6px; }
.login-foot { color: #9aa5b5; font-size: 11px; text-align: center; margin: 22px 0 0; }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 10px; align-items: center; }
.pager button { padding: 5px 12px; font-size: 12px; min-height: 36px; }
.pager .pageinfo { color: #8692a1; }

/* ---------- 移动端导航 ---------- */
.mobile-menu, .bottomnav, .navveil { display: none; }

/* ---------- 响应式 ---------- */
@media (min-width: 1650px) {
  #content { padding-top: 42px; }
  .metric .num { font-size: 37px; }
  .executive { min-height: 180px; }
  .chart svg { height: 270px; }
}
@media (min-width: 761px) and (max-width: 1150px) {
  aside { width: 210px; padding-left: 12px; padding-right: 12px; }
  main { margin-left: 210px; }
  #content { padding: 28px 24px; }
  header { padding: 0 24px; }
  .summary { gap: 10px; }
  .metric { padding: 18px 15px; }
  .metric .num { font-size: 25px; }
  .metric:after { right: 14px; top: 23px; }
  .chartgrid { grid-template-columns: minmax(0, 1.3fr) minmax(240px, 1fr); }
  .panelhead { padding: 20px 18px; flex-wrap: wrap; }
  .legend { flex-wrap: wrap; }
  .accountgrid { grid-template-columns: 180px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  body { padding-bottom: 72px; }
  /* 侧栏改抽屉 */
  aside { position: fixed; inset: 0 auto 0 0; width: 280px; padding: 30px 18px; transform: translateX(-100%); transition: transform .2s; z-index: 70; }
  .brand { padding-bottom: 24px; }
  .brand > span { font-size: 26px; }
  #nav { display: block; overflow: auto; }
  #nav label { display: block; }
  #nav button { width: 100%; }
  #nav button svg { display: block; }
  .navveil { position: fixed; inset: 0; border: 0; background: #102d4466; z-index: 60; border-radius: 0; }
  .menu-open aside { transform: translateX(0); }
  .menu-open .navveil { display: block; }
  .menu-open { overflow: hidden; }
  main { margin-left: 0; }
  header { height: 65px; padding: 0 20px; gap: 12px; position: relative; background: #fff; }
  header > span { font-size: 0; flex: 1; }
  header > span:before { content: '楚渊'; font-size: 21px; font-weight: 650; letter-spacing: 3px; color: #1f415a; }
  header > span:after { content: '电商项目管理系统'; font-size: 10px; color: #8595a0; display: block; letter-spacing: 1px; }
  header em, header strong { display: none; }
  header > div { gap: 0; }
  .headerdate { display: none; }
  .headlogout { font-size: 11px; }
  .mobile-menu { display: block; padding: 0; border: 0; font-size: 21px; color: #3b5b71; min-height: 44px; width: 32px; order: -1; background: none; }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 45; background: #fffffff7; border-top: 1px solid #e2e8ec; padding: 7px 8px calc(7px + env(safe-area-inset-bottom)); backdrop-filter: blur(12px); gap: 0; overflow: visible; }
  .bottomnav button { display: flex; flex-direction: column; align-items: center; gap: 4px; justify-content: center; flex: 1; border: 0; border-radius: 7px; background: none; color: #95a1a9; font-size: 10px; margin: 0; padding: 4px 0; min-height: 47px; }
  .bottomnav button svg { display: block; width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; fill: none; }
  .bottomnav button.active { background: none; box-shadow: none; color: #254f70; font-weight: 600; }
  #content { padding: 25px 18px 26px; min-height: calc(100vh - 150px); }
  .pagehead { margin-bottom: 21px; gap: 17px; }
  .pagehead h1 { font-size: 25px; margin-bottom: 7px; letter-spacing: 1px; }
  .pagehead p { font-size: 10px; line-height: 1.7; margin-top: 6px; }
  .actions { width: 100%; gap: 8px; flex-wrap: wrap; }
  .actions button, .actions select { min-height: 42px; padding: 9px 13px; font-size: 11px; }
  .actions .primary { margin-left: auto; }
  .executive { padding: 22px; min-height: 108px; align-items: flex-start; margin-bottom: 18px; border-radius: 10px; }
  .executive p { font-size: 11px; }
  .executive p span { display: block; border: 0; margin: 8px 0 0; padding: 0; }
  .executive button { font-size: 0; border: 0; padding: 0; min-width: 26px; min-height: 30px; position: absolute; right: 18px; bottom: 22px; background: transparent; }
  .executive button span { font-size: 23px; margin: 0; }
  .hero-seal { right: -6px; bottom: -18px; font-size: 95px; color: #ffffff07; }
  .summary { grid-template-columns: 1fr 1fr; gap: 11px; margin-bottom: 18px; }
  .metric { padding: 18px 16px; border-radius: 9px; }
  .metric .num { font-size: 27px; letter-spacing: -1px; margin: 9px 0; }
  .metric .num small { font-size: 14px; margin-right: 3px; }
  .metric .label { font-size: 11px; }
  .metric .sub { font-size: 9px; }
  .metric:after { right: 15px; top: 23px; width: 5px; height: 5px; }
  .minorstats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 10px; padding: 0 3px 20px; }
  .minorstats span { display: flex; justify-content: space-between; padding-right: 10px; }
  .minorstats b { margin-left: 5px; font-size: 10px; }
  .chartgrid { grid-template-columns: 1fr; gap: 17px; margin-bottom: 18px; }
  .panelhead { padding: 20px 18px 13px; flex-wrap: wrap; gap: 10px; }
  .panelhead h2 { font-size: 14px; }
  .panelhead p { font-size: 9px; }
  .panelhead > .muted { font-size: 9px; }
  .legend { font-size: 9px; }
  .chart { padding: 0 13px 7px; }
  .chart svg { height: auto; min-height: 166px; }
  .ranklist { padding: 0 19px 13px; }
  .rankrow { margin: 17px 0; }
  .rankrow > div { font-size: 11px; }
  .tabs { padding: 0 18px; }
  .tabs button { font-size: 11px; min-height: 44px; }
  th, td { padding: 14px 16px; }
  .tablefoot { font-size: 9px; padding: 14px 17px; }
  .toolbar { padding: 12px; flex-wrap: wrap; gap: 10px; margin: 0 0 15px; }
  .filters { width: 100%; flex-wrap: nowrap; gap: 8px; }
  .filters input { width: 100%; min-width: 0; flex: 1; }
  .filters select { max-width: 108px; }
  .toolbar > button { font-size: 10px; min-height: 34px; padding: 5px 10px; }
  .overviewline { padding: 20px 16px; margin-bottom: 18px; }
  .overviewline > div { font-size: 10px; padding-left: 17px; }
  .overviewline b { font-size: 26px; }
  .accountgrid { grid-template-columns: 1fr; gap: 15px; }
  .accountgrid .userlist { display: flex; overflow-x: auto; max-height: none; }
  .usercard { min-width: 145px; padding: 10px; font-size: 12px; }
  .permissionbody { padding: 0 15px 20px; }
  .permissionbody table td, .permissionbody table th { padding: 12px 8px; }
  .checks { gap: 17px; }
  .checks label { min-height: 35px; }
  .permissionfoot { padding: 16px; }
  .notice { font-size: 10px; line-height: 1.8; padding: 13px 15px; }
  footer { display: block; padding: 0 18px 23px; font-size: 9px; }
  footer span { margin-top: 6px; }
  dialog, dialog.drawer { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border-radius: 0; }
  #modal-form { height: 100%; }
  .dialoghead { padding: 23px 22px; flex-shrink: 0; }
  .dialoghead h2 { font-size: 23px; }
  #dialog-body { padding: 25px 22px; overflow: auto; flex: 1; }
  .dialogfoot { padding: 16px 22px calc(16px + env(safe-area-inset-bottom)); flex-shrink: 0; }
  .dialogfoot button { flex: 1; min-height: 46px; }
  .field label { font-size: 12px; }
  .field input, .field select { font-size: 16px; min-height: 50px; }
  .field { margin-bottom: 23px; }
  .fieldrow { grid-template-columns: 1fr; }
  .iconbutton { min-width: 44px; min-height: 44px; }
  #toast { bottom: 86px; width: max-content; max-width: 90vw; }
  .moduleintro { padding: 24px; }
  .moduleintro h2 { font-size: 21px; }
  .moduleintro p, .moduleintro li { font-size: 12px; }
  /* 小屏订单/微信列表改卡片（保留标签与操作，不横向滚动） */
  body[data-page=orders] #rows, body[data-page=wechat] #rows { border: 0; background: none; box-shadow: none; overflow: visible; }
  body[data-page=orders] #rows .tablewrap, body[data-page=wechat] #rows .tablewrap { overflow: visible; }
  body[data-page=orders] #rows table, body[data-page=wechat] #rows table { white-space: normal; display: block; }
  body[data-page=orders] #rows thead, body[data-page=wechat] #rows thead { display: none; }
  body[data-page=orders] #rows tbody, body[data-page=wechat] #rows tbody { display: grid; gap: 13px; }
  body[data-page=orders] #rows tr, body[data-page=wechat] #rows tr { display: grid; grid-template-columns: 1fr 1fr; background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 16px; gap: 13px 16px; }
  body[data-page=orders] #rows td, body[data-page=wechat] #rows td { display: block; padding: 0; border: 0; font-size: 12px; min-width: 0; overflow-wrap: anywhere; }
  body[data-page=orders] #rows td:before, body[data-page=wechat] #rows td:before { content: attr(data-label); display: block; font-size: 9px; color: #93a1aa; margin-bottom: 4px; }
  body[data-page=orders] #rows td:first-child, body[data-page=wechat] #rows td:first-child { grid-column: 1 / -1; border-bottom: 1px solid #eef2f4; padding-bottom: 11px; }
  body[data-page=orders] #rows td:first-child:before, body[data-page=wechat] #rows td:first-child:before { display: none; }
  body[data-page=orders] #rows td:first-child .muted, body[data-page=wechat] #rows td:first-child .muted { float: right; font-size: 10px; padding-top: 8px; }
  body[data-page=orders] #rows td:last-child, body[data-page=wechat] #rows td:last-child { grid-column: 1 / -1; border-top: 1px solid #eef2f4; padding-top: 7px; }
  body[data-page=orders] #rows td:last-child:before, body[data-page=wechat] #rows td:last-child:before { display: none; }
  .rowactions { justify-content: flex-end; gap: 20px; }
  .rowactions .link { min-height: 44px; padding: 5px; }
  .tablefoot { background: transparent; }
  body[data-page=orders] #rows .tablefoot, body[data-page=wechat] #rows .tablefoot { border: 0; }
  body[data-page=orders] #rows td.empty { grid-column: 1 / -1; padding: 30px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.summary > .metric, .chartgrid > .panel, .accountgrid > .panel { min-width: 0; }
@media (max-width: 380px) {
  .metric { padding: 17px 12px; }
  .metric .num { font-size: 24px; }
  .metric:after { right: 12px; }
  .minorstats { font-size: 9px; gap: 10px 4px; }
  .minorstats b { font-size: 9px; }
}
