/**
 * 天偌装修平台 - 统一设计系统 v3.0
 * 核心原则：栅格布局 | ≤3主色 | 字体层级 | 充足留白 | 精致细节
 */

/* =============================================
   CSS Custom Properties (Design Tokens)
   ============================================= */
:root {
  /* ----- Brand (主色：暖橙) ----- */
  --primary: #e07b39;
  --primary-dark: #c96a2d;
  --primary-light: #ff9a56;
  --primary-bg: #fff5f0;
  
  /* ----- Orange (兼容别名) ----- */
  --orange: #e07b39;
  --orange-light: #fff3eb;

  /* ----- Neutral (中性色：灰度体系) ----- */
  --gray-50: #fafafa;
  --gray-100: #f5f5f5;
  --gray-200: #e8e6e3;
  --gray-300: #d4d0cc;
  --gray-400: #9e9a95;
  --gray-500: #706c66;
  --gray-600: #5e5a55;
  --gray-700: #3d3a36;
  --gray-800: #2d2a26;
  --gray-900: #1a1a1a;

  /* ----- Surfaces (表面层次) ----- */
  --white: #ffffff;
  --bg-page: #f6f6f8;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --bg-hover: #fafafa;
  --bg-sunken: #f0efed;

  /* ----- Dark (深色背景) ----- */
  --dark: #1a1a2e;
  --dark-secondary: #16213e;
  --dark-tertiary: #0f3460;

  /* ----- Text (文字层级) ----- */
  --text: #2d2a26;
  --text-secondary: #5e5a55;
  --text-muted: #9e9a95;
  --text-placeholder: #b8b4af;
  --text-inverse: #ffffff;

  /* ----- Border ----- */
  --border: #e8e6e3;
  --border-light: #f0efed;
  --border-focus: var(--primary);

  /* ----- Semantic (语义色：低饱和) ----- */
  --success: #059669;
  --success-bg: #ecfdf5;
  --success-border: #a7f3d0;
  --warning: #d97706;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --info: #2563eb;
  --info-bg: #eff6ff;
  --info-border: #bfdbfe;

  /* ----- Accent (点缀色：金色) ----- */
  --gold: #d97706;
  --gold-light: #fbbf24;

  /* ----- Spacing (8px 网格系统) ----- */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* ----- Border Radius (圆角) ----- */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  /* ----- Shadows (阴影层级) ----- */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.03);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.03);
  --shadow: 0 4px 6px -1px rgba(0,0,0,.05), 0 2px 4px -2px rgba(0,0,0,.03);
  --shadow-md: 0 6px 10px -2px rgba(0,0,0,.06), 0 3px 6px -3px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.06), 0 4px 6px -4px rgba(0,0,0,.03);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.07), 0 8px 10px -6px rgba(0,0,0,.03);
  --shadow-glow: 0 0 20px rgba(224,123,57,.15);

  /* ----- Transitions (动效) ----- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast: .15s var(--ease-out);
  --transition: .25s var(--ease-out);
  --transition-slow: .4s var(--ease-out);
  --transition-spring: .5s var(--ease-spring);

  /* ----- Layout ----- */
  --container-max: 1200px;
  --container-sm: 800px;
  --container-xs: 600px;
  --navbar-height: 64px;
  --sidebar-width: 260px;

  /* ----- Typography (字体层级) ----- */
  --font-sans: 'PingFang SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', 'Consolas', monospace;

  /* 字号 */
  --text-xs: 0.75rem;    /* 12px - 标签、角标 */
  --text-sm: 0.875rem;   /* 14px - 辅助文字 */
  --text-base: 1rem;     /* 16px - 正文 */
  --text-lg: 1.125rem;   /* 18px - 小标题 */
  --text-xl: 1.25rem;    /* 20px - 副标题 */
  --text-2xl: 1.5rem;    /* 24px - 标题 */
  --text-3xl: 1.875rem;  /* 30px - 大标题 */
  --text-4xl: 2.25rem;   /* 36px - 展示标题 */

  /* 字重 */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;

  /* 行高 */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  --leading-loose: 1.8;
}

/* =============================================
   Reset & Base
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* 页面过渡动画 */
@view-transition {
  navigation: auto;
}

::view-transition-old(root) {
  animation: fadeOut 0.2s var(--ease-out) forwards;
}

::view-transition-new(root) {
  animation: fadeIn 0.3s var(--ease-out) forwards;
}

@keyframes fadeOut {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.98); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(1.02); }
  to { opacity: 1; transform: scale(1); }
}

/* =============================================
   Layout (栅格布局)
   ============================================= */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-lg); }
.container-sm { max-width: var(--container-sm); margin: 0 auto; padding: 0 var(--space-lg); }
.container-xs { max-width: var(--container-xs); margin: 0 auto; padding: 0 var(--space-lg); }

.section {
  padding: var(--space-3xl) 0;
  position: relative;
}

.section-sm { padding: var(--space-2xl) 0; }
.section-xs { padding: var(--space-xl) 0; }

/* 区块分隔线 */
.section + .section::before {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: var(--border);
  margin: 0 auto var(--space-3xl);
}

/* =============================================
   Typography (字体层级)
   ============================================= */

/* 标题层级 */
h1, h2, h3, h4, h5, h6 {
  line-height: var(--leading-tight);
  color: var(--text);
  letter-spacing: -0.01em;
}

h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  letter-spacing: -0.02em;
}

h2 {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
}

h3 {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
}

h4 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

h5 {
  font-size: var(--text-base);
  font-weight: var(--font-semibold);
}

h6 {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

/* 段落 */
p {
  margin-bottom: var(--space-md);
  line-height: var(--leading-relaxed);
}

p:last-child { margin-bottom: 0; }

/* 区块标题 */
.section-title {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-title h2 {
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  color: var(--dark);
  margin-bottom: var(--space-sm);
}

.section-title h2 span { color: var(--primary); }

.section-title p {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

/* 文字工具类 */
.text-xs { font-size: var(--text-xs); }
.text-sm { font-size: var(--text-sm); }
.text-base { font-size: var(--text-base); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }
.text-2xl { font-size: var(--text-2xl); }
.text-3xl { font-size: var(--text-3xl); }
.text-4xl { font-size: var(--text-4xl); }

.text-primary { color: var(--primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }
.font-extrabold { font-weight: var(--font-extrabold); }

.leading-tight { line-height: var(--leading-tight); }
.leading-normal { line-height: var(--leading-normal); }
.leading-relaxed { line-height: var(--leading-relaxed); }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* =============================================
   Buttons (按钮)
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  position: relative;
  overflow: hidden;
}

.btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* 点击涟漪效果 */
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, rgba(255,255,255,.3) 10%, transparent 10%);
  transform: scale(10);
  opacity: 0;
  transition: transform .5s, opacity 1s;
}

.btn:active::after {
  transform: scale(0);
  opacity: .3;
  transition: 0s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  box-shadow: var(--shadow-sm), 0 2px 8px rgba(224,123,57,.2);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 4px 12px rgba(224,123,57,.3);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: var(--shadow-xs);
}

.btn-secondary {
  background: var(--white);
  color: var(--text-secondary);
  border: 1.5px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-bg);
  transform: translateY(-1px);
}

.btn-outline {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
}

.btn-outline:hover {
  background: var(--primary-bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

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

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

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

.btn-danger:hover {
  background: #b91c1c;
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  color: var(--white);
}

.btn-success:hover {
  background: #047857;
  transform: translateY(-1px);
}

/* 按钮尺寸 */
.btn-xs { padding: 6px 12px; font-size: var(--text-xs); }
.btn-sm { padding: 8px 16px; font-size: var(--text-sm); }
.btn-md { padding: 12px 24px; }
.btn-lg { padding: 16px 32px; font-size: var(--text-base); }
.btn-xl { padding: 20px 40px; font-size: var(--text-lg); }
.btn-block { width: 100%; }

/* 按钮组 */
.btn-group {
  display: inline-flex;
  gap: var(--space-xs);
}

.btn-group .btn { border-radius: 0; }
.btn-group .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.btn-group .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }

/* =============================================
   Cards (卡片)
   ============================================= */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
  overflow: hidden;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--border);
}

/* 卡片内边距分级 */
.card-body { padding: var(--space-lg); }
.card-body-compact { padding: var(--space-md); }
.card-body-spacious { padding: var(--space-xl); }

.card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border-light);
  font-weight: var(--font-semibold);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border-light);
  background: var(--bg-page);
}

/* 卡片图片 */
.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.card:hover .card-img {
  transform: scale(1.05);
}

.card-img-wrapper {
  overflow: hidden;
  position: relative;
}

/* 卡片标题 */
.card-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-xs);
  color: var(--text);
}

.card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
}

/* 卡片元信息 */
.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-sm);
}

/* =============================================
   Badges & Tags (徽章与标签)
   ============================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  white-space: nowrap;
  line-height: 1.4;
}

.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-gold { background: #fefce8; color: var(--gold); }
.badge-neutral { background: var(--gray-100); color: var(--gray-600); }

/* 实心徽章 */
.badge-solid {
  color: var(--white);
}
.badge-solid.badge-primary { background: var(--primary); }
.badge-solid.badge-success { background: var(--success); }
.badge-solid.badge-warning { background: var(--warning); }
.badge-solid.badge-danger { background: var(--danger); }

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  background: var(--bg-page);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.tag:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

/* =============================================
   Stats (统计卡片)
   ============================================= */
.stat-card {
  text-align: center;
  padding: var(--space-xl);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.stat-card .stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--font-extrabold);
  color: var(--primary);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stat-card .stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.stat-card .stat-icon {
  font-size: 2rem;
  margin-bottom: var(--space-md);
  opacity: .8;
}

/* =============================================
   Forms (表单)
   ============================================= */
.form-group { margin-bottom: var(--space-lg); }

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text);
  margin-bottom: var(--space-xs);
}

.form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-2xs);
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: var(--text-base);
  outline: none;
  background: var(--white);
  transition: all var(--transition-fast);
  color: var(--text);
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(224,123,57,.1);
}

.form-control::placeholder {
  color: var(--text-placeholder);
}

.form-control:disabled {
  background: var(--bg-page);
  cursor: not-allowed;
  opacity: .7;
}

.form-control.error {
  border-color: var(--danger);
}

.form-control.error:focus {
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

.form-error {
  font-size: var(--text-xs);
  color: var(--danger);
  margin-top: var(--space-2xs);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
  line-height: var(--leading-relaxed);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239e9a95' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 44px;
  cursor: pointer;
}

.input-group {
  display: flex;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1.5px solid var(--border);
  transition: all var(--transition-fast);
}

.input-group:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(224,123,57,.1);
}

.input-group .form-control {
  border: none;
  border-radius: 0;
}

.input-group .form-control:focus {
  box-shadow: none;
}

.input-group .btn { border-radius: 0; }

/* 表单行 */
.form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
}

/* =============================================
   Toast / Alert (提示)
   ============================================= */
.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  line-height: var(--leading-normal);
}

.alert-success {
  background: var(--success-bg);
  color: #065f46;
  border: 1px solid var(--success-border);
}

.alert-warning {
  background: var(--warning-bg);
  color: #92400e;
  border: 1px solid var(--warning-border);
}

.alert-danger {
  background: var(--danger-bg);
  color: #991b1b;
  border: 1px solid var(--danger-border);
}

.alert-info {
  background: var(--info-bg);
  color: #1e40af;
  border: 1px solid var(--info-border);
}

/* Toast 通知 */
.toast {
  position: fixed;
  top: calc(var(--navbar-height) + var(--space-md));
  right: var(--space-lg);
  z-index: 9999;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius);
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  animation: toastSlideIn 0.4s var(--ease-spring);
  max-width: 400px;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); color: var(--text); }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(100%) translateY(-10px); }
  to { opacity: 1; transform: translateX(0) translateY(0); }
}

.toast-exit {
  animation: toastSlideOut 0.3s var(--ease-out) forwards;
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0); }
  to { opacity: 0; transform: translateX(100%); }
}

/* =============================================
   Modal (弹窗)
   ============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  animation: fadeIn 0.2s var(--ease-out);
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-xl);
  animation: modalSlideUp 0.3s var(--ease-spring);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: var(--space-lg) var(--space-xl);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.modal-header h3 {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-2xs);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  line-height: 1;
}

.modal-close:hover {
  background: var(--bg-page);
  color: var(--text);
}

.modal-body {
  padding: var(--space-xl);
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: var(--space-md) var(--space-xl);
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  flex-shrink: 0;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

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

/* 弹窗尺寸 */
.modal-sm { max-width: 400px; }
.modal-lg { max-width: 680px; }
.modal-xl { max-width: 900px; }

/* =============================================
   Page Hero (页面头部)
   ============================================= */
.page-hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-secondary) 50%, var(--dark-tertiary) 100%);
  padding: var(--space-4xl) 0 var(--space-3xl);
  text-align: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 70%, rgba(224,123,57,.1) 0%, transparent 50%),
              radial-gradient(circle at 70% 30%, rgba(15,52,96,.2) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--primary-light), var(--primary));
}

.page-hero h1 {
  font-size: var(--text-4xl);
  font-weight: var(--font-extrabold);
  color: var(--white);
  margin-bottom: var(--space-md);
  position: relative;
}

.page-hero h1 span { color: var(--primary-light); }

.page-hero p {
  font-size: var(--text-lg);
  opacity: .75;
  max-width: 560px;
  margin: 0 auto;
  position: relative;
}

/* =============================================
   Navbar (导航栏)
   ============================================= */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--navbar-height);
  backdrop-filter: blur(10px);
  background: rgba(255,255,255,.95);
}

.navbar .container {
  display: flex;
  align-items: center;
  height: 100%;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: var(--font-bold);
  font-size: var(--text-lg);
  color: var(--primary);
  transition: opacity var(--transition-fast);
}

.navbar-brand:hover { opacity: .8; }

.navbar-brand .brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  object-fit: cover;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  margin-left: auto;
}

.navbar-nav a {
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
}

.navbar-nav a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 1px;
  transition: width var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--primary);
}

.navbar-nav a:hover::after,
.navbar-nav a.active::after {
  width: 20px;
}

.navbar-nav a.active {
  background: var(--primary-bg);
}

.navbar-nav a.nav-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  font-weight: var(--font-semibold);
  margin-left: var(--space-sm);
  box-shadow: 0 2px 8px rgba(224,123,57,.2);
}

.navbar-nav a.nav-cta::after { display: none; }

.navbar-nav a.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(224,123,57,.3);
  background: var(--primary-dark);
}

.navbar .nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--text);
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: background var(--transition-fast);
}

.navbar .nav-toggle:hover {
  background: var(--bg-page);
}

/* =============================================
   Footer (页脚)
   ============================================= */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,.8);
  padding: var(--space-3xl) 0 var(--space-xl);
  margin-top: var(--space-4xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer h3 {
  color: var(--white);
  font-size: var(--text-base);
  margin-bottom: var(--space-md);
  font-weight: var(--font-semibold);
}

.footer ul li { margin-bottom: var(--space-sm); }

.footer ul li a {
  color: rgba(255,255,255,.8);
  font-size: var(--text-sm);
  transition: all var(--transition-fast);
}

.footer ul li a:hover {
  color: var(--primary-light);
  padding-left: 4px;
}

.footer-bottom {
  padding-top: var(--space-xl);
  text-align: center;
  font-size: var(--text-xs);
}

/* =============================================
   Tab Navigation (标签页)
   ============================================= */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: var(--space-xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.tab {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
  position: relative;
}

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

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

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

/* =============================================
   Loading / Skeleton / Empty
   ============================================= */
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.spinner-lg {
  width: 32px;
  height: 32px;
  border-width: 3px;
}

/* 骨架屏 */
.skeleton {
  background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-50) 50%, var(--gray-100) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

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

.skeleton-text {
  height: 1em;
  margin-bottom: var(--space-xs);
}

.skeleton-title {
  height: 1.5em;
  width: 60%;
  margin-bottom: var(--space-md);
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
}

.skeleton-img {
  height: 200px;
  border-radius: var(--radius);
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: var(--space-3xl) var(--space-xl);
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  opacity: .4;
}

.empty-state h3 {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.empty-state p {
  font-size: var(--text-sm);
  max-width: 320px;
  margin: 0 auto var(--space-lg);
}

/* =============================================
   Grid Utilities (栅格工具)
   ============================================= */
.grid { display: grid; gap: var(--space-lg); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
.grid-auto-fit { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-auto-fill { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* 栅格间距 */
.grid-gap-xs { gap: var(--space-xs); }
.grid-gap-sm { gap: var(--space-sm); }
.grid-gap-md { gap: var(--space-md); }
.grid-gap-lg { gap: var(--space-lg); }
.grid-gap-xl { gap: var(--space-xl); }

/* Flex 工具 */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }

.gap-xs { gap: var(--space-2xs); }
.gap-sm { gap: var(--space-xs); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* =============================================
   Spacing Utilities (间距工具)
   ============================================= */
.m-0 { margin: 0; }
.m-xs { margin: var(--space-xs); }
.m-sm { margin: var(--space-sm); }
.m-md { margin: var(--space-md); }
.m-lg { margin: var(--space-lg); }
.m-xl { margin: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-xs { margin-top: var(--space-2xs); }
.mt-sm { margin-top: var(--space-xs); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
.mt-2xl { margin-top: var(--space-2xl); }
.mt-3xl { margin-top: var(--space-3xl); }

.mb-0 { margin-bottom: 0; }
.mb-xs { margin-bottom: var(--space-2xs); }
.mb-sm { margin-bottom: var(--space-xs); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }
.mb-2xl { margin-bottom: var(--space-2xl); }
.mb-3xl { margin-bottom: var(--space-3xl); }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0; }
.p-xs { padding: var(--space-2xs); }
.p-sm { padding: var(--space-xs); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.p-xl { padding: var(--space-xl); }
.p-2xl { padding: var(--space-2xl); }

.px-sm { padding-left: var(--space-xs); padding-right: var(--space-xs); }
.px-md { padding-left: var(--space-md); padding-right: var(--space-md); }
.px-lg { padding-left: var(--space-lg); padding-right: var(--space-lg); }
.px-xl { padding-left: var(--space-xl); padding-right: var(--space-xl); }

.py-sm { padding-top: var(--space-xs); padding-bottom: var(--space-xs); }
.py-md { padding-top: var(--space-md); padding-bottom: var(--space-md); }
.py-lg { padding-top: var(--space-lg); padding-bottom: var(--space-lg); }
.py-xl { padding-top: var(--space-xl); padding-bottom: var(--space-xl); }

/* =============================================
   Animations (动画)
   ============================================= */

/* 滚动动画 */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}

.animate-on-scroll.animated,
.animated {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

/* 进入动画 */
.animate-fade-up {
  animation: fadeInUp 0.6s var(--ease-out) forwards;
}

.animate-fade-left {
  animation: fadeInLeft 0.6s var(--ease-out) forwards;
}

.animate-fade-right {
  animation: fadeInRight 0.6s var(--ease-out) forwards;
}

.animate-scale-in {
  animation: scaleIn 0.5s var(--ease-spring) forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 2%); }
  50% { transform: translate(2%, -2%); }
  75% { transform: translate(-1%, -1%); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* 延迟 */
.delay-1 { transition-delay: 0.1s; animation-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; animation-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; animation-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; animation-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; animation-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; animation-delay: 0.6s; }

/* =============================================
   Section Title Enhancement
   ============================================= */
.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: var(--space-2xl);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 48px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 2px;
  transition: width 0.4s var(--ease-out);
}

.section-title:hover::after {
  width: 80px;
}

/* =============================================
   Dropdown Menu (下拉菜单)
   ============================================= */
.nav-dropdown { position: relative; }

.nav-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 8px;
}

.dropdown-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.dropdown-trigger::after {
  content: '▾';
  font-size: 0.7em;
  transition: transform var(--transition-fast);
}

.nav-dropdown:hover .dropdown-trigger::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  min-width: 180px;
  padding: var(--space-xs);
  z-index: 200;
  animation: dropdownFadeIn 0.2s var(--ease-out);
}

@keyframes dropdownFadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.dropdown-menu a:hover {
  background: var(--primary-bg);
  color: var(--primary);
  padding-left: var(--space-lg);
}

/* =============================================
   Utility Classes (工具类)
   ============================================= */

/* 显示 */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-grid { display: grid; }

/* 定位 */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* 溢出 */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }

/* 圆角 */
.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: var(--radius-sm); }
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* 阴影 */
.shadow-none { box-shadow: none; }
.shadow-xs { box-shadow: var(--shadow-xs); }
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* 背景 */
.bg-white { background: var(--white); }
.bg-page { background: var(--bg-page); }
.bg-primary { background: var(--primary); }
.bg-primary-bg { background: var(--primary-bg); }
.bg-dark { background: var(--dark); }

/* 边框 */
.border { border: 1px solid var(--border); }
.border-light { border: 1px solid var(--border-light); }
.border-0 { border: none; }

/* 宽度 */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-fit { width: fit-content; }

/* 最大宽度 */
.max-w-sm { max-width: var(--container-xs); }
.max-w-md { max-width: var(--container-sm); }
.max-w-lg { max-width: var(--container-max); }

/* 光标 */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* 透明度 */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: .5; }
.opacity-75 { opacity: .75; }
.opacity-100 { opacity: 1; }

/* 过渡 */
.transition { transition: all var(--transition); }
.transition-fast { transition: all var(--transition-fast); }
.transition-slow { transition: all var(--transition-slow); }

/* 变换 */
.hover-lift:hover { transform: translateY(-4px); }
.hover-scale:hover { transform: scale(1.05); }
.hover-glow:hover { box-shadow: var(--shadow-glow); }

/* 无障碍 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =============================================
   Responsive (响应式)
   ============================================= */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .grid-6 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 968px) {
  .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  :root {
    --text-4xl: 1.875rem;
    --text-3xl: 1.5rem;
    --text-2xl: 1.25rem;
  }

  .container { padding: 0 var(--space-md); }

  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 {
    grid-template-columns: 1fr;
  }

  .footer-grid { grid-template-columns: 1fr; }

  .section { padding: var(--space-2xl) 0; }

  .page-hero {
    padding: var(--space-3xl) 0 var(--space-2xl);
  }

  .page-hero h1 { font-size: var(--text-3xl); }

  .section-title h2 { font-size: var(--text-2xl); }

  /* 移动端导航 */
  .navbar .nav-toggle {
    display: block;
  }

  .navbar-nav {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-md);
    box-shadow: var(--shadow-lg);
    border-top: 1px solid var(--border-light);
    animation: slideDown 0.3s var(--ease-out);
  }

  .navbar-nav.open,
  .navbar-nav.active {
    display: flex;
  }

  .navbar-nav a {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
  }

  .navbar-nav a::after { display: none; }

  .nav-dropdown .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: var(--space-lg);
    animation: none;
  }

  .nav-dropdown .dropdown-trigger::after { display: none; }

  /* 移动端按钮 */
  .btn-lg {
    padding: 14px 24px;
    font-size: var(--text-sm);
  }

  /* 移动端卡片 */
  .card-body { padding: var(--space-md); }
  .card-body-spacious { padding: var(--space-lg); }

  /* 移动端弹窗 */
  .modal {
    margin: var(--space-md);
    max-height: calc(100vh - var(--space-xl));
  }

  .modal-body { padding: var(--space-lg); }

  /* 移动端表格 */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* 小屏手机 */
@media (max-width: 375px) {
  :root {
    --text-4xl: 1.625rem;
    --text-3xl: 1.375rem;
  }

  .container { padding: 0 var(--space-sm); }

  .btn { padding: 10px 16px; }
  .btn-lg { padding: 12px 20px; }
}

/* 暗色模式预留 */
@media (prefers-color-scheme: dark) {
  /* 暗色模式变量覆盖 - 暂未启用 */
  /*
  :root {
    --bg-page: #1a1a1a;
    --bg-card: #2d2d2d;
    --text: #e5e5e5;
    --text-secondary: #a3a3a3;
    --border: #404040;
  }
  */
}

/* 减少动画 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .animate-on-scroll {
    opacity: 1;
    transform: none;
  }

  html { scroll-behavior: auto; }
}
