﻿/* ===== CSS Variables ===== */
:root {
  --primary: #1e3a5f;
  --primary-light: #2c5282;
  --primary-dark: #15304d;
  --primary-bg: #0f2942;
  --accent: #f59e0b;
  --accent-light: #fbbf24;
  --accent-bg: #fef3c7;
  --success: #10b981;
  --success-bg: #d1fae5;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --danger: #ef4444;
  --danger-bg: #fee2e2;
  --info: #3b82f6;
  --info-bg: #dbeafe;
  --bg: #f1f5f9;
  --card: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  --sidebar-width: 240px;
  --header-height: 64px;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  min-width: 1200px;
  overflow-x: auto;
}

/* ===== Login Page ===== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0f3460 0%, #1a5276 50%, #2980b9 100%);
  position: relative;
  overflow: hidden;
}
.login-wrap::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.15) 0%, transparent 70%);
  top: -200px; right: -100px;
  border-radius: 50%;
}
.login-wrap::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(41, 128, 185, 0.15) 0%, transparent 70%);
  bottom: -100px; left: -100px;
  border-radius: 50%;
}
.login-box {
  width: 400px;
  background: #fff;
  border-radius: 20px;
  padding: 44px 36px 36px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
  position: relative;
  z-index: 1;
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}
.login-logo-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid rgba(0, 150, 199, 0.2);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.login-logo h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}
.login-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.login-box .form-item {
  margin-bottom: 20px;
}
.login-box .form-item label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.login-box .form-item input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
  background: #f8fafc;
}
.login-box .form-item input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}
.btn-login {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #00b4d8 0%, #0096c7 50%, #0077b6 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  letter-spacing: 2px;
  box-shadow: 0 6px 20px rgba(0, 150, 199, 0.4);
}
.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 150, 199, 0.5);
}
.btn-login:active { transform: translateY(0); }
.login-tip {
  margin-top: 16px;
  font-size: 13px;
  color: var(--danger);
  text-align: center;
  min-height: 20px;
}
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0 8px;
}
.login-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  user-select: none;
}
.login-option input[type="checkbox"] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}
.login-option:hover {
  color: var(--primary);
}

/* ===== Sidebar ===== */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: var(--sidebar-width);
  background: linear-gradient(180deg, var(--primary-bg) 0%, #0a1f33 100%);
  z-index: 100;
  display: flex;
  flex-direction: column;
}
.sidebar-logo {
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  gap: 12px;
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.sidebar-logo .logo-text {
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}
.sidebar-logo .logo-text small {
  display: block;
  font-weight: 400;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 2px;
}
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 2px; }
.nav-group { margin-bottom: 4px; }
.nav-group-title {
  padding: 8px 20px 4px;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}
.nav-item {
  display: flex;
  align-items: center;
  padding: 10px 20px;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  transition: all 0.2s;
  gap: 12px;
  font-size: 13.5px;
  border-left: 3px solid transparent;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}
.nav-item.active {
  background: rgba(245,158,11,0.12);
  color: var(--accent-light);
  border-left-color: var(--accent);
}
.nav-item .nav-icon {
  width: 18px; height: 18px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 600;
}
.sidebar-footer {
  padding: 16px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-footer .avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}
.sidebar-footer .user-info { flex: 1; min-width: 0; }
.sidebar-footer .user-name { color: #fff; font-size: 13px; font-weight: 500; }
.sidebar-footer .user-role { color: rgba(255,255,255,0.5); font-size: 11px; }

/* ===== Header ===== */
.header {
  position: fixed;
  left: var(--sidebar-width); right: 0; top: 0;
  height: var(--header-height);
  background: var(--card);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  z-index: 90;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
}
.page-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.page-breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-btn {
  width: 38px; height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
  position: relative;
  border: none;
  background: transparent;
}
.header-btn:hover {
  background: var(--bg);
  color: var(--primary);
}
.header-btn .dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--card);
}
.header-divider {
  width: 1px; height: 24px;
  background: var(--border);
  margin: 0 8px;
}
.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
}
.header-user:hover { background: var(--bg); }
.header-user .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
}
.header-user .name { font-size: 13px; font-weight: 500; color: var(--text-primary); }

/* ===== Main Content ===== */
.main {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  padding: 24px;
  min-height: calc(100vh - var(--header-height));
}
.content-body { animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== Cards ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  overflow: hidden;
  margin-bottom: 16px;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title::before {
  content: '';
  width: 3px; height: 16px;
  background: var(--accent);
  border-radius: 2px;
}
.card-body { padding: 20px; }

/* ===== Stat Cards ===== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  position: relative;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.stat-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
}
.stat-card.primary::before { background: var(--primary); }
.stat-card.accent::before { background: var(--accent); }
.stat-card.success::before { background: var(--success); }
.stat-card.danger::before { background: var(--danger); }
.stat-card .stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-card .stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.stat-card .stat-unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 4px;
}
.stat-card .stat-trend {
  margin-top: 8px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.stat-trend.up { color: var(--danger); }
.stat-trend.down { color: var(--success); }
.stat-card .stat-icon {
  position: absolute;
  right: 16px; top: 20px;
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
}
.stat-card.primary .stat-icon { background: var(--info-bg); color: var(--info); }
.stat-card.accent .stat-icon { background: var(--accent-bg); color: var(--accent); }
.stat-card.success .stat-icon { background: var(--success-bg); color: var(--success); }
.stat-card.danger .stat-icon { background: var(--danger-bg); color: var(--danger); }

/* ===== Charts ===== */
.chart-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.chart-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.chart-container {
  width: 100%;
  height: 300px;
}

/* ===== Table (兼容 .table 和 .data-table) ===== */
.data-table, .table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th, .table th {
  background: #f8fafc;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td, .table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-primary);
}
.data-table tr:hover td, .table tr:hover td { background: #f8fafc; }
.data-table tr:last-child td, .table tr:last-child td { border-bottom: none; }

/* ===== Tags / Badges ===== */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  gap: 4px;
}
.tag-danger, .tag-red { background: var(--danger-bg); color: var(--danger); }
.tag-warning, .tag-orange { background: var(--warning-bg); color: #b45309; }
.tag-success, .tag-green { background: var(--success-bg); color: var(--success); }
.tag-info, .tag-blue { background: var(--info-bg); color: var(--info); }
.tag-default, .tag-gray { background: #f1f5f9; color: var(--text-secondary); }
.tag-primary { background: #e0e7ff; color: #4338ca; }
.tag-accent { background: var(--accent-bg); color: #b45309; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  font-family: inherit;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-light); }
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { background: #d97706; }
.btn-outline, .btn-plain {
  background: #fff;
  border-color: var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover, .btn-plain:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-link {
  background: none;
  border: none;
  color: var(--primary);
  padding: 4px 8px;
  cursor: pointer;
  font-size: 13px;
}
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: var(--danger); }

/* ===== Filters ===== */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.filter-item label {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}
.filter-select, .filter-input {
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
  background: #fff;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}
.filter-select:focus, .filter-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}

/* ===== Toolbar (兼容现有JS) ===== */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-top: 1px solid var(--border-light);
}
.pagination-info { font-size: 13px; color: var(--text-secondary); }
.pagination-controls {
  display: flex;
  gap: 4px;
}
.page-btn {
  min-width: 32px; height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s;
  padding: 0 8px;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Person Card (三违台账) ===== */
.person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.person-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: all 0.2s;
  cursor: pointer;
}
.person-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
}
.person-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.person-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
}
.person-avatar.level-1 { background: linear-gradient(135deg, #ef4444, #dc2626); }
.person-avatar.level-2 { background: linear-gradient(135deg, #f59e0b, #d97706); }
.person-avatar.level-3 { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.person-avatar.level-4 { background: linear-gradient(135deg, #10b981, #059669); }
.person-info { flex: 1; min-width: 0; }
.person-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.person-dept { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.person-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border-light);
}
.person-stat { text-align: center; }
.person-stat .num { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.person-stat .label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ===== Course Card ===== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.course-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-light);
  transition: all 0.2s;
}
.course-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.course-cover {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: #fff;
  font-size: 36px;
}
.course-cover.video { background: linear-gradient(135deg, #1e3a5f, #2c5282); }
.course-cover.doc { background: linear-gradient(135deg, #059669, #10b981); }
.course-cover.exam { background: linear-gradient(135deg, #d97706, #f59e0b); }
.course-type-tag {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(4px);
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
}
.course-body { padding: 14px; }
.course-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.course-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Form ===== */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: #fff;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== Switch ===== */
.switch {
  position: relative;
  display: inline-block;
  width: 44px; height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #cbd5e1;
  border-radius: 24px;
  transition: 0.3s;
}
.switch-slider::before {
  content: '';
  position: absolute;
  height: 18px; width: 18px;
  left: 3px; bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.3s;
}
.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* ===== Timeline ===== */
.timeline {
  position: relative;
  padding-left: 24px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 7px; top: 4px; bottom: 4px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 20px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: '';
  position: absolute;
  left: -21px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--primary);
}
.timeline-item.success::before { border-color: var(--success); }
.timeline-item.warning::before { border-color: var(--warning); }
.timeline-item.danger::before { border-color: var(--danger); }
.timeline-time { font-size: 12px; color: var(--text-muted); }
.timeline-title { font-size: 13px; font-weight: 500; color: var(--text-primary); margin: 2px 0; }
.timeline-desc { font-size: 12px; color: var(--text-secondary); }

/* ===== Empty / Loading ===== */
.empty-state, .empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  background: var(--bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}
.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: calc(100vh - var(--header-height) - 48px);
}
.loading::before {
  content: '';
  width: 36px;
  height: 36px;
  border: 3px solid #e0e0e0;
  border-top-color: #06b6d4;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.muted { color: var(--text-muted); }

/* ===== Progress Bar ===== */
.progress {
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

/* ===== Tabs ===== */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 20px;
}
.tab {
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  font-weight: 500;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===== Detail Panel ===== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 24px;
}
.detail-item {
  display: flex;
  font-size: 13px;
}
.detail-item .detail-label {
  color: var(--text-muted);
  width: 90px;
  flex-shrink: 0;
}
.detail-item .detail-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* ===== Modal ===== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  width: 92vw;
  max-width: 600px;
  max-height: 85vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.modal-title {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body {
  padding: 12px;
  overflow-y: auto;
  flex: 1;
}
.modal-actions {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ===== Utility ===== */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 12px; }
.text-right { text-align: right; }
.font-600 { font-weight: 600; }

/* ===== Worker Home ===== */
.welcome-card {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border: none;
}
.welcome-card .card-body { padding: 24px; }
.welcome-left { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.welcome-avatar {
  width: 56px; height: 56px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 700;
}
.welcome-name { font-size: 20px; font-weight: 700; }
.welcome-role { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.welcome-stats { display: flex; gap: 24px; }
.stat-item { text-align: center; }
.stat-num { font-size: 28px; font-weight: 700; }
.stat-label { font-size: 12px; opacity: 0.85; margin-top: 4px; }

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.quick-item {
  text-align: center;
  padding: 16px 8px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.quick-item:hover { background: var(--bg-hover); }
.quick-icon {
  width: 48px; height: 48px;
  margin: 0 auto 8px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
}
.quick-icon.blue { background: #e3f2fd; }
.quick-icon.orange { background: #fff3e0; }
.quick-icon.green { background: #e8f5e9; }
.quick-icon.purple { background: #f3e5f5; }
.quick-name { font-size: 13px; color: var(--text-primary); }

.task-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}
.task-item:last-child { border-bottom: none; }
.task-info { flex: 1; }
.task-name { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.task-meta { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.progress-bar {
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 3px;
  transition: width 0.3s;
}
.task-status {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
}
.task-status.pending { background: #fff3e0; color: #e65100; }
.task-status.learning { background: #e3f2fd; color: #1565c0; }
.task-status.ready_exam { background: #e8f5e9; color: #2e7d32; }
.task-status.exam_failed { background: #ffebee; color: #c62828; }

.violation-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.violation-item:last-child { border-bottom: none; }
.v-row { display: flex; justify-content: space-between; align-items: center; }
.v-type { font-size: 14px; font-weight: 500; }
.v-status { font-size: 12px; color: var(--text-muted); }
.v-desc { font-size: 13px; color: var(--text-secondary); margin-top: 6px; }
.v-meta { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

/* ===== Task Cards ===== */
.task-card {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}
.task-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-hover);
}
.task-type { font-size: 14px; font-weight: 600; }
.task-status-tag {
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
}
.task-status-tag.pending { background: #fff3e0; color: #e65100; }
.task-status-tag.learning { background: #e3f2fd; color: #1565c0; }
.task-status-tag.ready { background: #e8f5e9; color: #2e7d32; }
.task-status-tag.failed { background: #ffebee; color: #c62828; }
.task-status-tag.passed, .task-status-tag.completed { background: #e8f5e9; color: #2e7d32; }
.task-status-tag.waiting { background: #e3f2fd; color: #1565c0; }
.task-status-tag.rejected { background: #ffebee; color: #c62828; }
.task-card-body { padding: 16px; }
.task-progress-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.task-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}
.task-card-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  text-align: right;
}

/* ===== Learn Page ===== */
.learn-progress {
  display: flex;
  align-items: center;
  gap: 16px;
}
.learn-progress span { font-size: 13px; color: var(--text-secondary); white-space: nowrap; }
.learn-progress .progress-bar { flex: 1; margin-top: 0; }

.course-list { display: flex; flex-direction: column; gap: 8px; }
.course-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.course-item:hover { border-color: var(--primary); }
.course-item.active { border-color: var(--primary); background: #e3f2fd; }
.course-item.done { opacity: 0.7; }
.course-num {
  width: 28px; height: 28px;
  background: var(--border-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.course-item.active .course-num { background: var(--primary); color: #fff; }
.course-item.done .course-num { background: #4caf50; color: #fff; }
.course-title { font-size: 14px; }
.course-status { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.course-content-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-primary);
}
.course-content-text p { margin-bottom: 12px; }

/* ===== Exam Page ===== */
.exam-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.exam-title { font-size: 18px; font-weight: 700; }
.exam-meta { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.exam-timer {
  font-size: 24px;
  font-weight: 700;
  color: var(--danger);
  font-family: monospace;
}
.question-card { margin-top: 16px; }
.question-num { font-size: 14px; font-weight: 600; }
.question-type {
  padding: 3px 10px;
  background: var(--bg-hover);
  border-radius: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.question-text {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 24px;
  color: var(--text-primary);
}
.options-list { display: flex; flex-direction: column; gap: 12px; }
.option-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1.5px solid var(--border-light);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}
.option-item:hover { border-color: var(--primary); background: var(--bg-hover); }
.option-item.selected { border-color: var(--primary); background: #e3f2fd; }
.option-radio { font-size: 18px; color: var(--primary); }
.option-text { font-size: 14px; }
.question-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ===== Question List Modal ===== */
.modal-mask {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal-content {
  background: #fff;
  border-radius: 16px;
  width: 90%;
  max-width: 480px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
}
.modal-close { cursor: pointer; color: var(--text-muted); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--border-light); text-align: center; }
.qlist-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.qlist-item {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--border-light);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}
.qlist-item.answered {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ===== Exam Result ===== */
.result-page { display: flex; justify-content: center; padding: 40px 20px; }
.result-card {
  max-width: 420px;
  width: 100%;
  text-align: center;
  padding: 40px;
}
.result-icon {
  width: 80px; height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 40px;
  font-weight: 700;
  color: #fff;
}
.result-icon.pass { background: linear-gradient(135deg, #4caf50, #2e7d32); }
.result-icon.fail { background: linear-gradient(135deg, #f44336, #c62828); }
.result-title { font-size: 24px; font-weight: 700; margin-bottom: 16px; }
.result-score { margin-bottom: 24px; }
.score-num { font-size: 56px; font-weight: 700; color: var(--primary); }
.score-unit { font-size: 20px; color: var(--text-muted); }
.result-detail {
  text-align: left;
  margin-bottom: 24px;
  padding: 16px;
  background: var(--bg-hover);
  border-radius: 10px;
}
.result-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}
.result-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.result-tip { font-size: 13px; color: var(--text-muted); }

/* ===== Profile Page ===== */
.profile-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  border: none;
}
.profile-avatar {
  width: 64px; height: 64px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700;
}
.profile-name { font-size: 20px; font-weight: 700; }
.profile-role { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.profile-team { font-size: 13px; opacity: 0.85; margin-top: 2px; }

.info-list { display: flex; flex-direction: column; }
.info-item {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--border-light);
}
.info-item:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); font-size: 14px; }
.info-value { color: var(--text-primary); font-size: 14px; font-weight: 500; }

/* ===== Violation Card ===== */
.violation-card {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}
.v-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-hover);
}
.v-card-header .v-type { font-weight: 600; }
.v-severity {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
}
.v-severity.danger { background: #ffebee; color: #c62828; }
.v-severity.warning { background: #fff3e0; color: #e65100; }
.v-card-header .v-status { margin-left: auto; font-size: 12px; }
.v-status.info { color: #1565c0; }
.v-status.warning { color: #e65100; }
.v-status.success { color: #2e7d32; }
.v-status.danger { color: #c62828; }
.v-card-body { padding: 16px; }
.v-card-body .v-desc { font-size: 14px; line-height: 1.6; margin-bottom: 10px; }
.v-card-body .v-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
}
.v-photos {
  display: flex;
  gap: 8px;
  padding: 0 16px 16px;
  flex-wrap: wrap;
}
.v-photo {
  width: 80px; height: 80px;
  object-fit: cover;
  border-radius: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .welcome-stats { gap: 16px; }
  .stat-num { font-size: 22px; }
  .qlist-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ===== Form Styles ===== */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.required { color: var(--danger); }
.form-input {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-primary);
  font-family: inherit;
  outline: none;
  transition: all 0.2s;
  background: #fff;
  box-sizing: border-box;
}
.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,58,95,0.1);
}
textarea.form-input { resize: vertical; min-height: 100px; }
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

/* ===== Photo Upload ===== */
.photo-upload-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.photo-preview {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.preview-img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* ===== Detail Grid ===== */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.detail-label {
  font-size: 12px;
  color: var(--text-muted);
}
.detail-value {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}

/* ===== Search Result ===== */
.search-result-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--bg-hover); }
.search-result-title { font-size: 14px; font-weight: 500; color: var(--text-primary); }
.search-result-desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== Notify ===== */
.notify-group { margin-bottom: 16px; }
.notify-group-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-light);
}
.notify-item {
  padding: 10px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border-light);
}
.notify-item:hover { background: var(--bg-hover); }
.notify-title { font-size: 14px; color: var(--text-primary); }
.notify-desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ===== Help ===== */
.help-content h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 16px 0 8px;
}
.help-content h4:first-child { margin-top: 0; }
.help-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 8px;
}
.help-content ul {
  padding-left: 20px;
  margin-bottom: 8px;
}
.help-content li {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* 违章详情 - 流程时间线 */
.timeline {
  position: relative;
  padding-left: 28px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--border);
}
.timeline-item {
  position: relative;
  padding-bottom: 24px;
}
.timeline-item:last-child {
  padding-bottom: 0;
}
.timeline-dot {
  position: absolute;
  left: -28px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--border);
  border: 3px solid var(--card);
  box-shadow: 0 0 0 2px var(--border);
}
.timeline-item.done .timeline-dot {
  background: var(--success);
  box-shadow: 0 0 0 2px var(--success);
}
.timeline-item.current .timeline-dot {
  background: var(--warning);
  box-shadow: 0 0 0 2px var(--warning);
  animation: pulse 1.5s infinite;
}
.timeline-item.rejected .timeline-dot {
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--danger);
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
.timeline-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.timeline-item.done .timeline-title {
  color: var(--success);
}
.timeline-item.current .timeline-title {
  color: var(--warning);
}
.timeline-item.rejected .timeline-title {
  color: var(--danger);
}
.timeline-status {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.timeline-time {
  font-size: 12px;
  color: var(--text-muted);
}
.timeline-reason {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
  padding: 6px 10px;
  background: var(--danger-bg);
  border-radius: 4px;
}

/* 证据照片网格 */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.evidence-photo {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: transform 0.2s;
}
.evidence-photo:hover {
  transform: scale(1.02);
}

/* 课程迷你项 */
.course-mini-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 6px;
  margin-bottom: 8px;
}
.course-mini-num {
  width: 24px;
  height: 24px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  margin-right: 10px;
}
.course-mini-title {
  flex: 1;
  font-size: 13px;
  color: var(--text-primary);
}

/* 审批迷你项 */
.approval-mini-item {
  padding: 12px;
  background: var(--bg);
  border-radius: 6px;
  margin-bottom: 8px;
}
.approval-mini-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
}
.approval-mini-time {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}
.approval-mini-reason {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

/* 回访迷你项 */
.followup-mini-item {
  padding: 12px;
  background: var(--bg);
  border-radius: 6px;
  margin-bottom: 8px;
}
.followup-mini-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.followup-mini-time {
  font-size: 12px;
  color: var(--text-muted);
}
.followup-mini-content {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 6px;
  padding: 8px;
  background: var(--card);
  border-radius: 4px;
}

/* 进度条 */
.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  border-radius: 4px;
  transition: width 0.3s;
}


/* 违章卡片底部 */
.v-card-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
  text-align: right;
}



/* 可搜索下拉框 */
.searchable-select {
  position: relative;
}
.searchable-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.searchable-item {
  padding: 10px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-light);
  transition: background 0.15s;
}
.searchable-item:hover {
  background: var(--primary-bg);
  color: white;
}
.searchable-item:hover .searchable-desc,
.searchable-item:hover .searchable-tag {
  color: rgba(255,255,255,0.8);
}
.searchable-item.disabled {
  color: var(--text-muted);
  cursor: default;
  justify-content: center;
}
.searchable-item.disabled:hover {
  background: transparent;
  color: var(--text-muted);
}
.searchable-name {
  font-weight: 500;
  font-size: 14px;
}
.searchable-desc {
  font-size: 12px;
  color: var(--text-muted);
}
.searchable-tag {
  font-size: 11px;
  color: var(--primary);
  background: var(--info-bg);
  padding: 2px 8px;
  border-radius: 10px;
}



/* 学习计时器 */
.study-timer-bar {
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 8px;
}
.study-timer-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
}
.study-status {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.study-status.studying {
  background: var(--success-bg);
  color: var(--success);
}
.study-status.paused {
  background: var(--warning-bg);
  color: var(--warning);
}

/* 课程学习时间 */
.course-study-time {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 90px;
  text-align: right;
}
.course-item.done .course-study-time {
  display: none;
}

/* 完成按钮 */
#complete-course-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--border);
  border-color: var(--border);
}
.study-tip {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

/* 课程页面 */
.course-page {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border);
}
.course-page:last-child {
  border-bottom: none;
  margin-bottom: 0;
}
.course-page h4 {
  color: var(--primary);
  margin-bottom: 12px;
  font-size: 16px;
}
.course-page-content {
  line-height: 1.8;
  color: var(--text-secondary);
  font-size: 14px;
}

/* 视频课程 */
.course-video {
  text-align: center;
}

/* ==================== 新登录页样式（桌面端+手机端通用） ==================== */
#login-page .login-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

#login-page .login-header {
  text-align: center;
  padding: 40px 0 20px;
}

#login-page .login-title {
  font-size: 20px;
  font-weight: 600;
  color: #fff !important;
}

#login-page .login-logo-section {
  text-align: center;
  margin-bottom: 32px;
}

#login-page .login-logo-circle {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: #fff;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  overflow: hidden;
}

#login-page .login-logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#login-page .login-app-name {
  font-size: 26px;
  font-weight: 700;
  color: #fff !important;
  margin: 0 0 8px;
}

#login-page .login-app-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.8) !important;
  margin: 0;
}

#login-page .login-card {
  background: #fff !important;
  border-radius: 20px !important;
  padding: 28px 24px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
  width: auto !important;
}

#login-page .login-input-group {
  margin-bottom: 20px;
}

#login-page .login-input-label {
  font-size: 14px;
  color: #374151 !important;
  margin-bottom: 8px;
  font-weight: 500;
  display: block;
}

#login-page .login-input {
  width: 100%;
  padding: 14px 16px !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  font-size: 16px !important;
  box-sizing: border-box;
  transition: all 0.2s;
  background: #fff !important;
  color: #1f2937 !important;
}

#login-page .login-input:focus {
  outline: none;
  border-color: #06b6d4 !important;
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

#login-page .login-password-wrap {
  position: relative;
}

#login-page .login-pwd-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6b7280;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 8px;
}

#login-page .login-submit-btn {
  width: 100%;
  padding: 16px !important;
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 12px !important;
  font-size: 18px !important;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
  box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
  transition: all 0.2s;
}

#login-page .login-submit-btn:active {
  transform: scale(0.98);
}

#login-page .login-forgot {
  text-align: right;
  font-size: 14px;
  color: #6b7280 !important;
  margin-top: 12px;
  cursor: pointer;
}

#login-page .login-footer-tip {
  text-align: center;
  font-size: 12px;
  color: rgba(255,255,255,0.7) !important;
  margin-top: 24px;
  padding-bottom: 40px;
}

#login-page .login-tip {
  text-align: center;
  font-size: 14px;
  margin-top: 12px;
  min-height: 20px;
  color: #ef4444 !important;
}

/* 隐藏旧的登录页元素 */
#login-page .login-box, 
#login-page .login-logo, 
#login-page .login-logo-icon, 
#login-page .btn-login {
  display: none !important;
}

/* ==================== 小程序风格手机端界面 ==================== */
@media (max-width: 768px) {
  /* 隐藏桌面端元素 */
  .sidebar { display: none !important; }
  .sidebar-overlay { display: none !important; }
  .mobile-menu-btn { display: none !important; }
  .header { display: none !important; }
  
  /* 主内容区 - 小程序风格 */
  .main {
    margin-left: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 70px !important; /* 底部TabBar高度 */
    min-height: 100vh;
    background: #f5f6f8;
    width: 100%;
    overflow-x: hidden;
  }
  
  .content-body {
    padding: 12px !important;
    padding-top: 12px !important;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  /* 手机端顶部标题栏 */
  .mobile-header {
    display: flex !important;
    align-items: center;
    justify-content: center;
    height: 52px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8a 100%);
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .mobile-header-back {
    position: absolute;
    left: 12px;
    font-size: 16px;
    cursor: pointer;
    padding: 8px 12px;
  }
  
  /* 底部TabBar */
  .mobile-tabbar {
    display: flex !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
  }
  
  .tabbar-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    padding: 6px 0;
  }
  
  .tabbar-item-icon {
    font-size: 24px;
    margin-bottom: 2px;
    opacity: 0.5;
  }
  
  .tabbar-item-label {
    font-size: 12px;
    color: #9ca3af;
  }
  
  .tabbar-item.active .tabbar-item-icon {
    opacity: 1;
  }
  
  .tabbar-item.active .tabbar-item-label {
    color: #1e3a5f;
    font-weight: 600;
  }
  
  /* 统计卡片 - 小程序风格 */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    margin-bottom: 16px;
    width: 100%;
  }
  
  .stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: none !important;
    box-sizing: border-box;
  }
  
  .stat-value {
    font-size: 28px !important;
    font-weight: 700;
  }
  
  .stat-label {
    font-size: 14px !important;
    color: #6b7280;
    margin-top: 4px;
  }
  
  /* 卡片 - 小程序风格 */
  .card {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: none !important;
    overflow: hidden;
    width: 100%;
    box-sizing: border-box;
  }
  
  .card-header {
    padding: 14px 16px !important;
    border-bottom: 1px solid #f3f4f6;
  }
  
  .card-title {
    font-size: 16px !important;
    font-weight: 600;
  }
  
  .card-body {
    padding: 14px 16px !important;
  }
  
  /* 图表 */
  .chart-row,
  .chart-row-3 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100%;
  }
  
  .chart-container {
    height: 240px !important;
    width: 100% !important;
  }
  
  /* 饼图容器需要更高，因为图例在下方 */
  #chartCategory,
  #chartLevel {
    height: 300px !important;
  }
  
  /* 表格 - 卡片式 */
  .data-table-wrapper,
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    width: 100%;
  }
  
  .data-table {
    min-width: 100%;
    font-size: 14px;
    background: #fff;
  }
  
  .data-table th {
    background: #f9fafb;
    padding: 12px 14px !important;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
  }
  
  .data-table td {
    padding: 12px 14px !important;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
  }
  
  /* 筛选栏 */
  .filter-bar {
    background: #fff;
    border-radius: 12px;
    padding: 14px !important;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    width: 100%;
    box-sizing: border-box;
  }
  
  .filter-item {
    flex: 1 1 calc(50% - 10px);
    min-width: 140px;
  }
  
  .filter-input,
  .filter-select {
    font-size: 15px;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* 按钮 - 小程序风格 */
  .btn {
    padding: 12px 20px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
    font-weight: 500;
    min-height: 44px;
  }
  
  .btn-primary {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8a 100%);
    border: none;
  }
  
  .btn-sm {
    padding: 8px 14px !important;
    font-size: 13px !important;
    min-height: 36px;
  }
  
  /* 弹窗 - 小程序风格底部弹出 */
  .modal-mask {
    background: rgba(0,0,0,0.5);
    align-items: flex-end !important;
    display: flex !important;
    z-index: 9999 !important;
  }
  
  .modal,
  .modal-content {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 85vh !important;
    margin: 0 !important;
    border-radius: 16px 16px 0 0 !important;
    animation: slideUp 0.3s ease;
    background: #fff !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
  }
  
  .modal-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 16px !important;
    border-bottom: 1px solid #f3f4f6 !important;
    font-size: 17px !important;
    font-weight: 600 !important;
    flex-shrink: 0 !important;
  }
  
  .modal-close {
    cursor: pointer !important;
    color: #6b7280 !important;
    font-size: 18px !important;
    padding: 4px 8px !important;
  }
  
  .modal-body {
    padding: 16px !important;
    max-height: calc(85vh - 120px) !important;
    overflow-y: auto !important;
    flex: 1 !important;
  }
  
  .modal-footer {
    padding: 12px 16px !important;
    border-top: 1px solid #f3f4f6 !important;
    display: flex !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
  }
  
  .modal-footer .btn {
    flex: 1 !important;
  }
  
  .form-input,
  .form-group input,
  .form-group select,
  .form-group textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 14px !important;
    font-size: 16px !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
  }
  
  .form-group {
    margin-bottom: 16px !important;
  }
  
  @keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  
  .modal-title {
    font-size: 17px !important;
    padding: 16px !important;
    text-align: center;
    border-bottom: 1px solid #f3f4f6;
  }
  
  .modal-body {
    padding: 16px !important;
    max-height: calc(85vh - 120px) !important;
    overflow-y: auto;
  }
  
  .modal-footer {
    padding: 12px 16px !important;
    border-top: 1px solid #f3f4f6;
    display: flex;
    gap: 10px;
  }
  
  .modal-footer .btn {
    flex: 1;
  }
  
  /* 表单 */
  .form-item {
    margin-bottom: 16px !important;
  }
  
  .form-item label {
    font-size: 15px !important;
    margin-bottom: 8px !important;
    color: #374151;
    font-weight: 500;
  }
  
  .form-item input,
  .form-item select,
  .form-item textarea {
    font-size: 16px !important;
    padding: 14px !important;
    border-radius: 8px !important;
    border: 1px solid #e5e7eb;
    width: 100%;
    box-sizing: border-box;
  }
  
  /* 登录页 - 小程序风格 */
  .login-wrap {
    padding: 0 !important;
    background: linear-gradient(180deg, #1e3a5f 0%, #2d5a8a 40%, #f0f4f8 40%, #f0f4f8 100%) !important;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
  }
  
  .login-box {
    width: calc(100% - 32px) !important;
    max-width: 400px;
    margin: 60px auto 0 !important;
    padding: 32px 24px !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    box-sizing: border-box;
    background: #fff;
  }
  
  .login-logo {
    flex-direction: column;
    text-align: center;
    gap: 16px;
    margin-bottom: 32px;
  }
  
  .login-logo-icon {
    width: 90px !important;
    height: 90px !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  }
  
  .login-logo h1 {
    font-size: 26px !important;
    color: #1e3a5f;
    font-weight: 700;
    margin: 0;
  }
  
  .login-sub {
    font-size: 14px !important;
    color: #6b7280;
    margin-top: 4px;
  }
  
  .btn-login {
    width: 100%;
    padding: 16px !important;
    font-size: 18px !important;
    border-radius: 12px !important;
    margin-top: 12px;
    min-height: 52px;
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(6, 182, 212, 0.3);
  }
  
  /* 课程卡片 - 小程序风格 */
  .course-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100%;
  }
  
  .course-card {
    background: #fff;
    border-radius: 12px;
    padding: 16px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: none !important;
    box-sizing: border-box;
  }
  
  /* 标签 */
  .tag {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 4px;
  }
  
  /* 空状态 */
  .empty-state {
    padding: 40px 20px;
    text-align: center;
  }
  
  .empty-state-icon {
    font-size: 48px;
    margin-bottom: 12px;
  }
  
  .empty-state-text {
    font-size: 15px;
    color: #9ca3af;
  }
  
  /* 分页 */
  .pagination {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    padding: 12px 0;
  }
  
  .page-btn {
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 8px;
    min-height: 40px;
  }
  
  /* 列表项 - 小程序风格 */
  .list-item {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  
  /* 时间线 */
  .timeline-item {
    padding-left: 20px;
  }
  
  /* 快捷入口网格 */
  .quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
  }
  
  .quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 12px 4px;
    cursor: pointer;
  }
  
  .quick-item-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 6px;
  }
  
  .quick-item-label {
    font-size: 13px;
    color: #374151;
    text-align: center;
  }
  
  /* 确保所有元素不超出屏幕宽度 */
  * {
    max-width: 100%;
  }
  
  img, video, canvas {
    max-width: 100%;
    height: auto;
  }
  
  /* 手机端搜索框 */
  .mobile-search-bar {
    margin-bottom: 12px;
  }
  
  .mobile-search-input {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border-radius: 24px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    cursor: pointer;
    font-size: 14px;
    color: #9ca3af;
  }
  
  /* 手机端快捷功能入口 */
  .mobile-quick-actions {
    background: #fff;
    border-radius: 12px;
    padding: 16px 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  
  /* 手机端用户信息卡片 */
  .mobile-user-card {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8a 100%);
    border-radius: 16px;
    padding: 20px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 16px rgba(30, 58, 95, 0.2);
  }
  
  .mobile-user-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  
  .mobile-user-info {
    flex: 1;
    min-width: 0;
  }
  
  .mobile-user-name {
    font-size: 20px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .mobile-user-role {
    font-size: 12px;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 400;
  }
  
  .mobile-user-team {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin-top: 4px;
  }
  
  .mobile-logout-btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
  }
  
  /* 手机端功能入口卡片 */
  .mobile-actions-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px 12px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  
  .mobile-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 8px;
  }
  
  .mobile-action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
  }
  
  .mobile-action-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  
  .mobile-action-label {
    font-size: 12px;
    color: #374151;
    text-align: center;
  }
  
  /* 手机端区块卡片 */
  .mobile-section-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  }
  
  .mobile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
  }
  
  .mobile-section-title {
    font-size: 17px;
    font-weight: 600;
    color: #1e3a5f;
  }
  
  .mobile-section-more {
    font-size: 14px;
    color: #6b7280;
    cursor: pointer;
  }
  
  /* 手机端违章列表项 */
  .mobile-violation-item {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
  }
  
  .mobile-violation-item:last-child {
    border-bottom: none;
  }
  
  .mobile-violation-title {
    font-size: 16px;
    font-weight: 500;
    color: #1f2937;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
  }
  
  .mobile-violation-status {
    font-size: 12px;
    padding: 3px 8px;
    border-radius: 6px;
    flex-shrink: 0;
  }
  
  .status-returned {
    background: #dcfce7;
    color: #16a34a;
  }
  
  .status-reported {
    background: #dbeafe;
    color: #2563eb;
  }
  
  .mobile-violation-meta {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 6px;
  }
  
  .mobile-empty {
    text-align: center;
    padding: 30px;
    color: #9ca3af;
    font-size: 14px;
  }
}

@media (max-width: 640px) {
  .stat-grid {
    grid-template-columns: 1fr !important;
  }
  
  .filter-item {
    flex: 1 1 100%;
  }
  
  .quick-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .stat-value {
    font-size: 24px !important;
  }
  
  .mobile-header {
    font-size: 17px;
    height: 48px;
  }
  
  .tabbar-item-label {
    font-size: 11px;
  }
}

/* ===== 题库管理响应式布局 ===== */
.question-table-desktop {
  display: block;
}

.question-list-mobile {
  display: none;
}

@media (max-width: 768px) {
  .question-table-desktop {
    display: none !important;
  }
  
  .question-list-mobile {
    display: block !important;
  }
  
  .question-card-mobile {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  }
  
  .question-card-mobile .q-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
  }
  
  .question-card-mobile .q-stem {
    font-size: 14px;
    color: #1f2937;
    line-height: 1.6;
    word-break: break-word;
    margin-bottom: 10px;
  }
  
  .question-card-mobile .q-answer {
    font-size: 13px;
    color: #6b7280;
    background: #f9fafb;
    padding: 8px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
  }
  
  .question-card-mobile .q-answer span {
    color: #059669;
    font-weight: 500;
  }
  
  .question-card-mobile .q-actions {
    display: flex;
    gap: 8px;
  }
  
  .question-card-mobile .q-actions button {
    flex: 1;
    padding: 8px;
    font-size: 13px;
  }
}

/* ==================== 两大板块侧边导航 ==================== */
.nav-section { margin-bottom: 2px; }
.nav-section-title { display:flex; align-items:center; justify-content:space-between; padding:10px 14px; margin:8px 8px 4px; background:linear-gradient(135deg,#1e3a5f,#0f766e); color:#fff; border-radius:9px; font-size:13px; font-weight:700; letter-spacing:1px; cursor:pointer; user-select:none; }
.nav-section-title .nav-section-arrow { font-size:12px; opacity:.9; }
.nav-section-body { }

/* ==================== 安全生产警示教育专栏 ==================== */
.warn-wrap { max-width:880px; margin:0 auto; padding:14px 16px 44px; font-size:16px; }
.warn-back { background:none; border:none; color:#2563eb; font-size:15px; padding:6px 0; margin-bottom:10px; cursor:pointer; }
.warn-hero { background:linear-gradient(135deg,#7f1d1d 0%,#b45309 100%); color:#fff; border-radius:16px; padding:22px; margin-bottom:18px; box-shadow:0 6px 18px rgba(127,29,29,.18); }
.warn-hero-title { font-size:22px; font-weight:800; margin-bottom:6px; }
.warn-hero-sub { font-size:14px; opacity:.92; margin-bottom:16px; }
.warn-hero-bar { height:12px; background:rgba(255,255,255,.25); border-radius:8px; overflow:hidden; }
.warn-hero-fill { height:100%; background:#fde047; border-radius:8px; transition:width .4s; }
.warn-hero-num { font-size:14px; margin-top:8px; opacity:.95; }

.warn-cat-title { font-size:16px; font-weight:700; color:#7f1d1d; margin:20px 4px 10px; padding-left:10px; border-left:4px solid #b45309; line-height:1.2; }
.warn-case-card { display:flex; align-items:center; gap:14px; background:#fff; border:1px solid #eef0f3; border-radius:14px; padding:16px; margin-bottom:10px; cursor:pointer; transition:.15s; box-shadow:0 1px 3px rgba(0,0,0,.04); }
.warn-case-card:hover { border-color:#b45309; box-shadow:0 4px 14px rgba(180,83,9,.12); transform:translateY(-1px); }
.warn-case-card.is-lock { opacity:.55; cursor:not-allowed; }
.warn-case-no { width:44px; height:44px; flex-shrink:0; border-radius:10px; background:#fef3c7; color:#92400e; font-weight:800; font-size:17px; display:flex; align-items:center; justify-content:center; }
.warn-case-main { flex:1; min-width:0; }
.warn-case-title { font-size:16.5px; font-weight:700; color:#1f2937; line-height:1.45; margin-bottom:4px; }
.warn-case-meta { font-size:13px; color:#6b7280; }
.warn-case-right { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.warn-case-arrow { font-size:24px; color:#9ca3af; }
.warn-tag { font-size:12.5px; padding:4px 10px; border-radius:20px; white-space:nowrap; font-weight:600; }
.warn-tag-done { background:#dcfce7; color:#15803d; }
.warn-tag-doing { background:#ffedd5; color:#c2410c; }
.warn-tag-todo { background:#f1f5f9; color:#64748b; }

.warn-learn-card { background:#fff; border-radius:16px; padding:24px 26px; box-shadow:0 2px 10px rgba(0,0,0,.05); border:1px solid #eef0f3; }
.warn-learn-cat { font-size:14px; color:#b45309; font-weight:600; margin-bottom:6px; }
.warn-learn-title { font-size:21px; line-height:1.5; color:#111827; margin:0 0 10px; font-weight:800; }
.warn-learn-loss { font-size:14.5px; color:#7f1d1d; background:#fef2f2; border-radius:8px; padding:8px 12px; margin-bottom:18px; font-weight:600; }
.warn-sec { margin-bottom:20px; }
.warn-sec-h { font-size:17px; font-weight:800; color:#1e3a5f; margin-bottom:10px; }
.warn-p { font-size:16.5px; line-height:1.95; color:#1f2937; margin:0; text-align:justify; }
.warn-ul { margin:0; padding-left:22px; }
.warn-ul li { font-size:16.5px; line-height:1.95; color:#1f2937; margin-bottom:8px; }
.warn-sec-alert { background:#fffbeb; border:1px solid #fde68a; border-radius:12px; padding:16px 18px; }
.warn-sec-alert .warn-sec-h { color:#b45309; }
.warn-learn-foot { margin-top:24px; padding-top:18px; border-top:1px dashed #e5e7eb; text-align:center; }
.warn-big-btn { width:100%; max-width:520px; padding:15px 20px; border:none; border-radius:12px; background:linear-gradient(135deg,#1e3a5f,#0f766e); color:#fff; font-size:17px; font-weight:700; cursor:pointer; box-shadow:0 4px 12px rgba(15,118,110,.25); }
.warn-big-btn:active { transform:scale(.99); }
.warn-ghost-btn { width:100%; max-width:520px; margin-top:10px; padding:13px 20px; border:1px solid #d1d5db; background:#fff; color:#374151; border-radius:12px; font-size:15px; cursor:pointer; }
.warn-foot-tip { font-size:13px; color:#9ca3af; margin-top:10px; line-height:1.6; }

.warn-quiz-tip { font-size:14px; color:#6b7280; margin-bottom:18px; }
.warn-q { border:1px solid #eef0f3; border-radius:12px; padding:16px 18px; margin-bottom:16px; background:#fcfcfd; }
.warn-q.q-wrong { border-color:#fecaca; background:#fefafa; }
.warn-q-stem { font-size:17px; font-weight:700; color:#111827; line-height:1.7; margin-bottom:12px; display:flex; align-items:flex-start; gap:8px; flex-wrap:wrap; }
.warn-q-no { flex-shrink:0; width:26px; height:26px; border-radius:50%; background:#1e3a5f; color:#fff; font-size:14px; display:inline-flex; align-items:center; justify-content:center; font-weight:700; }
.warn-q-type { font-size:12px; background:#e0f2fe; color:#0369a1; padding:2px 8px; border-radius:6px; font-weight:600; flex-shrink:0; margin-top:3px; }
.wr-ok { font-size:13.5px; color:#15803d; font-weight:700; }
.wr-no { font-size:13.5px; color:#dc2626; font-weight:700; }
.warn-opts { display:flex; flex-direction:column; gap:9px; }
.warn-opt { display:flex; align-items:center; gap:12px; border:1.5px solid #e5e7eb; border-radius:10px; padding:12px 14px; cursor:pointer; font-size:16px; line-height:1.6; color:#1f2937; background:#fff; transition:.12s; }
.warn-opt:hover { border-color:#0f766e; background:#f0fdfa; }
.warn-opt.sel { border-color:#0f766e; background:#ccfbf1; box-shadow:inset 0 0 0 1px #0f766e; }
.warn-opt.opt-right { border-color:#16a34a; background:#f0fdf4; }
.warn-opt.opt-your-wrong { border-color:#dc2626; background:#fef2f2; }
.warn-opt-key { flex-shrink:0; width:30px; height:30px; border-radius:50%; border:1.5px solid #cbd5e1; display:inline-flex; align-items:center; justify-content:center; font-weight:700; font-size:15px; color:#475569; }
.warn-opt.sel .warn-opt-key { background:#0f766e; color:#fff; border-color:#0f766e; }
.warn-opt.opt-right .warn-opt-key { background:#16a34a; color:#fff; border-color:#16a34a; }
.warn-opt.opt-your-wrong .warn-opt-key { background:#dc2626; color:#fff; border-color:#dc2626; }
.warn-opt-text { flex:1; }
.warn-explain { margin-top:10px; font-size:14px; line-height:1.7; color:#92400e; background:#fffbeb; border-radius:8px; padding:8px 12px; }

.warn-result-card { border-radius:16px; padding:28px 20px; text-align:center; color:#fff; margin-bottom:16px; }
.warn-result-card.pass { background:linear-gradient(135deg,#15803d,#0f766e); }
.warn-result-card.fail { background:linear-gradient(135deg,#b91c1c,#c2410c); }
.warn-result-score { font-size:52px; font-weight:800; line-height:1; }
.warn-result-score span { font-size:20px; font-weight:600; margin-left:2px; }
.warn-result-status { font-size:17px; font-weight:700; margin:12px 0 4px; }
.warn-result-sub { font-size:14px; opacity:.92; }

.warn-mine-row { display:flex; align-items:center; gap:14px; padding:13px 8px; border-bottom:1px solid #f3f4f6; cursor:pointer; }
.warn-mine-row:last-child { border-bottom:none; }
.warn-mine-row:hover { background:#fafbfc; }

.wov-stat-row { display:grid; grid-template-columns:repeat(5,1fr); gap:12px; margin-bottom:14px; }
.wov-stat { background:#fff; border-radius:12px; padding:16px 10px; text-align:center; border:1px solid #eef0f3; }
.wov-stat-n { font-size:26px; font-weight:800; color:#1e3a5f; }
.wov-stat-l { font-size:13px; color:#6b7280; margin-top:4px; }
.wov-stat.ok .wov-stat-n { color:#15803d; }
.wov-stat.doing .wov-stat-n { color:#c2410c; }
.wov-stat.no .wov-stat-n { color:#dc2626; }
.wov-table { width:100%; border-collapse:collapse; font-size:14px; min-width:760px; }
.wov-table th { background:#f8fafc; color:#475569; font-weight:700; padding:11px 10px; text-align:left; border-bottom:2px solid #e5e7eb; white-space:nowrap; }
.wov-table td { padding:10px; border-bottom:1px solid #f1f5f9; color:#374151; vertical-align:top; }
.wov-table tr:hover td { background:#fafbfc; }
.wov-st { padding:3px 10px; border-radius:20px; font-size:12.5px; font-weight:600; white-space:nowrap; }
.wov-st.st-ok { background:#dcfce7; color:#15803d; }
.wov-st.st-doing { background:#ffedd5; color:#c2410c; }
.wov-st.st-no { background:#f1f5f9; color:#64748b; }
@media(max-width:768px){
  .wov-stat-row { grid-template-columns:repeat(2,1fr); }
  .warn-wrap { padding:10px 10px 30px; }
  .warn-learn-card { padding:18px 16px; }
  .warn-learn-title { font-size:19px; }
  .warn-p,.warn-ul li { font-size:16px; line-height:1.9; }
}

.wov-stat.wov-clickable { cursor:pointer; transition:.15s; }
.wov-stat.wov-clickable:hover { transform:translateY(-2px); box-shadow:0 6px 16px rgba(30,58,95,.15); border-color:#93c5fd; }
.wov-stat.active { outline:3px solid #2563eb; outline-offset:-2px; border-color:#2563eb; background:#eff6ff; }
.wov-stat-go { display:block; font-size:11px; color:#2563eb; font-weight:600; margin-top:3px; }
.wov-stat.active .wov-stat-go { color:#1d4ed8; }
/* ===== 统一工作台（移动优先） ===== */
.home-page { padding:12px; max-width:980px; margin:0 auto; }
.home-hero { background:linear-gradient(135deg,#1e3a5f,#0f766e); color:#fff; border-radius:16px; padding:18px; margin-bottom:14px; box-shadow:0 6px 18px rgba(30,58,95,.25); }
.home-hero-top { display:flex; align-items:center; gap:14px; }
.home-avatar { width:54px; height:54px; border-radius:50%; background:rgba(255,255,255,.2); display:flex; align-items:center; justify-content:center; font-size:23px; font-weight:700; flex-shrink:0; }
.home-hero-info .hello { font-size:20px; font-weight:700; }
.home-hero-info .sub { font-size:13px; opacity:.88; margin-top:4px; }
.home-date { font-size:12.5px; opacity:.82; margin-top:12px; }
.home-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:14px; }
.home-stat { background:rgba(255,255,255,.14); border-radius:12px; padding:12px 6px; text-align:center; cursor:pointer; }
.home-stat .num { font-size:23px; font-weight:800; color:#fff; line-height:1.1; }
.home-stat .lab { font-size:12.5px; opacity:.94; margin-top:3px; }
.home-block { margin-bottom:14px; }
.home-block-h { font-size:15.5px; font-weight:700; color:#1e3a5f; margin:6px 2px 10px; }
.home-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.home-tile { background:#fff; border-radius:14px; padding:20px 12px; text-align:center; cursor:pointer; box-shadow:0 2px 10px rgba(15,23,42,.06); border:1px solid #eef2f7; display:flex; flex-direction:column; align-items:center; gap:9px; transition:transform .12s ease; }
.home-tile:active { transform:scale(.97); }
.home-tile-ic { font-size:32px; line-height:1; }
.home-tile-name { font-size:15.5px; font-weight:600; color:#1f2937; }
@media (min-width:660px) { .home-grid { grid-template-columns:repeat(3,1fr); } }
@media (min-width:920px) { .home-grid { grid-template-columns:repeat(4,1fr); } }
@media (max-width:480px) {
  .home-stats { grid-template-columns:repeat(2,1fr); }
  .home-stat { display:flex; align-items:center; justify-content:center; gap:10px; text-align:left; padding:12px; }
  .home-stat .num { font-size:21px; }
  .home-tile-name { font-size:16px; }
}
