/* ==================== Reset & Base ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: #333;
  background: #f0f2f5;
  line-height: 1.5;
}

a {
  color: #1677ff;
  text-decoration: none;
}

a:hover {
  color: #4096ff;
}

/* ==================== Login Page ==================== */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: 8px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* 登录页盾牌 Logo */
.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.login-logo svg {
  width: 72px;
  height: 72px;
  color: #1677ff;
  filter: drop-shadow(0 4px 12px rgba(22, 119, 255, 0.35));
}

/* 登录页提示框：大字+图标+抖动，确保醒目 */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-6px); }
  40%       { transform: translateX(6px); }
  60%       { transform: translateX(-4px); }
  80%       { transform: translateX(4px); }
}
.login-alert {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  border: 1px solid transparent;
  animation: shake 0.4s ease;
}
.login-alert-error {
  color: #a8071a;
  background: #fff1f0;
  border-color: #ffa39e;
}
.login-alert-warn {
  color: #874d00;
  background: #fffbe6;
  border-color: #ffe58f;
  font-weight: 600;
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-header h1 {
  font-size: 24px;
  font-weight: 600;
  color: #1677ff;
  margin-bottom: 8px;
}

.login-header p {
  font-size: 14px;
  color: #666;
}

/* ==================== Form ==================== */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  font-size: 14px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #1677ff;
  box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
}

.form-group input:disabled,
.form-group select:disabled {
  background: #f5f5f5;
  cursor: not-allowed;
}

.form-group textarea {
  height: 80px;
  padding: 8px 12px;
  resize: vertical;
}

.form-group select {
  appearance: auto;
}

.form-inline {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.form-inline .form-group {
  flex: 1;
  margin-bottom: 0;
}

/* ==================== Checkbox chips ==================== */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 160px;
  overflow-y: auto;
  padding: 10px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
}

.checkbox-group-empty {
  color: #999;
  font-size: 13px;
}

.checkbox-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: normal;
  line-height: 1.2;
  white-space: nowrap;
  color: #333;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s;
}

.checkbox-chip:hover {
  border-color: #1677ff;
}

.checkbox-chip input[type=checkbox] {
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  cursor: pointer;
}

.checkbox-chip:has(input:checked) {
  color: #1677ff;
  background: #e6f0ff;
  border-color: #1677ff;
}

.checkbox-chip-sub {
  margin-left: 4px;
  font-style: normal;
  color: #999;
}

.checkbox-chip:has(input:checked) .checkbox-chip-sub {
  color: #1677ff;
}

/* ==================== Buttons ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  gap: 6px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: #1677ff;
  color: #fff;
  border-color: #1677ff;
}

.btn-primary:hover:not(:disabled) {
  background: #4096ff;
  border-color: #4096ff;
}

.btn-default {
  background: #fff;
  color: #333;
  border-color: #d9d9d9;
}

.btn-default:hover:not(:disabled) {
  color: #1677ff;
  border-color: #1677ff;
}

.btn-danger {
  background: #fff;
  color: #ff4d4f;
  border-color: #ff4d4f;
}

.btn-danger:hover:not(:disabled) {
  color: #fff;
  background: #ff4d4f;
}

.btn-success {
  background: #52c41a;
  color: #fff;
  border-color: #52c41a;
}

.btn-success:hover:not(:disabled) {
  background: #73d13d;
  border-color: #73d13d;
}

.btn-warning {
  background: #faad14;
  color: #fff;
  border-color: #faad14;
}

.btn-warning:hover:not(:disabled) {
  background: #ffc53d;
  border-color: #ffc53d;
}

.btn-sm {
  height: 28px;
  padding: 0 8px;
  font-size: 12px;
}

.btn-block {
  width: 100%;
  height: 40px;
  font-size: 16px;
}

/* PDF 导出字段勾选标签 */
.pdf-opt-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: #555;
  cursor: pointer;
  user-select: none;
  margin-right: 4px;
}
.pdf-opt-label input[type="checkbox"] {
  cursor: pointer;
  width: 14px;
  height: 14px;
}

/* Excel 导入步骤引导 */
.import-steps {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 4px;
}
.import-step {
  display: flex;
  align-items: center;
  font-size: 13px;
  color: #444;
}
.import-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1677ff;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  margin-right: 8px;
  flex-shrink: 0;
}

/* ==================== Layout ==================== */
.admin-layout {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 220px;
  min-width: 220px;
  background: #001529;
  color: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-logo {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo-icon {
  color: #1677ff;
  flex-shrink: 0;
}

.sidebar-logo h2 {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.sidebar-menu {
  flex: 1;
  padding: 8px 0;
  overflow-y: auto;
}

.menu-item {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  transition: all 0.2s;
  gap: 10px;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.menu-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.menu-item.active {
  color: #fff;
  background: #1677ff;
}

.menu-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Main content area */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Top bar */
.topbar {
  height: 64px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  z-index: 10;
}

.topbar-title {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-user {
  font-size: 14px;
  color: #666;
}

.btn-logout {
  background: none;
  border: none;
  color: #ff4d4f;
  cursor: pointer;
  font-size: 14px;
}

.btn-logout:hover {
  color: #ff7875;
}

/* Content */
.content {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.content-panel {
  display: none;
}

.content-panel.active {
  display: block;
}

/* ==================== Cards ==================== */
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.card-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.card-body {
  padding: 24px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* ==================== Table ==================== */
.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead {
  background: #001529;
  color: #fff;
}

thead th {
  padding: 12px 16px;
  text-align: left;
  font-weight: 500;
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.2s;
}

tbody tr:nth-child(even) {
  background: #fafafa;
}

tbody tr:hover {
  background: #e6f4ff;
}

tbody td {
  padding: 12px 16px;
  vertical-align: middle;
}

.table-empty {
  text-align: center;
  padding: 40px 16px;
  color: #999;
}

/* ==================== Tags / Badges ==================== */
.tag {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  font-size: 12px;
  border-radius: 4px;
  white-space: nowrap;
}

.tag-blue {
  background: #e6f4ff;
  color: #1677ff;
  border: 1px solid #91caff;
}

.tag-green {
  background: #f6ffed;
  color: #52c41a;
  border: 1px solid #b7eb8f;
}

.tag-red {
  background: #fff2f0;
  color: #ff4d4f;
  border: 1px solid #ffccc7;
}

.tag-orange {
  background: #fff7e6;
  color: #fa8c16;
  border: 1px solid #ffd591;
}

.tag-gray {
  background: #f5f5f5;
  color: #666;
  border: 1px solid #d9d9d9;
}

/* ==================== Pagination ==================== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 16px;
  padding: 8px 0;
}

.pagination-info {
  font-size: 14px;
  color: #666;
  margin-right: 16px;
}

.pagination-btn {
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  font-size: 14px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s;
  color: #333;
}

.pagination-btn:hover:not(:disabled) {
  color: #1677ff;
  border-color: #1677ff;
}

.pagination-btn.active {
  color: #fff;
  background: #1677ff;
  border-color: #1677ff;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ==================== Filter / Search Bar ==================== */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 16px 24px;
  background: #fafafa;
  border-radius: 8px;
  border: 1px solid #f0f0f0;
}

.filter-bar .form-group {
  margin-bottom: 0;
  min-width: 160px;
}

.filter-bar .form-group input,
.filter-bar .form-group select {
  height: 32px;
  font-size: 13px;
}

.filter-bar .btn {
  height: 32px;
}

/* ==================== Modal ==================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: #fff;
  border-radius: 8px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transform: translateY(-20px);
  transition: transform 0.2s;
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  font-size: 18px;
  color: #999;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: #f5f5f5;
  color: #333;
}

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid #f0f0f0;
}

/* ==================== Tabs ==================== */
.tabs {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 20px;
}

.tab-item {
  padding: 10px 20px;
  font-size: 14px;
  color: #666;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.tab-item:hover {
  color: #1677ff;
}

.tab-item.active {
  color: #1677ff;
  border-bottom-color: #1677ff;
  font-weight: 500;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ==================== Image Thumbnail ==================== */
.thumb {
  width: 30px;
  height: auto;
  border-radius: 4px;
  cursor: pointer;
  border: 1px solid #d9d9d9;
  transition: transform 0.2s;
  display: block;
  max-height: 60px;
}

.thumb:hover {
  transform: scale(1.5);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* 用户列表头像缩略图 */
.avatar-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid #d9d9d9;
  transition: transform 0.2s;
  display: block;
}
.avatar-thumb:hover {
  transform: scale(2);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
/* 无头像时的首字占位 */
.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #e6f0ff;
  color: #1677ff;
  font-weight: 600;
}

/* Image viewer modal */
.image-viewer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.image-viewer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.image-viewer-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

/* ==================== Confirm Dialog ==================== */
.confirm-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.confirm-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.confirm-dialog {
  background: #fff;
  border-radius: 8px;
  padding: 24px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.confirm-dialog .confirm-icon {
  font-size: 48px;
  margin-bottom: 16px;
  display: block;
}

.confirm-dialog .confirm-message {
  font-size: 15px;
  color: #333;
  margin-bottom: 24px;
  line-height: 1.6;
}

.confirm-dialog .confirm-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

/* ==================== Loading ==================== */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #1677ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==================== Toast ==================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  font-size: 14px;
  animation: toastIn 0.3s ease;
  max-width: 400px;
}

.toast-success {
  border-left: 3px solid #52c41a;
}

.toast-error {
  border-left: 3px solid #ff4d4f;
}

.toast-warning {
  border-left: 3px solid #faad14;
}

.toast-info {
  border-left: 3px solid #1677ff;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ==================== Utility ==================== */
.text-success { color: #52c41a; }
.text-danger { color: #ff4d4f; }
.text-warning { color: #faad14; }
.text-muted { color: #999; }

.link-btn {
  color: #1677ff;
  text-decoration: none;
  font-family: monospace;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== 图片上传网格 ==================== */
.img-upload-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.img-upload-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
}
.img-upload-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.img-upload-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  line-height: 18px;
  text-align: center;
  font-size: 12px;
  color: #fff;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  cursor: pointer;
}
.img-upload-remove:hover { background: #ff4d4f; }
.img-upload-add {
  width: 80px;
  height: 80px;
  border: 1px dashed #d0d0d0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #999;
  cursor: pointer;
  background: #fafafa;
  transition: border-color 0.2s, color 0.2s;
}
.img-upload-add:hover { border-color: #1677ff; color: #1677ff; }
.img-upload-plus { font-size: 24px; line-height: 1; }
.img-upload-hint { font-size: 12px; }

.action-btns {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
}

.action-btns .btn-sm {
  font-size: 12px;
  height: 26px;
  padding: 0 6px;
}

/* ==================== Responsive ==================== */
@media (max-width: 1200px) {
  .filter-bar {
    gap: 8px;
  }
  .filter-bar .form-group {
    min-width: 140px;
  }
}

/* ==================== Dashboard ==================== */
.dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.kpi-card {
  position: relative;
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.kpi-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
}

.kpi-blue::before { background: #1677ff; }
.kpi-cyan::before { background: #13c2c2; }
.kpi-purple::before { background: #722ed1; }
.kpi-green::before { background: #52c41a; }

.kpi-skeleton {
  height: 104px;
  background: linear-gradient(90deg, #f5f5f5 25%, #eee 50%, #f5f5f5 75%);
  background-size: 400% 100%;
  animation: kpiShimmer 1.4s ease infinite;
}

@keyframes kpiShimmer {
  0% { background-position: 100% 0; }
  100% { background-position: 0 0; }
}

.kpi-label {
  font-size: 13px;
  color: #888;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 32px;
  font-weight: 700;
  color: #1f1f1f;
  line-height: 1.1;
}

.kpi-sub {
  margin-top: 8px;
  font-size: 12px;
  color: #999;
  display: flex;
  align-items: center;
  gap: 6px;
}

.kpi-delta {
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
}

.kpi-delta.up { color: #52c41a; background: #f6ffed; }
.kpi-delta.down { color: #ff4d4f; background: #fff2f0; }
.kpi-delta.flat { color: #888; background: #f5f5f5; }

.dash-card {
  margin-bottom: 16px;
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.dash-grid .dash-card {
  margin-bottom: 0;
}

.dash-trend-tabs {
  display: inline-flex;
  gap: 4px;
  background: #f5f5f5;
  padding: 3px;
  border-radius: 8px;
}

.trend-tab {
  border: none;
  background: none;
  padding: 5px 14px;
  border-radius: 6px;
  font-size: 13px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.trend-tab.active {
  background: #fff;
  color: #1677ff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dash-chart {
  width: 100%;
}

.line-chart {
  width: 100%;
  height: auto;
  display: block;
}

.chart-grid {
  stroke: #f0f0f0;
  stroke-width: 1;
}

.chart-ylabel {
  fill: #bbb;
  font-size: 12px;
  text-anchor: end;
}

.chart-xlabel {
  fill: #999;
  font-size: 12px;
  text-anchor: middle;
}

.chart-line {
  fill: none;
  stroke: #1677ff;
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.chart-dot {
  fill: #fff;
  stroke: #1677ff;
  stroke-width: 2;
}

.chart-empty {
  padding: 48px 0;
  text-align: center;
  color: #bbb;
  font-size: 14px;
}

.rank-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.rank-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rank-idx {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #999;
  background: #f0f0f0;
}

.rank-idx-1 { background: #ffece0; color: #fa541c; }
.rank-idx-2 { background: #fff7e0; color: #fa9d14; }
.rank-idx-3 { background: #e6f4ff; color: #1677ff; }

.rank-body {
  flex: 1;
  min-width: 0;
}

.rank-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 5px;
}

.rank-name {
  font-size: 13px;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-tag {
  font-size: 11px;
  color: #999;
  background: #f5f5f5;
  padding: 1px 5px;
  border-radius: 3px;
  margin-left: 4px;
}

.rank-count {
  font-size: 14px;
  font-weight: 700;
  color: #1677ff;
  flex-shrink: 0;
  margin-left: 8px;
}

.rank-track {
  height: 6px;
  background: #f5f5f5;
  border-radius: 3px;
  overflow: hidden;
}

.rank-fill {
  height: 100%;
  background: linear-gradient(90deg, #1677ff, #4096ff);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.dash-dispatch-summary {
  font-size: 13px;
  color: #666;
}

.text-up { color: #52c41a; }
.text-down { color: #ff4d4f; }

.dispatch-track {
  height: 28px;
  background: #fff2f0;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 6px;
}

.dispatch-fill {
  height: 100%;
  background: linear-gradient(90deg, #52c41a, #73d13d);
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  min-width: 36px;
  transition: width 0.5s ease;
}

.dispatch-legend {
  font-size: 12px;
  color: #999;
  margin-bottom: 12px;
}

.notlist-title {
  font-size: 13px;
  color: #666;
  margin-bottom: 10px;
}

.notlist-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notlist-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fafafa;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 13px;
  color: #333;
}

.notlist-chip em {
  font-style: normal;
  font-size: 11px;
  color: #999;
}

@media (max-width: 1200px) {
  .dash-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

/* 工单详情行 */
.detail-row {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f5f5f5;
  font-size: 14px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row > label {
  flex-shrink: 0;
  width: 88px;
  color: #888;
  font-weight: normal;
}
.detail-row > span { flex: 1; color: #333; word-break: break-all; }
