/* 推薪客统一移动端适配框架 */
/* 橙色主题 + 全设备自适应 */

/* ===== 核心CSS变量（橙色主题） ===== */
:root {
  --primary: #F97316;
  --primary-dark: #EA580C;
  --primary-light: #FB923C;
  --primary-bg: #FFF7ED;
  --accent-color: #F97316;
  --accent-hover: #EA580C;
  --accent-light: #FED7AA;
  
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;
  --bg: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --card-bg: #FFFFFF;
  --border-color: #E2E8F0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
}

/* ===== 深色模式 ===== */
[data-theme="dark"] {
  --text-primary: #F1F5F9;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --bg: #0F172A;
  --bg-secondary: #1E293B;
  --card-bg: #1E293B;
  --border-color: #334155;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.4);
}

/* ===== 响应式容器 ===== */
.tkx-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

.tkx-container-fluid {
  width: 100%;
  padding: 0 20px;
  box-sizing: border-box;
}

/* ===== 网格系统 ===== */
.tkx-grid {
  display: grid;
  gap: 16px;
}

.tkx-grid-2 { grid-template-columns: repeat(2, 1fr); }
.tkx-grid-3 { grid-template-columns: repeat(3, 1fr); }
.tkx-grid-4 { grid-template-columns: repeat(4, 1fr); }
.tkx-grid-6 { grid-template-columns: repeat(6, 1fr); }

/* ===== 橙色按钮系统 ===== */
.tkx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  user-select: none;
}

.tkx-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}
.tkx-btn-primary:hover {
  box-shadow: 0 4px 12px rgba(249,115,22,0.4);
  transform: translateY(-1px);
}

.tkx-btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-color);
  color: var(--text-primary);
}
.tkx-btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.tkx-btn-sm { padding: 6px 12px; font-size: 12px; }
.tkx-btn-lg { padding: 14px 28px; font-size: 16px; }

/* ===== 橙色卡片 ===== */
.tkx-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  padding: 20px;
  transition: box-shadow 0.2s;
}
.tkx-card:hover {
  box-shadow: var(--shadow-md);
}

/* ===== 表单系统 ===== */
.tkx-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  background: var(--bg);
  color: var(--text-primary);
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tkx-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}

.tkx-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ===== 状态标签 ===== */
.tkx-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}
.tkx-badge-active { background: #DCFCE7; color: #15803D; }
.tkx-badge-pending { background: #FEF9C3; color: #A16207; }
.tkx-badge-inactive { background: #FEF2F2; color: #DC2626; }
.tkx-badge-primary { background: var(--primary-bg); color: var(--primary-dark); }

/* ===== 页面头部（橙色渐变） ===== */
.tkx-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 28px 24px;
}
.tkx-header h1 { font-size: 24px; font-weight: 700; margin: 0 0 8px; }
.tkx-header p { font-size: 14px; opacity: 0.9; margin: 0; }

/* ===== 空状态 ===== */
.tkx-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.tkx-empty i { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }

/* ===== Toast通知 ===== */
.tkx-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1E293B;
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s;
}
.tkx-toast.show { opacity: 1; }

/* ===== 加载LOGO ===== */
.tkx-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: tkx-spin 0.6s linear infinite;
}
@keyframes tkx-spin { to { transform: rotate(360deg); } }

/* ===== 响应式断点 ===== */

/* 平板（≤1024px） */
@media (max-width: 1024px) {
  .tkx-grid-4 { grid-template-columns: repeat(3, 1fr); }
  .tkx-grid-6 { grid-template-columns: repeat(3, 1fr); }
}

/* 小屏（≤768px） */
@media (max-width: 768px) {
  .tkx-grid-3, .tkx-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .tkx-grid-6 { grid-template-columns: repeat(2, 1fr); }
  .tkx-header { padding: 20px 16px; }
  .tkx-header h1 { font-size: 20px; }
  .tkx-container { padding: 0 12px; }
}

/* 手机（≤480px） */
@media (max-width: 480px) {
  .tkx-grid-2, .tkx-grid-3, .tkx-grid-4, .tkx-grid-6 { 
    grid-template-columns: 1fr; 
  }
  .tkx-btn { width: 100%; justify-content: center; }
  .tkx-card { padding: 14px; }
  .tkx-header { padding: 16px 12px; }
  .tkx-header h1 { font-size: 18px; }
  .tkx-header p { font-size: 13px; }
}
