/* 心货达 SaaS 运营后台 */
:root {
  --navy: #102033;
  --navy-2: #0a1726;
  --navy-3: #1b314a;
  --orange: #e8892d;
  --orange-2: #f2a24f;
  --orange-dark: #c76f19;
  --orange-soft: #fdf2e4;
  --cream: #f6f3ed;
  --paper: #fff;
  --ink: #1f2a37;
  --ink-2: #47586b;
  --ink-3: #6c7d90;
  --muted: #93a2b2;
  --line: #e7e2d8;
  --line-2: #d9d2c5;
  --green: #2f9e70;
  --green-soft: #eaf7f1;
  --red: #d25757;
  --red-soft: #fdf0f0;
  --blue: #397fd1;
  --blue-soft: #eef5fe;
  --violet: #8067c8;
  --violet-soft: #f3effd;
  --shadow-sm: 0 1px 2px rgba(15, 30, 45, .05);
  --shadow-md: 0 12px 32px rgba(15, 30, 45, .10);
  --shadow-lg: 0 26px 70px rgba(8, 22, 38, .26);
  --radius: 12px;
  --sidebar-w: 238px;
  --topbar-h: 64px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--orange-dark); text-decoration: none; }
a:hover { color: var(--orange); }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
.svg-ico { width: 16px; height: 16px; flex: none; }

/* ---------- 登录 ---------- */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr);
  background: var(--cream);
}
.login-visual {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 46px 54px 38px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 16%, rgba(232, 137, 45, .28), transparent 32%),
    radial-gradient(circle at 12% 82%, rgba(57, 127, 209, .20), transparent 36%),
    linear-gradient(145deg, #0a1726 0%, #10253b 52%, #0d1d2e 100%);
}
.login-visual::before, .login-visual::after {
  content: ""; position: absolute; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08);
}
.login-visual::before { width: 560px; height: 560px; right: -230px; bottom: -180px; }
.login-visual::after { width: 320px; height: 320px; right: -110px; bottom: -60px; border-color: rgba(232,137,45,.18); }
.login-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.login-logo, .side-logo {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--orange-2), var(--orange-dark));
  color: #fff; font-size: 20px; font-weight: 800;
  box-shadow: 0 8px 20px rgba(232,137,45,.28);
}
.login-brand b { display: block; font-size: 17px; letter-spacing: .5px; }
.login-brand span { display: block; font-size: 10px; letter-spacing: 2.2px; color: #9fb2c7; text-transform: uppercase; }
.login-brand .login-logo, .mobile-brand .login-logo { color: #fff; font-size: 20px; font-weight: 800; letter-spacing: 0; }
.login-hero { position: relative; z-index: 1; margin: auto 0; max-width: 610px; padding: 38px 0 28px; }
.login-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 20px;
  color: #ffd4a5; background: rgba(232,137,45,.12);
  border: 1px solid rgba(232,137,45,.25);
  font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
}
.login-hero h1 { margin-top: 20px; font-size: 46px; line-height: 1.22; font-weight: 700; letter-spacing: 1px; }
.login-hero h1 em { font-style: normal; color: var(--orange-2); }
.login-hero > p { margin-top: 16px; max-width: 540px; color: #aabacd; font-size: 14px; line-height: 1.9; }
.login-features { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 560px; }
.login-feature {
  padding: 15px 16px; border-radius: 12px;
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.08);
}
.login-feature b { display: block; font-size: 13px; color: #f3f7fb; margin-bottom: 4px; }
.login-feature span { font-size: 11.5px; color: #90a3b8; line-height: 1.65; }
.login-visual-foot { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 18px; font-size: 11.5px; color: #8599ad; }
.login-visual-foot a { color: #b8c8d7; }
.login-visual-foot a:hover { color: #fff; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 36px 28px; background: linear-gradient(180deg, #faf8f4, #f5f1ea); }
.login-card { width: 100%; max-width: 410px; }
.login-card .mobile-brand { display: none; }
.login-card h2 { font-size: 27px; font-weight: 700; letter-spacing: .5px; }
.login-card .login-sub { margin-top: 8px; color: var(--ink-3); font-size: 13px; margin-bottom: 28px; }
.login-field { margin-bottom: 18px; }
.login-field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 7px; }
.login-field .input-wrap { position: relative; }
.login-field .input {
  width: 100%; height: 46px; padding: 0 42px 0 13px;
  border: 1px solid var(--line-2); border-radius: 10px; background: #fff;
  font-size: 13.5px; outline: none; transition: border .15s, box-shadow .15s;
}
.login-field .input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232,137,45,.12); }
.login-field .field-ico { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: #a0adb9; pointer-events: none; }
.login-row { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 18px; font-size: 12px; color: var(--ink-3); }
.login-row label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.login-row input { accent-color: var(--orange); }
.login-error { min-height: 20px; color: var(--red); font-size: 12px; margin-bottom: 6px; }
.btn-login {
  width: 100%; height: 46px; border: none; border-radius: 10px;
  background: linear-gradient(135deg, var(--orange-2), var(--orange-dark));
  color: #fff; font-size: 14px; font-weight: 650; letter-spacing: 3px;
  cursor: pointer; box-shadow: 0 10px 22px rgba(232,137,45,.25);
  transition: transform .12s, box-shadow .15s;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(232,137,45,.30); }
.login-demo { margin-top: 20px; padding: 12px 14px; border-radius: 10px; background: #fff7eb; border: 1px solid #f3dfc2; color: #8a632b; font-size: 11.5px; line-height: 1.75; }
.login-demo b { color: #6f4a16; }
.login-links { margin-top: 18px; text-align: center; color: var(--muted); font-size: 11.5px; }
.login-links a { color: var(--ink-3); margin: 0 4px; }
.login-links a:hover { color: var(--orange-dark); }
.login-copyright { margin-top: 36px; text-align: center; color: #a8a196; font-size: 10.5px; }

/* ---------- 后台骨架 ---------- */
.admin-body { background: var(--cream); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar-w);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 58%, #0f2135 100%);
  color: #c7d3e0; box-shadow: 8px 0 30px rgba(6, 16, 28, .08);
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 21px 22px 18px; color: #fff; }
.side-brand:hover { color: #fff; }
.side-logo { width: 36px; height: 36px; border-radius: 10px; font-size: 18px; box-shadow: 0 7px 16px rgba(232,137,45,.24); }
.side-brand b { display: block; font-size: 15px; letter-spacing: .4px; }
.side-brand span { display: block; font-size: 9.5px; letter-spacing: 1.7px; color: #8095ab; margin-top: 1px; }
.side-brand .side-logo { color: #fff; font-size: 18px; font-weight: 800; letter-spacing: 0; }
.side-nav { flex: 1; padding: 8px 12px 18px; overflow-y: auto; }
.side-nav::-webkit-scrollbar { width: 5px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 3px; }
.nav-group { margin-bottom: 5px; }
.nav-group + .nav-group { border-top: 1px solid rgba(255,255,255,.055); padding-top: 5px; }
.nav-parent, .nav-link {
  display: flex; align-items: center; gap: 10px; min-height: 41px; padding: 0 12px;
  border-radius: 9px; color: #9fb0c2; font-size: 12.8px; cursor: pointer; user-select: none;
  transition: color .15s, background .15s;
}
.nav-parent:hover, .nav-link:hover { color: #fff; background: rgba(255,255,255,.055); }
.nav-parent .svg-ico, .nav-link .svg-ico { color: #72879d; }
.nav-parent:hover .svg-ico, .nav-link:hover .svg-ico { color: #aabdcf; }
.nav-caret { margin-left: auto; width: 12px; height: 12px; color: #6d8298; transition: transform .18s; }
.nav-group.open .nav-caret { transform: rotate(90deg); }
.nav-children { display: none; padding: 3px 0 5px 22px; }
.nav-group.open .nav-children { display: block; }
.nav-link { min-height: 36px; font-size: 12.4px; }
.nav-link::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: #50677e; flex: none; }
.nav-link.active { color: #ffd9ad; background: rgba(232,137,45,.14); box-shadow: inset 3px 0 0 var(--orange); }
.nav-link.active::before { background: var(--orange); box-shadow: 0 0 0 3px rgba(232,137,45,.13); }
.nav-group.active > .nav-parent { color: #fff; }
.nav-group.active > .nav-parent .svg-ico { color: var(--orange-2); }
.side-foot { padding: 15px 18px 17px; border-top: 1px solid rgba(255,255,255,.07); font-size: 10.5px; color: #6f8499; line-height: 1.7; }
.side-foot a { color: #9eb2c6; }
.side-foot a:hover { color: #fff; }
.topbar {
  position: fixed; inset: 0 0 auto var(--sidebar-w); z-index: 25; height: var(--topbar-h);
  display: flex; align-items: center; gap: 16px; padding: 0 26px;
  background: rgba(250,248,244,.92); border-bottom: 1px solid var(--line);
}
.menu-btn {
  display: none; width: 34px; height: 34px; border: 1px solid var(--line-2);
  border-radius: 8px; background: #fff; color: var(--ink-2); cursor: pointer;
  align-items: center; justify-content: center;
}
.top-env { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 12px; }
.top-env::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(47,158,112,.10); }
.top-spacer { flex: 1; }
.top-user { display: flex; align-items: center; gap: 10px; padding-left: 16px; border-left: 1px solid var(--line); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(145deg, #f4b467, #d98428); color: #fff;
  font-size: 13px; font-weight: 700; box-shadow: 0 3px 8px rgba(199,111,25,.18);
}
.avatar.sm { width: 28px; height: 28px; font-size: 11px; }
.top-user b { display: block; font-size: 12.8px; line-height: 1.2; }
.top-user span { display: block; font-size: 10.5px; color: var(--muted); }
.top-user .avatar { color: #fff; font-size: 13px; font-weight: 700; }
.top-user .avatar.sm { font-size: 11px; }
.logout-btn {
  margin-left: 4px; height: 30px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: 7px;
  background: #fff; color: var(--ink-3); font-size: 11.5px; cursor: pointer;
}
.logout-btn:hover { color: var(--red); border-color: #eccaca; background: var(--red-soft); }
.main { margin-left: var(--sidebar-w); padding: calc(var(--topbar-h) + 24px) 28px 34px; min-height: 100vh; }

/* ---------- 通用页面 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.page-head h1 { font-size: 22px; font-weight: 700; letter-spacing: .2px; }
.page-head .crumb { margin-top: 5px; font-size: 11.5px; color: var(--muted); }
.page-head .crumb b { color: var(--ink-3); font-weight: 500; }
.page-head .head-note { margin-top: 5px; color: var(--ink-3); font-size: 12px; }
.page-actions { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { display: flex; align-items: center; gap: 9px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.card-head h3 { font-size: 13.5px; font-weight: 650; }
.card-head .sub { color: var(--muted); font-size: 11.5px; }
.card-head .spacer { flex: 1; }
.card-body { padding: 17px 18px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line-2); background: #fff; color: var(--ink-2);
  font-size: 12.8px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: border .15s, color .15s, background .15s, box-shadow .15s;
}
.btn:hover { border-color: #d4b28d; color: var(--orange-dark); background: #fffbf6; }
.btn .svg-ico { width: 14px; height: 14px; }
.btn-primary { border-color: var(--orange); background: linear-gradient(135deg, var(--orange-2), var(--orange)); color: #fff; box-shadow: 0 4px 12px rgba(232,137,45,.20); }
.btn-primary:hover { border-color: var(--orange-dark); background: linear-gradient(135deg, #f1a44f, #d78225); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--orange-dark); padding: 0 9px; }
.btn-ghost:hover { background: var(--orange-soft); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12px; }
.btn-danger { color: var(--red); border-color: #efd0d0; }
.btn-danger:hover { color: var(--red); background: var(--red-soft); border-color: #e7bcbc; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link { color: var(--orange-dark); cursor: pointer; font-size: 12.5px; }
.link:hover { color: var(--orange); text-decoration: underline; }
.link.danger { color: var(--red); }
.link + .link { margin-left: 10px; }
.muted { color: var(--muted); }
.mono { font-family: "SFMono-Regular", Consolas, monospace; font-size: 12px; }
.empty { padding: 58px 20px; text-align: center; color: var(--muted); font-size: 12px; }
.empty .svg-ico { width: 30px; height: 30px; margin: 0 auto 10px; opacity: .4; }
.page-note { margin-top: 14px; padding: 11px 14px; border: 1px solid #efdfc7; border-left: 3px solid var(--orange); border-radius: 8px; background: #fffdf8; color: #8b6c3b; font-size: 11.8px; line-height: 1.8; white-space: pre-line; }

/* ---------- 筛选/表格 ---------- */
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 11px 16px; padding: 14px 16px; margin-bottom: 13px; }
.filter { display: flex; align-items: center; gap: 7px; }
.filter > label { color: var(--ink-3); font-size: 12px; white-space: nowrap; }
.spacer { flex: 1; }
.input, .select, .textarea {
  height: 34px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 8px;
  background: #fff; color: var(--ink); font-size: 12.5px; outline: none;
  transition: border .15s, box-shadow .15s;
}
.input::placeholder, .textarea::placeholder { color: #a8b2bc; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(232,137,45,.10); }
.input.w-sm { width: 100px; }
.input.w-md { width: 170px; }
.input.w-lg { width: 220px; }
.select {
  appearance: none; padding-right: 27px;
  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' fill='none' stroke='%237d8d9d' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center;
}
.textarea { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; min-width: 860px; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: 12.5px; }
.table th { height: 42px; padding: 0 10px; text-align: center; white-space: nowrap; background: #faf8f4; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 11.5px; font-weight: 600; }
.table td { padding: 12px 10px; border-bottom: 1px solid #f0ece5; text-align: center; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #fdfbf8; }
.table td.left, .table th.left { text-align: left; }
.table .col-actions { white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 11px; font-size: 11px; font-weight: 500; }
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.tag-on { background: var(--green-soft); color: #237a51; }
.tag-off { background: #f2f4f6; color: #7d8b99; }
.tag-warn { background: #fff5e7; color: #a36b13; }
.tag-err { background: var(--red-soft); color: #b63c3c; }
.tag-info { background: var(--blue-soft); color: #2469ad; }
.tag-violet { background: var(--violet-soft); color: #684dab; }
.pager { display: flex; align-items: center; gap: 12px; padding: 13px 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11.5px; }
.pager .spacer { flex: 1; }
.pager b { color: var(--ink-2); }

/* ---------- 首页 ---------- */
.dash-hero { position: relative; overflow: hidden; padding: 26px 28px; border-radius: 14px; color: #fff; background: radial-gradient(circle at 84% 18%, rgba(232,137,45,.34), transparent 32%), linear-gradient(125deg, #0c1b2c 0%, #142c46 62%, #183a56 100%); box-shadow: 0 18px 36px rgba(14, 31, 50, .15); margin-bottom: 16px; }
.dash-hero::after { content: ""; position: absolute; right: -60px; bottom: -100px; width: 300px; height: 300px; border-radius: 50%; border: 1px solid rgba(255,255,255,.10); }
.dash-hero .hello { font-size: 11px; letter-spacing: 1.5px; color: #f3b66f; text-transform: uppercase; }
.dash-hero h2 { margin-top: 8px; font-size: 26px; font-weight: 700; letter-spacing: .5px; }
.dash-hero p { margin-top: 7px; color: #a9bbce; font-size: 12.5px; }
.dash-hero .hero-actions { position: absolute; right: 26px; top: 26px; display: flex; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.dash-hero .hero-stat { display: flex; gap: 34px; margin-top: 24px; flex-wrap: wrap; position: relative; z-index: 1; }
.dash-hero .hero-stat b { display: block; font-size: 24px; line-height: 1.15; font-weight: 700; }
.dash-hero .hero-stat span { font-size: 11px; color: #9fb5c9; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.metric { position: relative; overflow: hidden; padding: 16px 17px; background: #fff; border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow-sm); }
.metric::after { content: ""; position: absolute; width: 66px; height: 66px; right: -20px; top: -24px; border-radius: 50%; background: var(--orange-soft); }
.metric .m-ico { width: 29px; height: 29px; border-radius: 8px; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange-dark); margin-bottom: 10px; }
.metric .m-label { font-size: 11.5px; color: var(--ink-3); }
.metric .m-value { margin-top: 3px; font-size: 25px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.metric .m-value small { font-size: 10.5px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.metric .m-foot { margin-top: 7px; font-size: 10.5px; color: var(--muted); }
.metric.tone-green .m-ico { background: var(--green-soft); color: #237a51; }
.metric.tone-green::after { background: var(--green-soft); }
.metric.tone-blue .m-ico { background: var(--blue-soft); color: #2469ad; }
.metric.tone-blue::after { background: var(--blue-soft); }
.metric.tone-violet .m-ico { background: var(--violet-soft); color: #684dab; }
.metric.tone-violet::after { background: var(--violet-soft); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 16px; margin-bottom: 16px; }
.dash-grid.equal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bar-list { display: grid; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 78px minmax(0, 1fr) 46px; align-items: center; gap: 12px; font-size: 12px; }
.bar-row .bar-name { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; border-radius: 5px; background: #f2ede5; overflow: hidden; }
.bar-track i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #f3b061, var(--orange)); }
.bar-row b { text-align: right; color: var(--ink); font-size: 12px; }
.legend-line { display: flex; align-items: center; gap: 16px; margin-top: 14px; color: var(--muted); font-size: 11px; }
.legend-line span { display: inline-flex; align-items: center; gap: 6px; }
.legend-line i { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.legend-line i.green { background: var(--green); }
.legend-line i.gray { background: #b9c3cd; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 12px; table-layout: fixed; }
.mini-table th { padding: 8px 6px; text-align: left; color: var(--muted); font-size: 10.5px; font-weight: 500; border-bottom: 1px solid var(--line); }
.mini-table td { padding: 10px 6px; text-align: left; border-bottom: 1px solid #f2eee7; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-table tr:last-child td { border-bottom: none; }
.quick-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick-item { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink-2); font-size: 12px; transition: all .15s; }
.quick-item:hover { border-color: #edc596; background: #fffaf3; color: var(--orange-dark); }
.quick-item .q-ico { width: 30px; height: 30px; border-radius: 8px; background: var(--orange-soft); color: var(--orange-dark); display: grid; place-items: center; }
.activity-list { display: grid; }
.activity-item { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid #f2eee7; }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 28px; height: 28px; border-radius: 8px; background: #faf5ed; color: var(--orange-dark); display: grid; place-items: center; }
.activity-item b { display: block; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.activity-item span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.activity-item em { font-style: normal; font-size: 10.5px; color: var(--muted); }

/* ---------- 表单/弹窗 ---------- */
.modal-mask { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; background: rgba(10, 23, 38, .48); }
.modal { width: 520px; max-width: 100%; max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: #fff; border-radius: 13px; box-shadow: var(--shadow-lg); animation: modalIn .18s ease; }
.modal.modal-lg { width: 760px; }
.modal.modal-sm { width: 410px; }
.modal-head { height: 56px; display: flex; align-items: center; gap: 9px; padding: 0 19px; border-bottom: 1px solid var(--line); flex: none; }
.modal-head h3 { font-size: 15px; font-weight: 650; }
.modal-sub { color: var(--muted); font-size: 11.5px; }
.modal-close { margin-left: auto; width: 29px; height: 29px; border: none; border-radius: 7px; background: transparent; color: #8a96a1; cursor: pointer; display: grid; place-items: center; }
.modal-close:hover { background: #f4f0e9; color: var(--ink); }
.modal-body { padding: 19px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 13px 19px; border-top: 1px solid var(--line); background: #fcfaf7; border-radius: 0 0 13px 13px; flex: none; }
.modal-foot .btn { min-width: 76px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid .span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: 12px; color: var(--ink-3); }
.field .req { color: var(--red); margin-right: 2px; }
.field .input, .field .select, .field .textarea { width: 100%; }
.field .hint { font-size: 10.5px; color: var(--muted); }
.checkbox-grid { display: flex; flex-wrap: wrap; gap: 9px 16px; padding: 3px 0; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.check input { accent-color: var(--orange); width: 14px; height: 14px; margin: 0; }
.detail-list { display: grid; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.detail-row { display: grid; grid-template-columns: 105px 1fr; border-bottom: 1px solid var(--line); }
.detail-row:last-child { border-bottom: none; }
.detail-key { padding: 10px 12px; background: #faf8f4; color: var(--ink-3); font-size: 11.5px; }
.detail-val { padding: 10px 12px; color: var(--ink-2); font-size: 12px; word-break: break-all; }
.confirm-body { display: flex; align-items: flex-start; gap: 13px; padding: 22px 20px; }
.confirm-ico { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--orange-soft); color: var(--orange-dark); }
.confirm-ico.danger { background: var(--red-soft); color: var(--red); }
.confirm-text b { display: block; font-size: 13px; margin-bottom: 4px; }
.confirm-text p { color: var(--ink-3); font-size: 11.5px; line-height: 1.7; }
.toast-wrap { position: fixed; right: 24px; bottom: 24px; z-index: 200; display: flex; flex-direction: column; gap: 9px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; min-width: 220px; max-width: 360px; padding: 11px 14px; border-radius: 9px; background: #1c2b3c; color: #fff; font-size: 12px; box-shadow: 0 14px 30px rgba(9, 24, 40, .25); animation: toastIn .2s ease; }
.toast .svg-ico { color: #7bd3a3; }
.toast.error .svg-ico { color: #ff9b9b; }
.toast.hide { animation: toastOut .2s ease forwards; }

/* ---------- 部门树/角色 ---------- */
.tree-cell { display: flex; align-items: center; gap: 7px; text-align: left; }
.tree-line { color: #c9d2db; }
.tree-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-node { color: var(--orange-dark); }
.role-accounts { display: grid; gap: 8px; }
.role-account-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.role-account-row b { font-size: 12px; color: var(--ink-2); }
.role-account-row span { font-size: 11px; color: var(--muted); margin-left: auto; }

/* ---------- 响应式 ---------- */
@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid, .dash-grid.equal { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar { width: 240px; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.show { transform: none; box-shadow: var(--shadow-lg); }
  .topbar { left: 0; padding: 0 16px; }
  .menu-btn { display: inline-flex; }
  .main { margin-left: 0; padding-left: 16px; padding-right: 16px; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100vh; }
  .login-card .mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
  .login-card .mobile-brand b { font-size: 16px; color: var(--ink); }
  .login-card .mobile-brand span { display: block; font-size: 9px; letter-spacing: 1.5px; color: var(--muted); }
  .login-card .mobile-brand .login-logo { color: #fff; font-size: 20px; font-weight: 800; letter-spacing: 0; }
}
@media (max-width: 640px) {
  .top-env { display: none; }
  .top-user b, .top-user span { display: none; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .page-head h1 { font-size: 19px; }
  .metric-grid, .quick-grid { grid-template-columns: 1fr; }
  .dash-hero { padding: 20px; }
  .dash-hero h2 { font-size: 21px; }
  .dash-hero .hero-actions { position: static; margin-top: 16px; justify-content: flex-start; }
  .dash-hero .hero-stat { gap: 22px; margin-top: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .modal { width: 100%; }
  .filter-bar { padding: 12px; }
  .input.w-md, .input.w-lg { width: 100%; }
  .filter { flex: 1 1 100%; }
}
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(6px); } }
