/* ==========================================================================
   拾味集 · 商家工作台
   暖纸、深林绿与陶土色，兼顾经营数据密度与阅读舒适度
   ========================================================================== */

:root {
  --ink: #1a241f;
  --ink-soft: #39443e;
  --muted: #778079;
  --muted-2: #9ca39d;
  --forest: #173f32;
  --forest-deep: #102e25;
  --forest-soft: #245744;
  --sage: #7e9a86;
  --cream: #f4efe5;
  --cream-deep: #ebe2d3;
  --paper: #fffdf8;
  --white: #ffffff;
  --line: #e5dccb;
  --line-soft: #efe8dc;
  --clay: #c76545;
  --clay-soft: #f3dfd5;
  --gold: #a87934;
  --gold-soft: #f2e6cc;
  --danger: #b0473b;
  --danger-soft: #f7e2de;
  --success: #2f6b4d;
  --success-soft: #e0eee3;
  --info: #3b6477;
  --info-soft: #e0edf0;
  --shadow-sm: 0 1px 2px rgba(26, 36, 31, 0.04), 0 8px 24px rgba(26, 36, 31, 0.035);
  --shadow-md: 0 18px 50px rgba(26, 36, 31, 0.1);
  --radius: 18px;
  --radius-sm: 12px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", SimSun, serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

::selection {
  background: var(--gold-soft);
  color: var(--forest-deep);
}

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 2px;
}

.app-loading {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  color: var(--muted);
  background:
    radial-gradient(circle at 30% 20%, rgba(199, 101, 69, 0.08), transparent 38%),
    var(--cream);
}

.boot-mark {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: var(--forest);
  color: #f3ead8;
  font-family: var(--font-serif);
  font-size: 30px;
  box-shadow: var(--shadow-md);
  animation: breathe 1.6s ease-in-out infinite;
}

@keyframes breathe {
  50% {
    transform: translateY(-3px);
    box-shadow: 0 24px 55px rgba(23, 63, 50, 0.22);
  }
}

/* ============================== 登录 ============================== */

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, 0.88fr);
  background: var(--paper);
}

.login-art {
  position: relative;
  overflow: hidden;
  padding: clamp(36px, 5vw, 76px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at 82% 14%, rgba(216, 178, 112, 0.2), transparent 28%),
    radial-gradient(circle at 12% 88%, rgba(199, 101, 69, 0.22), transparent 32%),
    linear-gradient(150deg, #1c4b3a 0%, #123429 58%, #0c271f 100%);
  color: #f4ecdc;
}

.login-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244, 236, 220, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 236, 220, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000 20%, transparent 92%);
  pointer-events: none;
}

.login-art::after {
  content: "泓";
  position: absolute;
  right: -0.08em;
  bottom: -0.32em;
  font-family: var(--font-serif);
  font-size: clamp(300px, 38vw, 620px);
  line-height: 1;
  color: rgba(244, 236, 220, 0.045);
  pointer-events: none;
}

.login-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-symbol {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: #f0e5d2;
  color: var(--forest-deep);
  font-family: var(--font-serif);
  font-size: 25px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
}

.brand-word {
  font-family: var(--font-serif);
  font-size: 22px;
  letter-spacing: 0.14em;
}

.brand-sub {
  font-size: 11px;
  letter-spacing: 0.24em;
  color: rgba(244, 236, 220, 0.56);
  text-transform: uppercase;
}

.login-copy {
  position: relative;
  z-index: 1;
  max-width: 610px;
  padding: 9vh 0 4vh;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: #d8b270;
  text-transform: uppercase;
}

.login-kicker::before {
  content: "";
  width: 36px;
  height: 1px;
  background: #d8b270;
}

.login-copy h1 {
  margin-top: 22px;
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(38px, 4.4vw, 64px);
  line-height: 1.18;
  letter-spacing: 0.02em;
}

.login-copy h1 em {
  font-style: normal;
  color: #e2bd7f;
}

.login-copy p {
  margin-top: 22px;
  max-width: 480px;
  color: rgba(244, 236, 220, 0.7);
  font-size: 15px;
  line-height: 1.9;
}

.login-features {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.login-feature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid rgba(244, 236, 220, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 236, 220, 0.78);
  font-size: 12px;
}

.login-feature::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d8b270;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 48px clamp(28px, 5vw, 76px);
  background:
    radial-gradient(circle at 100% 0%, rgba(216, 178, 112, 0.1), transparent 32%),
    var(--paper);
}

.login-form {
  width: min(100%, 384px);
}

.login-form-head {
  margin-bottom: 28px;
}

.login-form-head .eyebrow {
  color: var(--clay);
}

.login-form-head h2 {
  margin-top: 8px;
  font-family: var(--font-serif);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.login-form-head p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 24px;
  border-radius: 12px;
  background: var(--cream);
  border: 1px solid var(--line-soft);
}

.login-tab {
  border: 0;
  border-radius: 9px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  transition: 0.18s ease;
}

.login-tab.active {
  background: var(--white);
  color: var(--forest);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(26, 36, 31, 0.08);
}

.login-footnote {
  margin-top: 22px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.8;
}

.login-footnote strong {
  color: var(--ink-soft);
  font-weight: 500;
}

/* ============================== 通用控件 ============================== */

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 17px;
}

.field > label,
.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.field-hint {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 400;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--white);
  color: var(--ink);
  padding: 11px 13px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input::placeholder,
.textarea::placeholder {
  color: #b6bcb7;
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: #d4c8b5;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: 0;
  border-color: var(--forest-soft);
  box-shadow: 0 0 0 3px rgba(36, 87, 68, 0.1);
}

.textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.7;
}

.select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.input-money {
  position: relative;
}

.input-money .input {
  padding-left: 28px;
}

.input-money::before {
  content: "¥";
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  z-index: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--forest);
  color: #f7f0e3;
  box-shadow: 0 7px 16px rgba(23, 63, 50, 0.18);
}

.btn-primary:hover {
  background: var(--forest-deep);
}

.btn-clay {
  background: var(--clay);
  color: #fff8f1;
  box-shadow: 0 7px 16px rgba(199, 101, 69, 0.2);
}

.btn-clay:hover {
  background: #b65638;
}

.btn-ghost {
  border-color: var(--line);
  background: var(--paper);
  color: var(--ink-soft);
}

.btn-ghost:hover {
  border-color: #cfc2ae;
  background: var(--white);
}

.btn-soft {
  background: var(--cream);
  color: var(--ink-soft);
}

.btn-soft:hover {
  background: var(--cream-deep);
}

.btn-danger {
  border-color: #e8c8c0;
  background: var(--danger-soft);
  color: var(--danger);
}

.btn-danger:hover {
  background: #f2d4cd;
}

.btn-sm {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.btn-lg {
  min-height: 48px;
  padding: 12px 21px;
  border-radius: 13px;
  font-size: 14px;
}

.btn-block {
  width: 100%;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--muted);
  transition: 0.18s ease;
}

.icon-btn:hover {
  color: var(--forest);
  border-color: #cfc2ae;
  background: var(--white);
}

.icon {
  width: 17px;
  height: 17px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.icon-sm {
  width: 14px;
  height: 14px;
}

.link-btn {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--forest-soft);
  font-weight: 600;
  font-size: 12.5px;
}

.link-btn:hover {
  color: var(--clay);
}

.link-btn.danger {
  color: var(--danger);
}

/* ============================== 框架 ============================== */

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 50% -8%, rgba(216, 178, 112, 0.16), transparent 30%),
    linear-gradient(180deg, #173f32 0%, #123429 100%);
  color: #e9e0d0;
  z-index: 30;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 25px 22px 23px;
  border-bottom: 1px solid rgba(244, 236, 220, 0.08);
}

.sidebar-brand .brand-symbol {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
  border-radius: 13px;
  font-size: 22px;
}

.sidebar-brand-name {
  font-family: var(--font-serif);
  font-size: 19px;
  letter-spacing: 0.12em;
  line-height: 1.25;
}

.sidebar-brand-meta {
  margin-top: 2px;
  color: rgba(233, 224, 208, 0.48);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 18px 13px 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.16) transparent;
}

.nav-group {
  margin-bottom: 19px;
}

.nav-group-label {
  padding: 0 11px 7px;
  color: rgba(233, 224, 208, 0.34);
  font-size: 10px;
  letter-spacing: 0.2em;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 11px;
  margin-bottom: 3px;
  border-radius: 9px;
  color: rgba(233, 224, 208, 0.68);
  font-size: 13px;
  transition: 0.16s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #f4ecdc;
}

.nav-link.active {
  background: rgba(244, 236, 220, 0.1);
  color: #fff9ed;
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: -13px;
  top: 50%;
  width: 3px;
  height: 19px;
  border-radius: 0 4px 4px 0;
  background: #d8b270;
  transform: translateY(-50%);
}

.nav-link .icon {
  opacity: 0.8;
}

.nav-dot {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #d64545;
  color: #fff;
  font-size: 10px;
  font-style: normal;
  line-height: 18px;
  text-align: center;
}

.nav-link.active .icon {
  opacity: 1;
  color: #d8b270;
}

.nav-badge {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--clay);
  color: #fff8f1;
  font-size: 10px;
  font-weight: 700;
}

.sidebar-foot {
  padding: 14px 17px 18px;
  border-top: 1px solid rgba(244, 236, 220, 0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-avatar {
  width: 33px;
  height: 33px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: rgba(244, 236, 220, 0.11);
  color: #f2e6cc;
  font-family: var(--font-serif);
  font-size: 15px;
}

.sidebar-user-name {
  font-size: 12.5px;
  color: #f0e8d9;
}

.sidebar-user-role {
  font-size: 10px;
  color: rgba(233, 224, 208, 0.42);
  letter-spacing: 0.08em;
}

.sidebar-logout {
  margin-left: auto;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(233, 224, 208, 0.48);
}

.sidebar-logout:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 13px 34px;
  border-bottom: 1px solid rgba(229, 220, 203, 0.8);
  background: rgba(244, 239, 229, 0.9);
  backdrop-filter: blur(14px);
}

.menu-toggle {
  display: none;
}

.topbar-title {
  min-width: 0;
}

.topbar-title h1 {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.3;
}

.topbar-title p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
}

.topbar-store {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--ink-soft);
  font-size: 11px;
}

.topbar-store .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
}

.page {
  padding: 30px clamp(20px, 2.6vw, 40px) 64px;
}

.page-inner {
  width: min(100%, 1500px);
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}

.page-head h2 {
  font-family: var(--font-serif);
  font-size: 29px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.page-head p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12.5px;
}

.page-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.eyebrow {
  color: var(--clay);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.section-title h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.section-title p {
  color: var(--muted);
  font-size: 11.5px;
}

/* ============================== 卡片 / 数据 ============================== */

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.card-pad {
  padding: 22px;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.stat-card {
  position: relative;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  overflow: hidden;
  min-height: 142px;
  padding: 19px 20px 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(23, 63, 50, 0.12);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -25px;
  bottom: -35px;
  width: 105px;
  height: 105px;
  border-radius: 50%;
  background: rgba(23, 63, 50, 0.04);
}

.stat-card.accent {
  border-color: transparent;
  background: linear-gradient(145deg, #1d4b3a, #15382c);
  color: #f6efdf;
}

.stat-card.accent::after {
  background: rgba(216, 178, 112, 0.11);
}

.stat-card.clay {
  border-color: transparent;
  background: linear-gradient(145deg, #d47a59, #b9583b);
  color: #fff8f1;
}

.stat-card.clay::after {
  background: rgba(255, 255, 255, 0.09);
}

.stat-card.gold {
  border-color: #ecdcbd;
  background: linear-gradient(145deg, #fbf4e4, #f4e7cc);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.stat-label {
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 0.03em;
}

.accent .stat-label,
.clay .stat-label {
  color: rgba(255, 250, 240, 0.62);
}

.stat-icon {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--cream);
  color: var(--forest);
}

.accent .stat-icon {
  background: rgba(255, 255, 255, 0.1);
  color: #e2bd7f;
}

.clay .stat-icon {
  background: rgba(255, 255, 255, 0.13);
  color: #fff6e8;
}

.gold .stat-icon {
  background: rgba(168, 121, 52, 0.1);
  color: var(--gold);
}

.stat-value {
  margin-top: 14px;
  font-family: var(--font-serif);
  font-size: clamp(26px, 2.4vw, 34px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.stat-value .unit {
  margin-left: 3px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  opacity: 0.55;
}

.stat-foot {
  margin-top: 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10.5px;
}

.accent .stat-foot,
.clay .stat-foot {
  color: rgba(255, 250, 240, 0.54);
}

.stat-foot .up {
  color: var(--success);
  font-weight: 700;
}

.accent .stat-foot .up,
.clay .stat-foot .up {
  color: #f0d59f;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.grid-half {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.stack {
  display: grid;
  gap: 18px;
}

.mt-18 {
  margin-top: 18px;
}

.mt-24 {
  margin-top: 24px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 11.5px;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  letter-spacing: -0.02em;
}

.money {
  font-family: var(--font-serif);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  white-space: nowrap;
}

.money-strong {
  color: var(--forest);
  font-weight: 600;
}

.money-clay {
  color: var(--clay);
}

.empty {
  display: grid;
  place-items: center;
  gap: 9px;
  padding: 52px 20px;
  text-align: center;
  color: var(--muted);
}

.empty-mark {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--cream);
  color: var(--muted-2);
}

.empty h4 {
  color: var(--ink-soft);
  font-size: 14px;
  font-weight: 600;
}

.empty p {
  max-width: 340px;
  font-size: 12px;
}

/* ============================== 表格 ============================== */

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.table th {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-align: left;
  white-space: nowrap;
  background: rgba(244, 239, 229, 0.4);
}

.table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: 0;
}

.table tbody tr {
  transition: background 0.15s ease;
}

.table tbody tr:hover {
  background: rgba(244, 239, 229, 0.42);
}

.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table .nowrap {
  white-space: nowrap;
}

.table .cell-main {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.45;
}

.table .cell-sub {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.45;
}

.table .actions {
  white-space: nowrap;
  text-align: right;
}

.table .actions .link-btn {
  margin-left: 10px;
}

.table-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.thumb {
  width: 42px;
  height: 42px;
  border-radius: 9px;
  object-fit: cover;
  background: linear-gradient(135deg, #eaddc8, #d6c4a7);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.thumb-lg {
  width: 58px;
  height: 58px;
  border-radius: 12px;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 210px;
}

.product-cell .name {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 600;
}

.product-cell .meta {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.7;
}

.badge.green {
  background: var(--success-soft);
  color: var(--success);
}

.badge.orange {
  background: var(--gold-soft);
  color: var(--gold);
}

.badge.red {
  background: var(--danger-soft);
  color: var(--danger);
}

.badge.blue {
  background: var(--info-soft);
  color: var(--info);
}

.badge.gray {
  background: #ecebe5;
  color: #767b75;
}

.badge.plain::before {
  display: none;
}

.badge.square {
  border-radius: 6px;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.tag.clay {
  border-color: #ebcfc2;
  background: #fbf0ea;
  color: var(--clay);
}

.tag.green {
  border-color: #cfe2d5;
  background: #f0f7f1;
  color: var(--success);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  padding: 15px 17px;
  border-bottom: 1px solid var(--line-soft);
}

.toolbar .search {
  position: relative;
  flex: 1 1 220px;
  max-width: 310px;
}

.toolbar .search .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted-2);
}

.toolbar .search .input {
  height: 38px;
  padding-left: 35px;
  background: var(--white);
}

.toolbar select {
  width: auto;
  min-width: 112px;
}

.toolbar .spacer {
  flex: 1;
}

.tabs {
  display: flex;
  gap: 2px;
  overflow-x: auto;
  padding: 0 17px;
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
  display: none;
}

.tab {
  position: relative;
  border: 0;
  padding: 14px 13px 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
}

.tab:hover {
  color: var(--ink-soft);
}

.tab.active {
  color: var(--forest);
  font-weight: 600;
}

.tab.active::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--clay);
}

.tab .count {
  margin-left: 4px;
  color: var(--muted-2);
  font-size: 10px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 17px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 11.5px;
}

.pagination-actions {
  display: flex;
  gap: 6px;
}

/* ============================== 图表 ============================== */

.chart-card {
  padding: 22px 22px 16px;
}

.chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 8px;
}

.chart-head h3 {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
}

.chart-legend {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-size: 10.5px;
}

.legend-dot {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: var(--forest-soft);
}

.legend-dot.margin::before {
  background: var(--clay);
}

.bar-chart {
  position: relative;
  height: 208px;
  margin-top: 15px;
  display: flex;
  align-items: flex-end;
  gap: clamp(5px, 1.2vw, 12px);
  padding: 8px 0 24px;
  border-bottom: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 100% 25%;
}

.bar-col {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

.bar {
  width: min(13px, 42%);
  min-height: 2px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #3f705b, #245744);
  transition: height 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.bar.margin {
  background: linear-gradient(180deg, #e29a7d, #c76545);
}

.bar-label {
  position: absolute;
  left: 50%;
  bottom: -21px;
  transform: translateX(-50%);
  color: var(--muted-2);
  font-size: 9px;
  white-space: nowrap;
}

.bar-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  padding: 6px 8px;
  border-radius: 7px;
  background: var(--forest-deep);
  color: #f7f0e3;
  font-size: 10px;
  line-height: 1.5;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 4;
}

.bar-col:hover .bar-tip {
  opacity: 1;
}

.chart-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 13px;
  color: var(--muted);
  font-size: 10.5px;
}

/* ============================== 详情 / 列表 ============================== */

.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(135deg, rgba(244, 239, 229, 0.8), rgba(255, 253, 248, 0.6));
}

.detail-hero .order-no {
  font-family: var(--font-serif);
  font-size: 18px;
  letter-spacing: 0.02em;
}

.detail-hero .meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.85fr);
  gap: 18px;
  padding: 20px 22px;
}

.detail-block + .detail-block {
  margin-top: 17px;
}

.detail-block h4 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.info-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 5px 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.info-line .label {
  color: var(--muted);
  flex: 0 0 auto;
}

.info-line .value {
  text-align: right;
  word-break: break-all;
}

.info-panel {
  padding: 15px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(244, 239, 229, 0.38);
}

.item-list {
  display: grid;
  gap: 0;
}

.item-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.item-row:last-child {
  border-bottom: 0;
}

.item-row .item-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
}

.item-row .item-meta {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 400;
}

.item-row .item-price {
  text-align: right;
  font-size: 11.5px;
  white-space: nowrap;
}

.item-row .item-price strong {
  display: block;
  font-weight: 600;
}

.item-row .item-price span {
  color: var(--muted-2);
  font-size: 10px;
}

.shipment-card {
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--white);
}

.shipment-card + .shipment-card {
  margin-top: 9px;
}

.shipment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.shipment-head .supplier {
  font-size: 11.5px;
  font-weight: 600;
}

.shipment-head .meta {
  color: var(--muted-2);
  font-size: 10px;
}

.tracking-box {
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--cream);
  font-size: 10.5px;
  line-height: 1.7;
}

.tracking-box strong {
  font-weight: 600;
}

.timeline {
  display: grid;
  gap: 0;
}

.timeline-item {
  position: relative;
  padding: 0 0 17px 18px;
  border-left: 1px solid var(--line);
}

.timeline-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 4px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
  border: 2px solid var(--paper);
}

.timeline-item.done::before {
  background: var(--clay);
}

.timeline-item .tl-title {
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
}

.timeline-item .tl-time {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 10px;
}

/* ============================== 推广 / 设置 ============================== */

.promo-banner {
  position: relative;
  overflow: hidden;
  padding: 25px 28px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 88% 10%, rgba(216, 178, 112, 0.22), transparent 30%),
    linear-gradient(140deg, #1c4b3a, #123429);
  color: #f5edde;
}

.promo-banner::after {
  content: "荐";
  position: absolute;
  right: 18px;
  bottom: -48px;
  font-family: var(--font-serif);
  font-size: 190px;
  color: rgba(244, 236, 220, 0.04);
  pointer-events: none;
}

.promo-banner h3 {
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 500;
}

.promo-banner p {
  max-width: 620px;
  margin-top: 7px;
  color: rgba(244, 236, 220, 0.62);
  font-size: 12px;
  line-height: 1.8;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.rule-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}

.rule-card.disabled {
  opacity: 0.55;
}

.rule-card .rule-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
}

.rule-card .rule-value {
  margin-top: 9px;
  color: var(--forest);
  font-family: var(--font-serif);
  font-size: 18px;
}

.rule-card .rule-actions {
  margin-top: 10px;
  display: flex;
  justify-content: flex-end;
}

.promo-code {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border: 1px dashed #cbb994;
  border-radius: 8px;
  background: #fbf5e8;
  color: var(--forest);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 13px;
  letter-spacing: 0.16em;
}

.settings-nav {
  display: grid;
  gap: 2px;
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.settings-nav-item.active {
  background: var(--cream);
  color: var(--forest);
  font-weight: 600;
}

.check-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--paper);
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--muted);
}

.check-line strong {
  color: var(--ink-soft);
}

.notice {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #e8d7b8;
  border-radius: 11px;
  background: #fbf5e8;
  color: #775d36;
  font-size: 11.5px;
  line-height: 1.75;
}

.notice .icon {
  margin-top: 2px;
  flex: 0 0 auto;
  color: var(--gold);
}

.notice.green {
  border-color: #cee1d4;
  background: #f1f7f2;
  color: #3b654d;
}

.notice.green .icon {
  color: var(--success);
}

.notice.red {
  border-color: #ebcec7;
  background: #fbf0ed;
  color: #8d4136;
}

.notice.red .icon {
  color: var(--danger);
}

.upload-box {
  display: flex;
  align-items: center;
  gap: 15px;
}

.upload-preview {
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  border: 1px dashed #d3c4ad;
  border-radius: 13px;
  background: var(--cream);
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--muted-2);
}

.upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 10px;
}

.gallery-thumb {
  position: relative;
  width: 62px;
  height: 62px;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--cream);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 17px;
  height: 17px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(24, 30, 27, 0.72);
  color: #fff;
  font-size: 12px;
  line-height: 17px;
  cursor: pointer;
}

.upload-meta {
  display: grid;
  gap: 7px;
}

.upload-meta p {
  color: var(--muted-2);
  font-size: 10.5px;
}

.qr-upload {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.qr-preview {
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #d3c4ad;
  border-radius: 12px;
  background: var(--cream);
}

.qr-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
}

.qr-placeholder {
  color: #b5a68f;
  font-family: var(--font-serif);
  font-size: 30px;
}

.qr-upload-info {
  flex: 1;
  min-width: 0;
}

.qr-upload-title {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}

.qr-upload-hint {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.6;
}

.qr-upload-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.file-input {
  display: none;
}

.category-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.category-row:last-child {
  border-bottom: 0;
}

.category-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--cream);
  color: var(--forest);
  font-family: var(--font-serif);
  font-size: 14px;
}

.category-row .name {
  flex: 1;
  font-size: 12px;
}

.category-row .actions {
  display: flex;
  gap: 10px;
}

.notify-btn {
  position: relative;
}

.notify-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #b0473b;
  color: #fff;
  font-family: -apple-system, sans-serif;
  font-size: 9px;
  line-height: 17px;
  text-align: center;
}

.notification-list {
  display: grid;
  gap: 8px;
}

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--white);
  text-align: left;
  cursor: pointer;
}

.notification-item:hover {
  border-color: var(--line);
  background: var(--cream);
}

.notification-icon {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
}

.notification-icon.green {
  background: #e8f1eb;
  color: var(--forest);
}

.notification-icon.red {
  background: #f7e3dd;
  color: var(--danger);
}

.notification-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.notification-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.notification-message {
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.55;
}

.notification-time {
  color: var(--muted);
  font-size: 10px;
}

.notification-arrow {
  color: var(--muted);
  font-size: 14px;
}

/* ============================== 客服消息 ============================== */

.chat-card {
  overflow: hidden;
}

.chat-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 560px;
}

.chat-threads {
  border-right: 1px solid var(--line);
  background: rgba(244, 239, 229, 0.35);
  overflow-y: auto;
}

.chat-threads-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.chat-thread {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.chat-thread:hover,
.chat-thread.active {
  background: var(--white);
}

.chat-avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--forest);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 16px;
}

.chat-thread-copy {
  flex: 1;
  min-width: 0;
}

.chat-thread-name {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.chat-thread-last {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.chat-unread {
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--clay);
  color: #fff;
  font-size: 9px;
  line-height: 18px;
  text-align: center;
}

.chat-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chat-main-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  background: #fbf8f1;
}

.chat-bubble-row {
  display: flex;
  margin-bottom: 12px;
}

.chat-bubble-row.mine {
  justify-content: flex-end;
}

.chat-bubble {
  max-width: 72%;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px 12px 12px 3px;
  background: var(--white);
}

.chat-bubble-row.mine .chat-bubble {
  border-color: transparent;
  border-radius: 12px 12px 3px 12px;
  background: var(--forest);
  color: var(--cream);
}

.chat-text {
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}

.chat-media {
  display: block;
  max-width: 240px;
  max-height: 240px;
  border-radius: 9px;
  margin-bottom: 6px;
}

.chat-time {
  margin-top: 5px;
  color: var(--muted);
  font-size: 9px;
}

.chat-bubble-row.mine .chat-time {
  color: rgba(244, 238, 226, 0.66);
}

.chat-form {
  display: flex;
  gap: 9px;
  padding: 12px 15px;
  border-top: 1px solid var(--line-soft);
  background: var(--white);
}

.chat-form .input {
  flex: 1;
}

.chat-placeholder {
  flex: 1;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .chat-layout {
    grid-template-columns: 1fr;
  }
  .chat-threads {
    max-height: 220px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

/* ============================== 代发采购 ============================== */

.dropship-list {
  padding: 16px 18px;
  display: grid;
  gap: 14px;
}

.dropship-card {
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.dropship-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.dropship-order {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
}

.dropship-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.35fr) minmax(0, 0.9fr);
  gap: 16px;
  padding: 14px 0;
}

.dropship-block {
  min-width: 0;
}

.dropship-label {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.dropship-receiver {
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 11.5px;
  line-height: 1.8;
}

.dropship-items {
  display: grid;
  gap: 7px;
}

.dropship-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line-soft);
}

.dropship-item:last-child {
  border-bottom: 0;
}

.dropship-item-main {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.dropship-index {
  flex: 0 0 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--cream);
  color: var(--muted);
  font-size: 9px;
}

.source-link {
  flex: 0 0 auto;
  color: var(--clay);
  font-size: 10.5px;
  white-space: nowrap;
}

.source-link:hover {
  text-decoration: underline;
}

.dropship-copy-row {
  display: flex;
  gap: 7px;
  margin-top: 9px;
}

.dropship-purchase {
  padding: 4px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: rgba(244, 239, 229, 0.38);
}

.dropship-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
}

@media (max-width: 1180px) {
  .dropship-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dropship-grid .dropship-block:last-child {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .dropship-list {
    padding: 12px;
  }
  .dropship-grid {
    grid-template-columns: 1fr;
  }
  .dropship-grid .dropship-block:last-child {
    grid-column: span 1;
  }
  .dropship-head {
    flex-direction: column;
  }
  .dropship-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* ============================== 供货商工作台 ============================== */

.supplier-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 26px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 12%, rgba(216, 178, 112, 0.2), transparent 30%),
    linear-gradient(140deg, #1c4b3a, #123429);
  color: #f5edde;
}

.supplier-hero h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
}

.supplier-hero p {
  margin-top: 5px;
  max-width: 600px;
  color: rgba(244, 236, 220, 0.62);
  font-size: 12px;
  line-height: 1.8;
}

.supplier-hero .seal {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(244, 236, 220, 0.26);
  border-radius: 50%;
  color: #e2bd7f;
  font-family: var(--font-serif);
  font-size: 17px;
  letter-spacing: 0.08em;
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.task-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.task-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.task-card-head .task-no {
  color: var(--muted-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.task-card-head h4 {
  margin-top: 3px;
  font-size: 13px;
  font-weight: 600;
}

.task-receiver {
  margin-top: 11px;
  padding: 10px 12px;
  border-radius: 9px;
  background: var(--cream);
  font-size: 11.5px;
  line-height: 1.8;
}

.task-receiver strong {
  font-weight: 600;
}

.task-items {
  margin-top: 10px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.8;
}

.task-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
}

/* ============================== 弹窗 / Toast ============================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(16, 30, 24, 0.5);
  backdrop-filter: blur(5px);
  animation: fade-in 0.18s ease;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

.modal {
  width: min(100%, 680px);
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 19px;
  background: var(--paper);
  box-shadow: var(--shadow-md);
  animation: modal-in 0.24s cubic-bezier(0.2, 0.9, 0.2, 1);
  overflow: hidden;
}

.modal.wide {
  width: min(100%, 900px);
}

.modal.narrow {
  width: min(100%, 460px);
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.985);
  }
}

.modal-head {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 19px 22px 15px;
  border-bottom: 1px solid var(--line-soft);
}

.modal-head h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.modal-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.modal-head .close {
  margin-left: auto;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-body.flush {
  padding: 0;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 22px;
  border-top: 1px solid var(--line-soft);
  background: rgba(244, 239, 229, 0.32);
}

.modal-foot .left {
  margin-right: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 15px;
}

.form-grid .span-2 {
  grid-column: span 2;
}

.confirm-text {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.8;
}

.confirm-text strong {
  color: var(--danger);
}

.toast-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: grid;
  gap: 9px;
  pointer-events: none;
}

.toast {
  min-width: 230px;
  max-width: 380px;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  background: #1b2e25;
  color: #f5edde;
  box-shadow: var(--shadow-md);
  font-size: 12px;
  line-height: 1.6;
  animation: toast-in 0.25s cubic-bezier(0.2, 0.9, 0.2, 1);
}

.toast.error {
  background: #672e27;
}

.toast.success {
  background: #23513d;
}

.toast .icon {
  margin-top: 2px;
  color: #e2bd7f;
}

.toast.error .icon {
  color: #f1c2b8;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.toast.out {
  opacity: 0;
  transform: translateY(5px);
  transition: 0.2s ease;
}

.skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, #eee6d9 25%, #f7f2e9 37%, #eee6d9 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

.skeleton-line {
  height: 12px;
  margin-bottom: 9px;
}

/* ============================== 响应式 ============================== */

@media (max-width: 1180px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-2 {
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.95fr);
  }
  .rule-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 248px;
    transform: translateX(-100%);
    transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 18px 0 50px rgba(16, 30, 24, 0.22);
  }
  body.sidebar-open .sidebar {
    transform: translateX(0);
  }
  body.sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 25;
    background: rgba(16, 30, 24, 0.45);
    backdrop-filter: blur(2px);
  }
  .menu-toggle {
    display: inline-grid;
  }
  .topbar {
    padding: 11px 20px;
  }
  .grid-2,
  .grid-half,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .page {
    padding: 24px 20px 50px;
  }
  .task-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-art {
    min-height: 280px;
    padding: 26px 24px 30px;
  }
  .login-copy {
    padding: 30px 0 8px;
  }
  .login-copy h1 {
    font-size: 34px;
  }
  .login-copy p,
  .login-features {
    display: none;
  }
  .login-panel {
    padding: 30px 22px 46px;
    align-items: start;
  }
  .login-form {
    width: 100%;
  }
  .topbar-store {
    display: none;
  }
  .page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }
  .page-head h2 {
    font-size: 25px;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .stat-card {
    min-height: 124px;
    padding: 15px;
  }
  .stat-value {
    font-size: 24px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid .span-2 {
    grid-column: span 1;
  }
  .modal-overlay {
    padding: 0;
    align-items: end;
  }
  .modal {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
  }
  .modal-head,
  .modal-body,
  .modal-foot {
    padding-left: 17px;
    padding-right: 17px;
  }
  .detail-hero,
  .detail-grid {
    padding-left: 17px;
    padding-right: 17px;
  }
  .toolbar {
    padding: 12px;
  }
  .toolbar .search {
    max-width: none;
    flex-basis: 100%;
  }
  .rule-grid {
    grid-template-columns: 1fr;
  }
  .toast-root {
    left: 14px;
    right: 14px;
    bottom: 14px;
  }
  .toast {
    max-width: none;
  }
  .table th,
  .table td {
    padding: 10px 11px;
  }
  .supplier-hero {
    padding: 20px;
  }
  .supplier-hero .seal {
    display: none;
  }
  .promo-banner {
    padding: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.cleanup-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:18px}.cleanup-card{padding:18px;display:flex;flex-direction:column;gap:10px}.cleanup-card h3{margin:0;font-size:16px}.cleanup-card p{margin:0;color:var(--muted);font-size:12px;line-height:1.6;min-height:38px}.cleanup-card .btn{align-self:flex-start;margin-top:auto}.cleanup-card.danger{border-color:#e8b8ae;background:#fff7f4}@media(max-width:900px){.cleanup-grid{grid-template-columns:1fr 1fr}}@media(max-width:560px){.cleanup-grid{grid-template-columns:1fr}}

.cleanup-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto}
.variant-rows{display:grid;gap:7px}
.rule-master-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:4px 0 14px;padding:12px 14px;border:1px solid #d9e5dc;border-radius:12px;background:#f4f8f4}
.rule-master-bar span{display:grid;gap:3px}
.rule-master-bar small{color:#6c7a72;font-size:12px}
.rule-master-bar button{flex:none;min-width:76px;height:34px;border-radius:999px;border:1px solid #cbd8cf;background:#e9eeea;color:#6c7a72;font-size:12px}
.rule-master-bar button.on{background:#173f32;border-color:#173f32;color:#fff8eb}
.variant-row{display:grid;grid-template-columns:1.1fr .8fr .8fr .7fr 1.5fr auto;gap:6px;align-items:center}
@media(max-width:760px){.variant-row{grid-template-columns:1fr 1fr;}}
