/* ============================================================
   焱坤云 · 商户魔方后台主题
   纯手写样式，无任何第三方框架与组件库
   ============================================================ */

:root {
  --bg: #070b16;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.26);
  --text: #eaf0fb;
  --text-2: #c3cee2;
  --muted: #8b98b4;
  --brand: #6b8cff;
  --brand-2: #22d3ee;
  --violet: #a78bfa;
  --amber: #fbbf24;
  --green: #34d399;
  --red: #f87171;
  --brand-grad: linear-gradient(135deg, #6b8cff 0%, #22d3ee 100%);
  --amber-grad: linear-gradient(135deg, #fbbf24 0%, #fb923c 100%);
  --radius-lg: 18px;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.28);
  --sidebar-w: 250px;
  --sidebar-w-min: 78px;
  --topbar-h: 66px;
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand);
  text-decoration: none;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

svg {
  display: block;
}

::selection {
  background: rgba(107, 140, 255, 0.35);
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.22);
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(148, 163, 184, 0.36);
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------------- 图标 ---------------- */

.ico {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

.ico-lg {
  width: 22px;
  height: 22px;
}

/* ---------------- 骨架布局 ---------------- */

.shell {
  min-height: 100vh;
  display: flex;
  background:
    radial-gradient(1000px 500px at 82% -10%, rgba(107, 140, 255, 0.12), transparent 60%),
    radial-gradient(700px 400px at 0% 100%, rgba(34, 211, 238, 0.07), transparent 60%),
    var(--bg);
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0b1324 0%, #070c17 100%);
  border-right: 1px solid var(--line);
  z-index: 40;
  transition: width 0.22s ease, transform 0.24s ease;
}

.brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  flex: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--brand-grad);
  display: grid;
  place-items: center;
  color: #061027;
  font-weight: 800;
  font-size: 17px;
  box-shadow: 0 8px 22px rgba(107, 140, 255, 0.4);
  flex: none;
  position: relative;
  overflow: hidden;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.5), transparent 55%);
  opacity: 0.55;
}

.brand-text {
  min-width: 0;
}

.brand-name {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  line-height: 1.45;
}

.brand-ver {
  display: inline-block;
  margin-left: 4px;
  padding: 0 4px;
  border: 1px solid rgba(120, 148, 255, 0.45);
  border-radius: 4px;
  background: rgba(91, 124, 250, 0.16);
  color: #9db0ff;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.4px;
  vertical-align: 1px;
}

.brand-sub {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 1.4px;
  white-space: nowrap;
}

.nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px 20px;
}

.nav-group + .nav-group {
  margin-top: 18px;
}

.nav-label {
  padding: 0 12px 8px;
  font-size: 10.5px;
  letter-spacing: 2px;
  color: #5c6a86;
  white-space: nowrap;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  height: 40px;
  padding: 0 12px;
  margin-bottom: 3px;
  border-radius: 10px;
  color: #9fb0cc;
  border: 1px solid transparent;
  transition: background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item:hover {
  background: rgba(107, 140, 255, 0.09);
  color: #dce6fa;
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(107, 140, 255, 0.24), rgba(34, 211, 238, 0.07));
  border-color: rgba(107, 140, 255, 0.3);
  box-shadow: inset 0 0 24px rgba(107, 140, 255, 0.08);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand-grad);
}

.nav-item .nav-text {
  font-size: 13.5px;
  flex: 1;
}

.nav-item .nav-badge {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: rgba(248, 113, 113, 0.2);
  color: #fca5a5;
  font-size: 10.5px;
  display: grid;
  place-items: center;
  font-weight: 600;
}

.sidebar-foot {
  padding: 12px;
  border-top: 1px solid var(--line);
  flex: none;
}

.shop-mini {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.shop-mini .avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-weight: 700;
  color: #fff;
  flex: none;
}

.shop-mini .meta {
  min-width: 0;
  flex: 1;
}

.shop-mini .name {
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shop-mini .sub {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
}

.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.22s ease;
}

.topbar {
  height: var(--topbar-h);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 26px;
  background: rgba(7, 11, 22, 0.78);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  display: grid;
  place-items: center;
  transition: all 0.16s ease;
  flex: none;
}

.icon-btn:hover {
  color: #fff;
  border-color: rgba(107, 140, 255, 0.45);
  background: rgba(107, 140, 255, 0.12);
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.crumb .path {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.crumb .sep {
  color: #43506a;
  font-size: 11px;
}

.crumb .current {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(52, 211, 153, 0.3);
  background: rgba(52, 211, 153, 0.09);
  color: #6ee7b7;
  font-size: 12px;
  white-space: nowrap;
}

.status-pill.closed {
  border-color: rgba(248, 113, 113, 0.32);
  background: rgba(248, 113, 113, 0.09);
  color: #fca5a5;
}

.status-pill .dot,
.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.14);
  flex: none;
}

.status-pill.closed .dot {
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.14);
}

.iso-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  border-radius: 9px;
  background: rgba(34, 211, 238, 0.07);
  border: 1px solid rgba(34, 211, 238, 0.2);
  color: #67e8f9;
  font-size: 11.5px;
  white-space: nowrap;
}

.iso-pill .ico {
  width: 14px;
  height: 14px;
}

.avatar-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 8px 0 6px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
}

.avatar-btn:hover,
.avatar-btn.open {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #0a1020;
  background: var(--brand-grad);
  flex: none;
}

.avatar-btn .who {
  text-align: left;
  line-height: 1.25;
}

.avatar-btn .who b {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
}

.avatar-btn .who span {
  font-size: 10.5px;
  color: var(--muted);
}

.dropdown {
  position: fixed;
  top: 58px;
  right: 24px;
  width: 250px;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: #0d1526;
  box-shadow: var(--shadow);
  padding: 8px;
  z-index: 60;
  animation: pop 0.16s ease;
}

.dropdown.hidden {
  display: none;
}

.dropdown-title {
  padding: 8px 10px 6px;
  font-size: 10.5px;
  letter-spacing: 1.5px;
  color: var(--muted);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  border-radius: 9px;
  font-size: 13px;
  text-align: left;
}

.dropdown-item:hover {
  background: rgba(107, 140, 255, 0.11);
  color: #fff;
}

.dropdown-item .ico {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

.dropdown-sep {
  height: 1px;
  margin: 6px 4px;
  background: var(--line);
}

.bell {
  position: relative;
}

.bell-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg);
}

.notice-list {
  max-height: 320px;
  overflow-y: auto;
}

.notice-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: 9px;
  cursor: pointer;
}

.notice-item:hover {
  background: rgba(255, 255, 255, 0.04);
}

.notice-item .n-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: none;
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
}

.notice-item .n-ico.blue {
  background: rgba(107, 140, 255, 0.12);
  color: var(--brand);
}

.notice-item .n-body {
  min-width: 0;
  flex: 1;
}

.notice-item .n-title {
  font-size: 12.5px;
  font-weight: 600;
}

.notice-item .n-sub {
  font-size: 11px;
  color: var(--muted);
}

.content {
  flex: 1;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 24px 28px 34px;
}

.footbar {
  border-top: 1px solid var(--line);
  padding: 15px 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  align-items: center;
  justify-content: space-between;
  color: #5f6d88;
  font-size: 11px;
  letter-spacing: 0.2px;
}

.footbar .foot-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footbar b {
  color: #7d8ba6;
  font-weight: 500;
}

/* ---------------- 页面头 ---------------- */

.page {
  animation: rise 0.32s ease;
}

.page-head {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.page-head h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-head h1 .dot-mark {
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: var(--brand-grad);
  display: inline-block;
}

.page-desc {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12.5px;
  max-width: 720px;
}

.page-actions {
  margin-left: auto;
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 15px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.btn:hover {
  border-color: rgba(107, 140, 255, 0.45);
  color: #fff;
  background: rgba(107, 140, 255, 0.1);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn .ico {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: var(--brand-grad);
  border-color: transparent;
  color: #061027;
  font-weight: 650;
  box-shadow: 0 8px 22px rgba(91, 124, 250, 0.28);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #809dff, #4de3f5);
  color: #061027;
  box-shadow: 0 10px 26px rgba(91, 124, 250, 0.4);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.22);
  color: #fecaca;
}

.btn-ghost {
  background: transparent;
}

.btn-sm {
  height: 30px;
  padding: 0 11px;
  font-size: 11.5px;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.btn-link {
  border: 0;
  background: transparent;
  color: var(--brand);
  padding: 0;
  height: auto;
  font-size: 12px;
}

.btn-link:hover {
  background: transparent;
  color: #9db4ff;
}

/* ---------------- 卡片 / 网格 ---------------- */

.card {
  background: linear-gradient(180deg, rgba(17, 26, 46, 0.92), rgba(12, 19, 34, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
}

.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.card-head h3 {
  font-size: 14px;
  font-weight: 650;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-head .hint {
  font-size: 11px;
  color: var(--muted);
  margin-left: auto;
}

.card-body {
  padding: 18px;
}

.card-body.tight {
  padding: 12px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-kpi {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-main {
  grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr);
  align-items: start;
}

.mt-16 {
  margin-top: 16px;
}

.mb-16 {
  margin-bottom: 16px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 11.5px;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

.text-green {
  color: var(--green);
}

.text-red {
  color: var(--red);
}

.text-amber {
  color: var(--amber);
}

.flex {
  display: flex;
  align-items: center;
  gap: 8px;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.flex-wrap {
  flex-wrap: wrap;
}

.spacer {
  flex: 1;
}

/* ---------------- KPI ---------------- */

.kpi {
  position: relative;
  padding: 17px 18px;
  overflow: hidden;
}

.kpi::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -42px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(107, 140, 255, 0.18), transparent 65%);
  pointer-events: none;
}

.kpi-top {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
}

.kpi-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(107, 140, 255, 0.12);
  color: var(--brand);
  border: 1px solid rgba(107, 140, 255, 0.18);
}

.kpi-ico.cyan {
  background: rgba(34, 211, 238, 0.1);
  color: var(--brand-2);
  border-color: rgba(34, 211, 238, 0.18);
}

.kpi-ico.amber {
  background: rgba(251, 191, 36, 0.1);
  color: var(--amber);
  border-color: rgba(251, 191, 36, 0.18);
}

.kpi-ico.violet {
  background: rgba(167, 139, 250, 0.1);
  color: var(--violet);
  border-color: rgba(167, 139, 250, 0.18);
}

.kpi-ico.green {
  background: rgba(52, 211, 153, 0.1);
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.18);
}

.kpi-value {
  margin-top: 12px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: 0.4px;
  line-height: 1.2;
  display: flex;
  align-items: baseline;
  gap: 5px;
}

.kpi-value .unit {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}

.kpi-foot {
  margin-top: 7px;
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi-foot b {
  color: var(--text-2);
  font-weight: 600;
}

/* ---------------- 表格 ---------------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

table.data th {
  text-align: left;
  padding: 10px 14px;
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.6px;
  background: rgba(255, 255, 255, 0.018);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

table.data td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  vertical-align: middle;
}

table.data tbody tr {
  transition: background 0.14s ease;
}

table.data tbody tr:hover {
  background: rgba(107, 140, 255, 0.055);
}

table.data tbody tr:last-child td {
  border-bottom: 0;
}

table.data th.right,
table.data td.right {
  text-align: right;
}

table.data th.center,
table.data td.center {
  text-align: center;
}

table.data .sub {
  display: block;
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
}

.check {
  width: 15px;
  height: 15px;
  accent-color: var(--brand);
  cursor: pointer;
}

.cell-goods {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.thumb {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
}

.cell-goods .g-name {
  font-size: 12.5px;
  font-weight: 600;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-goods .g-sub {
  font-size: 10.5px;
  color: var(--muted);
}

/* ---------------- 标签 ---------------- */

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid transparent;
  background: rgba(148, 163, 184, 0.12);
  color: #b6c2d8;
}

.tag-blue {
  background: rgba(107, 140, 255, 0.12);
  border-color: rgba(107, 140, 255, 0.22);
  color: #a7bbff;
}

.tag-cyan {
  background: rgba(34, 211, 238, 0.1);
  border-color: rgba(34, 211, 238, 0.22);
  color: #67e8f9;
}

.tag-green {
  background: rgba(52, 211, 153, 0.1);
  border-color: rgba(52, 211, 153, 0.22);
  color: #6ee7b7;
}

.tag-amber {
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.22);
  color: #fcd34d;
}

.tag-red {
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.22);
  color: #fca5a5;
}

.tag-violet {
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.22);
  color: #c4b5fd;
}

.tag-gray {
  background: rgba(148, 163, 184, 0.1);
  border-color: rgba(148, 163, 184, 0.18);
  color: #a9b5ca;
}

/* ---------------- 表单 ---------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field > label {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}

.field > label .req {
  color: var(--red);
  margin-left: 2px;
}

.field .hint {
  font-size: 10.5px;
  color: var(--muted);
}

.input,
.select,
.textarea {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(7, 12, 23, 0.65);
  color: var(--text);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.textarea {
  height: auto;
  min-height: 78px;
  padding: 9px 12px;
  resize: vertical;
  line-height: 1.6;
}

.input::placeholder,
.textarea::placeholder {
  color: #5b6882;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: rgba(107, 140, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(107, 140, 255, 0.14);
}

.input[type="date"] {
  color-scheme: dark;
}

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #7d8ba6 50%), linear-gradient(135deg, #7d8ba6 50%, transparent 50%);
  background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 30px;
}

.form-grid {
  display: grid;
  gap: 15px 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid .span-2 {
  grid-column: span 2;
}

.form-section-title {
  grid-column: span 2;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--muted);
  padding-top: 4px;
}

.form-section-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

/* 开关 */

.switch {
  position: relative;
  width: 38px;
  height: 21px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(148, 163, 184, 0.16);
  padding: 0;
  flex: none;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #b9c4d8;
  transition: transform 0.18s ease, background 0.18s ease;
}

.switch[data-on="true"] {
  background: rgba(52, 211, 153, 0.22);
  border-color: rgba(52, 211, 153, 0.45);
}

.switch[data-on="true"]::after {
  transform: translateX(17px);
  background: #6ee7b7;
}

.switch.small {
  width: 32px;
  height: 18px;
}

.switch.small::after {
  width: 12px;
  height: 12px;
}

.switch.small[data-on="true"]::after {
  transform: translateX(14px);
}

/* ---------------- 工具条 / 筛选 ---------------- */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.toolbar .grow {
  flex: 1;
  min-width: 120px;
}

.search-box {
  position: relative;
  min-width: 210px;
  flex: 0 1 280px;
}

.search-box .ico {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--muted);
  pointer-events: none;
}

.search-box .input {
  padding-left: 34px;
  height: 36px;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 11.5px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chip b {
  color: var(--text-2);
  font-weight: 600;
}

.chip:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.chip.active {
  background: rgba(107, 140, 255, 0.14);
  border-color: rgba(107, 140, 255, 0.38);
  color: #c7d4ff;
}

.chip.active b {
  color: #fff;
}

.bulkbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: rgba(251, 191, 36, 0.06);
  border-bottom: 1px solid rgba(251, 191, 36, 0.16);
  font-size: 12px;
  color: #fcd34d;
  flex-wrap: wrap;
}

.bulkbar .spacer {
  flex: 1;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: rgba(7, 12, 23, 0.5);
  gap: 2px;
}

.segmented button {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
}

.segmented button.active {
  background: rgba(107, 140, 255, 0.18);
  color: #dfe7ff;
  box-shadow: inset 0 0 0 1px rgba(107, 140, 255, 0.28);
}

/* ---------------- 分页 ---------------- */

.pager {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 13px 16px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.pager .p-info {
  color: var(--muted);
  font-size: 11px;
  margin-right: auto;
}

.pager button {
  min-width: 30px;
  height: 30px;
  padding: 0 9px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-2);
  font-size: 11.5px;
}

.pager button:hover:not(:disabled) {
  border-color: rgba(107, 140, 255, 0.4);
  color: #fff;
}

.pager button.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #061027;
  font-weight: 700;
}

.pager button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ---------------- 模态框 ---------------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 7, 14, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fade 0.18s ease;
}

.modal {
  width: 100%;
  max-width: 680px;
  max-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(180deg, #101a2e, #0a1020);
  box-shadow: var(--shadow);
  animation: pop 0.2s ease;
}

.modal.wide {
  max-width: 860px;
}

.modal.narrow {
  max-width: 460px;
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  font-size: 16px;
  font-weight: 650;
}

.modal-head .sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

.modal-head .icon-btn {
  margin-left: auto;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--muted);
}

.modal-head .icon-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 15px 20px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.modal-foot .left {
  margin-right: auto;
  color: var(--muted);
  font-size: 11px;
}

/* 抽屉 */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(4, 7, 14, 0.66);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: flex-end;
  animation: fade 0.18s ease;
}

.drawer-panel {
  width: min(560px, 100%);
  height: 100%;
  background: linear-gradient(180deg, #0f1829, #080d18);
  border-left: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  animation: slide-left 0.22s ease;
}

.drawer-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.drawer-head h3 {
  font-size: 16px;
}

.drawer-head .icon-btn {
  margin-left: auto;
  border: 0;
  background: transparent;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.drawer-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

/* ---------------- 提示 ---------------- */

.toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-width: 260px;
  max-width: 400px;
  padding: 11px 14px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: #101a2e;
  box-shadow: var(--shadow);
  font-size: 12.5px;
  animation: slide-down 0.22s ease;
  pointer-events: auto;
}

.toast.success {
  border-color: rgba(52, 211, 153, 0.4);
}

.toast.error {
  border-color: rgba(248, 113, 113, 0.42);
}

.toast.info {
  border-color: rgba(107, 140, 255, 0.4);
}

.toast .t-ico {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  margin-top: 1px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(52, 211, 153, 0.16);
  color: #6ee7b7;
}

.toast.error .t-ico {
  background: rgba(248, 113, 113, 0.16);
  color: #fca5a5;
}

.toast.info .t-ico {
  background: rgba(107, 140, 255, 0.16);
  color: #a7bbff;
}

.toast .t-body {
  flex: 1;
  line-height: 1.5;
}

.toast .t-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

/* ---------------- 空状态 / 加载 ---------------- */

.empty {
  padding: 48px 20px;
  text-align: center;
  color: var(--muted);
}

.empty .e-ico {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line-strong);
  color: #5d6d89;
}

.empty h4 {
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 4px;
}

.empty p {
  font-size: 11.5px;
}

.loading-block {
  padding: 60px 0;
  display: grid;
  place-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.spinner {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid rgba(107, 140, 255, 0.2);
  border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}

/* ---------------- 页内组件 ---------------- */

.notice-bar {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px 15px;
  border-radius: 12px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  background: rgba(34, 211, 238, 0.055);
  color: #a5f3fc;
  font-size: 11.5px;
  line-height: 1.6;
}

.notice-bar .ico {
  color: #22d3ee;
  margin-top: 1px;
}

.notice-bar.amber {
  border-color: rgba(251, 191, 36, 0.18);
  background: rgba(251, 191, 36, 0.055);
  color: #fde68a;
}

.notice-bar.amber .ico {
  color: var(--amber);
}

.notice-bar.red {
  border-color: rgba(248, 113, 113, 0.2);
  background: rgba(248, 113, 113, 0.06);
  color: #fecaca;
}

.notice-bar.red .ico {
  color: var(--red);
}

.notice-bar b {
  color: #fff;
  font-weight: 600;
}

.isolation-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 13px;
  border: 1px solid rgba(107, 140, 255, 0.2);
  background:
    linear-gradient(90deg, rgba(107, 140, 255, 0.1), rgba(34, 211, 238, 0.045) 60%, transparent),
    rgba(255, 255, 255, 0.015);
  font-size: 11.5px;
  color: #b9c9f5;
  flex-wrap: wrap;
}

.isolation-bar .shield {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(107, 140, 255, 0.16);
  color: #a7bbff;
  flex: none;
}

.isolation-bar code {
  font-family: Consolas, monospace;
  font-size: 11px;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.16);
  border-radius: 5px;
  padding: 1px 6px;
}

/* 待办 */

.todo-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid transparent;
  transition: all 0.16s ease;
  cursor: pointer;
}

.todo-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
}

.todo-item + .todo-item {
  margin-top: 4px;
}

.todo-ico {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
}

.todo-ico.blue {
  background: rgba(107, 140, 255, 0.12);
  color: var(--brand);
}

.todo-ico.amber {
  background: rgba(251, 191, 36, 0.12);
  color: var(--amber);
}

.todo-ico.red {
  background: rgba(248, 113, 113, 0.12);
  color: var(--red);
}

.todo-ico.green {
  background: rgba(52, 211, 153, 0.12);
  color: var(--green);
}

.todo-item .t-main {
  flex: 1;
  min-width: 0;
}

.todo-item .t-label {
  font-size: 12.5px;
  font-weight: 550;
}

.todo-item .t-hint {
  font-size: 10.5px;
  color: var(--muted);
}

.todo-item .t-count {
  font-size: 19px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.todo-item .t-count.zero {
  color: #4d5b74;
}

/* 排行榜 */

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.rank-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 62px;
  gap: 9px;
  align-items: center;
}

.rank-no {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
}

.rank-no.top1 {
  background: rgba(251, 191, 36, 0.18);
  color: #fcd34d;
}

.rank-no.top2 {
  background: rgba(148, 163, 184, 0.2);
  color: #d1d9e8;
}

.rank-no.top3 {
  background: rgba(251, 146, 60, 0.16);
  color: #fdba74;
}

.rank-name {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rank-track {
  height: 5px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.09);
  margin-top: 5px;
  overflow: hidden;
}

.rank-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--brand-grad);
  animation: grow 0.7s ease;
}

.rank-val {
  text-align: right;
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* 图表 */

.chart-wrap {
  position: relative;
  width: 100%;
}

.chart-wrap canvas {
  display: block;
  width: 100%;
}

.chart-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--muted);
  padding: 0 2px 4px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 3px;
}

.chart-tip {
  position: absolute;
  z-index: 5;
  min-width: 120px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-strong);
  background: rgba(10, 16, 30, 0.96);
  box-shadow: var(--shadow-soft);
  font-size: 11px;
  color: var(--text-2);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.12s ease;
  white-space: nowrap;
}

.chart-tip.show {
  opacity: 1;
}

.chart-tip b {
  color: #fff;
  font-weight: 600;
}

.chart-tip .tip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}

/* 营销活动卡片 */

.act-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.act-card {
  position: relative;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(107, 140, 255, 0.07), rgba(255, 255, 255, 0.015) 45%);
  overflow: hidden;
}

.act-card.coupon {
  background: linear-gradient(160deg, rgba(251, 191, 36, 0.075), rgba(255, 255, 255, 0.012) 45%);
}

.act-card .act-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.act-type {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(107, 140, 255, 0.14);
  color: #a7bbff;
  flex: none;
}

.act-card.coupon .act-type {
  background: rgba(251, 191, 36, 0.14);
  color: #fcd34d;
}

.act-card h4 {
  font-size: 13.5px;
  font-weight: 650;
  margin-bottom: 2px;
}

.act-card .act-sub {
  font-size: 10.5px;
  color: var(--muted);
}

.act-card .act-rule {
  margin-top: 13px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-2);
}

.act-card .act-rule b {
  color: #fff;
  font-size: 13px;
  font-weight: 650;
}

.act-card .act-foot {
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px dashed var(--line);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--muted);
  flex-wrap: wrap;
}

.act-card .act-foot .spacer {
  flex: 1;
}

.progress {
  height: 5px;
  border-radius: 3px;
  background: rgba(148, 163, 184, 0.1);
  overflow: hidden;
  margin-top: 8px;
}

.progress > i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--amber-grad);
}

/* 试算 */

.sim-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.sim-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  transition: background 0.14s ease;
}

.sim-item:hover {
  background: rgba(255, 255, 255, 0.03);
}

.sim-item.selected {
  background: rgba(107, 140, 255, 0.08);
  border-color: rgba(107, 140, 255, 0.22);
}

.sim-item .s-main {
  flex: 1;
  min-width: 0;
}

.sim-item .s-name {
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim-item .s-price {
  font-size: 10.5px;
  color: var(--muted);
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  overflow: hidden;
  height: 26px;
  flex: none;
}

.qty button {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  font-size: 13px;
}

.qty button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.qty span {
  min-width: 24px;
  text-align: center;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
}

.sim-summary {
  border-radius: 14px;
  border: 1px solid rgba(107, 140, 255, 0.22);
  background:
    radial-gradient(340px 150px at 100% 0%, rgba(34, 211, 238, 0.12), transparent 70%),
    linear-gradient(160deg, rgba(107, 140, 255, 0.1), rgba(10, 16, 30, 0.4));
  padding: 18px;
}

.sim-total {
  font-size: 32px;
  font-weight: 750;
  letter-spacing: 0.5px;
  line-height: 1.2;
}

.sim-total .cur {
  font-size: 16px;
  font-weight: 500;
  color: var(--muted);
  margin-right: 2px;
}

.sim-lines {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sim-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-2);
}

.sim-line .lv {
  font-size: 9.5px;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(107, 140, 255, 0.14);
  color: #a7bbff;
}

.sim-line .lv.shop {
  background: rgba(251, 191, 36, 0.14);
  color: #fcd34d;
}

.sim-line .amt {
  margin-left: auto;
  color: #fca5a5;
  font-variant-numeric: tabular-nums;
}

.sim-divider {
  height: 1px;
  background: var(--line);
  margin: 13px 0;
}

.sim-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  font-size: 11px;
  color: var(--muted);
}

.sim-meta b {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--text);
  font-weight: 600;
}

/* 订单详情 */

.detail-section + .detail-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-section h4 {
  font-size: 11px;
  letter-spacing: 1.4px;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 500;
}

.line-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
}

.line-item .thumb {
  width: 34px;
  height: 34px;
}

.line-item .li-main {
  flex: 1;
  min-width: 0;
}

.line-item .li-name {
  font-size: 12px;
}

.line-item .li-sub {
  font-size: 10.5px;
  color: var(--muted);
}

.line-item .li-amount {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  font-size: 12px;
}

.kv span {
  color: var(--muted);
}

.kv b {
  font-weight: 550;
  text-align: right;
}

.amount-lines {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
}

.amount-lines .kv.total {
  margin-top: 5px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  font-size: 13.5px;
}

.amount-lines .kv.total b {
  color: var(--amber);
  font-size: 17px;
  font-weight: 700;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.timeline-item {
  display: flex;
  gap: 11px;
  position: relative;
  padding-bottom: 15px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 14px;
  bottom: 0;
  width: 1px;
  background: var(--line);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  border: 2px solid rgba(107, 140, 255, 0.6);
  background: #0a1020;
  margin-top: 3px;
  flex: none;
  z-index: 1;
}

.timeline-item.done .timeline-dot {
  background: var(--brand);
  border-color: var(--brand);
}

/* 店铺信息预览 */

.shop-preview {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.shop-cover {
  height: 108px;
  position: relative;
  background:
    radial-gradient(300px 120px at 20% 0%, rgba(255, 255, 255, 0.18), transparent 60%),
    linear-gradient(135deg, #3350c8, #12b5cc);
}

.shop-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 16px 16px;
  opacity: 0.35;
}

.shop-cover .badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  padding: 3px 9px;
  border-radius: 7px;
  background: rgba(5, 10, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 10.5px;
  backdrop-filter: blur(6px);
}

.shop-preview-body {
  padding: 0 18px 18px;
  background: linear-gradient(180deg, rgba(17, 26, 46, 0.9), rgba(12, 19, 34, 0.96));
}

.shop-logo {
  width: 62px;
  height: 62px;
  border-radius: 15px;
  margin-top: -28px;
  border: 4px solid #0e1728;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  position: relative;
  z-index: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.shop-preview h3 {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 700;
}

.shop-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
}

.shop-stats div {
  text-align: center;
}

.shop-stats b {
  display: block;
  font-size: 16px;
  font-weight: 650;
}

.shop-stats span {
  font-size: 10px;
  color: var(--muted);
}

/* 结算 */

.settle-hero {
  position: relative;
  padding: 22px 24px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(107, 140, 255, 0.28);
  background:
    radial-gradient(500px 220px at 88% -10%, rgba(34, 211, 238, 0.2), transparent 65%),
    radial-gradient(400px 200px at 0% 120%, rgba(167, 139, 250, 0.16), transparent 65%),
    linear-gradient(135deg, #172448, #0c1d33);
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}

.settle-hero .s-label {
  font-size: 11.5px;
  color: #93a7d0;
  letter-spacing: 0.4px;
}

.settle-hero .s-value {
  font-size: 36px;
  font-weight: 750;
  letter-spacing: 1px;
  line-height: 1.25;
  background: linear-gradient(120deg, #fff, #9ddcff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.settle-hero .s-sub {
  font-size: 11px;
  color: #7f92b8;
  margin-top: 4px;
}

.settle-formula {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 11px;
  color: #8fa3c8;
  background: rgba(5, 10, 20, 0.3);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 10px;
  padding: 10px 13px;
}

.settle-formula b {
  color: #dce7ff;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.settle-formula .op {
  color: #5e78a8;
}

.settle-hero .right {
  margin-left: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: flex-end;
}

.bill-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

.voucher {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  padding: 16px;
}

.voucher-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 13px;
  border-bottom: 1px dashed var(--line);
}

.voucher-head h4 {
  font-size: 15px;
  font-weight: 700;
}

.voucher-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 14px 0;
}

.voucher-grid b {
  display: block;
  font-size: 14px;
  font-weight: 650;
  margin-top: 2px;
}

.voucher-grid span {
  font-size: 10.5px;
  color: var(--muted);
}

/* 日志 */

.log-row {
  display: flex;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.log-row:last-child {
  border-bottom: 0;
}

.log-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: none;
  background: rgba(148, 163, 184, 0.1);
  color: #a9b5ca;
  font-size: 10px;
  font-weight: 600;
}

.log-ico.越权 {
  background: rgba(248, 113, 113, 0.12);
  color: #fca5a5;
}

.log-ico.订单 {
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
}

.log-ico.活动 {
  background: rgba(251, 191, 36, 0.1);
  color: #fcd34d;
}

.log-ico.结算 {
  background: rgba(34, 211, 238, 0.1);
  color: #67e8f9;
}

.log-content {
  flex: 1;
  min-width: 0;
}

.log-content .lc-main {
  font-size: 12px;
}

.log-content .lc-meta {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 2px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 数据表统计行 */

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-box {
  padding: 13px 15px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.018);
}

.stat-box span {
  font-size: 10.5px;
  color: var(--muted);
}

.stat-box b {
  display: block;
  font-size: 19px;
  font-weight: 700;
  margin-top: 3px;
  font-variant-numeric: tabular-nums;
}

/* 桌面端手动收起菜单 */

@media (min-width: 1181px) {
  .shell.compact .sidebar {
    width: var(--sidebar-w-min);
  }

  .shell.compact .brand {
    justify-content: center;
    padding: 0;
  }

  .shell.compact .brand-text,
  .shell.compact .nav-label,
  .shell.compact .nav-item .nav-text,
  .shell.compact .nav-item .nav-badge,
  .shell.compact .shop-mini .meta {
    display: none;
  }

  .shell.compact .nav-item {
    justify-content: center;
    padding: 0;
  }

  .shell.compact .nav-item.active::before {
    display: none;
  }

  .shell.compact .shop-mini {
    justify-content: center;
    padding: 8px;
  }

  .shell.compact .main {
    margin-left: var(--sidebar-w-min);
  }
}

/* 响应式 */

.sidebar-backdrop {
  display: none;
}

@media (max-width: 1320px) {
  .grid-kpi {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  .sidebar {
    width: var(--sidebar-w-min);
  }

  .brand-text,
  .nav-label,
  .nav-item .nav-text,
  .shop-mini .meta,
  .nav-item .nav-badge {
    display: none;
  }

  .brand {
    justify-content: center;
    padding: 0;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .nav-item.active::before {
    display: none;
  }

  .shop-mini {
    justify-content: center;
    padding: 8px;
  }

  .main {
    margin-left: var(--sidebar-w-min);
  }

  .grid-main,
  .sim-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .iso-pill {
    display: none;
  }
}

@media (max-width: 900px) {
  .grid-2,
  .grid-3,
  .grid-4,
  .act-grid,
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .form-grid .span-2,
  .form-section-title {
    grid-column: span 1;
  }

  .content {
    padding: 18px 16px 26px;
  }

  .topbar {
    padding: 0 14px;
    gap: 10px;
  }

  .status-pill {
    display: none;
  }

  .page-head h1 {
    font-size: 19px;
  }

  .footbar {
    padding: 14px 16px;
  }
}

@media (max-width: 760px) {
  .sidebar {
    width: var(--sidebar-w);
    transform: translateX(-102%);
    box-shadow: var(--shadow);
  }

  .shell.nav-open .sidebar {
    transform: none;
  }

  .shell.nav-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 14, 0.6);
    z-index: 35;
  }

  .main {
    margin-left: 0;
  }

  .brand-text,
  .nav-label,
  .nav-item .nav-text,
  .shop-mini .meta,
  .nav-item .nav-badge {
    display: block;
  }

  .brand {
    justify-content: flex-start;
    padding: 0 20px;
  }

  .nav-item {
    justify-content: flex-start;
    padding: 0 12px;
  }

  .nav-label {
    display: block;
  }

  .avatar-btn .who {
    display: none;
  }

  .dropdown {
    right: 12px;
  }

  .stat-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 打印（浏览器原生打印，用于报表与结算凭证） */

@media print {
  body {
    background: #fff !important;
    color: #111 !important;
    font-size: 12px;
  }

  .sidebar,
  .topbar,
  .footbar,
  .page-actions,
  .no-print,
  .toast-stack,
  .drawer,
  .overlay {
    display: none !important;
  }

  .main {
    margin: 0 !important;
  }

  .content {
    max-width: none;
    padding: 0;
  }

  .card,
  .settle-hero,
  .voucher,
  .sim-summary {
    background: #fff !important;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
    color: #111 !important;
  }

  .card-head,
  .page-head {
    border-color: #ddd !important;
  }

  .muted,
  .page-desc,
  .stat-box span,
  .kv span {
    color: #555 !important;
  }

  table.data th {
    background: #f2f2f2 !important;
    color: #333 !important;
    border-color: #ccc !important;
  }

  table.data td {
    border-color: #ddd !important;
    color: #111 !important;
  }

  .tag {
    background: #eee !important;
    border-color: #ccc !important;
    color: #333 !important;
  }

  .print-title {
    display: block !important;
    padding-bottom: 14px;
    border-bottom: 2px solid #333;
    margin-bottom: 14px;
  }
}

.print-title {
  display: none;
}

/* 结算凭证打印：仅打印临时凭证区域 */
.print-sheet {
  display: none;
}

@media print {
  body.print-voucher .page > *:not(.print-sheet) {
    display: none !important;
  }

  body.print-voucher .print-sheet {
    display: block !important;
  }
}

/* 动画 */

@keyframes fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: none; }
}

@keyframes slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

@keyframes slide-left {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: none; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes grow {
  from { width: 0; }
}

.hidden {
  display: none !important;
}
