/* ===================================================================
   审核工作台 — 共享基础样式
   基于 design-system/DESIGN.md + PC-Desktop 布局规范
   =================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=PingFang+SC:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

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

:root {
  /* ── 色彩 ── */
  --black: #000; --white: #fff;
  --bg-viewport: #f0f0f0; --bg-sidebar: #fafafa; --bg-content: #f5f5f5;
  --bg-card: #fff; --bg-avatar: #e9e9e9;
  --pc-text: #0a0a0a; --pc-muted: #737373; --pc-sidebar-title: #171717;
  --text-body: #333; --text-muted: #6e6e73; --text-placeholder: #94a3b8;
  --text-disabled: #b9babc;
  --border-pc: #e5e5e5; --border-muted: #eee;
  --red: #ff3b30; --red-light: #fff0ef;
  --orange: #ff9500; --orange-light: #fff6eb;
  --green: #34c759; --green-light: #eefbf2;
  --blue: #007aff; --blue-dark: #1c4686;
  --blue-light: rgba(67,143,255,0.05);
  /* ── 字体 ── */
  --font-sans: 'PingFang SC', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --font-mono: 'Space Mono', 'SF Mono', monospace;
  --font-inter: 'Inter', sans-serif;
  /* ── 圆角 ── */
  --r-xs: 1px; --r-sm: 2px; --r-md: 4px; --r-btn: 6px; --r-lg: 8px; --r-xl: 14px; --r-full: 9999px;
  /* ── 阴影 ── */
  --shadow-pc: inset 0 0 0 1px var(--border-pc);
  --shadow-float: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-elevated: 0 4px 6px -1px rgba(0,0,0,0.1);
  /* ── 动画 ── */
  --ease: cubic-bezier(0.4,0,0.2,1); --dur-fast: 0.15s; --dur-normal: 0.2s;
}

/* ── 侧边栏 ── */
.sidebar {
  width: 255px; flex-shrink: 0; background: var(--bg-sidebar);
  display: flex; flex-direction: column; align-self: stretch;
  border-right: 1px solid var(--border-pc);
}

.sidebar-header {
  height: 49px; display: flex; align-items: center;
  padding: 8px; gap: 8px;
}
.sidebar-logo {
  width: 20px; height: 20px; background: var(--black); border-radius: 2px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-logo svg { width: 10px; height: 11px; }
.sidebar-title {
  font-size: 16px; font-weight: 600; color: var(--pc-sidebar-title);
  font-family: var(--font-inter);
}
.sidebar-divider { height: 1px; background: var(--border-pc); margin: 0 8px; }

.sidebar-nav { flex: 1; padding: 8px; display: flex; flex-direction: column; gap: 4px; }

.nav-item {
  height: 32px; display: flex; align-items: center; gap: 8px;
  padding: 8px; border-radius: 8px; cursor: pointer;
  transition: all var(--dur-fast) var(--ease); text-decoration: none;
}
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }
.nav-item span { font-size: 14px; font-weight: 400; color: var(--pc-text); font-family: var(--font-inter); }
.nav-item:hover { background: rgba(0,0,0,0.04); }

/* 选中态 */
.nav-item.active {
  background: var(--black); border-radius: var(--r-xs);
}
.nav-item.active span { color: var(--white); }
.nav-item.active svg { opacity: 1; }
.nav-item.active svg path,
.nav-item.active svg rect,
.nav-item.active svg circle,
.nav-item.active svg line { stroke: var(--white); }

.sidebar-group-label {
  font-size: 10px; color: var(--text-muted); padding: 12px 8px 4px;
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
}

.sidebar-footer {
  padding: 8px; border-top: 1px solid var(--border-pc);
}
.sidebar-user {
  display: flex; align-items: center; gap: 8px; padding: 8px;
}
.sidebar-avatar {
  width: 32px; height: 32px; background: var(--bg-avatar); border-radius: 2px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-avatar svg { width: 18px; height: 18px; }
.sidebar-user-name { font-size: 14px; font-weight: 600; color: var(--pc-text); }
.sidebar-user-role { font-size: 10px; color: var(--text-muted); }

/* ── 内容区 ── */
.main-content {
  flex: 1; display: flex; flex-direction: column; min-width: 0;
  background: var(--bg-card);
}

/* 顶部导航栏 */
.main-header {
  height: 49px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; border-bottom: 1px solid var(--border-pc);
  background: var(--bg-card); flex-shrink: 0;
}
.breadcrumb { display: flex; align-items: center; gap: 6px; }
.breadcrumb-home {
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  border-radius: 2px; cursor: pointer;
}
.breadcrumb-home svg { width: 16px; height: 16px; }
.breadcrumb-sep { width: 1px; height: 17px; background: var(--border-pc); }
.breadcrumb-item { font-size: 14px; color: var(--pc-muted); font-family: var(--font-inter); }
.breadcrumb-item.current { color: var(--pc-text); font-weight: 600; }
.breadcrumb-chevron { width: 14px; height: 14px; display: flex; align-items: center; }
.breadcrumb-chevron svg { width: 4.5px; height: 8px; }

.search-box {
  width: 300px; height: 32px; display: flex; align-items: center;
  padding: 4px 12px; border-radius: var(--r-xs);
  box-shadow: var(--shadow-pc); background: var(--bg-card);
}
.search-box svg { width: 16px; height: 16px; opacity: 0.5; margin-right: 8px; }
.search-placeholder { font-size: 16px; color: var(--pc-muted); opacity: 0.5; font-family: var(--font-inter); }

/* 内容主体 */
.content-body {
  flex: 1; padding: 24px; padding-bottom: 56px; background: var(--bg-content);
}

/* ── 通用组件 ── */

/* 卡片 */
.card {
  background: var(--bg-card); box-shadow: var(--shadow-pc);
  border-radius: var(--r-xs); overflow: hidden;
}
.card-header {
  padding: 12px 20px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border-muted);
}
.card-header-icon {
  width: 32px; height: 32px; background: var(--bg-content);
  box-shadow: var(--shadow-pc); border-radius: var(--r-btn);
  display: flex; align-items: center; justify-content: center;
}
.card-header-icon svg { width: 16px; height: 16px; }
.card-title { font-size: 14px; font-weight: 600; color: var(--pc-text); }
.card-body { padding: 20px; }

/* Badge / 状态标签 */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 600; padding: 3px 12px;
  border-radius: var(--r-full); white-space: nowrap;
}
.badge-pending { background: var(--orange-light); color: var(--orange); }
.badge-approved { background: var(--green-light); color: var(--green); }
.badge-rejected { background: var(--red-light); color: var(--red); }
.badge-progress { background: var(--blue-light); color: var(--blue); }
.badge-done { background: var(--bg-content); color: var(--pc-muted); }
.badge-b { background: rgba(28,70,134,0.08); color: var(--blue-dark); }

/* 等级标签 */
.level-tag {
  font-size: 11px; font-weight: 700; padding: 3px 10px;
  border-radius: var(--r-full); display: inline-flex; align-items: center; gap: 4px;
}
.level-d { background: var(--red-light); color: var(--red); }
.level-c { background: var(--orange-light); color: var(--orange); }
.level-b { background: rgba(28,70,134,0.08); color: var(--blue-dark); }
.level-a { background: var(--green-light); color: var(--green); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 12px; border-radius: var(--r-xs); font-size: 13px; font-weight: 600;
  cursor: pointer; border: none; transition: all var(--dur-fast) var(--ease);
  font-family: var(--font-sans);
}
.btn-primary { background: var(--pc-text); color: var(--white); }
.btn-primary:hover { background: #1a1a1a; }
.btn-outline { background: var(--bg-card); color: var(--pc-text); box-shadow: inset 0 0 0 1px var(--border-pc); }
.btn-outline:hover { background: #f3f4f6; }
.btn-success { background: var(--green); color: var(--white); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-content); }

/* 输入框 */
.input, .select, .textarea {
  width: 100%; padding: 8px 12px; border-radius: var(--r-xs);
  box-shadow: inset 0 0 0 1px rgb(203,213,225);
  font-size: 13px; font-family: var(--font-sans); color: var(--pc-text);
  background: var(--bg-card); transition: all var(--dur-fast) var(--ease);
  border: none; outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  box-shadow: inset 0 0 0 2px var(--blue);
}
.textarea { min-height: 80px; resize: vertical; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%236b7280'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.form-label { font-size: 13px; font-weight: 600; color: #252529; display: flex; align-items: center; gap: 4px; }
.form-label .req { color: var(--red); font-weight: 700; font-size: 12px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-row.full { grid-template-columns: 1fr; }

/* 表格 */
.table-wrap { background: var(--bg-card); box-shadow: var(--shadow-pc); border-radius: var(--r-xs); overflow: hidden; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table thead th {
  background: var(--bg-content); padding: 0 8px; height: 40px;
  text-align: left; font-weight: 500; color: var(--pc-text);
  border-bottom: 1px solid var(--border-pc); white-space: nowrap;
  font-size: 14px;
}
.data-table tbody td {
  padding: 8px; height: 53px; border-bottom: 1px solid var(--border-muted);
  vertical-align: middle; color: var(--text-body);
}
.data-table tbody tr:hover { background: rgba(0,0,0,0.02); }
.table-footer {
  padding: 12px 18px; border-top: 1px solid var(--border-muted);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--pc-muted);
}

/* Segmented Control */
.segmented {
  display: inline-flex; height: 34px; padding: 3px;
  background: var(--bg-content); border-radius: var(--r-xs);
  gap: 2px;
}
.segment {
  height: 28px; padding: 4px 12px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--pc-text);
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; transition: all var(--dur-fast) var(--ease);
  border: none; background: transparent;
}
.segment.active {
  background: var(--bg-card); border-radius: var(--r-sm);
  box-shadow: var(--shadow-float); font-weight: 600;
}
.segment .count {
  font-size: 12px; font-weight: 500; color: var(--pc-muted);
  background: var(--bg-content); padding: 1px 6px; border-radius: var(--r-full);
}
.segment.active .count { background: rgba(0,0,0,0.06); }

/* 进度条 */
.progress-bar { width: 80px; height: 6px; background: #eee; border-radius: 3px; overflow: hidden; display: inline-block; vertical-align: middle; }
.progress-fill { height: 100%; border-radius: 3px; background: var(--green); }
.progress-text { font-size: 11px; color: var(--pc-muted); margin-left: 6px; font-family: var(--font-mono); }

/* 操作链接 */
.action-link {
  font-size: 12px; font-weight: 600; color: var(--pc-text);
  cursor: pointer; padding: 4px 10px; border-radius: 4px;
  transition: all var(--dur-fast) var(--ease); text-decoration: none;
}
.action-link:hover { background: rgba(0,0,0,0.04); }

/* 信息行 */
.info-row { display: flex; align-items: center; height: 32px; gap: 8px; }
.info-label { font-size: 13px; color: var(--pc-muted); min-width: 80px; }
.info-value { font-size: 13px; font-weight: 600; color: var(--pc-text); }

/* Section Label */
.section-label {
  font-size: 11px; font-weight: 600; color: var(--text-placeholder);
  text-transform: uppercase; letter-spacing: 0.88px; margin-bottom: 12px;
}

/* 时间线 */
.timeline { list-style: none; }
.timeline-item {
  display: flex; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--border-muted);
  position: relative; padding-left: 24px;
}
.timeline-item:last-child { border-bottom: none; }
.timeline-line {
  position: absolute; left: 7px; top: 18px; bottom: -2px;
  width: 2px; background: var(--border-pc);
}
.timeline-item:last-child .timeline-line { display: none; }
.timeline-dot {
  position: absolute; left: 3px; top: 15px; width: 10px; height: 10px;
  border-radius: 50%; border: 2px solid var(--bg-card); z-index: 1;
}
.timeline-dot.green { background: var(--green); }
.timeline-dot.blue { background: var(--blue); }
.timeline-dot.red { background: var(--red); }
.timeline-dot.orange { background: var(--orange); }
.timeline-text { flex: 1; font-size: 12px; color: var(--text-body); line-height: 1.5; }
.timeline-text strong { color: var(--pc-text); display: block; margin-bottom: 2px; }
.timeline-date { font-family: var(--font-mono); font-size: 11px; color: var(--text-placeholder); white-space: nowrap; }

/* 照片缩略图 */
.thumb-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb {
  width: 160px; height: 90px; box-shadow: inset 0 0 0 1px var(--border-pc);
  border-radius: 2px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
  cursor: pointer; position: relative; overflow: hidden;
  background: var(--bg-content); transition: all var(--dur-fast) var(--ease);
}
.thumb:hover { box-shadow: inset 0 0 0 2px var(--blue); }
.thumb-icon { font-size: 24px; }
.thumb-label { font-size: 10px; font-weight: 600; color: var(--pc-text); }
.thumb-sub { font-size: 9px; color: var(--text-placeholder); }
