/*
 * 苍白订单管理系统 — 工作室专业版
 * Design: 像素君 / 2026-07-22
 * Inspired by: 游戏代练工作室系统UI设计说明书
 */

:root {
  /* ===== 主色：深海军蓝 + 暖金 ===== */
  --navy-900: #0f1729;
  --navy-800: #1a2541;
  --navy-700: #243156;
  --navy-600: #2d3e6e;
  --navy-50: #eef1f8;

  --gold-500: #d4a857;
  --gold-400: #e6c080;
  --gold-100: #fbf3e1;
  --gold-50: #fefaf0;

  /* ===== 背景层级 ===== */
  --bg-app: #f3f5f9;
  --bg-card: #ffffff;
  --bg-soft: #f8fafc;
  --bg-hover: #f1f5fb;

  /* ===== 文字 ===== */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-light: #cbd5e1;
  --text-white: #ffffff;

  /* ===== 边框 ===== */
  --border: #e5e9f0;
  --border-soft: #eef1f6;
  --border-light: #f3f5f9;

  /* ===== 语义色 ===== */
  --primary: #d4a857;
  --primary-hover: #c19a48;
  --primary-light: #fef8e8;
  --primary-soft: #fbf3e1;

  --info: #3b82f6;
  --info-light: #dbeafe;
  --info-soft: #eff6ff;

  --success: #10b981;
  --success-light: #d1fae5;
  --success-soft: #f0fdf4;

  --warning: #f59e0b;
  --warning-light: #fed7aa;
  --warning-soft: #fffbeb;

  --danger: #ef4444;
  --danger-light: #fecaca;
  --danger-soft: #fef2f2;

  --purple: #8b5cf6;
  --purple-soft: #f5f3ff;

  --cyan: #06b6d4;
  --cyan-soft: #ecfeff;

  /* ===== 阴影 ===== */
  --shadow-xs: 0 1px 2px rgba(15, 23, 41, 0.04);
  --shadow-sm: 0 1px 3px rgba(15, 23, 41, 0.05), 0 1px 2px rgba(15, 23, 41, 0.04);
  --shadow: 0 2px 6px rgba(15, 23, 41, 0.05), 0 4px 12px rgba(15, 23, 41, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 41, 0.06), 0 6px 18px rgba(15, 23, 41, 0.04);
  --shadow-lg: 0 10px 32px rgba(15, 23, 41, 0.08), 0 4px 12px rgba(15, 23, 41, 0.04);
  --shadow-gold: 0 4px 14px rgba(212, 168, 87, 0.25);

  /* ===== 圆角 ===== */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-2xl: 22px;
  --r-pill: 999px;

  /* ===== 过渡 ===== */
  --t-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --t: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --t-slow: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg-app);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'tnum';
}

a { color: var(--info); text-decoration: none; }

/* ==================== Login ==================== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at top left, rgba(212, 168, 87, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(36, 49, 86, 0.4) 0%, transparent 50%),
    linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 60%, var(--navy-800) 100%);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}
.login-container { width: 100%; max-width: 420px; padding: 24px; position: relative; z-index: 1; }
.login-box {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: var(--r-xl);
  padding: 48px 40px;
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255,255,255,0.5) inset;
  border: 1px solid rgba(255,255,255,0.4);
}
.login-box h1 {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--text-primary);
  letter-spacing: -0.4px;
}
.login-box::before {
  content: '';
  display: block;
  width: 56px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
  border-radius: 2px;
  margin: 0 auto 32px;
}
.login-error {
  color: var(--danger);
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  min-height: 20px;
}

/* ==================== Header ==================== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 28px;
  height: 60px;
  background: var(--bg-card);
  color: var(--text-primary);
  position: fixed;
  top: 0;
  left: 220px;
  right: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
}
.header-left h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: var(--text-primary);
}
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-right .btn-sm {
  background: var(--bg-soft);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 6px 14px;
  font-size: 13px;
  transition: var(--t);
  font-weight: 500;
}
.header-right .btn-sm:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border);
}
.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-right: 4px;
  padding: 4px 14px 4px 4px;
  background: var(--bg-soft);
  border-radius: var(--r-pill);
  border: 1px solid var(--border-soft);
}
.user-info::before {
  content: attr(data-initial);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-900);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ==================== Layout ==================== */
.main-container {
  display: flex;
  margin-top: 60px;
  min-height: calc(100vh - 60px);
}

/* ==================== Sidebar ==================== */
.sidebar {
  width: 220px;
  background: linear-gradient(180deg, var(--navy-900) 0%, var(--navy-800) 100%);
  flex-shrink: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(212,168,87,0.15), transparent);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.sidebar-brand::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,168,87,0.3), transparent);
}
.sidebar-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-900);
  font-weight: 800;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(212,168,87,0.4);
}
.sidebar-brand-text {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.sidebar-nav {
  flex: 1;
  padding: 12px 0 16px;
  overflow-y: auto;
}
.sidebar a {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: rgba(255,255,255,0.65);
  font-size: 13.5px;
  transition: var(--t);
  border-left: 3px solid transparent;
  gap: 8px;
  position: relative;
}
.sidebar a:hover {
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.04);
}
.sidebar a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(212,168,87,0.12), transparent);
  border-left-color: var(--gold-500);
  font-weight: 500;
}
.sidebar a.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--gold-500);
  border-radius: 0 2px 2px 0;
}
.sidebar .nav-group { margin-top: 6px; }
.sidebar .nav-group-title {
  padding: 12px 20px 4px;
  font-size: 13px;
  font-weight: 700;
  color: #FFD470;
  cursor: pointer;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}
.sidebar .nav-group-title::before {
  content: '';
  width: 12px;
  height: 1px;
  background: rgba(212,168,87,0.4);
}
.sidebar .nav-group .nav-group-items { margin-left: 0; }
.sidebar .nav-group .nav-group-items a {
  padding-left: 36px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}
.sidebar .nav-group .nav-group-items a:hover {
  color: rgba(255,255,255,0.95);
  background: rgba(255,255,255,0.04);
}
.sidebar .nav-group .nav-group-items a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(212,168,87,0.12), transparent);
  border-left-color: var(--gold-500);
}
.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  text-align: center;
  letter-spacing: 0.5px;
}

/* ==================== Content ==================== */
.content {
  flex: 1;
  margin-left: 220px;
  padding: 24px 28px;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
}

/* ==================== Cards ==================== */
.card {
  background: var(--bg-card);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  border: 1px solid var(--border-soft);
  transition: var(--t);
  overflow: hidden;
}
.card:hover { box-shadow: var(--shadow); }
.card-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-soft);
  font-weight: 600;
  font-size: 14.5px;
  color: var(--text-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
}
.card-body { padding: 20px; }
.card-title-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}
.card-title-bar::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--gold-500);
  border-radius: 2px;
}

/* ==================== Tabs ==================== */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 0;
  background: var(--bg-card);
  padding: 0 8px;
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.tab {
  padding: 12px 18px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: var(--t);
  font-weight: 500;
  white-space: nowrap;
}
.tab:hover { color: var(--text-primary); }
.tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--gold-500);
  font-weight: 600;
}

/* ==================== Forms ==================== */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-secondary);
}
.form-group label .required { color: var(--danger); margin-right: 2px; }
input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--bg-card);
  transition: var(--t-fast);
}
input:hover, select:hover, textarea:hover {
  border-color: var(--text-light);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(212, 168, 87, 0.12);
}
textarea { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 14px; }
.form-row .form-group { flex: 1; }

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--t);
  gap: 6px;
  letter-spacing: 0.1px;
  white-space: nowrap;
  line-height: 1.2;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 2px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-900);
  box-shadow: 0 1px 2px rgba(212,168,87,0.25);
  font-weight: 600;
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.btn-default {
  background: var(--bg-card);
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-default:hover {
  border-color: var(--gold-500);
  color: var(--gold-500);
  background: var(--gold-50);
}

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }

.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #d97706; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }

.btn-info { background: var(--info); color: #fff; }
.btn-info:hover { background: #2563eb; }

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

.btn-sm { padding: 5px 12px; font-size: 12.5px; border-radius: var(--r-xs); }
.btn-xs { padding: 3px 9px; font-size: 11.5px; border-radius: var(--r-xs); font-weight: 500; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ==================== Table ==================== */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--r-sm);
  background: var(--bg-card);
}
table { width: 100%; border-collapse: separate; border-spacing: 0; }
table th, table td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-soft);
  font-size: 13.5px;
  vertical-align: middle;
}
table th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  font-size: 12px;
  letter-spacing: 0.3px;
  position: sticky;
  top: 0;
  z-index: 1;
}
table th:first-child { border-top-left-radius: var(--r-sm); }
table th:last-child { border-top-right-radius: var(--r-sm); }
table tr:hover td { background: var(--bg-hover); }
table tr:last-child td { border-bottom: none; }
table td { color: var(--text-primary); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-red { color: var(--danger); }
.text-green { color: var(--success); }
.text-blue { color: var(--info); }
.text-orange { color: var(--warning); }
.text-gold { color: var(--gold-500); }
.text-brown { color: #92400e; }
.text-muted { color: var(--text-muted); }

/* ==================== Tags / Pills ==================== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  gap: 4px;
  line-height: 1.5;
}
.tag-blue { background: var(--info-soft); color: var(--info); }
.tag-green { background: var(--success-soft); color: var(--success); }
.tag-red { background: var(--danger-soft); color: var(--danger); }
.tag-orange { background: var(--warning-soft); color: var(--warning); }
.tag-purple { background: var(--purple-soft); color: var(--purple); }
.tag-gold { background: var(--gold-soft); color: var(--gold-500); }
.tag-cyan { background: var(--cyan-soft); color: var(--cyan); }
.tag-gray { background: var(--bg-hover); color: var(--text-secondary); }
.tag-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ==================== Modal ==================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 41, 0.55);
  backdrop-filter: blur(6px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.modal.show { display: flex; }
.modal-content {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  width: 92%;
  max-width: 680px;
  max-height: 86vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  user-select: none;
  animation: modalIn 0.25s ease-out;
}
@keyframes modalIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.modal-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  background: var(--bg-card);
  flex-shrink: 0;
}
.modal-header h3 {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.modal-header h3::before {
  content: '';
  width: 3px;
  height: 14px;
  background: var(--gold-500);
  border-radius: 2px;
}
.modal-close {
  font-size: 18px;
  cursor: pointer;
  color: var(--text-muted);
  background: none;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--t);
  line-height: 1;
}
.modal-close:hover { color: var(--danger); background: var(--danger-soft); }
.modal-body { padding: 22px; overflow-y: auto; flex: 1; }
.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: var(--bg-soft);
  flex-shrink: 0;
}

/* ==================== Toast ==================== */
.toast {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast-item {
  padding: 11px 20px;
  border-radius: var(--r-sm);
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  animation: slideIn 0.25s ease;
  min-width: 200px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toast-item::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 0 0 4px rgba(255,255,255,0.2);
}
.toast-success { background: linear-gradient(135deg, #10b981, #34d399); }
.toast-error { background: linear-gradient(135deg, #ef4444, #f87171); }
.toast-info { background: linear-gradient(135deg, var(--navy-700), var(--navy-600)); }
@keyframes slideIn {
  from { transform: translateX(120%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==================== Search/Filter Bar ==================== */
.search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  align-items: center;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--r-md);
  border: 1px solid var(--border-soft);
}
.search-bar select, .search-bar input {
  width: auto;
  min-width: 140px;
  padding: 7px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  font-size: 13.5px;
}
.search-bar .btn { white-space: nowrap; }

/* ==================== Stats Cards ==================== */
.stats-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-soft);
  flex: 1;
  min-width: 180px;
  transition: var(--t);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--gold-500);
  opacity: 0;
  transition: var(--t);
}
.stat-card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.stat-card:hover::before { opacity: 1; }
.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 8px;
  letter-spacing: -0.5px;
  line-height: 1.1;
}
.stat-card .stat-value.text-gold { color: var(--gold-500); }
.stat-card .stat-value.text-blue { color: var(--info); }
.stat-card .stat-value.text-green { color: var(--success); }
.stat-card .stat-value.text-orange { color: var(--warning); }
.stat-card .stat-value.text-red { color: var(--danger); }
.stat-card .stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.stat-card .stat-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  background: var(--gold-50);
  color: var(--gold-500);
}
.stat-card .stat-icon.blue { background: var(--info-soft); color: var(--info); }
.stat-card .stat-icon.green { background: var(--success-soft); color: var(--success); }
.stat-card .stat-icon.orange { background: var(--warning-soft); color: var(--warning); }
.stat-card .stat-icon.red { background: var(--danger-soft); color: var(--danger); }

/* ==================== Work Status ==================== */
.work-status {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  background: var(--success-soft);
  border-radius: var(--r-md);
  margin-bottom: 18px;
  border: 1px solid var(--success-light);
}
.work-status.off {
  background: var(--danger-soft);
  border-color: var(--danger-light);
}
.work-status .status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.work-status .status-dot.on { background: var(--success); box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15); animation: pulse 2s infinite; }
.work-status .status-dot.off { background: #cbd5e1; }
@keyframes pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.6; transform: scale(0.95); } }

/* ==================== Detail Rows ==================== */
.detail-row {
  display: flex;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: var(--bg-soft);
  border-radius: var(--r-sm);
}
.detail-row:hover { background: var(--bg-hover); }
.detail-label {
  min-width: 96px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 13px;
}
.detail-value { flex: 1; word-break: break-all; font-size: 13.5px; }

.truncate {
  max-width: 150px;
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: default;
  vertical-align: bottom;
}
.truncate.copyable { cursor: pointer; }
.truncate.copyable:hover { color: var(--gold-500); }

/* ==================== Priority ==================== */
.priority-长期 { color: var(--info); font-weight: 500; }
.priority-普通 { color: var(--text-secondary); }
.priority-重要 { color: #92400e; font-weight: 600; }
.priority-紧急 { color: var(--danger); font-weight: 600; }

/* ==================== Tier Badges ==================== */
.tier-铜牌 { background: linear-gradient(135deg, #b45309, #d97706); color: #fff; padding: 2px 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 500; }
.tier-银牌 { background: linear-gradient(135deg, #94a3b8, #cbd5e1); color: #1e293b; padding: 2px 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 500; }
.tier-金牌 { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: #78350f; padding: 2px 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 500; }
.tier-钻石 { background: linear-gradient(135deg, #38bdf8, #7dd3fc); color: #0c4a6e; padding: 2px 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 500; }
.tier-黑钻 { background: linear-gradient(135deg, #1e293b, #475569); color: #f1f5f9; padding: 2px 10px; border-radius: var(--r-pill); font-size: 11.5px; font-weight: 500; }
.tier-普通 { color: var(--text-muted); padding: 2px 6px; font-size: 11.5px; }

/* ==================== Empty State ==================== */
.empty-state {
  padding: 56px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13.5px;
}
.empty-state::before {
  content: '∅';
  display: block;
  font-size: 32px;
  color: var(--text-light);
  margin-bottom: 8px;
}

/* ==================== Pagination ==================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 18px;
  padding: 12px 0;
}
.pagination button {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: var(--t);
  font-weight: 500;
}
.pagination button:hover:not(:disabled) { border-color: var(--gold-500); color: var(--gold-500); background: var(--gold-50); }
.pagination button.active {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-900);
  border-color: var(--gold-500);
  font-weight: 600;
}
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==================== Sidebar Navigation ==================== */
.nav-group .collapse-arrow {
  font-size: 10px;
  transition: transform 0.2s;
  display: inline-block;
  margin-right: 6px;
  color: rgba(255,255,255,0.4);
}
.nav-group.collapsed .collapse-arrow { transform: rotate(-90deg); }
.nav-group.collapsed .nav-group-items { display: none; }

/* ==================== Game Tabs ==================== */
.game-tabs { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.game-tab {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 12.5px;
  cursor: pointer;
  color: var(--text-secondary);
  background: var(--bg-card);
  transition: var(--t);
  font-weight: 500;
}
.game-tab:hover { border-color: var(--gold-500); color: var(--gold-500); }
.game-tab.active {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-900);
  border-color: var(--gold-500);
  font-weight: 600;
}

/* ==================== Copyable Text ==================== */
.copyable {
  cursor: pointer;
  border-bottom: 1.5px dashed var(--border);
  transition: var(--t);
  padding-bottom: 1px;
}
.copyable:hover { color: var(--gold-500); border-bottom-color: var(--gold-500); }

/* ==================== Bar Chart ==================== */
.bar-chart { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: flex; align-items: center; gap: 10px; }
.bar-label { min-width: 72px; font-size: 13px; font-weight: 500; text-align: right; color: var(--text-secondary); }
.bar-track { flex: 1; height: 24px; background: var(--bg-soft); border-radius: var(--r-pill); overflow: hidden; }
.bar-fill {
  height: 100%;
  border-radius: var(--r-pill);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 2px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
}
.bar-value { min-width: 130px; font-size: 13px; color: var(--text-primary); white-space: nowrap; font-weight: 500; }

/* ==================== Dropdown Menu ==================== */
.dropdown-btn { position: relative; }
.dropdown-menu {
  position: fixed;
  z-index: 9999;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-lg);
  min-width: 130px;
  padding: 6px 0;
  animation: dropIn 0.15s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.dropdown-menu a {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  transition: var(--t-fast);
  gap: 8px;
}
.dropdown-menu a:hover { background: var(--bg-hover); color: var(--gold-500); }

@keyframes silverShine {
  0%, 100% { box-shadow: 0 0 4px rgba(192,192,192,0.4); }
  50% { box-shadow: 0 0 12px rgba(192,192,192,0.9), 0 0 20px rgba(220,220,220,0.5); }
}

/* ==================== Toggle Switch ==================== */
.toggle-switch {
  display: inline-block;
  padding: 5px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: var(--t);
  font-weight: 500;
}
.toggle-switch:hover { border-color: var(--gold-500); color: var(--gold-500); }
.toggle-switch.active {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-900);
  border-color: var(--gold-500);
  font-weight: 600;
}

/* ==================== Image Lightbox ==================== */
.img-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 41, 0.92);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}
.img-lightbox.show { display: flex; }
.img-lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  transition: transform 0.2s;
  cursor: pointer;
  border-radius: var(--r-sm);
}
.img-close {
  position: absolute;
  top: 20px;
  right: 28px;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.1);
  transition: var(--t);
}
.img-close:hover { background: rgba(255,255,255,0.2); }

/* ==================== Image Upload ==================== */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--r-md);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: var(--t);
  color: var(--text-muted);
  background: var(--bg-soft);
}
.upload-area:hover { border-color: var(--gold-500); background: var(--gold-50); color: var(--gold-500); }

/* ==================== Filter Section ==================== */
.filter-section {
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid var(--border-soft);
}

/* ==================== Section Title ==================== */
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-title::before {
  content: '';
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, var(--gold-500), var(--gold-400));
  border-radius: 2px;
}

/* ==================== Floating Action Button ==================== */
.fab {
  position: fixed;
  right: 28px;
  bottom: 28px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  box-shadow: var(--shadow-gold);
  cursor: pointer;
  transition: var(--t);
  z-index: 50;
  border: none;
}
.fab:hover { transform: scale(1.08) rotate(90deg); }

/* ==================== Alert ==================== */
.alert {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  margin-bottom: 14px;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid;
}
.alert-info { background: var(--info-soft); color: var(--info); border-color: var(--info-light); }
.alert-success { background: var(--success-soft); color: var(--success); border-color: var(--success-light); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border-color: var(--warning-light); }
.alert-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-light); }

/* ==================== Avatar ==================== */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
  color: var(--navy-900);
  font-weight: 600;
  font-size: 12px;
  flex-shrink: 0;
}
.avatar.blue { background: linear-gradient(135deg, #3b82f6, #60a5fa); color: #fff; }
.avatar.green { background: linear-gradient(135deg, #10b981, #34d399); color: #fff; }
.avatar.purple { background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: #fff; }

/* ==================== Modal Wide Variants ==================== */
.modal-content.wide { max-width: 1100px; }
.modal-content.narrow { max-width: 420px; }

/* ==================== Custom Checkbox ==================== */
.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.checkbox input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--gold-500);
}

/* ==================== Responsive ==================== */
@media (max-width: 900px) {
  .sidebar { width: 200px; }
  .content { margin-left: 200px; padding: 16px; }
  .header { left: 200px; padding: 0 16px; }
  .stat-card { min-width: 140px; padding: 16px; }
  .stat-card .stat-value { font-size: 22px; }
}

/* 16:9 wide screen optimization */
@media (min-width: 1400px) {
  .card { max-width: 1400px; }
}
/* 21:9 ultrawide screen optimization */
@media (min-width: 2100px) {
  .card { max-width: 1800px; }
  .content { padding: 24px 48px; }
}

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 41, 0.15);
  border-radius: var(--r-pill);
  transition: var(--t);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 41, 0.3);
}

/* ==================== Selection ==================== */
::selection {
  background: rgba(212, 168, 87, 0.25);
  color: var(--text-primary);
}

/* ==================== Utility ==================== */
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-xs { font-size: 11.5px; }
.text-sm { font-size: 12.5px; }
.text-lg { font-size: 16px; }
.font-bold { font-weight: 600; }
.font-medium { font-weight: 500; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.rounded { border-radius: var(--r-sm); }
.rounded-md { border-radius: var(--r-md); }
.rounded-lg { border-radius: var(--r-lg); }
.rounded-full { border-radius: var(--r-pill); }
.shadow { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.bg-white { background: var(--bg-card); }
.bg-soft { background: var(--bg-soft); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.border { border: 1px solid var(--border); }
.border-soft { border: 1px solid var(--border-soft); }
.transition { transition: var(--t); }
.cursor-pointer { cursor: pointer; }
.relative { position: relative; }
.absolute { position: absolute; }
.inline-flex { display: inline-flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.truncate-1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* click-to-copy cells */
.copy-cell {
  cursor: pointer;
  transition: color 0.2s;
}
.copy-cell:hover {
  color: var(--gold-500);
}
