/* =========================================================
   服装质检反馈管理系统 - 现代极简设计系统 (Modern Clean UI)
   ========================================================= */

@charset "UTF-8";

:root {
  /* 品牌与主色调 */
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;
  --primary-glow: rgba(79, 70, 229, 0.15);

  /* 语义色彩 */
  --success: #10b981;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;
  --success-text: #065f46;

  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;

  --danger: #ef4444;
  --danger-light: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #991b1b;

  --info: #0284c7;
  --info-light: #f0f9ff;
  --info-border: #bae6fd;
  --info-text: #075985;

  /* 背景系统 - 简洁通透底色 */
  --bg-main: #f8fafc;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --bg-hover: #f8fafc;

  /* 边框与阴影 */
  --border-color: #e2e8f0;
  --border-light: #f1f5f9;
  --border-focus: #818cf8;

  /* 文本系统 - 字号层级提升，清晰护眼 */
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  /* 层次阴影 */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 8px -2px rgba(15, 23, 42, 0.06), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 20px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 28px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  /* 圆角 */
  --radius-sm: 8px;
  --radius-md: 11px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* 过渡 */
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  font-size: 15px; /* 全局基础字体调大，阅读更舒适清晰 */
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================= 主布局 ================= */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100vw;
  overflow-x: hidden;
  background-color: var(--bg-main);
}

/* ================= 左侧导航侧边栏 ================= */
.app-sidebar {
  width: 268px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.02);
}

.sidebar-header {
  padding: 22px 20px 18px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 12px var(--primary-glow);
  flex-shrink: 0;
}

.sidebar-brand h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.sidebar-brand p {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* 角色切换卡片 (运营 / 主管) */
.role-switch-box {
  padding: 16px 18px 10px 18px;
}

.role-pills {
  background: var(--bg-subtle);
  border-radius: var(--radius-md);
  padding: 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  border: 1px solid var(--border-color);
}

.role-pill-btn {
  border: none;
  background: transparent;
  padding: 8px 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}

.role-pill-btn:hover:not(.active) {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.5);
}

.role-pill-btn.active {
  background: #ffffff;
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* 侧边栏导航列表 */
.sidebar-nav-section {
  padding: 12px 14px;
  flex: 1;
}

.nav-group-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 10px 12px 6px 12px;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  user-select: none;
}

.nav-item:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
  transform: translateX(2px);
}

.nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border-color: rgba(99, 102, 241, 0.25);
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 11px;
}

.nav-platform-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.icon-ae { background: #ff4747; color: #fff; }       /* 速卖通红 */
.icon-tk { background: #000000; color: #00f2fe; }    /* TK黑蓝 */
.icon-ml { background: #ffe600; color: #2d3277; font-weight: 800; }    /* 美客多黄 */
.icon-sh { background: #111111; color: #ffffff; }    /* 希音黑 */
.icon-tm { background: #fb5705; color: #ffffff; }    /* TEMU橙 */
.icon-gov { background: #e0e7ff; color: #4338ca; font-size: 15px; }   /* 管理图标 */

.nav-badge {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  min-width: 22px;
  text-align: center;
}

.nav-item.active .nav-badge {
  background: #ffffff;
  color: var(--primary);
  border-color: var(--primary-border);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.sidebar-footer {
  padding: 16px 18px;
  margin: 14px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 12.5px;
  color: var(--text-muted);
}

.sidebar-footer .tip-title {
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 4px;
}

/* ================= 右侧主工作区 ================= */
.app-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background-color: var(--bg-main);
}

/* 顶部信息栏 */
.top-navbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.top-navbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.top-navbar-title h1 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.top-tag {
  font-size: 12.5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 600;
  border: 1px solid var(--primary-border);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.top-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  display: inline-block;
}

.top-navbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* 主内容容器 */
.content-body {
  padding: 26px 32px 40px 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
}

/* ================= 运营端专区：直接填写质检数据卡片 ================= */
.op-entry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.op-entry-card:hover {
  box-shadow: var(--shadow-md);
}

.op-entry-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #818cf8, #a5b4fc);
}

.op-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
  flex-wrap: wrap;
  gap: 10px;
}

.op-card-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.card-subtitle {
  font-size: 13.5px;
  color: var(--text-muted);
}

.platform-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 14px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  border: 1px solid var(--primary-border);
}

.op-form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.col-span-3 {
  grid-column: span 3;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.form-label.required::after {
  content: ' *';
  color: var(--danger);
  font-weight: 700;
}

.form-input, .form-textarea, .form-select {
  padding: 10px 14px;
  font-size: 14.5px; /* 输入框字体调大 */
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  background: #ffffff;
  transition: var(--transition);
  font-family: inherit;
  color: var(--text-main);
  line-height: 1.5;
}

.form-input::placeholder, .form-textarea::placeholder {
  color: var(--text-light);
  font-size: 14px;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.16);
  background: #fff;
}

.form-select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2364748b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 18px 18px;
  padding-right: 36px;
  appearance: none;
}

/* 按钮通用 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  outline: none;
  user-select: none;
  white-space: nowrap;
  font-family: inherit;
  line-height: 1.4;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #6366f1 100%);
  color: #ffffff;
  box-shadow: 0 2px 8px var(--primary-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #4f46e5 100%);
  box-shadow: 0 4px 14px var(--primary-glow);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: #cbd5e1;
  color: var(--text-main);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.btn-outline-danger {
  background: transparent;
  border-color: #fecaca;
  color: var(--danger);
}

.btn-outline-danger:hover {
  background: var(--danger-light);
  border-color: var(--danger);
}

/* 实物图片凭证上传框 */
.image-upload-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.image-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.image-preview-item {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  position: relative;
  background: #f1f5f9;
  box-shadow: var(--shadow-xs);
  transition: var(--transition);
}

.image-preview-item:hover {
  box-shadow: var(--shadow-sm);
  border-color: var(--border-focus);
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.image-remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 22px;
  height: 22px;
  background: rgba(239, 68, 68, 0.95);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: var(--transition);
}

.image-remove-btn:hover {
  background: #dc2626;
  transform: scale(1.1);
}

.upload-trigger-btn {
  width: 96px;
  height: 96px;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: var(--transition);
  background: #fafafa;
}

.upload-trigger-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}

.upload-trigger-text {
  font-size: 12.5px;
  margin-top: 5px;
  font-weight: 500;
}

/* ================= 主管端看板区 ================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

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

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 28px; /* 指标大字号，清晰醒目 */
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat-sub {
  font-size: 13px;
  color: var(--text-light);
  margin-top: 8px;
}

.stat-icon {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.icon-blue { background: #eff6ff; color: #2563eb; }
.icon-amber { background: #fffbeb; color: #d97706; }
.icon-indigo { background: #eef2ff; color: #4f46e5; }
.icon-emerald { background: #ecfdf5; color: #059669; }
.icon-rose { background: #ffe4e6; color: #e11d48; }

.loss-badge {
  font-weight: 700;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 13px;
  display: inline-block;
  white-space: nowrap;
}

.upload-paste-hint {
  font-size: 11px;
  color: var(--primary);
  margin-top: 2px;
  font-weight: 600;
}

/* 五大平台汇总对比与瑕疵排行榜 */
.supervisor-analytics-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 20px;
}

.analytics-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.analytics-card:hover {
  box-shadow: var(--shadow-md);
}

.analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.analytics-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.analytics-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* 平台对比矩阵行 */
.platform-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: #f8fafc;
  margin-bottom: 10px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.platform-stat-row:hover {
  background: #ffffff;
  box-shadow: var(--shadow-xs);
  border-color: var(--primary-border);
}

.platform-stat-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.platform-pill-tag {
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: inline-block;
  letter-spacing: 0.02em;
}

.platform-counts-group {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13.5px;
}

/* 瑕疵排行榜 */
.defect-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.defect-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.defect-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text-main);
}

.bar-track {
  height: 9px;
  background: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================= 列表表格卡片 ================= */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.table-card:hover {
  box-shadow: var(--shadow-md);
}

.table-header-bar {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: #ffffff;
}

.table-title-wrap h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-filters-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-input {
  min-width: 240px;
}

/* 主管端时间筛选组件 */
.date-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.date-filter-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.date-input {
  width: 132px;
  padding: 6px 8px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
  transition: var(--transition);
}

.date-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}

.date-sep {
  font-size: 12px;
  color: var(--text-light);
}

.quick-date-tags {
  display: inline-flex;
  gap: 3px;
  margin-left: 2px;
}

.btn-quick-date {
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-quick-date:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.btn-quick-date.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 1px 3px var(--primary-glow);
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 1060px;
}

.data-table th {
  background: #f8fafc;
  padding: 14px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.data-table td {
  padding: 14px 18px;
  font-size: 14px; /* 表格主体字体统一调大 */
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  vertical-align: middle;
  transition: background 0.15s ease;
}

.data-table tbody tr:hover td {
  background: #f8fafc;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* 主管端处理状态背景高亮对比 */
.data-table tbody tr.row-processed td {
  background: #f0fdf4; /* 清爽柔和浅绿：代表已由主管出具处理意见/指定工厂 */
}

.data-table tbody tr.row-processed:hover td {
  background: #dcfce7;
}

.data-table tbody tr.row-processed td:first-child {
  border-left: 4px solid #10b981;
}

.data-table tbody tr.row-unprocessed td {
  background: #fffbeb; /* 醒目警示浅暖黄：代表待主管出具意见/未指定工厂 */
}

.data-table tbody tr.row-unprocessed:hover td {
  background: #fef3c7;
}

.data-table tbody tr.row-unprocessed td:first-child {
  border-left: 4px solid #f59e0b;
}

.tag-processed-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.2;
}

.tag-is-processed {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.tag-not-processed {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

/* 状态徽章 */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.badge-pending { background: var(--warning-light); color: var(--warning-text); border: 1px solid var(--warning-border); }
.badge-pending::before { background: var(--warning); }

.badge-processing { background: var(--info-light); color: var(--info-text); border: 1px solid var(--info-border); }
.badge-processing::before { background: var(--info); }

.badge-resolved { background: var(--success-light); color: var(--success-text); border: 1px solid var(--success-border); }
.badge-resolved::before { background: var(--success); }

.badge-rejected { background: var(--danger-light); color: var(--danger-text); border: 1px solid var(--danger-border); }
.badge-rejected::before { background: var(--danger); }

/* 瑕疵与责任人高亮 */
.defect-desc-preview {
  max-width: 280px;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.5;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.assignee-badge {
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: inline-block;
}

.assignee-unassigned {
  color: var(--warning-text);
  background: var(--warning-light);
  border: 1px solid var(--warning-border);
  padding: 3px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: inline-block;
}

.opinion-preview {
  max-width: 240px;
  color: var(--text-muted);
  font-size: 13.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-img-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.table-img-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
  z-index: 2;
  position: relative;
}

/* 表格底部分页 */
.table-footer {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
}

.pagination-info {
  font-size: 13.5px;
  color: var(--text-muted);
}

.page-indicator {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 28px;
  padding: 0 6px;
}

/* ================= 模态弹窗 (主管审核处置) ================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 24px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

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

.modal-header {
  padding: 18px 26px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  border-radius: 6px;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.modal-body {
  padding: 26px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-footer {
  padding: 16px 26px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}

/* 主管处理卡片区 */
.supervisor-action-box {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-top: 6px;
}

.supervisor-action-box h4 {
  font-size: 15px;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 详情基础指标网格 */
.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  background: #f8fafc;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item-label {
  font-size: 12.5px;
  color: var(--text-muted);
}

.detail-item-val {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
}

/* 瑕疵照片展示 */
.detail-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}

.detail-gallery-img {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 1px solid var(--border-color);
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.detail-gallery-img:hover {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* 履历时间轴 */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 6px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: #e2e8f0;
}

.timeline-step {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.timeline-dot {
  position: absolute;
  left: -20px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

.timeline-time {
  font-size: 12.5px;
  color: var(--text-light);
}

.timeline-content {
  font-size: 14px;
  color: var(--text-main);
}

.timeline-comment {
  font-size: 13.5px;
  color: var(--text-secondary);
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  margin-top: 4px;
}

/* Toast */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 12px 22px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.toast-success { background: #059669; }
.toast-error { background: #dc2626; }
.toast-info { background: #2563eb; }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* 灯箱全屏放大 */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  cursor: zoom-out;
  padding: 30px;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0,0,0,0.6);
  object-fit: contain;
}

/* 响应式适配 */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .supervisor-analytics-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .op-form-grid { grid-template-columns: 1fr 1fr; }
  .col-span-3 { grid-column: span 2; }
}

@media (max-width: 768px) {
  .app-layout { flex-direction: column; }
  .app-sidebar { width: 100%; height: auto; position: static; }
  .top-navbar { padding: 14px 18px; }
  .content-body { padding: 18px; }
  .op-form-grid { grid-template-columns: 1fr; }
  .col-span-3 { grid-column: span 1; }
  .stats-grid { grid-template-columns: 1fr; }
}
