/* ==========================================================================
   拼豆管理后台 (Vue 3 + Element Plus 模块化架构专属样式 - Modern SaaS Edition)
   ========================================================================== */

:root {
  --el-color-primary: #FA4D6E;
  --el-color-primary-light-3: #FF7591;
  --el-color-primary-light-5: #FF9EBE;
  --el-color-primary-light-7: #FFC7D8;
  --el-color-primary-light-8: #FFDBE5;
  --el-color-primary-light-9: #FFF0F4;
  --el-color-primary-dark-2: #D12547;

  --admin-sidebar-bg: #11151E;
  --admin-sidebar-surface: #1A202C;
  --admin-sidebar-hover: rgba(255, 255, 255, 0.06);
  --admin-sidebar-active: #FA4D6E;
  --admin-sidebar-width: 240px;
  --admin-sidebar-collapsed-width: 68px;

  --admin-bg: #F6F8FA;
  --admin-card-bg: #FFFFFF;
  --admin-text-main: #111827;
  --admin-text-sub: #4B5563;
  --admin-text-muted: #9CA3AF;
  --admin-border-color: #EAECEF;

  --admin-shadow-sm: 0 1px 2px 0 rgba(17, 24, 39, 0.04);
  --admin-shadow: 0 2px 6px -1px rgba(17, 24, 39, 0.04), 0 1px 3px 0 rgba(17, 24, 39, 0.03);
  --admin-shadow-md: 0 8px 20px -4px rgba(17, 24, 39, 0.07), 0 2px 6px -2px rgba(17, 24, 39, 0.04);
  --admin-shadow-lg: 0 16px 36px -8px rgba(17, 24, 39, 0.1), 0 4px 12px -4px rgba(17, 24, 39, 0.05);

  /* 图纸生成器弹窗兼容变量 */
  --pink: #FA4D6E;
  --pink-hover: #E83A5C;
  --pink-active: #D12547;
  --ink: #1D2129;
  --ink-regular: #4E5969;
  --muted: #86909C;
  --line: #E5E6EB;
  --bg: #F6F8FA;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--admin-bg);
  color: var(--admin-text-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  font-size: 14px;
}

/* 自定义极简滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9CA3AF;
}

/* ==========================================================================
   1. 登录界面
   ========================================================================== */
.login-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(at 15% 15%, rgba(250, 77, 110, 0.12) 0px, transparent 50%),
    radial-gradient(at 85% 80%, rgba(22, 93, 255, 0.09) 0px, transparent 50%),
    #F6F8FA;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-radius: 20px;
  box-shadow: var(--admin-shadow-lg);
  padding: 42px 34px;
  border: 1px solid rgba(255, 255, 255, 0.8);
}

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

.login-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: linear-gradient(135deg, #FFF0F4 0%, #FFE0E9 100%);
  color: var(--el-color-primary);
  margin-bottom: 14px;
  box-shadow: 0 8px 20px rgba(250, 77, 110, 0.18);
}

.login-brand h1 {
  font-size: 21px;
  font-weight: 700;
  color: var(--admin-text-main);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
}

.login-brand p {
  font-size: 13px;
  color: var(--admin-text-muted);
}

/* ==========================================================================
   2. 主布局与可折叠侧边栏
   ========================================================================== */
.admin-layout {
  min-height: 100vh;
  display: flex;
}

.admin-sidebar {
  width: var(--admin-sidebar-width);
  background: linear-gradient(180deg, #11151E 0%, #151A26 100%);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
  transition: width 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

body.sidebar-collapsed .admin-sidebar {
  width: var(--admin-sidebar-collapsed-width);
}

.sidebar-logo {
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 18px;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.admin-sidebar.is-collapsed .sidebar-logo {
  padding: 0;
  justify-content: center;
}

.sidebar-logo-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, #FA4D6E 0%, #FF7591 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(250, 77, 110, 0.35);
}

.sidebar-brand-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity 0.2s ease, width 0.2s ease;
}

.admin-sidebar.is-collapsed .sidebar-brand-info {
  display: none;
}

.sidebar-logo-text {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: 0.3px;
  line-height: 1.2;
}

.sidebar-logo-sub {
  font-size: 11px;
  color: #6B7280;
  margin-top: 2px;
}

.sidebar-menu {
  flex: 1;
  border-right: none !important;
  background-color: transparent !important;
  padding: 10px 0;
  overflow-y: auto;
  overflow-x: hidden;
}

.sidebar-menu:not(.el-menu--collapse) {
  width: 100%;
}

.admin-sidebar.is-collapsed .sidebar-menu {
  width: 100% !important;
}

.sidebar-menu .el-menu-item {
  color: #9CA3AF !important;
  height: 44px;
  line-height: 44px;
  margin: 4px 10px;
  padding: 0 14px !important;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.admin-sidebar.is-collapsed .sidebar-menu .el-menu-item {
  margin: 4px 10px;
  padding: 0 !important;
  justify-content: center;
}

.admin-sidebar.is-collapsed .sidebar-menu .el-menu-item .el-menu-tooltip__trigger {
  padding: 0 !important;
  justify-content: center !important;
}

.sidebar-menu .el-menu-item:hover {
  background-color: var(--admin-sidebar-hover) !important;
  color: #F9FAFB !important;
}

.sidebar-menu .el-menu-item.is-active {
  background: linear-gradient(135deg, #FA4D6E 0%, #FF6B88 100%) !important;
  color: #FFFFFF !important;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(250, 77, 110, 0.36);
}

.sidebar-menu .el-menu-item .el-icon {
  font-size: 17px;
  margin-right: 0 !important;
  flex-shrink: 0;
}

.menu-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-menu-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #F53F3F;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 2px 6px rgba(245, 63, 63, 0.45);
  margin-left: auto;
}

.el-menu-item.is-active .sidebar-menu-badge {
  background: #FFFFFF;
  color: #FA4D6E;
  box-shadow: none;
}

.el-popper .sidebar-menu-badge {
  margin-left: 8px;
  vertical-align: middle;
}

.sidebar-collapsed-dot {
  position: absolute;
  top: 9px;
  right: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F53F3F;
  border: 2px solid #131722;
  box-shadow: 0 0 8px rgba(245, 63, 63, 0.8);
}

/* 底部折叠按钮 */
.sidebar-bottom-action {
  padding: 8px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-toggle-btn {
  width: 100%;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.04);
  color: #9CA3AF;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s ease;
}

.sidebar-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #FFFFFF;
}

.sidebar-footer {
  padding: 10px 14px 14px;
  font-size: 11px;
  color: #6B7280;
  text-align: center;
  line-height: 1.5;
}

.version-tag {
  color: #9CA3AF;
  font-weight: 500;
}

.tech-stack-tag {
  opacity: 0.7;
  font-size: 10.5px;
}

/* ==========================================================================
   3. 主内容区 & 玻璃拟态顶栏 (TopHeader)
   ========================================================================== */
.admin-main-wrap {
  flex: 1;
  margin-left: var(--admin-sidebar-width);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

body.sidebar-collapsed .admin-main-wrap {
  margin-left: var(--admin-sidebar-collapsed-width);
}

.admin-header {
  height: 60px;
  background-color: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--admin-border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-breadcrumb-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.breadcrumb-home {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--admin-text-muted);
  font-weight: 500;
}

.crumb-icon {
  font-size: 15px;
}

.crumb-separator {
  color: #D1D5DB;
  font-size: 13px;
}

.crumb-current {
  color: var(--admin-text-main);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.clock-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--admin-text-sub);
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  padding: 5px 12px;
  border-radius: 999px;
  font-variant-numeric: tabular-nums;
}

.live-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00B42A;
  box-shadow: 0 0 0 0 rgba(0, 180, 42, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(0, 180, 42, 0.65); }
  70% { box-shadow: 0 0 0 6px rgba(0, 180, 42, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 180, 42, 0); }
}

.header-tool-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--admin-border-color);
  background: #FFFFFF;
  color: var(--admin-text-sub);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: all 0.2s ease;
}

.header-tool-btn:hover {
  border-color: #D1D5DB;
  background: #F9FAFB;
  color: var(--admin-text-main);
  transform: translateY(-1px);
  box-shadow: var(--admin-shadow-sm);
}

.spin-anim {
  animation: spin360 0.7s linear infinite;
}

@keyframes spin360 {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.admin-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 5px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid var(--admin-border-color);
  color: var(--admin-text-main);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-user-pill:hover {
  border-color: rgba(250, 77, 110, 0.45);
  background: #FFF9FA;
  box-shadow: var(--admin-shadow-sm);
}

.user-avatar-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FA4D6E 0%, #FF7591 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.dropdown-arrow-icon {
  font-size: 12px;
  color: var(--admin-text-muted);
}

.dropdown-user-banner {
  padding: 10px 14px;
  border-bottom: 1px solid #F3F4F6;
  margin-bottom: 4px;
}

.banner-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--admin-text-main);
}

.banner-sub {
  font-size: 11.5px;
  color: var(--admin-text-muted);
  margin-top: 2px;
}

.admin-body {
  padding: 22px 26px;
  flex: 1;
}

/* 全屏模式微调 */
:fullscreen .admin-body {
  background: var(--admin-bg);
}

/* ==========================================================================
   4. 仪表盘控制中心 (Overview.js)
   ========================================================================== */
.overview-container {
  margin-bottom: 22px;
}

/* 顶部待办预警横幅 */
.pending-alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 18px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: linear-gradient(90deg, #FFF7E8 0%, #FFFBF2 100%);
  border: 1px solid #FFD591;
  box-shadow: 0 2px 10px rgba(255, 125, 0, 0.08);
}

.alert-banner-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.alert-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: #FF7D00;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
}

.alert-banner-text {
  font-size: 13.5px;
  color: #7C4400;
}

.alert-jump-btn {
  border-radius: 8px !important;
  font-weight: 600 !important;
  flex-shrink: 0;
}

/* 顶部 KPI 数据卡片网格 */
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card-item {
  background: var(--admin-card-bg);
  border-radius: 14px;
  padding: 18px 20px;
  border: 1px solid var(--admin-border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--admin-shadow);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--admin-shadow-md);
  border-color: #D8DCE3;
}

.stat-card-clickable {
  cursor: pointer;
}

.stat-card-clickable.has-warning {
  border-color: #FECACA;
  background: linear-gradient(180deg, #FFFFFF 0%, #FFF9F9 100%);
}

.stat-card-clickable.has-warning:hover {
  border-color: #FCA5A5;
}

.stat-card-content {
  flex: 1;
  min-width: 0;
}

.stat-card-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.stat-card-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text-sub);
}

.stat-trend-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.pill-blue { background: #EBF3FF; color: #165DFF; }
.pill-amber { background: #FFF7E6; color: #D46B08; }
.pill-green { background: #E8FFEA; color: #009A29; }
.pill-rose { background: #FFF0F4; color: #E02E52; }
.pill-danger { background: #FFECE8; color: #CB272D; }
.pill-success { background: #E8FFEA; color: #009A29; }

.stat-card-val {
  font-size: 25px;
  font-weight: 800;
  color: var(--admin-text-main);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.val-unit {
  font-size: 13px;
  font-weight: 600;
  color: var(--admin-text-muted);
  margin-left: 2px;
}

.stat-card-sub {
  font-size: 12px;
  color: var(--admin-text-muted);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-card-icon-wrap {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.icon-blue { background: #EBF3FF; color: #165DFF; }
.icon-amber { background: #FFF7E6; color: #FF7D00; }
.icon-green { background: #E8FFEA; color: #00B42A; }
.icon-rose { background: #FFF0F4; color: #FA4D6E; }
.icon-danger { background: #FFECE8; color: #F53F3F; }
.icon-purple { background: #F5E8FF; color: #722ED1; }

/* 运营态势与快捷控制面板 */
.executive-panel-card {
  background: var(--admin-card-bg);
  border-radius: 16px;
  border: 1px solid var(--admin-border-color);
  box-shadow: var(--admin-shadow);
  overflow: hidden;
}

.executive-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 15px 22px;
  border-bottom: 1px solid #F2F4F7;
  background: linear-gradient(180deg, #FCFDFF 0%, #FFFFFF 100%);
}

.executive-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.executive-icon-dot {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, #FFF0F4 0%, #FFE2EA 100%);
  color: #FA4D6E;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.executive-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--admin-text-main);
}

.executive-subtitle {
  font-size: 12px;
  color: var(--admin-text-muted);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.executive-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Apple 风格分段控制器 */
.metric-segmented-ctrl {
  display: inline-flex;
  background: #F3F4F6;
  padding: 3px;
  border-radius: 9px;
  gap: 2px;
}

.seg-btn {
  border: none;
  background: transparent;
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--admin-text-sub);
  cursor: pointer;
  transition: all 0.18s ease;
}

.seg-btn:hover {
  color: var(--admin-text-main);
}

.seg-btn.active {
  background: #FFFFFF;
  color: var(--admin-text-main);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.panel-collapse-btn {
  border-radius: 8px !important;
  font-size: 12px !important;
}

.executive-panel-body {
  display: grid;
  grid-template-columns: minmax(0, 1.75fr) minmax(300px, 1fr);
  gap: 24px;
  padding: 20px 22px;
}

/* 左侧趋势图表区 */
.trend-chart-section {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.chart-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.chart-summary-pills {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.summary-chip {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.chip-label {
  font-size: 12px;
  color: var(--admin-text-muted);
}

.chip-value {
  font-size: 14.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.chart-hover-readout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--admin-text-main);
  font-variant-numeric: tabular-nums;
}

.chart-hover-readout.muted {
  color: var(--admin-text-muted);
  border-style: dashed;
}

.readout-date {
  font-weight: 700;
  color: #165DFF;
}

.readout-sep {
  color: #CBD5E1;
}

.svg-chart-wrap {
  width: 100%;
  background: #FAFBFD;
  border: 1px solid #F0F2F5;
  border-radius: 12px;
  padding: 12px 10px 6px;
}

.trend-svg-canvas {
  width: 100%;
  height: 190px;
  display: block;
}

.chart-y-label {
  font-size: 11px;
  fill: #9CA3AF;
  font-variant-numeric: tabular-nums;
}

.chart-x-label {
  font-size: 11px;
  fill: #6B7280;
  font-variant-numeric: tabular-nums;
  transition: fill 0.15s;
}

.chart-x-label.is-active {
  fill: #111827;
  font-weight: 700;
}

.chart-val-label {
  font-size: 10.5px;
  fill: #6B7280;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.chart-val-label.is-active {
  fill: #111827;
  font-size: 11.5px;
  font-weight: 700;
}

.svg-bar-rect {
  transition: opacity 0.18s ease, filter 0.18s ease;
  opacity: 0.88;
}

.svg-bar-rect.is-hovered {
  opacity: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.12));
}

/* 右侧快捷操作中心 */
.quick-actions-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-left: 1px solid #F0F2F5;
  padding-left: 22px;
}

.section-mini-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--admin-text-main);
}

.mini-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--admin-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid #EAECEF;
  background: #FFFFFF;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.quick-action-btn:hover {
  border-color: rgba(250, 77, 110, 0.4);
  background: #FFFDFD;
  transform: translateY(-2px);
  box-shadow: var(--admin-shadow-sm);
}

.qa-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.qa-info {
  flex: 1;
  min-width: 0;
}

.qa-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--admin-text-main);
  line-height: 1.25;
}

.qa-desc {
  font-size: 11px;
  color: var(--admin-text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qa-arrow {
  font-size: 12px;
  color: #D1D5DB;
  transition: transform 0.2s ease, color 0.2s ease;
}

.quick-action-btn:hover .qa-arrow {
  color: #FA4D6E;
  transform: translateX(2px);
}

/* 待办与状态微卡片 */
.pending-status-box {
  background: #F9FAFB;
  border: 1px solid #ECEEF3;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}

.pending-box-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
}

.pending-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--admin-text-sub);
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.dot-warn {
  background: #FF7D00;
  box-shadow: 0 0 6px rgba(255, 125, 0, 0.7);
}

.dot-ok {
  background: #00B42A;
}

.pending-action {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pending-count-text {
  font-weight: 700;
  color: #F53F3F;
}

.pending-clear-text {
  color: #00B42A;
  font-weight: 600;
}

.pending-val {
  font-weight: 700;
  color: var(--admin-text-main);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   5. 统一业务视图容器、表格增强、状态指示药丸与图片预览
   ========================================================================== */
.panel-card {
  background: var(--admin-card-bg);
  border-radius: 16px;
  border: 1px solid var(--admin-border-color);
  box-shadow: var(--admin-shadow);
  padding: 22px 24px;
  margin-bottom: 24px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #F2F4F7;
}

.panel-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--admin-text-main);
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: -0.01em;
}

.panel-title .el-icon {
  color: var(--el-color-primary);
  font-size: 18px;
}

.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

/* Element Plus 表格精细化升级 */
.el-table {
  border-radius: 10px;
  overflow: hidden;
  --el-table-border-color: #F0F2F5;
  --el-table-header-bg-color: #F9FAFB;
}

.el-table th.el-table__cell {
  background-color: #F9FAFB !important;
  color: #4B5563 !important;
  font-weight: 600 !important;
  font-size: 12.5px !important;
  padding: 11px 0 !important;
}

.el-table td.el-table__cell {
  padding: 11px 0 !important;
  font-size: 13.5px;
}

.el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell {
  background-color: #F8FAFC !important;
  transition: background-color 0.15s ease;
}

/* 通用汇总数据条与状态药丸 */
.summary-stats-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 12px 16px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: #F8FAFC;
  border: 1px solid #ECEEF3;
  font-size: 13px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.status-pill::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.is-success { background: #ECFDF5; color: #059669; }
.status-pill.is-warning { background: #FFFBEB; color: #D97706; }
.status-pill.is-danger  { background: #FEF2F2; color: #DC2626; }
.status-pill.is-info    { background: #F3F4F6; color: #4B5563; }
.status-pill.is-purple  { background: #F5F3FF; color: #7C3AED; }

/* 弹窗与按钮精细化 */
.el-dialog {
  border-radius: 16px !important;
  overflow: hidden;
  box-shadow: var(--admin-shadow-lg) !important;
}

.el-dialog__header {
  border-bottom: 1px solid #F2F4F7;
  padding: 16px 22px !important;
  margin-right: 0 !important;
}

.el-dialog__title {
  font-weight: 700 !important;
  font-size: 16px !important;
}

.el-button {
  transition: all 0.18s ease !important;
}

.table-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  vertical-align: middle;
  border: 1px solid #EAECEF;
}

.thumb-preview {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #E5E7EB;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.thumb-preview:hover {
  transform: scale(1.06);
  box-shadow: var(--admin-shadow-sm);
}

/* 海报与二维码预览框 */
.poster-modal-preview {
  width: 220px;
  height: 315px;
  border-radius: 10px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border: 1px solid #E5E7EB;
}

.qr-modal-preview {
  width: 180px;
  height: 180px;
  border-radius: 10px;
  border: 1px solid #E5E7EB;
  padding: 4px;
  background: #FFFFFF;
}

/* ==========================================================================
   6. 响应式适配 (平板/小屏)
   ========================================================================== */
@media (max-width: 1120px) {
  .executive-panel-body {
    grid-template-columns: 1fr;
  }

  .quick-actions-section {
    border-left: none;
    padding-left: 0;
    border-top: 1px solid #F0F2F5;
    padding-top: 18px;
  }
}

@media (max-width: 768px) {
  .admin-sidebar:not(.is-collapsed) {
    width: 210px;
  }

  .admin-main-wrap {
    margin-left: 210px;
  }

  body.sidebar-collapsed .admin-main-wrap {
    margin-left: var(--admin-sidebar-collapsed-width);
  }

  .admin-header {
    padding: 0 16px;
  }

  .clock-badge {
    display: none;
  }

  .admin-body {
    padding: 16px;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   7. 图纸生成与预览器独立弹窗 (pattern-viewer.js)
   ========================================================================== */
.mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.56);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2200;
  animation: pmMaskFadeIn 0.18s ease-out;
}

@keyframes pmMaskFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pmModalZoomIn {
  from { transform: scale(0.96); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.mask button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 8px;
  padding: 0 14px;
  height: 32px;
  font-size: 12px;
  font-weight: 600;
  background: var(--pink);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(250, 77, 110, 0.22);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.mask button:hover:not(:disabled) {
  background: var(--pink-hover);
  box-shadow: 0 4px 12px rgba(250, 77, 110, 0.34);
}

.mask button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mask button.ghost {
  background: #FFFFFF;
  color: var(--ink-regular);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
}

.mask button.ghost:hover:not(:disabled) {
  background: #F9FAFB;
  color: var(--ink);
  border-color: #D1D5DB;
  box-shadow: 0 1px 3px rgba(17, 24, 39, 0.08);
}

.mask button.small {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.mask select,
.mask input[type="number"],
.mask input[type="text"] {
  font-family: inherit;
  font-size: 12px;
  height: 32px;
  padding: 4px 10px;
  border: 1px solid #D1D5DB;
  border-radius: 8px;
  outline: none;
  background: #FFFFFF;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mask select:focus,
.mask input:focus {
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(250, 77, 110, 0.12);
}

.pattern-modal {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 22px 24px;
  width: min(96vw, 1140px);
  max-height: 92vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 24px 56px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.8);
  animation: pmModalZoomIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pattern-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 12px;
}

.pattern-modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pattern-modal .pm-sub {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.pattern-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
  background: #F9FAFB;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
}

.pattern-toolbar label {
  font-size: 12px;
  color: var(--ink-regular);
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-weight: 600;
}

.pattern-toolbar select,
.pattern-toolbar input[type="number"] {
  min-width: 112px;
  width: auto;
}

.pm-tip {
  font-size: 12px;
  line-height: 1.5;
  color: #92400E;
  background: #FFFBEB;
  border: 1px solid #FDE68A;
  border-radius: 8px;
  padding: 9px 12px;
}

.pm-canvas-wrap {
  display: flex;
  gap: 16px;
  align-items: stretch;
  min-height: 440px;
}

.pm-canvas-scroll {
  flex: 2;
  min-width: 0;
  max-height: 580px;
  overflow: auto;
  background: #F3F4F6;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  display: block;
}

#pm-canvas {
  display: block;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid #D1D5DB;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  image-rendering: pixelated;
}

.pm-legend {
  flex: 1;
  min-width: 270px;
  max-width: 340px;
  max-height: 580px;
  overflow-y: auto;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.pm-legend-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #F3F4F6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pm-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  margin-bottom: 4px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  border-left: 3px solid transparent;
}

.pm-legend-row:hover {
  background: #F9FAFB;
}

.pm-legend-row.active {
  background: #FFF0F4;
  border-left-color: var(--pink);
  font-weight: 700;
}

.pm-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.14);
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.pm-legend-code {
  font-weight: 700;
  color: var(--ink);
  min-width: 48px;
}

.pm-legend-name {
  color: var(--muted);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-legend-cnt {
  color: var(--pink);
  font-weight: 700;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.pm-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 360px;
  color: var(--muted);
  font-size: 14px;
}

.pm-qrcode-card {
  margin-top: auto;
  padding: 12px;
  background: #FFF4F9;
  border: 1px dashed #FF9EBE;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pm-qrcode-title {
  font-size: 12px;
  font-weight: 700;
  color: #D80044;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.pm-qrcode-grid {
  display: flex;
  gap: 12px;
  justify-content: space-around;
}

.pm-qr-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.pm-qr-item img {
  width: 84px;
  height: 84px;
  background: #FFFFFF;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pm-qr-label {
  font-size: 11px;
  color: var(--ink-regular);
  font-weight: 500;
}

@media (max-width: 900px) {
  .pm-canvas-wrap {
    flex-direction: column;
  }
  .pm-legend {
    max-width: none;
    width: 100%;
    max-height: 320px;
  }
}
