/**
 * 天偌装修平台 - Bootstrap 兼容层
 * 将常用 Bootstrap 类映射到设计系统，实现全局升级
 * 所有页面加入此 CSS 即可自动获得统一外观
 */

/* ----- Grid -------------------------- */
.row { display: flex; flex-wrap: wrap; margin-left: -8px; margin-right: -8px; }
[class*="col-"] { padding: 0 8px; box-sizing: border-box; }
.col-1  { flex: 0 0 8.33%;  max-width: 8.33%;  }
.col-2  { flex: 0 0 16.66%; max-width: 16.66%; }
.col-3  { flex: 0 0 25%;    max-width: 25%;    }
.col-4  { flex: 0 0 33.33%; max-width: 33.33%; }
.col-5  { flex: 0 0 41.66%; max-width: 41.66%; }
.col-6  { flex: 0 0 50%;    max-width: 50%;    }
.col-7  { flex: 0 0 58.33%; max-width: 58.33%; }
.col-8  { flex: 0 0 66.66%; max-width: 66.66%; }
.col-9  { flex: 0 0 75%;    max-width: 75%;    }
.col-10 { flex: 0 0 83.33%; max-width: 83.33%; }
.col-11 { flex: 0 0 91.66%; max-width: 91.66%; }
.col-12 { flex: 0 0 100%;   max-width: 100%;   }

/* ----- Responsive Grid (lg: ≥992px) ----- */
@media (min-width: 992px) {
  .col-lg-1  { flex: 0 0 8.33%;  max-width: 8.33%;  }
  .col-lg-2  { flex: 0 0 16.66%; max-width: 16.66%; }
  .col-lg-3  { flex: 0 0 25%;    max-width: 25%;    }
  .col-lg-4  { flex: 0 0 33.33%; max-width: 33.33%; }
  .col-lg-5  { flex: 0 0 41.66%; max-width: 41.66%; }
  .col-lg-6  { flex: 0 0 50%;    max-width: 50%;    }
  .col-lg-7  { flex: 0 0 58.33%; max-width: 58.33%; }
  .col-lg-8  { flex: 0 0 66.66%; max-width: 66.66%; }
  .col-lg-9  { flex: 0 0 75%;    max-width: 75%;    }
  .col-lg-10 { flex: 0 0 83.33%; max-width: 83.33%; }
  .col-lg-11 { flex: 0 0 91.66%; max-width: 91.66%; }
  .col-lg-12 { flex: 0 0 100%;   max-width: 100%;   }
}

/* ----- Spacing -------------------------- */
.mt-0 { margin-top: 0; }         .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 4px; }       .mb-1 { margin-bottom: 4px; }
.mt-2 { margin-top: 8px; }       .mb-2 { margin-bottom: 8px; }
.mt-3 { margin-top: 16px; }      .mb-3 { margin-bottom: 16px; }
.mt-4 { margin-top: 24px; }      .mb-4 { margin-bottom: 24px; }
.mt-5 { margin-top: 48px; }      .mb-5 { margin-bottom: 48px; }
.me-1 { margin-right: 4px; }     .ms-1 { margin-left: 4px; }
.me-2 { margin-right: 8px; }     .ms-2 { margin-left: 8px; }
.me-3 { margin-right: 16px; }    .ms-3 { margin-left: 16px; }
.p-0 { padding: 0; }             .p-1 { padding: 4px; }
.p-2 { padding: 8px; }           .p-3 { padding: 16px; }
.p-4 { padding: 24px; }

/* ----- Text -------------------------- */
.text-start { text-align: left; }   .text-end { text-align: right; }
.text-bold, .fw-bold { font-weight: 700; }
.fw-normal { font-weight: 400; }
.text-white { color: var(--white); }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger, .text-error { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }
.text-sm, .small { font-size: .85rem; }
.text-xs { font-size: .75rem; }

/* ----- Display & Flex -------------------------- */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-grid { display: grid; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-items-end { align-items: flex-end; }
.gap-1 { gap: 4px; }   .gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }  .gap-4 { gap: 24px; }
.flex-grow-1 { flex: 1; }

/* ----- Width/Height -------------------------- */
.w-25 { width: 25%; }   .w-50 { width: 50%; }   .w-75 { width: 75%; }   .w-100 { width: 100%; }

/* ----- Buttons -------------------------- */
.btn-secondary {
  background: var(--bg-page); color: var(--text-secondary);
  border: 1.5px solid var(--border);
}
.btn-outline-primary {
  border: 2px solid var(--primary); color: var(--primary); background: transparent;
}
.btn-light {
  background: var(--bg-page); color: var(--text); border: 1px solid var(--border);
}
.btn-link { background: none; border: none; color: var(--primary); text-decoration: underline; cursor: pointer; }
.btn-warning { background: var(--warning); color: #fff; border: none; padding: 8px 20px; border-radius: var(--radius); font-weight: 600; cursor: pointer; transition: all var(--transition-fast); }
.btn-warning:hover { background: #d97706; }
.btn-outline-secondary { background: none; border: 1px solid var(--border); color: var(--text-secondary); padding: 8px 20px; border-radius: var(--radius); font-weight: 500; cursor: pointer; transition: all var(--transition-fast); }
.btn-outline-secondary:hover { background: var(--bg-page); }
.btn-outline-warning { background: none; border: 1px solid var(--warning); color: var(--warning); padding: 6px 14px; border-radius: var(--radius); font-weight: 500; cursor: pointer; transition: all var(--transition-fast); }
.btn-outline-warning:hover { background: var(--warning-bg); }
.btn-sm { padding: 4px 12px; font-size: .82rem; }

/* ----- Form -------------------------- */
.form-label { display: block; margin-bottom: 4px; font-weight: 500; font-size: .9rem; color: var(--text); }
.form-control { width: 100%; padding: 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: .9rem; outline: none; transition: border-color var(--transition-fast); }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-bg); }
.form-text { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }
.input-group { display: flex; align-items: stretch; }
.input-group-text { display: flex; align-items: center; padding: 8px 12px; background: var(--bg-page); border: 1.5px solid var(--border); border-right: none; border-radius: var(--radius) 0 0 var(--radius); font-size: .9rem; color: var(--text-secondary); }
.input-group .form-control { border-radius: 0 var(--radius) var(--radius) 0; }
.form-select { width: 100%; padding: 8px 32px 8px 12px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: .9rem; outline: none; background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e") no-repeat right 10px center/12px; appearance: none; cursor: pointer; }
.form-select:focus { border-color: var(--primary); }
.form-select-sm { padding: 4px 28px 4px 10px; font-size: .82rem; }

/* ----- Font Sizes -------------------------- */
.fs-5 { font-size: 1.25rem; }

/* ----- Badges -------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px; border-radius: var(--radius-sm);
  font-size: .72rem; font-weight: 600;
}
.badge-primary { background: var(--primary-bg); color: var(--primary); }
.badge-success, .bg-success { background: var(--success-bg); color: #065f46; }
.badge-danger, .bg-danger   { background: var(--danger-bg);  color: #991b1b; }
.badge-warning, .bg-warning { background: var(--warning-bg); color: #92400e; }
.badge-info, .bg-info       { background: var(--info-bg);    color: #1e40af; }
.badge-secondary { background: var(--bg-page); color: var(--text-secondary); }

/* ----- Alerts -------------------------- */
.alert {
  padding: 12px 16px; border-radius: var(--radius); font-size: .85rem;
  display: flex; align-items: flex-start; gap: 8px;
}
.alert-success { background: var(--success-bg); color: #065f46; }
.alert-danger  { background: var(--danger-bg);  color: #991b1b; }
.alert-warning { background: var(--warning-bg); color: #92400e; }
.alert-info    { background: var(--info-bg);    color: #1e40af; }

/* ----- Tables -------------------------- */
.table {
  width: 100%; border-collapse: collapse; font-size: .85rem;
}
.table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border-light); }
.table thead th { background: var(--bg-page); font-weight: 700; color: var(--text-secondary); font-size: .78rem; border-bottom-width: 2px; }
.table tbody tr:hover { background: var(--bg-hover); }
.table-sm th, .table-sm td { padding: 6px 10px; }
.table-striped tbody tr:nth-child(even) { background: var(--bg-page); }

/* ----- List Groups -------------------------- */
.list-group { display: flex; flex-direction: column; }
.list-group-item { padding: 12px 16px; border: 1px solid var(--border-light); background: var(--white); }
.list-group-item + .list-group-item { border-top: none; }

/* ----- Backgrounds -------------------------- */
.bg-white  { background: var(--white); }
.bg-light  { background: var(--bg-page); }
.bg-dark   { background: var(--dark); color: var(--white); }
.bg-primary { background: var(--primary-bg); }

/* ----- Shadows -------------------------- */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

/* ----- Borders -------------------------- */
.rounded { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.border { border: 1px solid var(--border); }

/* ----- Overflow -------------------------- */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }

/* ----- Position -------------------------- */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.sticky-top { position: sticky; top: 0; z-index: 100; }

/* ----- Visibility -------------------------- */
.visible { visibility: visible; }
.invisible { visibility: hidden; }

/* ----- Responsive -------------------------- */
@media (max-width: 768px) {
  [class*="col-"] { flex: 0 0 100%; max-width: 100%; }
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.33%; max-width: 33.33%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-8 { flex: 0 0 66.66%; max-width: 66.66%; }
}
@media (max-width: 576px) {
  .col-md-3, .col-md-4, .col-md-6, .col-md-8 { flex: 0 0 100%; max-width: 100%; }
}

/* === Design System === */
/**
 * 天偌装修平台 - 统一设计系统 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) !important;
  color: rgba(255,255,255,.8) !important;
  padding: var(--space-3xl) 0 var(--space-xl) !important;
  margin-top: var(--space-4xl) !important;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl) !important;
  padding-bottom: var(--space-xl) !important;
  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) !important;
  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; }
}

/* === Navbar === */
/**
 * 天偌装修平台 - 共享导航栏样式
 * 来源: community.html 导航 CSS
 * 更新: 2026-06-04 - 提取为共享文件
 */

/* ========== 导航栏基础 ========== */
.navbar {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.08);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  height: 64px;
}

/* ========== Logo ========== */
.logo {
  font-size: 22px;
  font-weight: bold;
  color: var(--orange);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--orange), #ff9a56);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
}

/* ========== 导航链接 ========== */
.nav-links {
  display: flex;
  list-style: none;
  margin-left: auto;
  gap: 8px;
}

.nav-links li a {
  text-decoration: none;
  color: #555;
  font-size: 15px;
  padding: 8px 16px;
  border-radius: 6px;
  transition: all .2s;
  display: block;
}

.nav-links li a:hover,
.nav-links li a.active {
  background: var(--orange-light);
  color: var(--orange);
}

.nav-links li a.highlight {
  background: var(--orange);
  color: #fff;
}

/* ========== 右侧按钮区 ========== */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: 20px;
}

/* ========== 用户下拉菜单 ========== */
.nav-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all .2s;
}

.nav-user:hover {
  background: var(--orange-light);
}

.nav-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), #ff9a56);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: bold;
}

.nav-user-name {
  font-size: 14px;
  color: #555;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,.15);
  min-width: 180px;
  padding: 8px 0;
  display: none;
  z-index: 1000;
  margin-top: 8px;
}

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

.nav-user-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: #555;
  font-size: 14px;
  transition: all .2s;
}

.nav-user-dropdown a:hover {
  background: var(--orange-light);
  color: var(--orange);
}

.nav-user-dropdown a i {
  width: 18px;
  text-align: center;
}

.nav-user-dropdown .divider {
  height: 1px;
  background: #eee;
  margin: 6px 0;
}

/* ========== 按钮 ========== */
.btn-outline {
  border: 1.5px solid var(--orange);
  color: var(--orange);
  background: transparent;
  padding: 7px 18px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
}

.btn-primary {
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 8px 20px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
}

.btn-primary:hover {
  background: #c96a2d;
}

/* ========== 移动端汉堡菜单 ========== */
.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #555;
}

/* ========== 页脚 ========== */
.footer {
  background: #f8f9fa;
  color: rgba(0,0,0,.7);
  padding: 12px 0 8px;
  margin-top: 15px;
}

.footer .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 40px;
  margin-bottom: 15px;
}

.footer h4 {
  color: #333;
  font-size: 15px;
  margin-bottom: 16px;
}

.footer ul {
  list-style: none;
  padding: 0;
}

.footer ul li {
  margin-bottom: 8px;
}

.footer ul a {
  color: #666;
  text-decoration: none;
  font-size: 13px;
  transition: color .2s;
}

.footer ul a:hover {
  color: var(--orange);
}

.footer-bottom {
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid rgba(0,0,0,.1);
  font-size: 12px;
  color: rgba(0,0,0,.4);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    z-index: 99;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    padding: 12px 16px;
    border-radius: 8px;
  }

  .mobile-toggle {
    display: block;
    padding: 8px;
  }

  .nav-right {
    margin-left: auto;
    gap: 8px;
  }

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

@media (max-width: 576px) {
  .nav-links li a {
    padding: 12px 14px;
    font-size: 14px;
  }
}

/* === Mobile Fixes === */
/**
 * 移动端响应式全面优化
 * 覆盖：抢单大厅 / 订单详情 / 工长工作台 / 全局组件
 */
/* ══════════════════════════════════════ */
/*  全局触摸和交互优化                    */
/* ══════════════════════════════════════ */

/* 按钮最小触摸尺寸 (Apple HIG >=44px) */
.btn, .btn-sm, button, [role="button"] { cursor: pointer; }
@media (max-width: 768px) {
  .btn, button[class*="btn"] { min-height: 42px; padding: 8px 16px; }
  .btn-sm { min-height: 36px; padding: 6px 12px; }
  /* 防止双击缩放 */
  button, a, .btn, .bid-item, .order-card, .recommended-card {
    touch-action: manipulation;
  }
}

/* 导航栏移动端 */
.nav-right { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.nav-right .btn-outline, .nav-right .btn-primary { padding: 6px 12px; font-size: 13px; }
@media (max-width: 768px) {
  .nav-right { gap: 6px; }
  .nav-right .btn-outline, .nav-right .btn-primary { padding: 5px 10px; font-size: 12px; }
}

/* featured-card */
.fc-img { height: 160px !important; overflow: hidden; position: relative; display: flex; align-items: center; justify-content: center; background: #e8f4ff; }
.fc-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fc-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.4 !important; max-height: 2.8em; }
.fc-meta { flex-wrap: nowrap; overflow: hidden; }
.fc-meta > * { flex-shrink: 0; }
.fc-rating { margin-right: 8px; }
.qa-card { padding: 20px 14px !important; min-height: 120px; }
.qa-title { font-size: 15px !important; }
.qa-icon { width: 48px !important; height: 48px !important; font-size: 22px !important; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll table { min-width: 600px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr !important; } }

/* 极端小屏 */
@media (max-width: 320px) {
  .nav-links li a { font-size: 14px !important; padding: 10px 12px !important; }
  .banner h1 { font-size: 18px !important; }
  .banner p { font-size: 12px !important; }
  .section-header h2 { font-size: 20px !important; }
}

/* 通用 Modal 移动端优化 */
@media (max-width: 768px) {
  .modal-dialog { margin: 8px !important; max-width: calc(100vw - 16px) !important; }
  .modal-body { max-height: 60vh !important; overflow-y: auto !important; -webkit-overflow-scrolling: touch; }
  .modal-header { padding: 12px 16px; }
  .modal-header h5 { font-size: 1rem; }
}

/* ══════════════════════════════════════ */
/*  抢单大厅 (order-hall)                */
/* ══════════════════════════════════════ */
@media (max-width: 768px) {
  /* 头部缩小 */
  .hall-hero { padding: 24px 0 16px; }
  .hall-hero h1 { font-size: 1.3rem; }
  .hall-hero p { font-size: .75rem; }

  /* 统计栏 2x2 网格 */
  .stats-bar .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .stats-bar .row .col-3 { flex: none !important; width: auto !important; }
  .stat-item { padding: 8px 4px; }
  .stat-item .num { font-size: 1.3rem; }
  .stat-item .label { font-size: .7rem; }

  /* 视图切换按钮组 */
  .btn-group { width: 100%; }
  .btn-group .btn { font-size: .78rem; padding: 6px 12px; }

  /* 筛选栏堆叠 */
  .filter-bar .row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .filter-bar .row > div { flex: none !important; width: auto !important; }
  .filter-bar select { font-size: .75rem; }

  /* 订单卡片单列 */
  #orderList .col-md-6 { flex: none !important; width: 100% !important; }
  .order-card { margin-bottom: 10px; }
  .order-card .card-top { padding: 12px 14px; }
  .order-card .order-title { font-size: .95rem; }
  .order-card .order-meta { padding: 8px 14px; gap: 6px; }
  .order-card .meta-item { font-size: .73rem; }
  .order-footer { padding: 10px 14px; flex-wrap: wrap; gap: 8px; }
  .budget-range { font-size: .9rem; }
  .btn-bid { padding: 5px 16px; font-size: .8rem; }
}

/* 报价表单移动端 (费用明细输入行) */
@media (max-width: 768px) {
  .bid-form { padding: 12px !important; }
  .bid-form .row.g-2 { gap: 8px !important; }
  #expenseList { max-height: 180px !important; }
  .expense-row { flex-wrap: wrap; gap: 4px !important; padding: 4px 0; border-bottom: 1px solid #f0f0f0; }
  .expense-row .exp-category { width: 70px !important; font-size: .7rem !important; }
  .expense-row .exp-name { min-width: 80px !important; flex: 1 !important; font-size: .7rem !important; }
  .expense-row .exp-amount { width: 60px !important; font-size: .7rem !important; }
  .expense-row .exp-qty { width: 44px !important; font-size: .7rem !important; }
  .expense-row .exp-unit { width: 44px !important; font-size: .7rem !important; }
  .expense-row button { padding: 2px 4px !important; }
  .bid-form textarea { font-size: .8rem; }
  #bidPrice { font-size: 1rem !important; }
}

/* ══════════════════════════════════════ */
/*  订单详情 (order-detail)              */
/* ══════════════════════════════════════ */
@media (max-width: 768px) {
  /* 头部缩小 */
  .detail-header { padding: 20px 0 16px; }
  .detail-header h4 { font-size: 1.1rem; }
  .detail-header .d-flex { flex-direction: column; align-items: flex-start !important; gap: 10px; }
  #detailBudget { font-size: 1.3rem !important; }

  /* 主内容区全宽 */
  .container > .row { flex-direction: column; }
  .container > .row > .col-lg-8,
  .container > .row > .col-lg-4 { flex: none !important; width: 100% !important; }

  /* 报价卡片 */
  .bid-item { padding: 12px; }
  .bid-item .price { font-size: 1.1rem; }
  .bid-item strong { font-size: .9rem; }
  .bid-item .certBadge { font-size: .6rem !important; }

  /* 合同面板 */
  #contractInfo { font-size: .8rem; }
  #contractInfo pre { font-size: .7rem !important; }

  /* 托管面板 */
  .escrow-panel .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .escrow-stat { padding: 6px 4px; }
  .escrow-stat .val { font-size: 1.1rem; }
  .milestone-item { font-size: .78rem; padding: 8px 0; }
  .milestone-dot { width: 26px; height: 26px; font-size: .65rem; }

  /* 聊天区 */
  .chat-messages { max-height: 280px !important; padding: 10px !important; }
  .msg-bubble { max-width: 85% !important; font-size: .8rem !important; padding: 8px 12px !important; }
  .chat-input-bar { padding: 8px 10px; gap: 6px; }
  .chat-input-bar input { font-size: .8rem; padding: 6px 12px; }
  .chat-input-bar button { padding: 6px 14px; font-size: .8rem; }

  /* 进度阶段 */
  .phase-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 6px; }
  .phase-item { padding: 8px; font-size: .75rem; }

  /* 评价星级 */
  .star-rating { font-size: 1.8rem !important; gap: 3px; }
}

/* ══════════════════════════════════════ */
/*  工长工作台 (worker-dashboard)        */
/* ══════════════════════════════════════ */
@media (max-width: 768px) {
  /* 顶部 hero */
  .top-hero { padding: 20px 0 12px; }
  .top-hero h4 { font-size: 1rem; }
  .profile-avatar { width: 52px; height: 52px; font-size: 1.3rem; }

  /* 统计卡片 2x2 */
  .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .stat-card { padding: 14px 10px; }
  .stat-card .icon { width: 40px; height: 40px; font-size: 1rem; margin-bottom: 6px; }
  .stat-card .num { font-size: 1.3rem; }
  .stat-card .label { font-size: .7rem; }

  /* Tab 栏横向滚动 */
  .tab-bar { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; }
  .tab-btn { padding: 6px 14px; font-size: .8rem; flex-shrink: 0; }

  /* 报价卡片 */
  .bid-card { padding: 12px; }
  .bid-card .fw-bold { font-size: .88rem; }
  .bid-card .text-warning { font-size: .95rem !important; }

  /* 推荐区域 */
  .recommended-card { padding: 10px 12px; }
  .recommended-card .fw-bold { font-size: .82rem; }

  /* 数据看板 - 2列 */
  #panel-earnings .row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  #panel-earnings .row > div { flex: none !important; width: auto !important; }

  /* 趋势图 */
  .bar-item { font-size: .75rem; }
  .bar-label { min-width: 36px; font-size: .7rem; }
}

/* ══════════════════════════════════════ */
/*  通用优化：小设备 480px               */
/* ══════════════════════════════════════ */
@media (max-width: 480px) {
  /* 统计/指标卡片 2列 */
  .stats-grid, #panel-earnings .row,
  .escrow-panel .row, .admin-stats {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* 表单全宽 */
  input[type="text"], input[type="number"], input[type="email"], select, textarea {
    font-size: 16px !important; /* 防止iOS缩放 */
  }

  /* 分页器 */
  .pagination .page-link { padding: 4px 8px; font-size: .75rem; }

  /* 浮动按钮 */
  .btn-bid, .btn-release { padding: 8px 14px !important; font-size: .82rem !important; }

  /* 合同签署 */
  #contractInfo button { width: 100%; margin-top: 6px; }

  /* 间化倒计时 */
  .countdown-timer { font-size: .68rem; padding: 1px 6px; }

  /* Modal 全屏接近 */
  .modal-dialog { margin: 4px !important; }
}