/* ============================================================
   S级客户拍摄计划动态管理系统 - 全局样式
   ============================================================ */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #dbeafe;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #d97706;
  --warning-light: #fef3c7;
  --danger: #dc2626;
  --danger-light: #fee2e2;
  --info: #0891b2;
  --info-light: #cffafe;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --sidebar-width: 240px;
  --header-height: 56px;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --transition: all 0.2s ease;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: var(--gray-800);
  background: var(--gray-50);
  min-height: 100vh;
}

/* ---- 登录页 ---- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 50%, #1e40af 100%);
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 { font-size: 22px; color: var(--gray-800); font-weight: 700; }
.login-logo p { color: var(--gray-500); font-size: 13px; margin-top: 6px; }
.login-form .form-group { margin-bottom: 18px; }
.login-form label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 6px; }
.login-form input {
  width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-200);
  border-radius: var(--radius); font-size: 14px; transition: var(--transition);
  outline: none;
}
.login-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.btn-login {
  width: 100%; padding: 11px; background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: var(--transition); margin-top: 8px;
}
.btn-login:hover { background: var(--primary-dark); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }
.login-error { color: var(--danger); font-size: 13px; margin-top: 10px; text-align: center; min-height: 20px; }

/* ---- 布局 ---- */
#app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-width);
  background: var(--gray-900);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform 0.3s ease;
}
.sidebar.hidden { transform: translateX(-100%); }
.sidebar-header {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.logo-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.user-info { display: flex; flex-direction: column; gap: 4px; }
#user-name { font-size: 13px; color: rgba(255,255,255,0.8); }
/* ---- 角色标签（按角色分色） ---- */
.role-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; font-size: 11px; border-radius: 20px;
  font-weight: 600; letter-spacing: 0.3px; white-space: nowrap;
}
.role-badge--manager         { background: #fef2f2; color: #dc2626; }
.role-badge--admin           { background: #f5f3ff; color: #7c3aed; }
.role-badge--project_manager { background: #eff6ff; color: #2563eb; }
.role-badge--designer        { background: #f0fdf4; color: #16a34a; }
.role-badge--design_leader   { background: #ecfdf5; color: #059669; }
.role-badge--brand_staff     { background: #fff7ed; color: #ea580c; }
.role-badge--delivery_assistant { background: #f0f9ff; color: #0284c7; }
.role-badge--delivery_director  { background: #e0f2fe; color: #0369a1; }

/* ---- 用户统计栏 ---- */
.users-stats-bar {
  background: #fff;
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
}
.stat-card-mini {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 20px;
  border-right: 1px solid var(--gray-100);
  min-width: 100px;
}
.stat-card-mini:last-of-type { border-right: none; }
.stat-card-mini__icon { font-size: 22px; line-height: 1; }
.stat-card-mini__num { font-size: 22px; font-weight: 800; color: var(--gray-900); line-height: 1; }
.stat-card-mini__label { font-size: 11px; color: var(--gray-500); margin-top: 2px; }
.stat-card-mini--green .stat-card-mini__num { color: #16a34a; }
.stat-card-mini--orange .stat-card-mini__num { color: #ea580c; }
.stat-card-mini--blue .stat-card-mini__num { color: #2563eb; }

.user-filter-area {
  margin-left: auto;
  display: flex; align-items: center;
}
.filter-chips { display: flex; gap: 8px; align-items: center; }
.filter-chip-select {
  padding: 6px 10px; border: 1px solid var(--gray-200);
  border-radius: 8px; font-size: 13px; outline: none;
  background: #fff; color: var(--gray-800); cursor: pointer;
  transition: border-color 0.15s;
}
.filter-chip-select:focus { border-color: var(--primary); }

/* ---- 用户卡片网格 ---- */
.user-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  padding: 20px 24px;
}
.user-card {
  background: #fff;
  border: 1px solid var(--gray-100);
  border-radius: 12px;
  padding: 20px 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  transition: box-shadow 0.2s, transform 0.15s;
  position: relative;
}
.user-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}
.user-card--inactive { opacity: 0.55; }

.user-card__avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 800; color: #fff;
  position: relative;
  flex-shrink: 0;
}
.user-card__status-dot {
  position: absolute; bottom: 1px; right: 1px;
  width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid #fff;
}
.user-card__status-dot.active  { background: #16a34a; }
.user-card__status-dot.inactive{ background: #d1d5db; }

.user-card__body { text-align: center; width: 100%; }
.user-card__name  { font-size: 15px; font-weight: 700; color: var(--gray-900); margin-bottom: 6px; }
.user-card__role  { margin-bottom: 8px; }
.user-card__meta  { display: flex; flex-direction: column; gap: 3px; }
.user-card__meta-item { font-size: 11px; color: var(--gray-500); }

.user-card__footer {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center; width: 100%;
  padding-top: 10px; border-top: 1px solid var(--gray-100);
}

/* 小按钮 */
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }
.btn-ghost {
  background: transparent; border: 1px solid var(--gray-200);
  color: var(--gray-600); padding: 4px 10px; border-radius: 6px;
  font-size: 12px; cursor: pointer; transition: var(--transition);
}
.btn-ghost:hover { background: var(--gray-50); color: var(--gray-900); }
.btn-danger-ghost  { background: transparent; border: 1px solid #fca5a5; color: #dc2626; padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.btn-danger-ghost:hover { background: #fef2f2; }
.btn-success-ghost { background: transparent; border: 1px solid #86efac; color: #16a34a; padding: 4px 10px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.btn-success-ghost:hover { background: #f0fdf4; }

.nav-menu { list-style: none; flex: 1; padding: 12px 0; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; cursor: pointer; color: rgba(255,255,255,0.7);
  font-size: 14px; transition: var(--transition); border-left: 3px solid transparent;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active { background: rgba(255,255,255,0.1); color: #fff; border-left-color: var(--primary); }
.nav-icon { font-size: 16px; }

.sidebar-footer { padding: 16px; border-top: 1px solid rgba(255,255,255,0.1); }
.btn-text {
  background: none; border: none; color: rgba(255,255,255,0.5);
  cursor: pointer; font-size: 13px; padding: 4px 0;
}
.btn-text:hover { color: #fff; }

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

/* ---- 页面头部 ---- */
.page-header {
  background: #fff;
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
}
.page-title { font-size: 18px; font-weight: 700; color: var(--gray-900); }
.page-subtitle { font-size: 12px; color: var(--gray-500); margin-top: 2px; }
.page-actions { display: flex; gap: 10px; align-items: center; }

/* ---- 筛选区 ---- */
.filter-bar {
  background: #fff;
  padding: 14px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}
.filter-item { display: flex; align-items: center; gap: 6px; }
.filter-item label { font-size: 13px; color: var(--gray-600); white-space: nowrap; }
.filter-item select, .filter-item input {
  padding: 6px 10px; border: 1px solid var(--gray-200);
  border-radius: 6px; font-size: 13px; outline: none; min-width: 120px;
  background: #fff; color: var(--gray-800);
}
.filter-item select:focus, .filter-item input:focus { border-color: var(--primary); }

/* ---- 按钮 ---- */
.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; border: none; border-radius: 6px;
  font-size: 13px; font-weight: 500; cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.45; cursor: not-allowed; filter: grayscale(0.6);
  box-shadow: none; pointer-events: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #b45309; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-outline { background: #fff; color: var(--gray-700); border: 1px solid var(--gray-200); }
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-300); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---- 表格 ---- */
.table-wrap {
  padding: 20px 24px;
}
.table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.table th, .table td {
  padding: 11px 14px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--gray-100);
}
.table th {
  background: var(--gray-50);
  font-weight: 600;
  color: var(--gray-700);
  white-space: nowrap;
}
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--gray-50); }
.table td a { color: var(--primary); cursor: pointer; text-decoration: none; font-weight: 500; }
.table td a:hover { text-decoration: underline; }

/* ---- 状态标签 ---- */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 12px; font-size: 12px; font-weight: 500;
}
.badge-blue    { background: var(--primary-light); color: var(--primary); }
.badge-green   { background: var(--success-light); color: var(--success); }
.badge-yellow  { background: var(--warning-light); color: var(--warning); }
.badge-red     { background: var(--danger-light); color: var(--danger); }
.badge-gray    { background: var(--gray-100); color: var(--gray-600); }
.badge-cyan    { background: var(--info-light); color: var(--info); }
.badge-purple  { background: #f3e8ff; color: #7c3aed; }
.badge-orange  { background: #ffedd5; color: #ea580c; }
.badge-pink    { background: #fce7f3; color: #db2777; }
.field-error   { border-color: var(--danger) !important; box-shadow: 0 0 0 2px rgba(220,53,69,.15) !important; }

/* ---- 统计卡片 ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  padding: 20px 24px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
}
.stat-card .stat-num { font-size: 28px; font-weight: 700; color: var(--gray-900); }
.stat-card .stat-label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.stat-card .stat-change { font-size: 12px; margin-top: 6px; }

/* ---- 图表区 ---- */
.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 20px;
  padding: 0 24px 20px;
}
.chart-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.chart-card h3 { font-size: 15px; font-weight: 600; color: var(--gray-800); margin-bottom: 16px; }
.chart-wrap { height: 260px; }

/* ---- 模态框 ---- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
}
.modal-backdrop.hidden { display: none; }
#modal-container {
  position: relative; z-index: 1001;
}
.modal-box {
  background: #fff; border-radius: 12px;
  width: 100%; max-width: 720px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-md);
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-header h2 { font-size: 17px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--gray-400); line-height: 1; padding: 2px 6px; border-radius: 4px; }
.modal-close:hover { background: var(--gray-100); color: var(--gray-600); }
.modal-body { padding: 20px 24px; }
.modal-footer { padding: 14px 24px; border-top: 1px solid var(--gray-100); display: flex; gap: 10px; justify-content: flex-end; }

/* ---- 表单 ---- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--gray-700); margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--gray-200);
  border-radius: 6px; font-size: 13px; outline: none; background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,0.08);
}
.form-group textarea { resize: vertical; min-height: 72px; }
.form-group.full { grid-column: 1 / -1; }
.form-hint { font-size: 12px; color: var(--gray-400); margin-top: 3px; }

/* ---- 执行人多选 ---- */
.executor-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.executor-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; background: var(--primary-light); color: var(--primary);
  border-radius: 12px; font-size: 12px;
}
.executor-tag .remove { cursor: pointer; color: var(--primary); font-weight: 700; }
.executor-tag .remove:hover { color: var(--danger); }
.executor-tag.inactive { opacity: 0.4; }

/* ---- 拍摄执行人 Combobox ---- */
.executor-combo-input-row {
  display: flex; gap: 6px; align-items: center; margin-bottom: 6px;
}
#executor-combo-input {
  flex: 1; padding: 7px 10px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); color: var(--text);
  transition: border-color 0.15s;
}
#executor-combo-input:focus { border-color: var(--primary); outline: none; }
.executor-combo-toggle-btn { padding: 6px 10px; flex-shrink: 0; }

.executor-combo-dropdown {
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); max-height: 180px; overflow-y: auto;
  margin-bottom: 6px; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  position: relative; z-index: 100;
}
.executor-combo-dropdown.hidden { display: none; }
.executor-combo-item {
  padding: 7px 12px; cursor: pointer; font-size: 13px;
  display: flex; justify-content: space-between; align-items: center;
}
.executor-combo-item:hover { background: var(--primary-light); }
.executor-combo-item.selected { background: #eef2ff; color: var(--primary); font-weight: 500; }
.executor-combo-dept { color: #888; font-size: 11px; }
.executor-combo-hint { padding: 8px 12px; font-size: 12px; color: #888; font-style: italic; }

/* ---- 拍摄计划列表 ---- */
.plan-list { display: flex; flex-direction: column; gap: 10px; }
.plan-item {
  border: 1px solid var(--gray-200); border-radius: 8px;
  padding: 12px 16px; display: flex; align-items: flex-start; gap: 12px;
}
.plan-item.completed { border-color: var(--success); background: var(--success-light); }
.plan-item.in_progress { border-color: var(--warning); background: var(--warning-light); }
.plan-item-left { flex-shrink: 0; }
.plan-item-badges { display: flex; flex-direction: column; gap: 4px; }
.plan-stage { flex-shrink: 0; }
.plan-body { flex: 1; min-width: 0; }
.plan-topic { font-weight: 600; font-size: 14px; color: var(--gray-800); }
.plan-shots {
  font-size: 12px; color: var(--gray-600); margin-top: 5px;
  background: #f8f9fa; border-radius: 4px; padding: 4px 8px;
  border-left: 3px solid var(--primary);
}
.plan-script {
  font-size: 12px; color: var(--gray-500); margin-top: 4px;
  background: #fef9ec; border-radius: 4px; padding: 4px 8px;
  border-left: 3px solid #f59e0b;
}
.plan-desc { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.plan-meta { font-size: 12px; color: var(--gray-400); margin-top: 4px; }
.plan-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; align-items: center; }

/* ---- 阶段进度条 ---- */
.stage-progress { display: flex; gap: 0; margin: 16px 0; }
.stage-step {
  flex: 1; text-align: center; padding: 8px 4px;
  position: relative; border-top: 3px solid var(--gray-200);
}
.stage-step.done { border-top-color: var(--success); }
.stage-step.active { border-top-color: var(--primary); }
.stage-step .step-label { font-size: 12px; font-weight: 600; margin-top: 8px; }
.stage-step.done .step-label { color: var(--success); }
.stage-step.active .step-label { color: var(--primary); }
.stage-step .step-sub { font-size: 11px; color: var(--gray-400); margin-top: 2px; }

/* ---- Toast ---- */
.toast-container { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 9999; }
.toast {
  padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-md); animation: slideIn 0.3s ease;
  display: flex; align-items: center; gap: 8px; max-width: 320px;
}
.toast-success { background: var(--success); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }
.toast-info { background: var(--info); color: #fff; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastSlideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ---- 空状态 ---- */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--gray-400);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-state h3 { font-size: 16px; color: var(--gray-600); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ---- 加载状态 ---- */
.loading { text-align: center; padding: 40px; color: var(--gray-400); font-size: 14px; }
.spinner { display: inline-block; width: 20px; height: 20px; border: 2px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.7s linear infinite; margin-right: 8px; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- 响应式 ---- */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0 !important; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .charts-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---- 辅助 ---- */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-400); font-size: 12px; }
.text-green { color: var(--success); }
.text-danger { color: var(--danger); }
.is-locked { background: var(--gray-100) !important; color: var(--gray-400) !important; cursor: not-allowed; opacity: 0.7; }
.lock-hint { font-size: 11px; color: var(--gray-400); font-weight: normal; margin-left: 4px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.divider { height: 1px; background: var(--gray-100); margin: 16px 0; }
.form-section-title { font-size: 14px; font-weight: 700; color: var(--gray-800); margin: 4px 0 10px; padding-left: 9px; border-left: 3px solid var(--primary, #2f6fed); }
.shot-checklist-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 8px; }
.arc-hl { line-height: 1.7; }
.arc-prio { display: inline-block; background: #fff7e6; color: #d48806; border-radius: 4px; padding: 0 6px; font-size: 12px; font-weight: 600; }
.arc-kw { color: #2f6fed; font-size: 12px; }
@media (max-width: 720px) { .shot-checklist-grid { grid-template-columns: 1fr; } }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 12px 24px; }
.pagination button {
  padding: 5px 12px; border: 1px solid var(--gray-200); background: #fff;
  border-radius: 6px; font-size: 13px; cursor: pointer;
}
.pagination button.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination button:hover:not(:disabled) { background: var(--gray-50); }

/* ============================================================
   批量导入选题页面
   ============================================================ */
.import-intro { margin-bottom: 20px; }
.intro-card {
  background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 10px; padding: 16px 20px;
}
.intro-card h3 { margin-bottom: 10px; font-size: 15px; }
.intro-card ul { padding-left: 20px; margin: 8px 0; font-size: 13px; line-height: 1.8; color: var(--gray-600); }
.intro-card ul strong { color: var(--gray-800); }
.intro-example { margin-top: 10px; font-size: 12px; }
.intro-example code {
  background: #fff; border: 1px solid var(--gray-200); border-radius: 4px;
  padding: 4px 8px; display: block; margin-top: 4px; word-break: break-all;
  color: var(--gray-700); font-size: 12px;
}

/* 上传区 */
.upload-zone {
  border: 2px dashed var(--gray-300); border-radius: 12px;
  text-align: center; padding: 48px 24px; cursor: pointer;
  transition: all 0.2s; background: #fff; margin-bottom: 20px;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary); background: color-mix(in srgb, var(--primary) 4%, white);
}
.upload-zone.has-file { border-color: #22c55e; background: color-mix(in srgb, #22c55e 4%, white); }
.upload-icon { font-size: 40px; margin-bottom: 12px; }
.upload-hint { color: var(--gray-500); font-size: 14px; }
.upload-browse {
  color: var(--primary); font-weight: 600; cursor: pointer;
  text-decoration: underline;
}
.upload-file-info {
  margin-top: 12px; display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 13px; color: var(--gray-600);
}
.btn-link { color: var(--gray-400); cursor: pointer; font-size: 13px; }
.btn-link:hover { color: #ef4444; }

/* 预览区 */
.preview-section { margin-bottom: 24px; }
.preview-section h3 { margin-bottom: 12px; font-size: 15px; }
.preview-table { width: 100%; border-collapse: collapse; }
.preview-table th { background: var(--gray-100); }
.row-num { color: var(--gray-400); font-size: 12px; width: 32px; text-align: center; }
.preview-summary {
  padding: 10px 0; font-size: 13px; color: var(--gray-500);
  text-align: center; margin-top: 8px;
}
.preview-actions {
  display: flex; gap: 12px; justify-content: center; align-items: center;
  margin-top: 16px;
}
.btn-lg { padding: 10px 24px; font-size: 15px; }

/* 导入结果 */
.import-result { margin-top: 16px; }
.result-card {
  border-radius: 12px; padding: 24px; text-align: center;
}
.result-card.success { background: color-mix(in srgb, #22c55e 6%, white); border: 1px solid color-mix(in srgb, #22c55e 20%, transparent); }
.result-card h3 { font-size: 18px; margin-bottom: 20px; }
.result-stats { display: flex; gap: 32px; justify-content: center; margin-bottom: 16px; }
.stat-item { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stat-num { font-size: 32px; font-weight: 700; line-height: 1; }
.stat-created .stat-num { color: #22c55e; }
.stat-updated .stat-num { color: #f59e0b; }
.stat-skipped .stat-num { color: var(--gray-400); }
.stat-label { font-size: 12px; color: var(--gray-500); }
.result-errors {
  background: #fff; border: 1px solid var(--gray-200); border-radius: 8px;
  padding: 12px 16px; text-align: left; font-size: 13px; color: var(--gray-600);
  margin-top: 12px;
}
.result-errors ul { padding-left: 16px; margin-top: 6px; }
.muted { color: var(--gray-400); }

/* 导航分隔线 */
.nav-separator { height: 1px; background: var(--gray-200); margin: 6px 0; list-style: none; }

/* ============================================================
   拍摄计划详情页
   ============================================================ */
.detail-body { padding: 20px 24px 16px; }

/* 顶部英雄区 */
.detail-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  border-radius: 14px;
  padding: 18px 22px 16px;
  margin-bottom: 22px;
  color: #fff;
}
.detail-hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.detail-hero-meta { flex: 1; }
.detail-hero-executor {
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 7px 12px;
  min-width: 140px;
  text-align: center;
  flex-shrink: 0;
}
.detail-exec-label { display: block; font-size: 11px; color: rgba(255,255,255,0.55); margin-bottom: 3px; }
.detail-exec-names { font-size: 12px; color: #fff; }
.detail-hero .executor-tag {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 20px;
  margin: 1px;
}

/* 时间线（暗底） */
.detail-timeline { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-bottom: 4px; }
.tl-item { font-size: 13px; color: rgba(255,255,255,0.85); }

/* 阶段进度（暗底适配） */
.detail-stage-label { font-size: 12px; color: rgba(255,255,255,0.65); margin-bottom: 7px; }
.detail-stage-bar { margin-bottom: 12px; }
.detail-hero .stage-progress-bar { background: rgba(255,255,255,0.12); }
.detail-hero .stage-step { color: rgba(255,255,255,0.45); }
.detail-hero .stage-step.done { color: #4ade80; }
.detail-hero .stage-step.active { color: #fbbf24; }
.detail-hero .stage-step .step-dot { border-color: rgba(255,255,255,0.4); background: transparent; }
.detail-hero .stage-step.done .step-dot { border-color: #4ade80; background: #4ade80; }
.detail-hero .stage-step.active .step-dot { border-color: #fbbf24; background: #fbbf24; }
.detail-hero .stage-step .step-line { background: rgba(255,255,255,0.12); }
.detail-hero .stage-step.done .step-line { background: #4ade80; }
.detail-stage-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* 三大板块 */
.detail-section { background: #fff; border: 1px solid #e8ecf0; border-radius: 12px; padding: 18px 22px; margin-bottom: 18px; }
.detail-section-head {
  font-size: 15px; font-weight: 700; color: #1a1a2e;
  margin-bottom: 14px; padding-bottom: 9px; border-bottom: 2px solid #1a1a2e;
}
.detail-count { font-weight: 400; color: #888; font-size: 13px; }
.detail-sub-head { font-size: 13px; font-weight: 600; color: #444; margin-bottom: 10px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.detail-sub-head--sep { margin-top: 20px; }
.detail-sub-hint { font-size: 12px; font-weight: 400; color: #999; }

/* 档案表格 */
.detail-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.detail-table th { width: 120px; color: #555; font-weight: 600; text-align: left; vertical-align: top; padding: 6px 0; border-bottom: 1px solid #f0f2f5; white-space: nowrap; }
.detail-table td { color: #333; padding: 6px 12px 6px 0; border-bottom: 1px solid #f0f2f5; line-height: 1.6; white-space: pre-wrap; }
.detail-table tr:last-child th, .detail-table tr:last-child td { border-bottom: none; }

/* 保密红线 */
.detail-redline-box { margin-top: 10px; background: #fff5f5; border: 1px solid #fed7d7; border-radius: 8px; padding: 9px 13px; }
.detail-redline-label { font-size: 13px; font-weight: 700; color: #c53030; margin-bottom: 4px; }
.detail-redline-body { font-size: 13px; color: #9b2929; white-space: pre-wrap; line-height: 1.7; }

/* 其他重要记录 */
.detail-other-records {
  background: #f8f9fc; border: 1px solid #e8ecf0;
  border-radius: 8px; padding: 12px 14px;
  font-size: 13px; color: #444; white-space: pre-wrap; line-height: 1.8;
  min-height: 60px;
}
.detail-other-records-empty {
  background: #fafbfc; border: 1px dashed #e0e4ec;
  border-radius: 8px; padding: 12px 14px;
  font-size: 13px; text-align: center;
}
.detail-other-records-list {
  background: #f8f9fc; border: 1px solid #e8ecf0;
  border-radius: 8px; padding: 12px 14px 12px 32px;
  font-size: 13px; color: #444; line-height: 1.8;
  margin: 0;
}
.detail-other-records-list li { margin-bottom: 6px; }
.detail-other-records-list li:last-child { margin-bottom: 0; }

/* 星级徽章（优先级） */
.star-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  background: linear-gradient(135deg, #f7c948, #f59f00);
  color: #fff; font-size: 12px; font-weight: 600;
  white-space: nowrap;
}
.detail-table th[style*="width:60px"] { text-align: center; }

/* 选题列表 */
.topic-list { display: flex; flex-direction: column; gap: 14px; }
.topic-empty { padding: 32px 16px; text-align: center; color: #aaa; font-size: 14px; }

/* 选题卡片 */
.topic-card { border: 1px solid #e0e4ec; border-radius: 10px; overflow: hidden; }
.topic-card-head {
  background: #f4f5fb; padding: 10px 16px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid #e0e4ec;
}
.topic-card-meta { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.topic-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.topic-prio {
  background: #ffe0b2; color: #e65100; font-size: 12px; font-weight: 700;
  padding: 2px 7px; border-radius: 4px; flex-shrink: 0;
}
.topic-title { font-size: 15px; font-weight: 700; color: #1a1a2e; line-height: 1.4; }
.topic-body { padding: 14px 16px; }
.topic-meta { font-size: 12px; color: #999; margin-top: 6px; }

/* 核心痛点 */
.topic-pain {
  display: flex; gap: 10px; align-items: baseline;
  margin-bottom: 12px; font-size: 13px; line-height: 1.6;
}
.topic-pain-label {
  font-weight: 700; color: #666; min-width: 148px; flex-shrink: 0;
}
.topic-pain-text { color: #333; }

/* 脚本三列（台词 | A版 | B版 | 拍摄阶段） */
.topic-script-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 10px;
  margin-top: 10px;
}
.topic-script-col { background: #f8f9fc; border: 1px solid #e8ecf0; border-radius: 8px; overflow: hidden; }
.topic-script-col--stage { min-width: 90px; }
.topic-script-header {
  background: #eceef5; padding: 5px 10px;
  font-size: 12px; font-weight: 700; color: #1a1a2e;
  border-bottom: 1px solid #e0e4ec;
}
.topic-script-body {
  padding: 8px 10px; font-size: 13px; color: #444;
  white-space: pre-wrap; line-height: 1.6; min-height: 60px;
}
.topic-stage-badge {
  display: inline-block; margin-top: 4px;
  font-size: 12px; font-weight: 600;
}

/* ============================================================
   拍摄计划详情页 — 新版面样式
   ============================================================ */
.detail-body { padding: 24px 28px 16px; }

/* 顶部英雄区 */
.detail-hero {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  border-radius: 14px;
  padding: 20px 24px 18px;
  margin-bottom: 24px;
  color: #fff;
}
.detail-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}
.detail-hero-meta { flex: 1; }
.detail-hero-executor {
  text-align: right;
  flex-shrink: 0;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px 14px;
  min-width: 160px;
}
.detail-exec-label {
  display: block;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  margin-bottom: 4px;
}
.detail-exec-names { font-size: 13px; color: #fff; }
.detail-stage-label {
  font-size: 12px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}
.detail-hero-stage { margin-bottom: 14px; }
.detail-stage-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* 提案时间线 */
.detail-timeline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 4px;
}
.tl-item { font-size: 13px; white-space: nowrap; }

/* 阶段进度条（暗色背景适配） */
.detail-hero .stage-progress-bar { background: rgba(255,255,255,0.15); }
.detail-hero .stage-step { color: rgba(255,255,255,0.5); }
.detail-hero .stage-step.done { color: #4ade80; }
.detail-hero .stage-step.active { color: #fbbf24; }
.detail-hero .stage-step .step-dot { border-color: rgba(255,255,255,0.4); background: transparent; }
.detail-hero .stage-step.done .step-dot { border-color: #4ade80; background: #4ade80; }
.detail-hero .stage-step.active .step-dot { border-color: #fbbf24; background: #fbbf24; }
.detail-hero .stage-step .step-line { background: rgba(255,255,255,0.15); }
.detail-hero .stage-step.done .step-line { background: #4ade80; }

/* 执行人标签 */
.detail-hero .executor-tag {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: #fff;
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 20px;
  margin: 2px;
  display: inline-block;
}

/* 三大板块 */
.detail-section {
  background: #fff;
  border: 1px solid #e8ecf0;
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 20px;
}
.detail-section-head {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid #1a1a2e;
}
.detail-sub-head {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin-bottom: 12px;
}

/* 档案表格 */
.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.detail-table th {
  width: 130px;
  color: #555;
  font-weight: 600;
  text-align: left;
  vertical-align: top;
  padding: 7px 0;
  border-bottom: 1px solid #f0f2f5;
  white-space: nowrap;
}
.detail-table td {
  color: #333;
  padding: 7px 12px;
  border-bottom: 1px solid #f0f2f5;
  line-height: 1.6;
  white-space: pre-wrap;
}
.detail-table tr:last-child th,
.detail-table tr:last-child td { border-bottom: none; }

/* 保密红线 */
.detail-redline {
  background: #fff5f5;
  border: 1px solid #fed7d7;
  border-radius: 8px;
  padding: 10px 14px;
  color: #c53030;
  font-size: 13px;
  white-space: pre-wrap;
  line-height: 1.7;
  margin-top: 6px;
}

/* 内容矩阵 */
.matrix-box { display: flex; flex-direction: column; gap: 8px; }
.matrix-row {
  display: flex;
  gap: 12px;
  align-items: baseline;
  font-size: 14px;
}
.matrix-label {
  font-weight: 600;
  color: #555;
  min-width: 120px;
  flex-shrink: 0;
}
.matrix-val { color: #333; }

/* 选题卡片 */
.topic-list { display: flex; flex-direction: column; gap: 12px; }
.topic-card {
  border: 1px solid #e8ecf0;
  border-radius: 10px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.topic-card:hover { box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.topic-card-head {
  background: #f8f9fc;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e8ecf0;
}
.topic-badges { display: flex; gap: 6px; align-items: center; }
.topic-actions { display: flex; gap: 6px; }
.topic-body { padding: 14px 16px; }
.topic-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 10px;
  line-height: 1.5;
}
.topic-field {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: #444;
  margin-bottom: 6px;
  line-height: 1.5;
}
.topic-field-label {
  font-weight: 600;
  color: #666;
  min-width: 72px;
  flex-shrink: 0;
}
.topic-desc { font-size: 13px; color: #555; margin-bottom: 8px; line-height: 1.5; }
.topic-meta { font-size: 12px; color: #999; margin-top: 6px; }

/* 脚本块 */
.script-block {
  background: #f8f9fc;
  border: 1px solid #e8ecf0;
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
}
.script-ver {
  font-size: 12px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}
.script-row {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: #444;
  margin-bottom: 5px;
  line-height: 1.6;
}
.script-role {
  font-weight: 600;
  color: #888;
  min-width: 42px;
  flex-shrink: 0;
}

/* 分镜表格样式（新增选题/编辑选题表单） */
.shot-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 8px;
  font-size: 13px;
}
.shot-table th {
  background: var(--gray-100);
  padding: 8px 10px;
  text-align: left;
  font-weight: 500;
  color: var(--gray-600);
  border-bottom: 2px solid var(--gray-200);
}
.shot-table td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
}
.shot-table textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 12px;
  resize: vertical;
  box-sizing: border-box;
}
.shot-table textarea:focus {
  border-color: var(--primary);
  outline: none;
}
.shot-table select {
  padding: 5px 8px;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 12px;
}
.shot-row:hover td {
  background: #f8fafc;
}

/* 选题表单分区 */
.plan-form-section {
  margin-bottom: 16px;
}
.plan-form-section .form-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--gray-200);
}

/* ========== 施工详情页 ========== */
.const-info-bar { font-size: 13px; }
.const-info-item { display: flex; flex-direction: column; gap: 2px; }
.const-info-label { font-size: 11px; color: #6b7280; font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.const-info-value { font-size: 13px; color: #1e293b; font-weight: 500; }

/* ========== 沟通记录气泡 ========== */
.comm-box { display: flex; flex-direction: column; gap: 10px; }
.comm-empty { text-align: center; color: #9ca3af; font-size: 13px; padding: 20px 0; }
.comm-item { display: flex; flex-direction: column; gap: 3px; max-width: 75%; }
.comm-item--me { align-self: flex-end; align-items: flex-end; }
.comm-item--other { align-self: flex-start; align-items: flex-start; }
.comm-meta { display: flex; align-items: center; gap: 5px; font-size: 11px; color: #9ca3af; }
.comm-role { background: #e0e7ff; color: #4338ca; padding: 1px 6px; border-radius: 10px; font-size: 10px; }
.comm-name { color: #6b7280; }
.comm-time { color: #d1d5db; }
.comm-bubble { display: inline-block; padding: 7px 11px; border-radius: 12px; font-size: 13px; line-height: 1.5; word-break: break-word; }
.comm-item--me .comm-bubble { background: #2563eb; color: #fff; border-bottom-right-radius: 3px; }
.comm-item--other .comm-bubble { background: #f1f5f9; color: #1e293b; border-bottom-left-radius: 3px; }
.comm-input-row textarea:focus, .comm-input-row input:focus { border-color: var(--primary); outline: none; }
