/* ============================================================
   TC Cloud UI - 腾讯云风格UI框架 (2026版)
   设计理念：简洁、现代、一致、高效
   特点：更精简的CSS变量、更一致的类名、更好的响应式设计
   ============================================================ */

/* ==================== CSS变量 ==================== */
:root {
  /* 新版变量（推荐） */
  --tc-primary: #0052D9;
  --tc-primary-light: #006EFF;
  --tc-primary-dark: #003BA5;
  --tc-primary-bg: rgba(0, 82, 217, 0.08);

  --tc-success: #00A870;
  --tc-warning: #ED7B2F;
  --tc-danger: #E34D59;
  --tc-info: #0052D9;

  --tc-bg: #F3F5F7;
  --tc-bg-white: #FFFFFF;
  --tc-bg-hover: #F3F5F7;
  --tc-bg-active: #E5E9EF;
  --tc-border: #E5E9EF;
  --tc-border-light: #F0F0F0;
  --tc-text: #1A1A1A;
  --tc-text-secondary: #4A4A4A;  /* 修复：对比度从4.53:1提升到7:1，满足WCAG AAA */
  --tc-text-muted: #757575;      /* 修复：对比度从2.67:1提升到4.5:1，满足WCAG AA */
  --tc-text-white: #FFFFFF;

  --tc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --tc-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --tc-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
  --tc-shadow-hover: 0 6px 20px rgba(0, 82, 217, 0.12);

  --tc-radius-sm: 4px;
  --tc-radius: 6px;
  --tc-radius-lg: 8px;
  --tc-radius-xl: 12px;

  --tc-spacing-xs: 4px;
  --tc-spacing-sm: 8px;
  --tc-spacing-md: 16px;
  --tc-spacing-lg: 24px;
  --tc-spacing-xl: 32px;

  --tc-font-xs: 12px;
  --tc-font-sm: 13px;
  --tc-font: 14px;
  --tc-font-lg: 16px;
  --tc-font-xl: 18px;
  --tc-font-2xl: 24px;
  --tc-font-3xl: 32px;

  /* 向后兼容（旧版变量） */
  --primary: var(--tc-primary);
  --primary-light: var(--tc-primary-light);
  --primary-dark: var(--tc-primary-dark);
  --success: var(--tc-success);
  --warning: var(--tc-warning);
  --danger: var(--tc-danger);
  --info: var(--tc-info);
  --bg: var(--tc-bg);
  --bg-white: var(--tc-bg-white);
  --border: var(--tc-border);
  --text: var(--tc-text);
  --text-secondary: var(--tc-text-secondary);
  --text-muted: var(--tc-text-muted);
  --shadow: var(--tc-shadow);
  --shadow-lg: var(--tc-shadow-lg);
  --shadow-hover: var(--tc-shadow-hover);
  --radius-sm: var(--tc-radius-sm);
  --radius: var(--tc-radius);
  --radius-lg: var(--tc-radius-lg);
  --radius-xl: var(--tc-radius-xl);
}

/* ==================== 全局重置 ==================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--tc-bg);
  color: var(--tc-text);
  line-height: 1.6;
  font-size: var(--tc-font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--tc-primary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--tc-primary-light);
}

/* ==================== 布局 ==================== */
.tc-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--tc-spacing-lg);
}

.tc-main {
  min-height: calc(100vh - 64px);
  padding: var(--tc-spacing-lg);
}

/* ==================== 头部 ==================== */
.tc-header {
  background: var(--tc-bg-white);
  box-shadow: var(--tc-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.tc-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--tc-spacing-lg);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tc-logo {
  font-size: var(--tc-font-2xl);
  font-weight: 700;
  color: var(--tc-primary);
  display: flex;
  align-items: center;
  gap: var(--tc-spacing-sm);
}

.tc-nav {
  display: flex;
  gap: var(--tc-spacing-xl);
  list-style: none;
}

.tc-nav-link {
  color: var(--tc-text-secondary);
  font-weight: 500;
  padding: var(--tc-spacing-sm) 0;
  position: relative;
  transition: color 0.2s;
}

.tc-nav-link:hover,
.tc-nav-link.active {
  color: var(--tc-primary);
}

.tc-nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--tc-primary);
}

.tc-header-actions {
  display: flex;
  align-items: center;
  gap: var(--tc-spacing-md);
}

/* ==================== 按钮 ==================== */
.tc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--tc-spacing-sm);
  padding: 8px 20px;
  border: 1px solid transparent;
  border-radius: var(--tc-radius);
  font-size: var(--tc-font);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
  text-decoration: none;
  line-height: 1.5;
}

.tc-btn-primary {
  background: var(--tc-primary);
  color: var(--tc-text-white);
  border-color: var(--tc-primary);
}

.tc-btn-primary:hover {
  background: var(--tc-primary-light);
  border-color: var(--tc-primary-light);
  box-shadow: var(--tc-shadow-hover);
  transform: translateY(-1px);
}

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

.tc-btn-warning {
  background: var(--tc-warning);
  color: var(--tc-text-white);
  border-color: var(--tc-warning);
}

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

.tc-btn-ghost {
  background: transparent;
  color: var(--tc-primary);
  border-color: var(--tc-primary);
}

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

.tc-btn-sm {
  padding: 5px 12px;
  font-size: var(--tc-font-sm);
}

.tc-btn-lg {
  padding: 12px 32px;
  font-size: var(--tc-font-lg);
}

.tc-btn-block {
  width: 100%;
}

.tc-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ==================== 卡片 ==================== */
.tc-card {
  background: var(--tc-bg-white);
  border-radius: var(--tc-radius-lg);
  box-shadow: var(--tc-shadow);
  transition: all 0.3s;
  overflow: hidden;
}

.tc-card:hover {
  box-shadow: var(--tc-shadow-lg);
  transform: translateY(-2px);
}

.tc-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--tc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tc-card-title {
  font-size: var(--tc-font-lg);
  font-weight: 600;
  color: var(--tc-text);
  margin: 0;
}

.tc-card-body {
  padding: 20px;
}

.tc-card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--tc-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--tc-spacing-sm);
}

/* ==================== 表格 ==================== */
.tc-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--tc-bg-white);
  border-radius: var(--tc-radius);
  overflow: hidden;
  box-shadow: var(--tc-shadow);
}

.tc-table thead {
  background: var(--tc-bg);
}

.tc-table th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: var(--tc-font-sm);
  color: var(--tc-text-secondary);
  border-bottom: 1px solid var(--tc-border);
}

.tc-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--tc-border-light);
  font-size: var(--tc-font-sm);
}

.tc-table tbody tr:hover {
  background: var(--tc-primary-bg);
}

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

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

.tc-form-label {
  display: block;
  margin-bottom: var(--tc-spacing-sm);
  font-weight: 500;
  color: var(--tc-text);
  font-size: var(--tc-font);
}

.tc-form-input,
.tc-form-select,
.tc-form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  font-size: var(--tc-font);
  color: var(--tc-text);
  background: var(--tc-bg-white);
  transition: all 0.2s;
}

.tc-form-input:focus,
.tc-form-select:focus,
.tc-form-textarea:focus {
  outline: none;
  border-color: var(--tc-primary);
  box-shadow: 0 0 0 3px var(--tc-primary-bg);
}

.tc-form-textarea {
  min-height: 120px;
  resize: vertical;
}

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

.tc-form-error {
  margin-top: var(--tc-spacing-xs);
  font-size: var(--tc-font-xs);
  color: var(--tc-danger);
}

/* ==================== 提示框 ==================== */
.tc-alert {
  padding: 12px 16px;
  border-radius: var(--tc-radius);
  margin-bottom: var(--tc-spacing-md);
  display: flex;
  align-items: center;
  gap: var(--tc-spacing-sm);
  font-size: var(--tc-font);
}

.tc-alert-success {
  background: rgba(0, 168, 112, 0.1);
  border: 1px solid var(--tc-success);
  color: var(--tc-success);
}

.tc-alert-error {
  background: rgba(227, 77, 89, 0.1);
  border: 1px solid var(--tc-danger);
  color: var(--tc-danger);
}

.tc-alert-warning {
  background: rgba(237, 123, 47, 0.1);
  border: 1px solid var(--tc-warning);
  color: var(--tc-warning);
}

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

/* ==================== 徽章 ==================== */
.tc-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: var(--tc-font-xs);
  font-weight: 600;
  line-height: 1.5;
}

.tc-badge-success {
  background: rgba(0, 168, 112, 0.1);
  color: var(--tc-success);
}

.tc-badge-warning {
  background: rgba(237, 123, 47, 0.1);
  color: var(--tc-warning);
}

.tc-badge-danger {
  background: rgba(227, 77, 89, 0.1);
  color: var(--tc-danger);
}

.tc-badge-info {
  background: var(--tc-primary-bg);
  color: var(--tc-primary);
}

.tc-badge-gray {
  background: var(--tc-bg);
  color: var(--tc-text-secondary);
}

/* ==================== 统计卡片 ==================== */
.tc-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--tc-spacing-lg);
  margin-bottom: var(--tc-spacing-lg);
}

.tc-stat-card {
  background: var(--tc-bg-white);
  border-radius: var(--tc-radius-lg);
  padding: var(--tc-spacing-lg);
  box-shadow: var(--tc-shadow);
  transition: all 0.3s;
}

.tc-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tc-shadow-hover);
}

.tc-stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--tc-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: var(--tc-spacing-md);
}

.tc-stat-value {
  font-size: var(--tc-font-2xl);
  font-weight: 700;
  color: var(--tc-text);
  margin-bottom: var(--tc-spacing-xs);
}

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

/* ==================== 产品网格 ==================== */
.tc-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--tc-spacing-lg);
}

.tc-product-card {
  background: var(--tc-bg-white);
  border-radius: var(--tc-radius-lg);
  box-shadow: var(--tc-shadow);
  overflow: hidden;
  transition: all 0.3s;
  cursor: pointer;
}

.tc-product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--tc-shadow-hover);
}

.tc-product-image {
  width: 100%;
  height: 200px;
  background: linear-gradient(135deg, var(--tc-primary) 0%, var(--tc-primary-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tc-text-white);
  font-size: 48px;
}

.tc-product-info {
  padding: var(--tc-spacing-lg);
}

.tc-product-name {
  font-size: var(--tc-font-lg);
  font-weight: 600;
  color: var(--tc-text);
  margin-bottom: var(--tc-spacing-sm);
}

.tc-product-desc {
  font-size: var(--tc-font-sm);
  color: var(--tc-text-secondary);
  margin-bottom: var(--tc-spacing-md);
  line-height: 1.6;
}

.tc-product-price {
  font-size: var(--tc-font-xl);
  font-weight: 700;
  color: var(--tc-danger);
}

/* ==================== 分页 ==================== */
.tc-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--tc-spacing-sm);
  margin-top: var(--tc-spacing-lg);
}

.tc-page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius);
  color: var(--tc-text-secondary);
  font-size: var(--tc-font-sm);
  transition: all 0.2s;
}

.tc-page-link:hover,
.tc-page-link.active {
  background: var(--tc-primary);
  border-color: var(--tc-primary);
  color: var(--tc-text-white);
}

/* ==================== 面包屑 ==================== */
.tc-breadcrumb {
  margin-bottom: var(--tc-spacing-lg);
  font-size: var(--tc-font-sm);
  color: var(--tc-text-secondary);
}

.tc-breadcrumb a {
  color: var(--tc-primary);
}

.tc-breadcrumb span {
  margin: 0 var(--tc-spacing-sm);
  color: var(--tc-text-muted);
}

/* ==================== 页脚 ==================== */
.tc-footer {
  background: var(--tc-bg-white);
  border-top: 1px solid var(--tc-border);
  padding: var(--tc-spacing-xl) 0;
  margin-top: var(--tc-spacing-xl);
}

.tc-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--tc-spacing-lg);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--tc-spacing-xl);
}

.tc-footer-title {
  font-size: var(--tc-font);
  font-weight: 600;
  color: var(--tc-text);
  margin-bottom: var(--tc-spacing-md);
}

.tc-footer-links {
  list-style: none;
}

.tc-footer-link {
  margin-bottom: var(--tc-spacing-sm);
}

.tc-footer-link a {
  color: var(--tc-text-secondary);
  font-size: var(--tc-font-sm);
  transition: color 0.2s;
}

.tc-footer-link a:hover {
  color: var(--tc-primary);
}

.tc-footer-bottom {
  max-width: 1200px;
  margin: var(--tc-spacing-lg) auto 0;
  padding-top: var(--tc-spacing-lg);
  border-top: 1px solid var(--tc-border);
  text-align: center;
  color: var(--tc-text-muted);
  font-size: var(--tc-font-sm);
}

/* ==================== 工具类 ==================== */
.tc-text-center { text-align: center; }
.tc-text-left { text-align: left; }
.tc-text-right { text-align: right; }

.tc-mt-sm { margin-top: var(--tc-spacing-sm); }
.tc-mt-md { margin-top: var(--tc-spacing-md); }
.tc-mt-lg { margin-top: var(--tc-spacing-lg); }
.tc-mt-xl { margin-top: var(--tc-spacing-xl); }

.tc-mb-sm { margin-bottom: var(--tc-spacing-sm); }
.tc-mb-md { margin-bottom: var(--tc-spacing-md); }
.tc-mb-lg { margin-bottom: var(--tc-spacing-lg); }
.tc-mb-xl { margin-bottom: var(--tc-spacing-xl); }

.tc-flex { display: flex; }
.tc-flex-center { display: flex; align-items: center; justify-content: center; }
.tc-flex-between { display: flex; align-items: center; justify-content: space-between; }
.tc-gap-sm { gap: var(--tc-spacing-sm); }
.tc-gap-md { gap: var(--tc-spacing-md); }
.tc-gap-lg { gap: var(--tc-spacing-lg); }

/* ==================== 动画 ==================== */
@keyframes tc-fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes tc-slideIn {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: translateX(0); }
}

.tc-fade-in {
  animation: tc-fadeIn 0.3s ease-out;
}

.tc-slide-in {
  animation: tc-slideIn 0.3s ease-out;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 480px) {
  .tc-container {
    padding: 0 var(--tc-spacing-md);
  }

  .tc-header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: var(--tc-spacing-sm) var(--tc-spacing-md);
  }

  .tc-nav {
    display: none;
  }

  .tc-stats-grid {
    grid-template-columns: 1fr;
  }

  .tc-product-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 768px) {
  .tc-container {
    padding: 0 var(--tc-spacing-md);
  }

  .tc-nav {
    display: none;
  }

  .tc-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tc-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tc-footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .tc-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tc-product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ==================== 打印样式 ==================== */
@media print {
  .tc-header,
  .tc-footer,
  .tc-btn,
  .tc-pagination {
    display: none !important;
  }

  .tc-main {
    margin: 0;
    padding: 0;
  }

  .tc-card {
    box-shadow: none;
    border: 1px solid var(--tc-border);
  }
}

/* ==================== 暗黑模式支持 ==================== */
/* 修复P1问题：添加暗黑模式 */

/* 自动暗黑模式（跟随系统） */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* 背景色 */
    --tc-bg: #1a1a1a;
    --tc-bg-white: #2d2d2d;
    --tc-bg-hover: #3a3a3a;
    --tc-bg-active: #404040;
    
    /* 文本色 */
    --tc-text: #ffffff;
    --tc-text-secondary: #b0b0b0;
    --tc-text-muted: #808080;
    --tc-text-white: #ffffff;
    
    /* 边框色 */
    --tc-border: #404040;
    --tc-border-light: #333333;
    
    /* 阴影（更暗） */
    --tc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --tc-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --tc-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
    --tc-shadow-hover: 0 6px 20px rgba(0, 82, 217, 0.2);
  }
}

/* 手动暗黑模式切换 */
[data-theme="dark"] {
  /* 背景色 */
  --tc-bg: #1a1a1a;
  --tc-bg-white: #2d2d2d;
  --tc-bg-hover: #3a3a3a;
  --tc-bg-active: #404040;
  
  /* 文本色 */
  --tc-text: #ffffff;
  --tc-text-secondary: #b0b0b0;
  --tc-text-muted: #808080;
  --tc-text-white: #ffffff;
  
  /* 边框色 */
  --tc-border: #404040;
  --tc-border-light: #333333;
  
  /* 阴影（更暗） */
  --tc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
  --tc-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --tc-shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
  --tc-shadow-hover: 0 6px 20px rgba(0, 82, 217, 0.2);
}

/* 暗黑模式下的特殊样式 */
[data-theme="dark"] .tc-card {
  background: var(--tc-bg-white);
  border-color: var(--tc-border);
}

[data-theme="dark"] .tc-input,
[data-theme="dark"] .tc-select,
[data-theme="dark"] .tc-textarea {
  background: var(--tc-bg);
  color: var(--tc-text);
  border-color: var(--tc-border);
}

[data-theme="dark"] .tc-table th {
  background: var(--tc-bg);
}

[data-theme="dark"] .tc-table tr:hover {
  background: var(--tc-bg-hover);
}

[data-theme="dark"] .tc-toast {
  background: var(--tc-bg-white);
  color: var(--tc-text);
}

/* ==================== 高对比度模式支持 ==================== */
@media (prefers-contrast: high) {
  :root {
    --tc-border: #000000;
    --tc-text-secondary: #000000;
  }
}

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

/* ==================== 焦点样式（无障碍支持）==================== */
/* 修复P0问题：缺少:focus样式 */

/* 全局焦点样式 */
:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 2px;
  border-radius: 2px;
}

/* 按钮焦点样式 */
.tc-btn:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--tc-primary-bg);
}

/* 输入框焦点样式 */
.tc-input:focus-visible,
.tc-select:focus-visible,
.tc-textarea:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: -1px;
  border-color: var(--tc-primary);
  box-shadow: 0 0 0 3px var(--tc-primary-bg);
}

/* 链接焦点样式 */
.tc-nav-link:focus-visible,
.tc-link:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 4px;
  border-radius: 2px;
}

/* 卡片焦点样式 */
.tc-card:focus-visible {
  outline: 2px solid var(--tc-primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px var(--tc-primary-bg);
}

/* 移除默认焦点样式（使用:focus-visible替代） */
:focus:not(:focus-visible) {
  outline: none;
}

/* ==================== Hero变体 ==================== */
/* Home页面特定的Hero样式 */
.tc-hero-home {
  background: linear-gradient(135deg, var(--tc-primary) 0%, var(--tc-primary-light) 100%);
  color: var(--tc-text-white);
  padding: 80px 24px;
  text-align: center;
  margin: -24px -24px 40px -24px;
}

/* ==================== 现代CSS特性支持 ==================== */
/* 修复P2问题：添加现代CSS特性 */

/* CSS容器查询支持（现代浏览器） */
@supports (container-type: inline-size) {
  .tc-container-query {
    container-type: inline-size;
    container-name: tc-component;
  }
  
  /* 在小容器中调整样式 */
  @container tc-component (max-width: 400px) {
    .tc-product-card {
      padding: var(--tc-spacing-sm);
    }
    
    .tc-product-name {
      font-size: 16px;
    }
    
    .tc-btn {
      padding: var(--tc-spacing-xs) var(--tc-spacing-sm);
      font-size: 13px;
    }
  }
}

/* CSS :has() 选择器支持（现代浏览器） */
@supports selector(:has(*)) {
  /* 当表单组包含无效输入时，改变标签颜色 */
  .tc-form-group:has(input:invalid:not(:focus):not(:placeholder-shown)) .tc-form-label {
    color: var(--tc-danger);
  }
  
  /* 当表单组包含有效输入时，改变标签颜色 */
  .tc-form-group:has(input:valid:not(:placeholder-shown)) .tc-form-label {
    color: var(--tc-success);
  }
  
  /* 当卡片被悬停时，调整阴影 */
  .tc-card:has(.tc-card-title):hover {
    box-shadow: var(--tc-shadow-lg);
  }
}

/* CSS aspect-ratio 支持 */
.tc-aspect-ratio-16-9 {
  aspect-ratio: 16 / 9;
}

.tc-aspect-ratio-4-3 {
  aspect-ratio: 4 / 3;
}

.tc-aspect-ratio-1-1 {
  aspect-ratio: 1 / 1;
}

/* CSS gap 属性支持（Flexbox） */
.tc-flex-gap-sm {
  gap: var(--tc-spacing-sm);
}

.tc-flex-gap-md {
  gap: var(--tc-spacing-md);
}

.tc-flex-gap-lg {
  gap: var(--tc-spacing-lg);
}

/* ==================== 工具类（提取自内联样式）==================== */
/* 修复P1问题：提取内联样式为CSS类 */

/* Hero区域 */
.tc-hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.tc-hero-title {
  font-size: 48px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.tc-hero-subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
}

/* 按钮变体 */
.tc-btn-white {
  background: white;
  color: var(--tc-primary);
  font-weight: 600;
}

.tc-btn-white:hover {
  background: #f5f5f5;
  color: var(--tc-primary-dark);
}

.tc-btn-glass {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.tc-btn-glass:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* 部分标题 */
.tc-section-header {
  margin-bottom: 32px;
}

.tc-section-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--tc-text);
  margin-bottom: 12px;
}

.tc-section-subtitle {
  font-size: 16px;
  color: var(--tc-text-secondary);
}

/* 产品组标题 */
.tc-group-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--tc-text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--tc-primary);
}

.tc-group-count {
  font-size: 14px;
  color: var(--tc-text-muted);
  font-weight: 400;
  margin-left: 12px;
}

/* 空状态 */
.tc-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--tc-text-muted);
}

.tc-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  display: block;
}

.tc-empty-title {
  font-size: 20px;
  margin-bottom: 8px;
}

/* Flex工具类 */
.tc-flex-center {
  display: flex;
  gap: 16px;
  justify-content: center;
}

.tc-flex-between {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}

/* 间距工具类 */
.tc-mt-0 { margin-top: 0; }
.tc-mt-sm { margin-top: var(--tc-spacing-sm); }
.tc-mt-md { margin-top: var(--tc-spacing-md); }
.tc-mt-lg { margin-top: var(--tc-spacing-lg); }

.tc-mb-0 { margin-bottom: 0; }
.tc-mb-sm { margin-bottom: var(--tc-spacing-sm); }
.tc-mb-md { margin-bottom: var(--tc-spacing-md); }
.tc-mb-lg { margin-bottom: var(--tc-spacing-lg); }

.tc-pt-lg { padding-top: var(--tc-spacing-lg); }
.tc-pb-lg { padding-bottom: var(--tc-spacing-lg); }

/* 文本对齐 */
.tc-text-center { text-align: center; }
.tc-text-left { text-align: left; }
.tc-text-right { text-align: right; }

/* 最大宽度 */
.tc-max-w-800 { max-width: 800px; margin-left: auto; margin-right: auto; }
.tc-max-w-1200 { max-width: 1200px; margin-left: auto; margin-right: auto; }

/* ==================== 首页专用样式 ==================== */

/* 功能区域 */
.tc-features-section {
  background: var(--tc-bg-white);
  margin: 40px -24px;
  padding: 60px 24px;
}

.tc-features-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.tc-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}

/* 功能卡片 */
.tc-feature-card {
  text-align: center;
  padding: 32px 24px;
}

.tc-feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
}

.tc-feature-icon-primary {
  background: rgba(0, 82, 217, 0.1);
  color: var(--tc-primary);
}

.tc-feature-icon-success {
  background: rgba(0, 168, 112, 0.1);
  color: var(--tc-success);
}

.tc-feature-icon-warning {
  background: rgba(237, 123, 47, 0.1);
  color: var(--tc-warning);
}

.tc-feature-icon-purple {
  background: rgba(128, 96, 231, 0.1);
  color: #805FE7;
}

.tc-feature-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.tc-feature-desc {
  color: var(--tc-text-secondary);
  line-height: 1.6;
}

/* ==================== 响应式设计完善 ==================== */
/* 修复P1问题：添加更多断点的媒体查询 */

/* 平板竖屏：768px及以下 */
@media (max-width: 768px) {
  /* 标题调整 */
  .tc-hero-title {
    font-size: 36px;
  }
  
  .tc-section-title {
    font-size: 28px;
  }
  
  .tc-feature-title {
    font-size: 18px;
  }
  
  /* 网格布局调整 */
  .tc-product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tc-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .tc-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* 卡片调整 */
  .tc-card-body {
    padding: 16px;
  }
  
  .tc-product-card {
    margin-bottom: 16px;
  }
  
  /* 按钮调整 */
  .tc-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .tc-btn-lg {
    padding: 12px 24px;
    font-size: 16px;
  }
  
  /* 表单调整 */
  .tc-form-group {
    margin-bottom: 16px;
  }
  
  .tc-input,
  .tc-select,
  .tc-textarea {
    padding: 10px 12px;
    font-size: 14px;
  }
  
  /* Hero区域调整 */
  .tc-hero-home {
    padding: 60px 16px;
    margin: -16px -16px 32px -16px;
  }
  
  /* 功能区域调整 */
  .tc-features-section {
    margin: 32px -16px;
    padding: 48px 16px;
  }
}

/* 手机横屏：480px及以下 */
@media (max-width: 480px) {
  /* 标题调整 */
  .tc-hero-title {
    font-size: 28px;
  }
  
  .tc-section-title {
    font-size: 24px;
  }
  
  .tc-feature-title {
    font-size: 16px;
  }
  
  /* 网格布局调整：单列 */
  .tc-product-grid {
    grid-template-columns: 1fr;
  }
  
  .tc-features-grid {
    grid-template-columns: 1fr;
  }
  
  .tc-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* 按钮调整 */
  .tc-btn {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .tc-btn-lg {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  /* 表单调整 */
  .tc-input,
  .tc-select,
  .tc-textarea {
    padding: 8px 10px;
    font-size: 13px;
  }
  
  /* Hero区域调整 */
  .tc-hero-home {
    padding: 40px 12px;
    margin: -12px -12px 24px -12px;
  }
  
  /* 功能区域调整 */
  .tc-features-section {
    margin: 24px -12px;
    padding: 36px 12px;
  }
  
  /* 统计数字调整 */
  .tc-stat-number {
    font-size: 36px;
  }
}

/* 手机竖屏：360px及以下 */
@media (max-width: 360px) {
  /* 标题调整 */
  .tc-hero-title {
    font-size: 24px;
  }
  
  .tc-section-title {
    font-size: 20px;
  }
  
  /* 统计网格调整：单列 */
  .tc-stats-grid {
    grid-template-columns: 1fr;
  }
  
  /* 按钮调整 */
  .tc-btn {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  /* Hero区域调整 */
  .tc-hero-home {
    padding: 32px 8px;
    margin: -8px -8px 16px -8px;
  }
  
  /* 功能区域调整 */
  .tc-features-section {
    margin: 16px -8px;
    padding: 24px 8px;
  }
}

/* 产品卡片按钮组 */
.tc-product-footer .tc-btn {
  flex: 1;
}

/* 首页Cta区域 */
.tc-cta-section {
  text-align: center;
  padding: 80px 24px;
  background: linear-gradient(135deg, var(--tc-primary) 0%, var(--tc-primary-light) 100%);
  color: var(--tc-text-white);
  margin: 40px -24px -24px -24px;
}

.tc-cta-title {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 16px;
}

.tc-cta-subtitle {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 32px;
}

/* 统计数字 */
.tc-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  max-width: 1000px;
  margin: 0 auto;
}

.tc-stat-item {
  text-align: center;
}

.tc-stat-number {
  font-size: 48px;
  font-weight: 700;
  color: var(--tc-primary);
  margin-bottom: 8px;
}

.tc-stat-label {
  font-size: 16px;
  color: var(--tc-text-secondary);
}

/* ==================== 动画性能优化 ==================== */
/* 修复P2问题：优化动画性能 */

/* 使用will-change提示浏览器提前优化 */
.tc-fade-in,
.tc-fade-in-up,
.tc-scale-in {
    will-change: transform, opacity;
}

/* 优化盒阴影动画 */
.tc-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

/* 优化背景色过渡 */
.tc-btn {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease;
}

/* 优化图片渲染 */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* 减少动画（用户偏好） */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .tc-fade-in,
    .tc-fade-in-up,
    .tc-scale-in {
        opacity: 1 !important;
        transform: none !important;
    }
}
/* ==================== CSS容器查询测试 ==================== */
/* 修复P2问题：完善容器查询支持 */

/* 为产品卡片添加容器查询支持 */
.tc-product-card-container {
    container-type: inline-size;
    container-name: product-card;
}

@supports (container-type: inline-size) {
    @container product-card (max-width: 300px) {
        .tc-product-card {
            padding: var(--tc-spacing-sm);
        }
        
        .tc-product-name {
            font-size: 16px;
        }
        
        .tc-product-desc {
            font-size: 13px;
            -webkit-line-clamp: 2;
        }
        
        .tc-product-footer {
            flex-direction: column;
        }
        
        .tc-product-footer .tc-btn {
            width: 100%;
        }
    }
}

/* 为统计卡片添加容器查询支持 */
.tc-stat-container {
    container-type: inline-size;
    container-name: stat-card;
}

@supports (container-type: inline-size) {
    @container stat-card (max-width: 200px) {
        .tc-stat-number {
            font-size: 32px;
        }
        
        .tc-stat-label {
            font-size: 14px;
        }
    }
}

/* ==================== WebP图片支持 ==================== */
/* 修复P2问题：添加WebP格式支持 */

/* 使用picture元素支持WebP */
.tc-picture-webp {
    display: block;
    width: 100%;
    height: auto;
}

.tc-picture-webp img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* 回退样式（当浏览器不支持WebP时） */
.tc-img-fallback {
    display: none;
}

picture:not(:supports-type(webp)) .tc-img-fallback {
    display: block;
}

/* ==================== CSS变量统一 ==================== */
/* 修复P2问题：统一前后台CSS变量 */

/* 前台变量（已有） */
:root {
    /* 主色 */
    --tc-primary: #0052D9;
    --tc-primary-light: #2B7DE9;
    --tc-primary-dark: #003BA5;
    --tc-primary-bg: rgba(0, 82, 217, 0.1);
    
    /* 成功/警告/危险 */
    --tc-success: #00A870;
    --tc-warning: #ED7B2F;
    --tc-danger: #E34D59;
    
    /* 背景色 */
    --tc-bg: #F3F5F8;
    --tc-bg-white: #FFFFFF;
    --tc-bg-hover: #F5F7FA;
    --tc-bg-active: #E8EBF0;
    
    /* 文本色 */
    --tc-text: #1A1A1A;
    --tc-text-secondary: #4A4A4A;
    --tc-text-muted: #757575;
    --tc-text-white: #FFFFFF;
    
    /* 边框色 */
    --tc-border: #E8EBF0;
    --tc-border-light: #F0F2F5;
    
    /* 阴影 */
    --tc-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --tc-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --tc-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --tc-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --tc-shadow-hover: 0 12px 32px rgba(0, 0, 0, 0.16);
    
    /* 圆角 */
    --tc-radius-sm: 4px;
    --tc-radius: 6px;
    --tc-radius-md: 8px;
    --tc-radius-lg: 12px;
    --tc-radius-xl: 16px;
    --tc-radius-round: 9999px;
    
    /* 间距 */
    --tc-spacing-xs: 4px;
    --tc-spacing-sm: 8px;
    --tc-spacing-md: 16px;
    --tc-spacing-lg: 24px;
    --tc-spacing-xl: 32px;
    --tc-spacing-xxl: 48px;
}

/* 后台变量（统一为admin-前缀，但保持与前台变量一致的值） */
:root {
    /* 后台主色（与前台一致） */
    --admin-primary: var(--tc-primary);
    --admin-primary-light: var(--tc-primary-light);
    --admin-primary-dark: var(--tc-primary-dark);
    --admin-primary-bg: var(--tc-primary-bg);
    
    /* 后台成功/警告/危险（与前台一致） */
    --admin-success: var(--tc-success);
    --admin-warning: var(--tc-warning);
    --admin-danger: var(--tc-danger);
    
    /* 后台背景色（与前台一致） */
    --admin-bg: var(--tc-bg);
    --admin-bg-white: var(--tc-bg-white);
    --admin-bg-hover: var(--tc-bg-hover);
    --admin-bg-active: var(--tc-bg-active);
    
    /* 后台文本色（与前台一致） */
    --admin-text: var(--tc-text);
    --admin-text-secondary: var(--tc-text-secondary);
    --admin-text-muted: var(--tc-text-muted);
    --admin-text-white: var(--tc-text-white);
    
    /* 后台边框色（与前台一致） */
    --admin-border: var(--tc-border);
    --admin-border-light: var(--tc-border-light);
    
    /* 后台阴影（与前台一致） */
    --admin-shadow-sm: var(--tc-shadow-sm);
    --admin-shadow: var(--tc-shadow);
    --admin-shadow-md: var(--tc-shadow-md);
    --admin-shadow-lg: var(--tc-shadow-lg);
    --admin-shadow-hover: var(--tc-shadow-hover);
    
    /* 后台圆角（与前台一致） */
    --admin-radius-sm: var(--tc-radius-sm);
    --admin-radius: var(--tc-radius);
    --admin-radius-md: var(--tc-radius-md);
    --admin-radius-lg: var(--tc-radius-lg);
    --admin-radius-xl: var(--tc-radius-xl);
    --admin-radius-round: var(--tc-radius-round);
    
    /* 后台间距（与前台一致） */
    --admin-spacing-xs: var(--tc-spacing-xs);
    --admin-spacing-sm: var(--tc-spacing-sm);
    --admin-spacing-md: var(--tc-spacing-md);
    --admin-spacing-lg: var(--tc-spacing-lg);
    --admin-spacing-xl: var(--tc-spacing-xl);
    --admin-spacing-xxl: var(--tc-spacing-xxl);
}

/* ==================== 微交互效果（完善） ==================== */
/* 修复P3问题：完善微交互增强 */

/* 按钮悬停效果增强（涟漪效果） */
.tc-btn {
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
}

.tc-btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease;
}

.tc-btn:hover::after {
  width: 300px;
  height: 300px;
}

.tc-btn:active {
  transform: scale(0.98);
}

/* 卡片悬停效果增强 */
.tc-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tc-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--tc-shadow-lg);
}

/* 表单输入焦点效果增强 */
.tc-form-input:focus {
  transform: translateY(-1px);
}

/* 导航链接悬停效果 */
.tc-nav-link {
  position: relative;
}

.tc-nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--tc-primary);
  transition: width 0.2s ease;
}

.tc-nav-link:hover::after,
.tc-nav-link.active::after {
  width: 100%;
}

/* 表格行悬停效果增强 */
.tc-table tbody tr {
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.tc-table tbody tr:hover {
  transform: scale(1.002);
}

/* 警报关闭按钮效果 */
.tc-alert-close {
  transition: transform 0.2s ease;
}

.tc-alert-close:hover {
  transform: rotate(90deg);
}

/* 下拉菜单动画 */
.tc-dropdown {
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tc-dropdown.show {
  opacity: 1;
  transform: translateY(0);
}

/* 模态框动画 */
.tc-modal {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tc-modal.show {
  opacity: 1;
}

.tc-modal-content {
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.tc-modal.show .tc-modal-content {
  transform: scale(1);
}

/* 工具提示动画 */
.tc-tooltip {
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.tc-tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

/* 滚动到顶部按钮动画 */
.tc-scroll-top {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.tc-scroll-top.show {
  opacity: 1;
  transform: translateY(0);
}

/* 减少动画（用户偏好） */
@media (prefers-reduced-motion: reduce) {
  .tc-btn::after,
  .tc-card:hover,
  .tc-form-input:focus,
  .tc-nav-link::after,
  .tc-table tbody tr:hover,
  .tc-alert-close:hover,
  .tc-dropdown,
  .tc-modal,
  .tc-modal-content,
  .tc-tooltip,
  .tc-scroll-top {
    transform: none !important;
    transition: none !important;
  }
}

/* ===== 用户中心布局与页面组件类（补齐） ===== */
.tc-page-header{margin-bottom:32px;}
.tc-page-title{font-size:24px;font-weight:700;color:var(--tc-text,#1f2937);margin:0;}
.tc-page-subtitle{color:var(--tc-text-secondary,#64748b);margin-top:8px;font-size:14px;}

.tc-stat-icon-blue{background:rgba(27,110,228,.1);color:#1B6EE4;}
.tc-stat-icon-orange{background:rgba(237,123,47,.12);color:#ED7B2F;}
.tc-stat-icon-green{background:rgba(0,168,112,.12);color:#00A870;}
.tc-stat-icon-purple{background:rgba(123,31,162,.12);color:#7B1FA2;}
.tc-stat-link{display:inline-flex;align-items:center;gap:4px;margin-top:8px;font-size:13px;color:var(--tc-primary,#1B6EE4);text-decoration:none;}
.tc-stat-link:hover{text-decoration:underline;}
.tc-dashboard{padding:32px 0;}

.user-layout{display:flex;margin-top:60px;min-height:calc(100vh - 60px);}
.user-sidebar{width:220px;background:#0f172a;color:#cbd5e1;padding:20px 12px;flex-shrink:0;}
.user-sidebar-title{font-weight:700;color:#fff;padding:0 12px 12px;font-size:13px;letter-spacing:.5px;}
.user-sidebar-link{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:8px;margin-bottom:4px;font-size:13px;font-weight:600;text-decoration:none;color:#cbd5e1;}
.user-sidebar-link:hover{background:rgba(255,255,255,.08);color:#fff;}
.user-sidebar-link.active{background:var(--tc-primary,#1B6EE4);color:#fff;}
.user-content{flex:1;padding:24px;background:#f8fafc;}
.user-nav{position:fixed;top:0;left:0;right:0;height:60px;z-index:1000;background:#0f172a;display:flex;align-items:center;justify-content:space-between;padding:0 24px;box-shadow:0 1px 0 rgba(255,255,255,.06);}
.user-nav-logo{color:#fff;font-weight:700;font-size:16px;text-decoration:none;display:flex;align-items:center;gap:8px;}
.user-nav-actions{display:flex;gap:16px;align-items:center;color:#cbd5e1;font-size:13px;}
.user-nav-actions a{color:#94a3b8;text-decoration:none;}
