:root {
  /* 自然有机厨房风：墨绿主色 + 燕麦米色背景 + 奶油白卡片 */
  --brand: #2f6b47;
  --brand-dark: #1f4d33;
  --brand-soft: #e7efe8;
  --terracotta: #b5602e;
  --terracotta-soft: #f5ece2;
  --text: #20271f;
  --text-sub: #576050;
  --muted: #8d9489;
  --line: #e2dccf;
  --line-strong: #d3cab8;
  --bg: #f4efe5;
  --bg-warm: #efe8da;
  --white: #fdfbf5;
  --success: #2d8a4e;
  --warning: #c47a1a;
  --danger: #c2413d;
  --info: #3a7d5a;
  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --shadow: 0 4px 14px rgba(40, 55, 40, 0.07);
  --shadow-lg: 0 14px 38px rgba(40, 55, 40, 0.14);
  --ring: rgba(47, 107, 71, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: 'Georgia', 'Songti SC', 'Source Han Serif SC', 'Noto Serif SC', serif;
  letter-spacing: 0.2px;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--brand);
}

img {
  max-width: 100%;
  display: block;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 12px;
  font-weight: 600;
  line-height: 1.35;
}

h1 {
  font-size: 24px;
}
h2 {
  font-size: 20px;
}
h3 {
  font-size: 16px;
}
h4 {
  font-size: 14px;
}

p {
  margin: 0 0 10px;
}

ul,
ol {
  margin: 0;
  padding-left: 20px;
}

.container {
  width: 1200px;
  max-width: calc(100% - 32px);
  margin: 0 auto;
}

.main-content {
  padding: 20px 0 48px;
  min-height: 60vh;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--bg-warm);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 3px 10px rgba(47, 107, 71, 0.22);
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 5px 16px rgba(47, 107, 71, 0.3);
}

.btn-outline {
  border-color: var(--line-strong);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.btn-danger {
  border-color: #e9b8b7;
  color: var(--danger);
  background: var(--white);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-sub);
}

.btn-ghost:hover {
  background: var(--bg-warm);
  color: var(--text);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 13px;
}

.btn-lg {
  padding: 12px 26px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

.btn[disabled],
.btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* ---------- 表单 ---------- */
label {
  display: block;
  font-size: 13px;
  color: var(--text-sub);
  margin-bottom: 6px;
}

input[type='text'],
input[type='search'],
input[type='password'],
input[type='number'],
input[type='tel'],
input[type='url'],
select,
textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--ring);
}

textarea {
  resize: vertical;
  min-height: 90px;
}

.form-row {
  margin-bottom: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 16px;
}

.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
}

.checkbox-line input {
  width: auto;
  margin: 0;
}

/* ---------- 卡片 / 面板 ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.card + .card {
  margin-top: 16px;
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title h3 {
  margin: 0;
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.page-head h1,
.page-head h2 {
  margin: 0;
}

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 14px;
}

.breadcrumb a:hover {
  color: var(--brand);
}

/* ---------- 表格 ---------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--white);
}

.data-table th,
.data-table td {
  padding: 13px 11px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table th {
  background: var(--bg-warm);
  font-weight: 600;
  color: var(--text-sub);
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: var(--brand-soft);
}

.data-table .col-actions {
  white-space: nowrap;
}

.data-table .col-actions form {
  display: inline-block;
  margin-right: 6px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ---------- 徽标 / 状态 ---------- */
.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 12px;
  line-height: 18px;
  background: var(--bg-warm);
  color: var(--text-sub);
  white-space: nowrap;
}

.badge-success {
  background: #e8f7ee;
  color: var(--success);
}
.badge-warning {
  background: var(--terracotta-soft);
  color: var(--warning);
}
.badge-danger {
  background: #fdeced;
  color: var(--danger);
}
.badge-info {
  background: var(--brand-soft);
  color: var(--brand-dark);
}
.badge-brand {
  background: var(--brand-soft);
  color: var(--brand);
}

.status-0 {
  color: var(--warning);
}
.status-1 {
  color: var(--info);
}
.status-2 {
  color: var(--info);
}
.status-3 {
  color: var(--success);
}
.status-4 {
  color: var(--muted);
}

/* ---------- 提示 ---------- */
.alert {
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
  border: 1px solid transparent;
}

.alert-success {
  background: #e8f7ee;
  color: #0f7a3d;
  border-color: #bfe6cd;
}

.alert-error {
  background: #fdeced;
  color: #b3282c;
  border-color: #f7c9cb;
}

.alert-warning {
  background: var(--terracotta-soft);
  color: #92590a;
  border-color: #f6dcb0;
}

.alert-info {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-color: #b9d4c6;
}

/* ---------- 价格 ---------- */
.price {
  color: var(--terracotta);
  font-weight: 700;
}

.price-lg {
  font-size: 26px;
}

.price-suffix {
  color: var(--muted);
  font-size: 12px;
  margin-left: 2px;
}

.sales {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  min-width: 36px;
  height: 36px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 13px;
  color: var(--text-sub);
}

.pagination a:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.pagination .active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.pagination .disabled {
  opacity: 0.5;
}

.pagination .ellipsis {
  border: none;
  background: transparent;
}

.pagination .page-total {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 空状态 / 错误页 ---------- */
.empty {
  text-align: center;
  padding: 70px 20px;
  color: var(--muted);
}

.empty-icon {
  font-size: 44px;
  margin-bottom: 12px;
  opacity: 0.45;
}

.error-page {
  text-align: center;
  padding: 70px 20px;
}

.error-code {
  font-size: 68px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 12px;
}

.error-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

/* ---------- 工具类 ---------- */
.muted {
  color: var(--muted);
}
.text-sub {
  color: var(--text-sub);
}
.text-right {
  text-align: right;
}
.text-center {
  text-align: center;
}
.nowrap {
  white-space: nowrap;
}
.text-danger {
  color: var(--danger);
}
.mt-8 {
  margin-top: 8px;
}
.mt-16 {
  margin-top: 16px;
}
.mt-24 {
  margin-top: 24px;
}
.mb-0 {
  margin-bottom: 0;
}
.mb-8 {
  margin-bottom: 8px;
}
.mb-16 {
  margin-bottom: 16px;
}
.flex {
  display: flex;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.flex-center {
  display: flex;
  align-items: center;
  gap: 12px;
}
.flex-wrap {
  flex-wrap: wrap;
}
.grow {
  flex: 1;
  min-width: 0;
}
.hidden {
  display: none !important;
}

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: 84px;
  transform: translateX(-50%);
  padding: 10px 20px;
  border-radius: 20px;
  background: rgba(31, 35, 41, 0.9);
  color: #fff;
  font-size: 13.5px;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  max-width: 80vw;
  text-align: center;
}

.toast-success {
  background: rgba(18, 161, 80, 0.94);
}

.toast-error {
  background: rgba(229, 72, 77, 0.94);
}

/* ---------- 站点标识（Logo） ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 16px;
  color: var(--brand-dark);
  transition: background-color 0.2s ease;
}

.brand:hover {
  background: var(--brand-soft);
}

.brand-emblem {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(145deg, #3c8259 0%, var(--brand) 45%, var(--brand-dark) 100%);
  box-shadow: 0 6px 16px rgba(31, 77, 51, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform 0.28s ease, box-shadow 0.28s ease;
}

.brand-emblem::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0) 62%);
}

.brand-emblem-ring {
  position: absolute;
  inset: -4px;
  border-radius: 19px;
  border: 1px dashed rgba(47, 107, 71, 0.4);
  opacity: 0;
  transform: scale(0.9) rotate(0deg);
  transition: opacity 0.25s ease, transform 0.35s ease;
}

.brand-emblem-icon {
  position: relative;
  width: 26px;
  height: 26px;
}

.brand:hover .brand-emblem {
  transform: translateY(-2px) rotate(-5deg);
  box-shadow: 0 10px 20px rgba(31, 77, 51, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand:hover .brand-emblem-ring {
  opacity: 1;
  transform: scale(1) rotate(14deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.brand-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-name {
  font-family: 'Georgia', 'Songti SC', 'Source Han Serif SC', 'Noto Serif SC', serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.6px;
  line-height: 1.2;
  white-space: nowrap;
  color: inherit;
}

.brand-badge {
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 10.5px;
  line-height: 1.5;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
  color: var(--terracotta);
  background: var(--terracotta-soft);
  border: 1px solid rgba(181, 96, 46, 0.22);
}

.brand-slogan {
  max-width: 230px;
  font-size: 11.5px;
  line-height: 1.25;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 紧凑版：控制台头部 */
.brand-compact {
  gap: 9px;
  padding: 4px 8px;
}

.brand-compact .brand-emblem {
  width: 34px;
  height: 34px;
  border-radius: 11px;
}

.brand-compact .brand-emblem-icon {
  width: 20px;
  height: 20px;
}

.brand-compact .brand-name {
  font-size: 15.5px;
  letter-spacing: 0.3px;
}

/* 大号版：登录 / 入驻独立页 */
.brand-hero {
  gap: 13px;
}

.brand-hero .brand-emblem {
  width: 54px;
  height: 54px;
  border-radius: 18px;
}

.brand-hero .brand-emblem-icon {
  width: 31px;
  height: 31px;
}

.brand-hero .brand-name {
  font-size: 21px;
}

/* 深色底版：控制台头部 */
.brand-light {
  color: #fff;
}

.brand-light:hover {
  background: rgba(255, 255, 255, 0.09);
}

.brand-light .brand-slogan {
  color: rgba(255, 255, 255, 0.55);
}

.brand-light .brand-badge {
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.26);
}

.brand-light .brand-emblem-ring {
  border-color: rgba(255, 255, 255, 0.35);
}

@media (max-width: 720px) {
  .brand-slogan {
    display: none;
  }
}
