/* ========================================
   沈阳同城零工平台 - 全局样式（优化版）
   设计风格：现代专业 + 温暖可靠 + 本地信任感
   紧凑布局 · 减少留白 · 提升信息密度
   ======================================== */

:root {
  /* 主色调 - 深蓝灰 + 活力橙 */
  --primary: #1a2a3a;
  --primary-light: #2d4a5e;
  --accent: #f07427;
  --accent-hover: #d9651f;
  --accent-light: #fff3e8;
  
  /* 辅助色 */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* 中性色 */
  --bg: #f5f7fa;
  --bg-dark: #0f172a;
  --surface: #ffffff;
  --surface-hover: #f1f5f9;
  --border: #e8ecf1;
  --border-light: #f1f5f9;
  
  /* 文字色 */
  --text-primary: #1a2332;
  --text-secondary: #5a6a7e;
  --text-muted: #8e9bae;
  --text-inverse: #ffffff;
  
  /* 字体 */
  --font-display: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-body: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  
  /* 尺寸 - 紧凑化 */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  
  /* 阴影 - 轻量化 */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 6px 24px rgba(0,0,0,0.08);
  --shadow-accent: 0 4px 16px rgba(240,116,39,0.18);
  
  /* 间距 - 紧凑化 */
  --section-gap: 28px;
  --container-max: 1280px;
}

/* 基础重置 */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: all 0.2s; }
img { max-width: 100%; display: block; }
button { border: none; background: none; cursor: pointer; font-family: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; outline: none; }

/* 容器 */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* ========================================
   按钮组件 - 更紧凑
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--text-inverse);
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(240,116,39,0.3);
}
.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border: 1.5px solid var(--border);
}
.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
}
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--accent); }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 5px; }
.btn-lg { padding: 11px 24px; font-size: 15px; border-radius: var(--radius); }

/* ========================================
   顶部导航栏 - 紧凑化
   ======================================== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  transition: all 0.3s;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo-icon {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff9a56 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  font-weight: 700;
}
.logo-text {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.logo-text span { color: var(--accent); }
.nav-menu {
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-menu a {
  padding: 6px 12px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: 6px;
  font-weight: 500;
  position: relative;
  transition: all 0.2s;
}
.nav-menu a:hover,
.nav-menu a.active {
  color: var(--accent);
  background: var(--accent-light);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.city-selector {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  background: var(--bg);
  border-radius: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  cursor: pointer;
  border: 1px solid var(--border);
}
.city-selector:hover { border-color: var(--accent); }

/* ========================================
   底部信息栏 - 紧凑化
   ======================================== */
.footer {
  background: var(--primary);
  color: rgba(255,255,255,0.7);
  padding: 28px 0 16px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
  gap: 20px;
  margin-bottom: 20px;
}
.footer-brand .logo-text { color: white; margin-bottom: 10px; }
.footer-brand p {
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 10px;
}
.footer-title {
  color: white;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.footer-links li { margin-bottom: 6px; }
.footer-links a {
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}
.footer-links a:hover { color: var(--accent); }
.footer-contact p {
  font-size: 13px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.footer-contact .phone {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin: 4px 0;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}
.footer-bottom a { color: rgba(255,255,255,0.45); margin-left: 16px; }
.footer-bottom a:hover { color: var(--accent); }

/* ========================================
   通用板块标题 - 紧凑化
   ======================================== */
.section-header {
  text-align: center;
  margin-bottom: 14px;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  border-radius: 100px;
  margin-bottom: 4px;
}
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
  letter-spacing: -0.3px;
}
.section-desc {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* ========================================
   卡片组件
   ======================================== */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: all 0.3s;
}
.card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.card-body { padding: 14px; }

/* ========================================
   标签组件
   ======================================== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
}
.tag-urgent {
  background: #fef2f2;
  color: var(--danger);
}
.tag-hot {
  background: var(--accent-light);
  color: var(--accent);
}
.tag-cert {
  background: #ecfdf5;
  color: var(--success);
}
.tag-settle {
  background: #eff6ff;
  color: var(--info);
}

/* ========================================
   悬浮客服
   ======================================== */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
}
.chat-btn {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--accent) 0%, #ff9a56 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  box-shadow: 0 4px 16px rgba(240,116,39,0.35);
  cursor: pointer;
  transition: all 0.3s;
}
.chat-btn:hover { transform: scale(1.08); }

/* ========================================
   轮播图
   ======================================== */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
}
.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel-slide {
  min-width: 100%;
  position: relative;
}
.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.carousel-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.35);
  cursor: pointer;
  transition: all 0.3s;
}
.carousel-dot.active {
  width: 20px;
  border-radius: 4px;
  background: white;
}

/* ========================================
   筛选器
   ======================================== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.filter-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-item label {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.filter-item select,
.filter-item input {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-primary);
  background: var(--bg);
  min-width: 100px;
}
.filter-item select:focus,
.filter-item input:focus {
  border-color: var(--accent);
}

/* ========================================
   分页
   ======================================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
}
.pagination a,
.pagination span {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.pagination a:hover,
.pagination span.current {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* ========================================
   响应式
   ======================================== */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .nav-menu { display: none; }
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .section-title { font-size: 18px; }
  :root { --section-gap: 24px; }
  .container { padding: 0 16px; }
}

/* ========================================
   动画
   ======================================== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.animate-fadeInUp {
  animation: fadeInUp 0.5s ease-out forwards;
}

/* 滚动显示 */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease-out;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ========================================
   后台布局
   ======================================== */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: var(--bg);
}
.sidebar {
  width: 240px;
  background: var(--primary);
  color: white;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 100;
}
.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-header .logo-text { color: white; font-size: 16px; }
.sidebar-menu { padding: 12px 8px; }
.sidebar-menu li { margin-bottom: 2px; }
.sidebar-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  transition: all 0.2s;
}
.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: rgba(255,255,255,0.08);
  color: white;
}
.sidebar-menu a.active {
  background: var(--accent);
  color: white;
}
.main-content {
  flex: 1;
  margin-left: 240px;
  padding: 20px 24px;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.page-title { font-size: 20px; font-weight: 700; }
.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff9a56);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 13px;
}

/* 数据卡片 */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 18px;
  border: 1px solid var(--border);
}
.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.stat-trend {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.data-table th,
.data-table td {
  padding: 10px 16px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--border-light);
}
.data-table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
}
.data-table tr:hover { background: var(--surface-hover); }
.data-table tr:last-child td { border-bottom: none; }

/* 状态标签 */
.status-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 500;
}
.status-tag::before {
  content: '';
  width: 5px; height: 5px;
  border-radius: 50%;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-pending::before { background: var(--warning); }
.status-active { background: #d1fae5; color: #065f46; }
.status-active::before { background: var(--success); }
.status-done { background: #dbeafe; color: #1e40af; }
.status-done::before { background: var(--info); }
.status-cancel { background: #fee2e2; color: #991b1b; }
.status-cancel::before { background: var(--danger); }

/* 表单 */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: all 0.2s;
  background: var(--surface);
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(240,116,39,0.08);
}
.form-textarea { resize: vertical; min-height: 80px; }

/* 标签页 */
.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
}
.tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
}
.tab:hover { color: var(--text-primary); }
.tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ========================================
   移动端响应式适配
   ======================================== */
@media (max-width: 768px) {
  * { box-sizing: border-box; }
  body { font-size: 16px; -webkit-text-size-adjust: 100%; }
  .container { padding: 0 16px; }
  .section-title { font-size: 20px; }
  .section-desc { font-size: 13px; }

  .nav-menu { display: none; }
  .nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--primary);
    padding: 16px;
    z-index: 999;
  }
  .nav-menu.active a {
    padding: 12px 0;
    color: white;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  .mobile-menu-btn { display: block !important; }

  .hero-section { padding: 32px 0; min-height: auto; }
  .worker-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .worker-card { padding: 10px 8px; }
  .job-grid { grid-template-columns: 1fr; gap: 10px; }
  .scene-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .scene-card { padding: 16px 12px; }
  .case-grid { grid-template-columns: 1fr; }

  .filter-bar { flex-direction: column; gap: 6px; }
  .filter-bar select,
  .filter-bar input { width: 100%; }

  .login-container { padding: 16px; }
  .login-card { padding: 20px 16px; }
  .form-input { font-size: 16px; }

  .data-table-wrapper { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 600px; }
  .sidebar { width: 100%; transform: translateX(-100%); transition: transform .3s; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }

  .btn { padding: 8px 14px; font-size: 13px; }
  .form-group { margin-bottom: 14px; }
  .pagination { flex-wrap: wrap; }

  .footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }
}

@media (max-width: 480px) {
  .worker-grid,
  .worker-grid-page { grid-template-columns: 1fr; }
  .scene-grid { grid-template-columns: 1fr; }
}
