/* ========================================
   原阳笑悦服装厂管理系统 - 全局样式
   ======================================== */

:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --primary-light: #eaf2fd;
  --sidebar-bg: #16233b;
  --sidebar-hover: rgba(255,255,255,0.06);
  --sidebar-active: #1a73e8;
  --text-dark: #0f172a;
  --text-gray: #475569;
  --text-light: #94a3b8;
  --border: #e2e8f0;
  --bg-page: #f6f8fb;
  --bg-card: #ffffff;
  --success: #0ea46f;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #0284c7;
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,0.05);
  --shadow: 0 1px 2px rgba(15,23,42,0.04), 0 1px 3px rgba(15,23,42,0.06);
  --shadow-md: 0 6px 16px rgba(15,23,42,0.08);
  --shadow-lg: 0 10px 24px rgba(15,23,42,0.12);
  --transition: all 0.18s ease;
  --sidebar-width: 240px;
  --sidebar-collapsed: 64px;
  --header-height: 56px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  font-size: 14px;
  color: var(--text-dark);
  background: var(--bg-page);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* ========================================
   布局 Layout
   ======================================== */

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  color: #fff;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed);
}

.sidebar-logo {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-logo .logo-icon {
  width: 28px;
  height: 28px;
  background: var(--primary);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0;
  font-size: 14px;
  flex-shrink: 0;
}

.sidebar-menu {
  flex: 1;
  padding: 12px 10px;
}

.sidebar-menu .menu-group {
  padding: 14px 10px 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar-menu .menu-item {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  margin: 2px 0;
  border-radius: 8px;
  color: #cbd5e1;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  font-size: 13.5px;
}

.sidebar-menu .menu-item:hover {
  background: var(--sidebar-hover);
  color: #fff;
  text-decoration: none;
}

.sidebar-menu .menu-item.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(26,115,232,0.35);
}

.sidebar-menu .menu-item .menu-icon {
  width: 20px;
  text-align: center;
  margin-right: 10px;
  font-size: 16px;
  flex-shrink: 0;
}

.sidebar-menu .menu-item .menu-arrow {
  margin-left: auto;
  font-size: 10px;
  transition: var(--transition);
}

.sidebar-menu .menu-item.expanded .menu-arrow {
  transform: rotate(90deg);
}

.sidebar-menu .submenu {
  display: none;
}

.sidebar-menu .submenu.show {
  display: block;
}

.sidebar-menu .submenu .menu-item {
  padding-left: 38px;
  font-size: 13px;
}

.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
}

.main-content {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-width);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.sidebar.collapsed ~ .main-content {
  margin-left: var(--sidebar-collapsed);
}

.header {
  height: var(--header-height);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-toggle {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 18px;
  color: var(--text-gray);
}

.header-toggle:hover {
  background: var(--bg-page);
}

.header-breadcrumb {
  font-size: 14px;
  color: var(--text-gray);
}

.header-breadcrumb span {
  color: var(--text-dark);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-notify {
  position: relative;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  font-size: 18px;
  color: var(--text-gray);
}

.header-notify:hover {
  background: var(--bg-page);
}

.header-notify .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.header-user:hover {
  background: var(--bg-page);
}

.header-user .avatar {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.header-user .user-name {
  font-size: 14px;
  font-weight: 500;
}

.page-content {
  padding: 24px;
  flex: 1;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 20px;
  letter-spacing: 0.2px;
}

/* 统一页面标题区：左标题+副标题，右操作按钮 */
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.page-head .page-title { margin-bottom: 0; }
.page-sub {
  font-size: 13px;
  color: var(--text-gray);
  margin-top: 3px;
}
.page-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

/* 表格行内操作：文字链接样式 */
.row-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.link { color: var(--primary); cursor: pointer; font-size: 13px; white-space: nowrap; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--danger); }
.link.gray { color: var(--text-gray); }

/* ========================================
   卡片 Card
   ======================================== */

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}

.card-header {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: 0.2px;
}

.card-body {
  padding: 20px;
}

/* ========================================
   统计卡片 Stat Card
   ======================================== */

.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: var(--transition);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.stat-card .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.stat-card .stat-icon.blue {
  background: var(--primary-light);
  color: var(--primary);
}

.stat-card .stat-icon.green {
  background: #e7f6f0;
  color: var(--success);
}

.stat-card .stat-icon.orange {
  background: #fdf3e3;
  color: var(--warning);
}

.stat-card .stat-icon.red {
  background: #fdecec;
  color: var(--danger);
}

.stat-card .stat-icon.purple {
  background: #ede9fe;
  color: #7c3aed;
}

.stat-card .stat-info h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}

.stat-card .stat-info p {
  font-size: 13px;
  color: var(--text-gray);
  margin-top: 2px;
}

/* ========================================
   表格 Table
   ======================================== */

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

table th {
  padding: 10px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-gray);
  text-align: left;
  white-space: nowrap;
  letter-spacing: 0.3px;
}

table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-dark);
  word-break: break-word;
}

table tbody tr:hover {
  background: #f8fafc;
}

table tbody tr {
  transition: var(--transition);
  cursor: pointer;
}

/* ========================================
   状态标签 Badge
   ======================================== */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  height: 22px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.badge-blue {
  background: var(--primary-light);
  color: var(--primary);
}

.badge-green {
  background: #e7f6f0;
  color: var(--success);
}

.badge-orange {
  background: #fdf3e3;
  color: var(--warning);
}

.badge-red {
  background: #fdecec;
  color: var(--danger);
}

.badge-gray {
  background: #f1f5f9;
  color: var(--text-gray);
}

.badge-purple {
  background: #ede9fe;
  color: #6d28d9;
}

/* ========================================
   按钮 Button
   ======================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  background: #fff;
  color: var(--text-dark);
}

.btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 1px 2px rgba(26,115,232,0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.btn-success:hover {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.btn-warning {
  background: var(--warning);
  color: #fff;
  border-color: var(--warning);
}

.btn-warning:hover {
  background: #d97706;
  border-color: #d97706;
  color: #fff;
}

/* 柔和变体：用于页面右上角工具栏，与浅色卡片风格协调 */
/* 次级操作：白底 + 主色描边/文字，明显可点（不再是"发白像禁用"） */
.btn-soft {
  background: #fff;
  color: var(--primary);
  border-color: #c7d9f7;
}
.btn-soft:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary-dark);
}
/* 主操作（如"清除/归档"类）：浅橙底 + 橙字描边，轻重适中、与告警色系一致 */
.btn-soft-warning {
  background: #fff7ed;
  color: #b45309;
  border-color: #fbdba7;
}
.btn-soft-warning:hover {
  background: #ffedd5;
  border-color: var(--warning);
  color: #92400e;
}

/* 键盘可达性：柔和按钮的聚焦环 */
.btn-soft:focus-visible,
.btn-soft-warning:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-sm {
  height: 28px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-lg {
  height: 38px;
  padding: 0 20px;
  font-size: 15px;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 6px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   表单 Form
   ======================================== */

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-label .required {
  color: var(--danger);
  margin-left: 2px;
}

.form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-dark);
  transition: var(--transition);
  background: #fff;
  font-family: inherit;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.12);
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  color: var(--text-dark);
  background: #fff;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  font-family: inherit;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,115,232,0.1);
}

textarea.form-input {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}

.form-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 4px;
}

/* ========================================
   搜索区域 Search Bar
   ======================================== */

.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.search-bar .form-group {
  margin-bottom: 0;
}

.search-bar .form-input,
.search-bar .form-select {
  min-width: 140px;
}

/* ========================================
   分页 Pagination
   ======================================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px 0;
}

.pagination .page-btn {
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-dark);
  transition: var(--transition);
}

.pagination .page-btn:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.pagination .page-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination .page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ========================================
   列表视图切换（列表显示 / 分页显示）
   ======================================== */

[data-lv-toggle] { display: flex; justify-content: flex-end; }

.lv-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.lv-tab {
  padding: 7px 14px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-gray);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
  transition: var(--transition);
}

.lv-tab + .lv-tab { border-left: 1px solid var(--border); }

.lv-tab:hover { background: #f3f6fb; }

.lv-tab.active { background: var(--primary); color: #fff; }

.lv-pagination {
  justify-content: flex-end;
  gap: 6px;
  padding: 12px 0 4px;
  flex-wrap: wrap;
}

.lv-total { font-size: 13px; color: var(--text-gray); margin-right: 8px; align-self: center; }
.lv-ellipsis { padding: 0 2px; color: var(--text-light); align-self: center; }

.lv-size {
  font-size: 13px;
  color: var(--text-gray);
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lv-size select {
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0 4px;
  font-size: 13px;
  background: #fff;
  cursor: pointer;
}

/* ========================================
   进度条 Progress
   ======================================== */

.progress-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar .progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.progress-fill.blue { background: var(--primary); }
.progress-fill.green { background: var(--success); }
.progress-fill.orange { background: var(--warning); }
.progress-fill.red { background: var(--danger); }

/* ========================================
   空状态 Empty State
   ======================================== */

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-gray);
}

.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state h3 {
  font-size: 16px;
  margin-bottom: 8px;
  color: var(--text-dark);
}

.empty-state p {
  font-size: 14px;
  max-width: 400px;
  margin: 0 auto;
}

/* ========================================
   模态框 Modal
   ======================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: #fff;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

.modal-lg { max-width: 900px; }

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 6px;
  font-size: 18px;
  color: var(--text-gray);
}

.modal-close:hover {
  background: #f3f4f6;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* 通用自定义确认弹窗（App.confirmModal）：多按钮 + 右上角 ✕ */
.confirm-modal {
  max-width: 460px;
  width: 92vw;
}
.confirm-modal .modal-footer {
  flex-wrap: wrap;
}
.confirm-modal-message {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-dark, #222);
  word-break: break-word;
}

/* ========================================
   动画 Animations
   ======================================== */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   工具类 Utilities
   ======================================== */

.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-muted { color: var(--text-gray); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.hidden { display: none !important; }

/* ========================================
   响应式 Responsive
   ======================================== */

@media (max-width: 1024px) {
  .sidebar {
    width: var(--sidebar-collapsed);
  }
  .sidebar .menu-group,
  .sidebar .menu-item span,
  .sidebar-logo span {
    display: none;
  }
  .main-content {
    margin-left: var(--sidebar-collapsed);
  }
  .stat-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    width: var(--sidebar-width);
  }
  .main-content {
    margin-left: 0;
  }
  .header {
    padding: 0 16px;
  }
  .page-content {
    padding: 16px;
  }
  .stat-cards {
    grid-template-columns: 1fr;
  }
  .search-bar {
    flex-direction: column;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   登录页 Login
   ======================================== */

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #16233b 0%, #1d3a66 55%, #1557b0 100%);
}

.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px;
  width: 400px;
  max-width: 90%;
  box-shadow: 0 24px 64px rgba(2,8,23,0.45);
}

.login-card .login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-card .login-logo .logo-box {
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  margin-bottom: 12px;
}

.login-card h1 {
  font-size: 20px;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.login-card .login-subtitle {
  font-size: 13px;
  color: var(--text-gray);
}

.login-card .btn-primary {
  width: 100%;
  padding: 11px;
  font-size: 15px;
}

.login-card .login-options {
  display: flex;
  justify-content: space-between;
  margin: 16px 0;
  font-size: 13px;
}

/* ========================================
   时间线 Timeline
   ======================================== */

.timeline {
  position: relative;
  padding-left: 28px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.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: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-item.completed::before {
  background: var(--success);
  box-shadow: 0 0 0 2px var(--success);
}

.timeline-item.active::before {
  background: var(--primary);
  animation: pulse 2s infinite;
}

.timeline-item.overdue::before {
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--danger);
}

.timeline-item .timeline-time {
  font-size: 12px;
  color: var(--text-gray);
  margin-bottom: 4px;
}

.timeline-item .timeline-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
}

.timeline-item .timeline-desc {
  font-size: 13px;
  color: var(--text-gray);
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--primary); }
  50% { box-shadow: 0 0 0 6px rgba(26,115,232,0.2); }
}

/* ========================================
   图表容器 Chart
   ======================================== */

.chart-container {
  width: 100%;
  height: 320px;
}

/* ========================================
   Toast消息
   ======================================== */

.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
  padding: 12px 20px;
  border-radius: 8px;
  color: #fff;
  font-size: 14px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toast-success { background: var(--success); }
.toast-error { background: var(--danger); }
.toast-warning { background: var(--warning); }
.toast-info { background: var(--info); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ========================================
   用户下拉菜单 User Dropdown
   ======================================== */

.header-user-wrap { position: relative; }

.header-user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  min-width: 180px;
  z-index: 200;
  overflow: hidden;
  display: none;
  animation: fadeIn 0.15s ease;
}

.header-user-dropdown.show { display: block; }

.header-user-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-dark);
  transition: background 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.header-user-dropdown .dropdown-item:hover {
  background: #f3f4f6;
}

.header-user-dropdown .dropdown-item.danger {
  color: var(--danger);
}

.header-user-dropdown .dropdown-item.danger:hover {
  background: #fef2f2;
}

.header-user-dropdown .dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ========================================
   模态框中的表单 Modal Form
   ======================================== */

.modal .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* ========================================
   Dropdown Filter 下拉筛选面板
   ======================================== */

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  min-width: 200px;
  z-index: 200;
  padding: 12px;
  display: none;
  animation: fadeIn 0.15s ease;
}

.dropdown-panel.show { display: block; }

/* ========================================
   Preview overlay
   ======================================== */

.clickable-row { cursor: pointer; }
.clickable-row:hover { background: #f0f7ff; }

/* 字段名后面统一补一个英文冒号，避免字段名与数值粘在一起 */
.detail-label::after { content: ":"; margin-right: 6px; }
