/* ==========================================================================
 * 基础设计系统（Outdoor Explorer）
 * 色彩 / 字体层级 / 间距 / 圆角 / 阴影 / 动效 / 通用组件
 * ========================================================================== */

:root {
  /* ---------- 色彩 ---------- */
  --ink-900: #0c1f18;
  --ink-800: #122d24;
  --ink-700: #1a3d31;
  --ink-500: #3d554b;

  --text: #12241d;
  --text-sub: #4b6157;
  --muted: #85978d;

  --brand: #0f6b4f;
  --brand-600: #0b563f;
  --brand-700: #08432f;
  --brand-soft: #e3f2eb;
  --brand-tint: #f1f8f4;

  --accent: #e8622a;
  --accent-600: #cf4e19;
  --accent-soft: #fdeee6;

  --line: #e3eae6;
  --line-strong: #cbd9d2;
  --bg: #f4f7f5;
  --bg-alt: #eef4f1;
  --white: #ffffff;

  --success: #12865a;
  --warning: #c57d10;
  --danger: #d33b3b;
  --info: #0f6b4f;

  /* ---------- 圆角 ---------- */
  --r-xs: 6px;
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* ---------- 阴影 ---------- */
  --sh-1: 0 1px 2px rgba(12, 31, 24, 0.05), 0 2px 8px rgba(12, 31, 24, 0.04);
  --sh-2: 0 6px 18px rgba(12, 31, 24, 0.08), 0 2px 6px rgba(12, 31, 24, 0.04);
  --sh-3: 0 18px 44px rgba(12, 31, 24, 0.14);
  --ring: rgba(15, 107, 79, 0.18);
  --ring-accent: rgba(232, 98, 42, 0.2);

  /* ---------- 间距 ---------- */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;

  /* ---------- 动效 ---------- */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 140ms;
  --t: 220ms;
  --t-slow: 420ms;

  /* ---------- 版式 ---------- */
  --container: 1240px;
  --gutter: clamp(16px, 4vw, 32px);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'HarmonyOS Sans SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}

/* ---------- 基础重置 ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 页面背景光晕，营造户外通透感 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(760px 420px at 12% -8%, rgba(15, 107, 79, 0.09), transparent 70%),
    radial-gradient(680px 380px at 96% 4%, rgba(232, 98, 42, 0.07), transparent 72%);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

a:hover {
  color: var(--brand);
}

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

/* ---------- 字体层级 ---------- */
h1,
h2,
h3,
h4 {
  margin: 0 0 var(--sp-3);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ink-900);
}

h1 {
  font-size: 28px;
}
h2 {
  font-size: 22px;
}
h3 {
  font-size: 17px;
}
h4 {
  font-size: 14.5px;
}

p {
  margin: 0 0 var(--sp-2);
}

ul,
ol {
  margin: 0;
  padding-left: 20px;
}

/* ---------- 容器 ---------- */
.container {
  width: var(--container);
  max-width: calc(100% - var(--gutter) * 2);
  margin: 0 auto;
}

.main-content {
  padding: var(--sp-6) 0 var(--sp-12);
  min-height: 62vh;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  background: var(--white);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
    background-color var(--t) var(--ease), color var(--t) var(--ease),
    border-color var(--t) var(--ease);
}

.btn:hover {
  color: var(--brand-700);
  border-color: var(--brand-soft);
  background: var(--brand-tint);
  transform: translateY(-1px);
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(11, 86, 63, 0.24);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--brand-600) 0%, var(--brand-700) 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(11, 86, 63, 0.32);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-600) 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(207, 78, 25, 0.26);
}

.btn-accent:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-600) 0%, #b0430f 100%);
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(207, 78, 25, 0.32);
}

.btn-outline {
  border-color: var(--line-strong);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand-700);
  background: var(--brand-tint);
}

.btn-danger {
  border-color: #f0c9c9;
  color: var(--danger);
  background: var(--white);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  box-shadow: 0 8px 18px rgba(211, 59, 59, 0.24);
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-sub);
}

.btn-ghost:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 30px;
  font-size: 16px;
}

.btn-block {
  width: 100%;
}

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

/* ---------- 表单 ---------- */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: var(--sp-2);
}

input[type='text'],
input[type='search'],
input[type='password'],
input[type='number'],
input[type='tel'],
input[type='url'],
select,
textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease),
    background-color var(--t) var(--ease);
}

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

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 4px var(--ring);
  background: #fff;
}

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

.form-row {
  margin-bottom: var(--sp-4);
}

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

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 var(--sp-4);
}

.form-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: var(--sp-2);
}

.checkbox-line {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 13.5px;
  color: var(--text);
}

.checkbox-line input {
  width: auto;
  margin: 0;
  accent-color: var(--brand);
}

/* ---------- 卡片 / 面板 ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  padding: var(--sp-6);
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease);
}

.card:hover {
  box-shadow: var(--sh-2);
}

.card + .card {
  margin-top: var(--sp-4);
}

.card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.card-title h3 {
  margin: 0;
}

.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: var(--sp-4);
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.page-head h1,
.page-head h2 {
  margin: 0;
}

.breadcrumb {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: var(--sp-4);
}

.breadcrumb a:hover {
  color: var(--brand);
}

/* ---------- 表格 ---------- */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  background: var(--white);
}

.data-table th,
.data-table td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--ink-700);
  white-space: nowrap;
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.data-table th:first-child {
  border-top-left-radius: var(--r-sm);
}

.data-table th:last-child {
  border-top-right-radius: var(--r-sm);
}

.data-table tbody tr {
  transition: background-color var(--t-fast) var(--ease);
}

.data-table tbody tr:hover {
  background: var(--brand-tint);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table .col-actions {
  white-space: nowrap;
}

.data-table .col-actions form {
  display: inline-block;
  margin-right: var(--sp-2);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--white);
  box-shadow: var(--sh-1);
}

/* ---------- 徽标 / 状态 ---------- */
.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.6;
  background: var(--bg-alt);
  color: var(--text-sub);
  white-space: nowrap;
}

.badge-success {
  background: #e2f4ea;
  color: var(--success);
}
.badge-warning {
  background: #fdf1de;
  color: var(--warning);
}
.badge-danger {
  background: #fce9e9;
  color: var(--danger);
}
.badge-info {
  background: var(--brand-soft);
  color: var(--brand-700);
}
.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 {
  position: relative;
  padding: 12px 16px 12px 18px;
  border-radius: var(--r-sm);
  margin-bottom: var(--sp-4);
  font-size: 13.5px;
  border: 1px solid transparent;
  animation: rise var(--t-slow) var(--ease) both;
}

.alert::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: var(--r-pill);
  background: currentColor;
  opacity: 0.5;
}

.alert-success {
  background: #e7f6ee;
  color: #0c6b45;
  border-color: #c4e8d6;
}

.alert-error {
  background: #fdeced;
  color: #b02b2f;
  border-color: #f7cbcd;
}

.alert-warning {
  background: var(--accent-soft);
  color: #9a5310;
  border-color: #f7d9be;
}

.alert-info {
  background: var(--brand-soft);
  color: var(--brand-700);
  border-color: #c3e2d5;
}

/* ---------- 价格 ---------- */
.price {
  color: var(--accent);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.price-lg {
  font-size: 26px;
}

.price-suffix {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  margin-left: 2px;
}

.sales {
  color: var(--muted);
  font-size: 12px;
}

/* ---------- 分页 ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-8);
}

.pagination a,
.pagination span {
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-sub);
  transition: all var(--t-fast) var(--ease);
}

.pagination a:hover {
  border-color: var(--brand);
  color: var(--brand-700);
  background: var(--brand-tint);
  transform: translateY(-1px);
}

.pagination .active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-600) 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 14px rgba(11, 86, 63, 0.22);
}

.pagination .disabled {
  opacity: 0.45;
}

.pagination .ellipsis,
.pagination .page-total {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

/* ---------- 空状态 / 错误页 ---------- */
.empty {
  text-align: center;
  padding: var(--sp-12) var(--sp-5);
  color: var(--muted);
  background: var(--white);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: var(--sp-3);
  opacity: 0.55;
}

.error-page {
  text-align: center;
  padding: var(--sp-12) var(--sp-5);
}

.error-code {
  font-size: 72px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: var(--sp-3);
}

.error-actions {
  display: flex;
  gap: var(--sp-3);
  justify-content: center;
  margin-top: var(--sp-5);
}

/* ---------- 工具类 ---------- */
.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: var(--sp-2);
}
.mt-16 {
  margin-top: var(--sp-4);
}
.mt-24 {
  margin-top: var(--sp-6);
}
.mb-0 {
  margin-bottom: 0;
}
.mb-8 {
  margin-bottom: var(--sp-2);
}
.mb-16 {
  margin-bottom: var(--sp-4);
}
.flex {
  display: flex;
}
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
}
.flex-center {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.flex-wrap {
  flex-wrap: wrap;
}
.grow {
  flex: 1;
  min-width: 0;
}
.hidden {
  display: none !important;
}
[hidden] {
  display: none !important;
}

/* ---------- 轻提示 ---------- */
.toast {
  position: fixed;
  left: 50%;
  top: 96px;
  transform: translateX(-50%);
  padding: 11px 22px;
  border-radius: var(--r-pill);
  background: rgba(12, 31, 24, 0.92);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  z-index: 200;
  box-shadow: var(--sh-3);
  max-width: 80vw;
  text-align: center;
  animation: toast-in var(--t-slow) var(--ease) both;
  backdrop-filter: blur(6px);
}

.toast-success {
  background: rgba(15, 107, 79, 0.95);
}

.toast-error {
  background: rgba(211, 59, 59, 0.95);
}

/* ---------- 动效关键帧 ---------- */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translate(-50%, -14px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes zoom-in {
  from {
    transform: scale(1);
  }
  to {
    transform: scale(1.08);
  }
}

/* ---------- 站点标识（Logo） ---------- */
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r);
  color: var(--ink-900);
  transition: background-color var(--t) var(--ease);
}

.brand:hover {
  background: var(--brand-tint);
}

.brand-emblem {
  position: relative;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-600) 48%, var(--ink-800) 100%);
  box-shadow: 0 8px 18px rgba(12, 45, 36, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: transform var(--t-slow) var(--ease), box-shadow var(--t-slow) var(--ease);
}

.brand-emblem::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.32), transparent 60%);
}

.brand-emblem-ring {
  position: absolute;
  inset: -5px;
  border-radius: 18px;
  border: 1px dashed rgba(232, 98, 42, 0.55);
  opacity: 0;
  transform: scale(0.88) rotate(0deg);
  transition: opacity var(--t) var(--ease), transform var(--t-slow) var(--ease);
}

.brand-emblem-icon {
  position: relative;
  width: 26px;
  height: 26px;
}

.brand:hover .brand-emblem {
  transform: translateY(-3px) rotate(-6deg);
  box-shadow: 0 14px 26px rgba(12, 45, 36, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.brand:hover .brand-emblem-ring {
  opacity: 1;
  transform: scale(1) rotate(16deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.brand-name {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.2;
  white-space: nowrap;
  color: inherit;
}

.brand-badge {
  padding: 2px 8px;
  border-radius: var(--r-xs);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: var(--accent-600);
  background: var(--accent-soft);
  border: 1px solid rgba(232, 98, 42, 0.24);
}

.brand-slogan {
  max-width: 240px;
  font-size: 11.5px;
  line-height: 1.3;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 紧凑版：控制台头部 */
.brand-compact {
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-2);
}

.brand-compact .brand-emblem {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}

.brand-compact .brand-emblem-icon {
  width: 20px;
  height: 20px;
}

.brand-compact .brand-name {
  font-size: 16px;
}

/* 大号版：登录 / 入驻独立页 */
.brand-hero {
  gap: var(--sp-3);
}

.brand-hero .brand-emblem {
  width: 56px;
  height: 56px;
  border-radius: 17px;
}

.brand-hero .brand-emblem-icon {
  width: 32px;
  height: 32px;
}

.brand-hero .brand-name {
  font-size: 22px;
}

/* 深色底版 */
.brand-light {
  color: #fff;
}

.brand-light:hover {
  background: rgba(255, 255, 255, 0.1);
}

.brand-light .brand-slogan {
  color: rgba(255, 255, 255, 0.6);
}

.brand-light .brand-badge {
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.brand-light .brand-emblem-ring {
  border-color: rgba(255, 255, 255, 0.4);
}

/* ---------- 无障碍：减少动效 ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 720px) {
  .brand-slogan {
    display: none;
  }
  h1 {
    font-size: 24px;
  }
  h2 {
    font-size: 19px;
  }
}
