/* ==========================================================
 * Theme: 黑底 + 主黄 + 薄荷绿点缀 · 大圆角胶囊型 UI
 * 参考图：能源仪表盘风
 * ========================================================== */
:root {
  --bg-page: #0F1115;
  --bg-card: #1A1D24;
  --bg-card-2: #20242C;
  --bg-input: #14171C;
  --line: rgba(255, 255, 255, 0.06);
  --line-strong: rgba(255, 255, 255, 0.12);

  --c-yellow: #FFD200;
  --c-yellow-soft: rgba(255, 210, 0, 0.16);
  --c-yellow-deep: #C8A000;
  --c-mint: #58E090;
  --c-mint-soft: rgba(88, 224, 144, 0.16);
  --c-red: #FF5C6F;
  --c-red-soft: rgba(255, 92, 111, 0.16);
  --c-blue: #6FB7FF;
  --c-purple: #C49BFF;

  --t-main: #FFFFFF;
  --t-sub: #B6BBC4;
  --t-dim: #6E7480;

  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 28px;
  --radius-pill: 999px;

  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.32);
  --shadow-yellow: 0 8px 28px rgba(255, 210, 0, 0.28);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-page);
  color: var(--t-main);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" on, "lnum" on;
  min-height: 100vh;
}
button { font-family: inherit; cursor: pointer; border: none; }
input, select { font-family: inherit; }
::selection { background: var(--c-yellow); color: #000; }

/* =========================== 顶部栏 =========================== */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 28px;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: var(--c-yellow);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-yellow);
}
.brand-text h1 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.3px;
  color: var(--t-main);
}
.brand-text p {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--t-dim);
  letter-spacing: 1.2px;
}
.topbar-meta { display: flex; align-items: center; gap: 12px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  font-size: 12px;
  color: var(--t-sub);
  letter-spacing: 0.4px;
}
.pill .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-mint);
  box-shadow: 0 0 0 0 rgba(88, 224, 144, 0.55);
  animation: pulse-dot 2.6s ease-out infinite;
}
.pill.pill-offline { color: var(--c-red); }
.pill.pill-offline .dot { background: var(--c-red); animation: none; }
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(88, 224, 144, 0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(88, 224, 144, 0); }
  100% { box-shadow: 0 0 0 0 rgba(88, 224, 144, 0); }
}
.meta-clock {
  font-size: 12px;
  color: var(--t-dim);
  letter-spacing: 0.5px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
}
.btn-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn-primary {
  background: var(--c-yellow);
  color: #0A0C14;
  box-shadow: var(--shadow-yellow);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(255, 210, 0, 0.42); }
.btn-primary:active { transform: translateY(0); }
.btn-primary.spinning svg { animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================== 主体布局 =========================== */
.dashboard {
  padding: 4px 28px 36px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.panel {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.panel-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--t-main);
  letter-spacing: 0.3px;
}
.panel-tag {
  font-size: 11px;
  color: var(--t-dim);
  letter-spacing: 0.6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-card-2);
}
.panel-head-right {
  display: flex; align-items: center;
  gap: 10px;
}

/* segment 切换：用于热力图工作日 / 所有日期 */
.seg-switch {
  display: inline-flex;
  padding: 3px;
  background: var(--bg-card-2);
  border-radius: var(--radius-pill);
  gap: 2px;
}
.seg-item {
  padding: 6px 14px;
  background: transparent;
  color: var(--t-sub);
  border: 0;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.4px;
  cursor: pointer;
  transition: all .25s ease;
}
.seg-item:hover { color: var(--t-main); }
.seg-item.is-active {
  background: var(--c-yellow);
  color: #0A0C14;
  box-shadow: 0 4px 14px rgba(255, 210, 0, 0.28);
}

/* =========================== KPI 卡片 =========================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.kpi-card {
  position: relative;
  padding: 22px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: transform .25s ease, box-shadow .25s ease;
  overflow: hidden;
  text-align: left;
  font: inherit;
  color: inherit;
  border: none;
  width: 100%;
  cursor: default;
}
.kpi-card[data-action] { cursor: pointer; }
.kpi-card[data-action]:active { transform: translateY(0) scale(0.98); }
.kpi-card:hover { transform: translateY(-3px); }
.kpi-card.kpi-yellow {
  background: linear-gradient(135deg, var(--c-yellow) 0%, #FFB800 100%);
  color: #0A0C14;
  box-shadow: 0 12px 32px rgba(255, 210, 0, 0.28);
}
.kpi-card.kpi-warn::before {
  content: '';
  position: absolute; right: -30px; top: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: var(--c-red-soft);
}
.kpi-label {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--t-sub);
  letter-spacing: 0.4px;
}
.kpi-card.kpi-yellow .kpi-label { color: rgba(10, 12, 20, 0.65); font-weight: 600; }
.kpi-value {
  margin: 0 0 6px;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.1;
  color: var(--t-main);
}
.kpi-card.kpi-yellow .kpi-value { color: #0A0C14; }
.kpi-card.kpi-warn .kpi-value { color: var(--c-red); }
.kpi-hint {
  margin: 0;
  font-size: 12px;
  color: var(--t-dim);
}
.kpi-card.kpi-yellow .kpi-hint { color: rgba(10, 12, 20, 0.55); }
.kpi-card.flash { animation: card-flash .9s ease; }
@keyframes card-flash {
  0%   { box-shadow: var(--shadow-card); }
  35%  { box-shadow: 0 0 0 4px var(--c-yellow-soft), var(--shadow-card); }
  100% { box-shadow: var(--shadow-card); }
}

/* =========================== 图表区 =========================== */
.chart-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}
.chart-grid .panel-wide { grid-column: span 1; }
.chart-grid .panel-wide-full { grid-column: 1 / -1; }
.chart-canvas { height: 280px; width: 100%; }
.panel-wide-full .chart-canvas { height: 360px; }
/* 时段热力图改为 DOM 自渲染，自适应高度 */
#chartTimeHeat { height: auto; }

/* =========================== 时段热力图 · 玻璃徽章 =========================== */
.heat-glass {
  width: 100%;
  padding: 4px 0 0;
}
/* 横向滚动外壳：超过容器宽度时左右滑动，无滚动条
 * 注：垂直方向必须留出空间承载 hover 上抬 (-2px) + box-shadow 扩散 (~24px)，
 * 否则 overflow-y:hidden 会把高光与阴影裁掉。这里用 padding 让 cell 在
 * scroll content 内部有「呼吸位」，再用负 margin 抵消视觉占位。 */
.heat-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 24px 0 32px;
  margin: -24px 0 -32px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge legacy */
  -webkit-overflow-scrolling: touch;
  /* 左右淡出渐隐，提示可横滑 */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 12px), transparent 100%);
}
.heat-scroll::-webkit-scrollbar { display: none; }
.heat-rows {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  row-gap: 12px;
  align-items: stretch;
  /* 行容器内部按 col-min 给每格固定最小宽度 */
  min-width: calc(56px + var(--cols, 1) * var(--col-min, 110px) + (var(--cols, 1) - 1) * 12px + 8px);
}
.heat-row {
  display: grid;
  grid-template-columns: repeat(var(--cols, 1), minmax(var(--col-min, 110px), 1fr));
  gap: 12px;
}
.heat-row-label {
  display: flex; align-items: center;
  font-size: 12px;
  letter-spacing: 1.6px;
  color: var(--t-sub);
  padding-right: 8px;
}
.heat-row-label-spacer { height: 0; }

/* ========== 单元格：玻璃徽章 ========== */
.heat-cell {
  position: relative;
  border-radius: 18px;
  min-height: 86px;
  padding: 14px 14px;
  cursor: default;
  isolation: isolate;
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s ease;
  overflow: hidden;
  /* 玻璃底：半透明 + 极淡边框 */
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--accent) 24%, #1A1D24) 0%, color-mix(in srgb, var(--accent) 8%, #1A1D24) 100%),
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--accent) 28%, transparent) 0%, transparent 60%);
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--accent) 35%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent),
    0 8px 24px -10px color-mix(in srgb, var(--accent) 35%, transparent);
}
.heat-cell:hover {
  transform: translateY(-2px);
  z-index: 3;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--accent) 55%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--accent) 32%, transparent),
    0 14px 32px -8px color-mix(in srgb, var(--accent) 50%, transparent);
}
/* 高光层 */
.heat-cell::before {
  content: '';
  position: absolute; left: 0; right: 0; top: 0;
  height: 50%;
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, transparent) 0%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}
/* 内发光（hover 加强） */
.heat-glow {
  position: absolute; inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 90% at 50% 110%, color-mix(in srgb, var(--accent) 35%, transparent) 0%, transparent 60%);
  opacity: 0.55;
  transition: opacity .35s ease;
  z-index: -1;
}
.heat-cell:hover .heat-glow { opacity: 1; }

.heat-cell-inner {
  position: relative;
  display: flex; flex-direction: column;
  gap: 6px;
  height: 100%;
  z-index: 1;
}
.heat-icon {
  position: absolute;
  top: 0; right: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 35%, rgba(255,255,255,0.05));
  color: color-mix(in srgb, var(--accent) 95%, white);
}
.heat-cell.heat-conflict .heat-icon { color: #fff; background: rgba(255, 92, 111, 0.55); }
/* 等边三角形视觉重心比几何中心偏下，整体上移 1px 让人眼觉得居中 */
.heat-cell.heat-conflict .heat-icon svg { transform: translateY(-1px); }
.heat-cell.heat-done     .heat-icon { color: #fff; background: rgba(88, 224, 144, 0.45); }
.heat-cell.heat-invalid  .heat-icon { color: #d1d5db; background: rgba(255, 255, 255, 0.08); }

.heat-names {
  display: flex; flex-direction: column;
  gap: 2px;
  margin-top: auto;
}
.heat-name {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #fff;
  line-height: 1.2;
}
.heat-name-more {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  letter-spacing: 1px;
}
.heat-empty-dash {
  font-size: 22px;
  color: rgba(255, 255, 255, 0.18);
  font-weight: 300;
  letter-spacing: 6px;
}

/* 状态变体的颜色调校 */
.heat-cell.heat-empty {
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.025) 0 6px, transparent 6px 12px),
    var(--bg-card-2);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.heat-cell.heat-empty:hover { transform: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06); }
.heat-cell.heat-empty .heat-empty-dash { display: block; text-align: center; margin-top: 22px; }
.heat-cell.heat-empty .heat-glow { display: none; }

.heat-cell.heat-invalid {
  background:
    linear-gradient(155deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%),
    var(--bg-card-2);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.heat-cell.heat-invalid .heat-name { color: rgba(255, 255, 255, 0.78); }
.heat-cell.heat-invalid .heat-glow { display: none; }
.heat-cell.heat-invalid::before { display: none; }

.heat-cell.heat-conflict {
  background:
    linear-gradient(155deg, rgba(255, 92, 111, 0.32) 0%, rgba(255, 92, 111, 0.10) 100%),
    radial-gradient(120% 80% at 0% 0%, rgba(255, 92, 111, 0.42) 0%, transparent 60%);
  box-shadow:
    inset 0 1px 0 rgba(255, 180, 190, 0.42),
    inset 0 0 0 1px rgba(255, 92, 111, 0.32),
    0 14px 28px -10px rgba(255, 92, 111, 0.45);
}
.heat-cell.heat-done {
  background:
    linear-gradient(155deg, rgba(88, 224, 144, 0.28) 0%, rgba(88, 224, 144, 0.06) 100%),
    radial-gradient(120% 80% at 0% 0%, rgba(88, 224, 144, 0.34) 0%, transparent 60%);
  box-shadow:
    inset 0 1px 0 rgba(170, 240, 200, 0.42),
    inset 0 0 0 1px rgba(88, 224, 144, 0.28),
    0 12px 24px -10px rgba(88, 224, 144, 0.32);
}

/* X 轴：日期 + 周几 */
.heat-row-axis {
  margin-top: 4px;
}
.heat-axis-cell {
  display: flex; flex-direction: column; align-items: center;
  gap: 2px;
  padding: 4px 0 2px;
}
.heat-axis-md {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--t-sub);
  letter-spacing: 0.5px;
}
.heat-axis-wd {
  font-size: 10px;
  color: var(--t-dim);
  letter-spacing: 1px;
}
/* 节假日：日期数字 + 名称 都用红色 */
.heat-axis-cell.is-holiday .heat-axis-md { color: var(--c-red); }
.heat-axis-cell.is-holiday .heat-axis-wd {
  color: var(--c-red);
  font-weight: 700;
  letter-spacing: 0.5px;
}
/* 调休补班：黄色提示 */
.heat-axis-cell.is-makeup .heat-axis-md { color: var(--c-yellow); }
.heat-axis-cell.is-makeup .heat-axis-wd {
  color: var(--c-yellow);
  font-weight: 600;
}
/* 节假日 cell：在底色上叠一层淡红 */
.heat-cell.is-holiday::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255, 92, 111, 0.08), rgba(255, 92, 111, 0.02));
  border-radius: inherit;
  pointer-events: none;
  z-index: 0;
}

/* tooltip */
.heat-tip {
  position: fixed;
  padding: 10px 14px;
  background: rgba(20, 22, 28, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  font-size: 12px;
  color: #fff;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
  z-index: 999;
  max-width: 320px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.5);
}
.heat-tip.show { opacity: 1; }
.heat-tip-h {
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
}
.heat-tip-b {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

@media (max-width: 900px) {
  .heat-rows { grid-template-columns: 40px 1fr; row-gap: 8px; }
  .heat-row { gap: 8px; }
  .heat-cell { min-height: 72px; padding: 10px; border-radius: 14px; }
  .heat-name { font-size: 12px; }
  .heat-icon { width: 20px; height: 20px; }
  .heat-axis-md { font-size: 10px; }
  .heat-axis-wd { font-size: 9px; }
}

/* =========================== 智能预警 + 时间轴 =========================== */
.warn-timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 16px;
}
.warn-tabs {
  display: flex; gap: 6px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.warn-tab {
  padding: 7px 14px;
  background: var(--bg-card-2);
  color: var(--t-sub);
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  transition: all .2s ease;
}
.warn-tab:hover { color: var(--t-main); }
.warn-tab.active {
  background: var(--c-yellow);
  color: #0A0C14;
  font-weight: 700;
}
.warn-list {
  max-height: 600px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px;
  padding-right: 4px;
}
.warn-item {
  position: relative;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-card-2);
  font-size: 13px;
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.warn-item:hover { background: #262B35; transform: translateX(2px); }
.warn-item.lvl-conflict { border-left: 3px solid var(--c-red); }
.warn-item.lvl-missing  { border-left: 3px solid var(--c-yellow); }
.warn-item.lvl-info     { border-left: 3px solid var(--c-purple); }
.warn-row1 {
  display: flex; justify-content: space-between; gap: 8px;
  align-items: baseline;
}
.warn-title { color: var(--t-main); font-weight: 600; font-size: 14px; }
.warn-date  { color: var(--t-dim); font-size: 12px; white-space: nowrap; }
.warn-meta  { color: var(--t-sub); font-size: 12px; }
.warn-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.warn-tag {
  font-size: 11px; padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}
.warn-tag.t-conflict { color: var(--c-red); background: var(--c-red-soft); }
.warn-tag.t-missing  { color: var(--c-yellow); background: var(--c-yellow-soft); }
.warn-tag.t-info     { color: var(--c-purple); background: rgba(196, 155, 255, 0.16); }

.timeline-wrap {
  max-height: 600px;
  overflow-y: auto;
  padding-left: 8px;
}
.timeline {
  position: relative;
  padding: 4px 0 4px 22px;
  border-left: 2px dashed var(--line-strong);
}
.timeline-day {
  position: relative;
  margin-bottom: 18px;
}
.timeline-day::before {
  content: '';
  position: absolute; left: -29px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg-card-2);
  border: 2px solid var(--c-yellow-deep);
}
.timeline-day.is-today::before {
  background: var(--c-yellow);
  border-color: var(--c-yellow);
  box-shadow: 0 0 0 4px rgba(255, 210, 0, 0.18);
}
.timeline-date {
  display: flex; align-items: baseline; gap: 12px;
  color: var(--t-main); font-weight: 700;
  margin-bottom: 8px;
  font-size: 14px;
}
.timeline-week {
  font-size: 11px;
  color: var(--t-dim);
  font-weight: 500;
  letter-spacing: 0.5px;
}
.timeline-tasks { display: flex; flex-wrap: wrap; gap: 8px; }
.timeline-chip {
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  background: var(--bg-card-2);
  color: var(--t-sub);
  transition: all .2s ease;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
}
.timeline-chip:hover { background: #2A2F3A; color: var(--t-main); transform: translateY(-1px); }
.timeline-chip .chip-slot { color: var(--t-dim); font-size: 11px; }
.timeline-chip.s-progress { background: var(--c-mint-soft); color: var(--c-mint); }
.timeline-chip.s-queue    { background: var(--c-yellow-soft); color: var(--c-yellow); }
.timeline-chip.s-conflict { background: var(--c-red-soft); color: var(--c-red); }
.timeline-chip.s-missing  { background: var(--c-yellow-soft); color: var(--c-yellow); }
.timeline-chip.s-info     { background: rgba(196, 155, 255, 0.16); color: var(--c-purple); }

/* =========================== 任务表格 =========================== */
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters input, .filters select {
  background: var(--bg-input);
  color: var(--t-main);
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 13px;
  outline: none;
  transition: box-shadow .2s ease;
}
.filters input { width: 220px; }
.filters input::placeholder { color: var(--t-dim); }
.filters input:focus, .filters select:focus { box-shadow: 0 0 0 2px var(--c-yellow); }
.filters select { padding-right: 28px; -webkit-appearance: none; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23B6BBC4' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 14px 14px;
}

.table-wrap { max-height: 460px; overflow-y: auto; border-radius: 16px; }
.task-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.task-table thead th {
  position: sticky; top: 0;
  background: var(--bg-card);
  color: var(--t-dim);
  font-weight: 500;
  letter-spacing: 0.5px;
  text-align: left;
  padding: 12px 14px;
  font-size: 12px;
  z-index: 1;
}
.task-table tbody tr {
  transition: background .2s ease;
}
.task-table tbody tr:hover { background: var(--bg-card-2); }
.task-table tbody td {
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  color: var(--t-main);
  vertical-align: top;
}
.task-table tbody td.dim { color: var(--t-dim); }
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-pill);
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.s-progress { color: var(--c-mint); background: var(--c-mint-soft); }
.s-queue    { color: var(--c-yellow); background: var(--c-yellow-soft); }
.s-conflict { color: var(--c-red); background: var(--c-red-soft); }
.s-missing  { color: var(--c-yellow); background: var(--c-yellow-soft); }
.s-done     { color: #9bdcb6; background: rgba(63, 168, 118, 0.18); }
.s-info     { color: var(--c-purple); background: rgba(196, 155, 255, 0.16); }
.plan-yes { color: var(--c-mint); font-weight: 600; }
.plan-no  { color: var(--c-yellow); font-weight: 600; }
.plan-link {
  color: var(--c-yellow);
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
}
.plan-link:hover { text-decoration: underline; }

/* =========================== 入场动画 =========================== */
/* 用 both + keyframe-only 初始态，避免外层动画状态切换时 opacity 被重置成 0 */
.fade-in {
  animation: fadeUp .7s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =========================== 详情弹层 =========================== */
.detail-modal {
  position: fixed; inset: 0;
  background: rgba(5, 8, 14, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 999;
  animation: modal-in .25s ease;
}
.detail-modal.show { display: flex; }
.detail-card {
  position: relative;
  width: min(540px, 92vw);
  max-height: 78vh;
  overflow-y: auto;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.5);
}
.detail-close {
  position: absolute; top: 14px; right: 18px;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--bg-card-2);
  color: var(--t-sub);
  font-size: 20px; line-height: 1;
}
.detail-close:hover { background: var(--c-red-soft); color: var(--c-red); }
.detail-card h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; }
.detail-card .meta { color: var(--t-dim); font-size: 11px; margin-bottom: 16px; letter-spacing: 0.5px; }
.detail-card dl { display: grid; grid-template-columns: 92px 1fr; row-gap: 12px; column-gap: 16px; font-size: 13px; }
.detail-card dt { color: var(--t-dim); }
.detail-card dd { margin: 0; color: var(--t-main); }
@keyframes modal-in {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* =========================== 今日任务弹窗列表 =========================== */
.today-list { display: flex; flex-direction: column; gap: 10px; }
.today-empty {
  text-align: center;
  color: var(--t-dim);
  padding: 32px 0;
  font-size: 13px;
}
.today-item {
  background: var(--bg-card-2);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.today-row {
  display: flex; justify-content: space-between; gap: 12px;
  align-items: baseline;
}
.today-title { font-weight: 700; font-size: 14px; color: var(--t-main); }
.today-slot {
  font-size: 11px; font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--c-yellow-soft);
  color: var(--c-yellow);
  white-space: nowrap;
  letter-spacing: 0.4px;
}
.today-meta {
  font-size: 12px;
  color: var(--t-sub);
  display: flex; gap: 14px; flex-wrap: wrap;
}
.today-meta a {
  color: var(--c-yellow);
  text-decoration: none;
  font-weight: 600;
}
.today-meta a:hover { text-decoration: underline; }
.today-meta .no-link { color: var(--t-dim); }

/* 滚动定位偏移：避免被顶部栏遮挡（顶部栏不是 fixed，但仍留 16px 缓冲） */
[id^="panel"] { scroll-margin-top: 16px; }
/* 滚动定位时的高亮提示 —— 用独立的伪元素脉冲，避开和 fade-in 的 animation 冲突 */
.panel { position: relative; }
.panel::after {
  content: '';
  position: absolute; inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: 0 0 0 0 rgba(255, 210, 0, 0);
  transition: box-shadow .9s ease-out;
}
.panel.flash-target::after {
  box-shadow: 0 0 0 4px var(--c-yellow-soft), 0 16px 36px rgba(255, 210, 0, 0.18);
  transition: box-shadow .15s ease-in;
}
/* =========================== 摄影师介绍模块 =========================== */
.photographer-card {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}
.photographer-photo {
  position: relative;
  min-height: 320px;
  background: #1a0808;
  overflow: hidden;
}
.photographer-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 25%;
  transition: transform .8s ease;
}
.photographer-card:hover .photographer-photo img { transform: scale(1.04); }
.photographer-photo::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(26, 29, 36, 0.6) 100%);
  pointer-events: none;
}
.photographer-info {
  padding: 28px 32px 28px 4px;
  display: flex; flex-direction: column;
  gap: 10px;
  justify-content: center;
}
.photographer-tag {
  font-size: 11px;
  letter-spacing: 1.6px;
  color: var(--c-yellow);
  font-weight: 700;
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: var(--c-yellow-soft);
}
.photographer-name {
  margin: 6px 0 0;
  font-size: 28px;
  font-weight: 800;
  color: var(--t-main);
  letter-spacing: 0.5px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.photographer-en {
  font-size: 14px;
  font-weight: 500;
  color: var(--t-dim);
  letter-spacing: 1.2px;
}
.photographer-title {
  margin: 0;
  font-size: 14px;
  color: var(--t-sub);
  font-weight: 500;
}
.photographer-bio {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--t-sub);
  line-height: 1.7;
  max-width: 660px;
}
.photographer-stats {
  display: flex; gap: 28px;
  margin-top: 14px;
}
.ph-stat {
  display: flex; flex-direction: column;
  gap: 4px;
}
.ph-stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--c-yellow);
  line-height: 1;
  font-feature-settings: "tnum" on;
}
.ph-stat-label {
  font-size: 11px;
  letter-spacing: 1.2px;
  color: var(--t-dim);
}
@media (max-width: 900px) {
  .photographer-card {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .photographer-photo { min-height: 280px; }
  .photographer-photo::after {
    background: linear-gradient(180deg, transparent 50%, rgba(26, 29, 36, 0.7) 100%);
  }
  .photographer-info { padding: 22px 22px 26px; }
  .photographer-name { font-size: 22px; }
  .photographer-stats { gap: 20px; }
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.18); }

/* =========================== 页脚 =========================== */
.footer {
  text-align: center;
  font-size: 12px;
  color: var(--t-dim);
  letter-spacing: 0.5px;
  padding: 14px 24px 28px;
}

/* =========================== 自适应 =========================== */
@media (max-width: 1500px) {
  .chart-grid { grid-template-columns: 1fr 1fr; }
  .chart-grid .panel-wide { grid-column: span 2; }
  .warn-timeline-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 12px; padding: 18px 18px 8px; }
  .topbar-meta { flex-wrap: wrap; }
  .dashboard { padding: 4px 18px 28px; gap: 16px; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .kpi-card { padding: 18px 18px; border-radius: var(--radius-md); }
  .kpi-value { font-size: 32px; }
  .panel { padding: 18px 18px; border-radius: var(--radius-md); }
  .chart-grid { grid-template-columns: 1fr; }
  .chart-grid .panel-wide { grid-column: span 1; }
  .chart-canvas { height: 240px; }
  .filters input { width: 100%; }
  .filters { width: 100%; }
}
@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; }
  .kpi-value { font-size: 28px; }
  .brand-text h1 { font-size: 16px; }
  .table-wrap { font-size: 12px; }
  .task-table { font-size: 12px; }
  .task-table thead th, .task-table tbody td { padding: 10px 10px; }
}
@media (min-width: 2200px) {
  .dashboard { padding: 4px 56px 48px; gap: 28px; }
  .kpi-value { font-size: 52px; }
  .chart-canvas { height: 340px; }
}
