/* ============================================================
   人员动态看板 · 样式
   ============================================================ */
:root {
  --bg: #080e1a;
  --bg-2: #0c1526;
  --panel: #101b2e;
  --panel-2: #16233a;
  --line: rgba(148, 178, 224, 0.14);
  --line-strong: rgba(148, 178, 224, 0.3);
  --text: #e9f0fb;
  --muted: #93a6c4;
  --faint: #63759a;
  --accent: #38bdf8;
  --radius: 14px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.9);
  --font: "Inter", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;

  /* 双主题语义变量（默认 = 深色夜航） */
  --topbar-bg: rgba(9, 16, 29, 0.82);
  --kpi-bg: rgba(22, 35, 58, 0.6);
  --btn-bg: rgba(22, 35, 58, 0.85);
  --btn-hover: #1d2f4c;
  --card-bg: linear-gradient(180deg, #17253c, #121d2f);
  --card-border: rgba(255, 255, 255, 0.055);
  --card-border-hover: rgba(255, 255, 255, 0.12);
  --lane-bg: linear-gradient(180deg, rgba(19, 30, 49, 0.92), rgba(13, 22, 38, 0.92));
  --lane-head-border: rgba(0, 0, 0, 0.18);
  --input-bg: #0d1728;
  --seg-bg: #0d1728;
  --seg-on: #1e3450;
  --modal-bg: linear-gradient(180deg, #142034, #101a2b);
  --mask: rgba(4, 9, 18, 0.72);
  --toast-bg: #16263d;
  --login-mask: rgba(5, 10, 20, 0.92);
  --login-card: #131f33;
  --login-input: #0c1626;
  --th-bg: #16243a;
  --td-sticky: #101b2e;
  --avatar-bg: #1d2c45;
  --badge-ring: #0b1424;
  --ring-bg: rgba(10, 17, 32, 0.9);
  --hover-soft: rgba(255, 255, 255, 0.08);
  --empty-fg: rgba(147, 166, 196, 0.55);
}

* { box-sizing: border-box; }

/* 通用隐藏类（日历视图等依赖它） */
.hidden { display: none !important; }

html, body {
  height: 100%;
  margin: 0;
  /* 禁止文档横向滚动：手机上任何横向位移/留白问题都从根源消除 */
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(56, 189, 248, 0.14), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(244, 114, 182, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

button, input, select, textarea { font-family: inherit; }

/* ------------------------------------------------------------ 顶栏 */
.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 20px;
  min-height: 68px;
  background: var(--topbar-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 11px; flex: 0 0 auto; }
.brand .mark { width: 34px; height: 34px; color: var(--accent); flex: 0 0 auto; }
.brand .mark-img {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  object-fit: cover;
  flex: 0 0 auto;
  display: block;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}
.brand-text h1 { margin: 0; font-size: 16.5px; letter-spacing: 0.4px; font-weight: 650; }
.brand-text p { margin: 2px 0 0; font-size: 11.5px; color: var(--faint); letter-spacing: 0.2px; }

.kpis {
  display: flex;
  gap: 8px;
  flex: 1 1 auto;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 0;
}
.kpis::-webkit-scrollbar { display: none; }

.kpi {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--kpi-bg);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  flex: 0 0 auto;
}
.kpi b { color: var(--text); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.kpi i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.kpi.util {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.12);
  color: #9ad9f8;
}
.kpi.util b { color: #cdf0ff; }

.actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }

/* 人员搜索框 */
#searchInput { width: 142px; }
@media (max-width: 640px) {
  #searchInput { width: 124px; }
}

.btn {
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--btn-bg);
  color: var(--text);
  padding: 7px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s, transform 0.12s;
  white-space: nowrap;
}
.btn:hover { background: var(--btn-hover); border-color: rgba(148, 178, 224, 0.5); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(180deg, #2aa8e0, #1d86bd);
  border-color: #35b3ea;
  color: #04121d;
  font-weight: 650;
}
.btn.primary:hover { background: linear-gradient(180deg, #38bdf8, #2296cf); }
.btn.ghost { background: transparent; }
.btn.danger { border-color: rgba(251, 113, 133, 0.5); color: #ffc2cc; background: rgba(251, 113, 133, 0.12); }
.btn.danger:hover { background: rgba(251, 113, 133, 0.22); }
.btn.sm { padding: 5px 10px; font-size: 12px; border-radius: 8px; }

.conn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--faint);
  padding-left: 4px;
}
.conn i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #64748b;
  box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.6);
}
.conn.on i { background: #4ade80; animation: pulse 2.4s infinite; }
.conn.off i { background: #fb7185; }
.conn em { font-style: normal; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.45); }
  70% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0); }
  100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); }
}

/* ------------------------------------------------------------ 看板 */
.board {
  height: calc(100dvh - 69px);
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(252px, 1fr);
  gap: 12px;
  padding: 14px 16px 18px;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scroll-padding-left: 16px;
  /* 触屏（含手机电脑版）允许横向滑动查看全部泳道 */
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

/* 泳道横向翻页箭头（多列布局时显示） */
.board-nav {
  position: fixed;
  right: 14px;
  bottom: 64px;
  z-index: 55;
  display: none;
  gap: 6px;
}
.board-nav .btn {
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 20px;
  line-height: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
@media (min-width: 901px) {
  .board-nav { display: flex; }
}

.lane {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--lane-bg);
  border: 1px solid var(--line);
  border-top: 2px solid var(--c, #38bdf8);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  scroll-snap-align: start;
  transition: background 0.18s, box-shadow 0.2s, border-color 0.2s;
}

.lane-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 12px 9px;
  background: var(--c, #38bdf8);
  border-bottom: 1px solid var(--lane-head-border);
}
.lane-head .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}
.lane-head .lane-icon {
  font-size: 17px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  transform: translateY(0.5px);
}
.lane-head .lane-img {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  flex: 0 0 auto;
  background: #fff;
}
.lane-head h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.lane-head .count {
  margin-left: auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 600;
}

.lane-head .count b {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
}

.card .eta-badge {
  display: inline-block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px dashed color-mix(in srgb, var(--c) 45%, transparent);
  padding: 1px 8px;
  border-radius: 999px;
  white-space: nowrap;
  width: fit-content;
}

.card .eta-badge.overdue {
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.5);
}

/* 预计复员/返岗日期：手动输入 + 日历选择 */
.eta-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.eta-row .input {
  flex: 1;
  min-width: 0;
}
.eta-row .eta-date {
  flex: 0 0 auto;
  width: 132px;
  cursor: pointer;
}
.eta-row .eta-cal {
  flex: 0 0 auto;
  padding: 7px 9px;
  font-size: 15px;
  line-height: 1;
}

/* 多选批量编辑 */
#btnMulti.active {
  background: var(--accent, #3b82f6);
  color: #fff;
}
.card.selected {
  outline: 2.5px solid #3b82f6;
  outline-offset: 1px;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}
.card.selected::after {
  content: '✓';
  position: absolute;
  top: 6px;
  right: 8px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
  font-weight: 700;
}
.batch-bar {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--panel, #1e293b);
  border: 1px solid rgba(148, 163, 184, 0.25);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
}
.batch-bar.hidden { display: none; }
.batch-count {
  font-size: 14px;
  font-weight: 700;
  color: var(--text, #e2e8f0);
  white-space: nowrap;
}
.batch-names {
  max-width: 60vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 640px) {
  .batch-bar { width: calc(100vw - 24px); justify-content: space-between; padding: 10px 12px; }
  .batch-names { max-width: 84vw; }
}

/* 「⚙ 管理」下拉菜单 */
.manage-wrap {
  position: relative;
  display: inline-block;
}
.manage-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 70;
  min-width: 168px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px;
  background: var(--panel, #16233b);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.manage-menu.hidden { display: none; }
.manage-menu button {
  border: none;
  background: transparent;
  color: var(--text, #e2e8f0);
  font-size: 13.5px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}
.manage-menu button:hover { background: rgba(148, 163, 184, 0.14); }
.manage-menu button:active { background: rgba(148, 163, 184, 0.24); }

/* 公告轮播淡入淡出 */
#noticeText {
  transition: opacity 0.18s ease;
}
#noticeText.notice-fade {
  opacity: 0;
}

/* 公告长文字无缝跑马灯 */
.notice-text .nt-inner {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
}
.notice-text.scrolling {
  text-overflow: clip;
}
.notice-text.scrolling .nt-inner {
  animation: noticeScroll var(--notice-dur, 11s) linear infinite;
}
@keyframes noticeScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .notice-text.scrolling .nt-inner { animation: none; }
}

/* ------------------------------------------------------------ 视图切换 */
/* 日历视图代码保留，入口暂时隐藏（后期优化后再放开） */
.view-switch {
  display: none !important;
}

.view-switch {
  display: inline-flex;
  gap: 4px;
  margin: 0 0 8px 18px;
  padding: 3px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  width: fit-content;
}

.vs-btn {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  padding: 4px 14px;
  border-radius: 8px;
  cursor: pointer;
}

.vs-btn.active {
  background: var(--accent);
  color: #0a1120;
  font-weight: 600;
}

/* ------------------------------------------------------------ 日历视图 */
.cal-view { padding: 0 18px 24px; }

.cal-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.cal-month { font-size: 16px; font-weight: 600; }

.cal-legend {
  margin-left: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--muted);
}

.cal-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 3px;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  font-size: 11.5px;
  color: var(--faint);
  text-align: center;
  margin-bottom: 4px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
  align-items: stretch;
}

.cal-cell {
  min-height: 96px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 5px 6px;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.cal-cell:hover { border-color: var(--line-strong); }
.cal-cell.weekend { background: rgba(255, 255, 255, 0.02); }
.cal-cell.empty-cell { background: transparent; border-color: transparent; cursor: default; }

.cal-cell.today {
  background: color-mix(in srgb, var(--accent) 16%, var(--panel));
  border-color: var(--accent);
}

.cal-cell.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent) inset;
}

.cal-date {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.cal-cell.today .cal-date { color: var(--text); font-weight: 600; }
.cal-date em {
  font-style: normal;
  font-size: 10.5px;
  color: var(--accent);
  margin-left: 3px;
}

.cal-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-top: 4px;
}

.cal-pill {
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--text);
  background: color-mix(in srgb, var(--c) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 55%, transparent);
  border-radius: 5px;
  padding: 0 4px;
  cursor: pointer;
  white-space: nowrap;
}

.cal-pill:hover { background: color-mix(in srgb, var(--c) 30%, transparent); }

.cal-eta {
  margin-top: 3px;
  font-size: 10.5px;
  color: color-mix(in srgb, var(--c) 85%, #fff);
  background: color-mix(in srgb, var(--c) 12%, transparent);
  border: 1px dashed color-mix(in srgb, var(--c) 60%, transparent);
  border-radius: 5px;
  padding: 0 4px;
  width: fit-content;
}

.cal-detail {
  margin-top: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.cd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 14px;
}

.cd-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 4px 0;
  font-size: 13px;
}

.cd-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.cd-names { color: var(--muted); display: inline-flex; gap: 6px; flex-wrap: wrap; }

.cd-name {
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 12.5px;
  padding: 1px 4px;
  border-radius: 5px;
  cursor: pointer;
}

.cd-name:hover { background: var(--hover-soft); }

.cd-etas {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
}

.lane-body {
  flex: 1 1 auto;
  min-height: 70px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow-y: auto;
  overflow-x: hidden;
  background: color-mix(in srgb, var(--c, #38bdf8) 8%, transparent);
  scrollbar-width: thin;
}
.lane-body::-webkit-scrollbar { width: 6px; }
.lane-body::-webkit-scrollbar-thumb { background: rgba(148, 178, 224, 0.22); border-radius: 3px; }

.lane.drag-over {
  background: linear-gradient(180deg, rgba(29, 47, 76, 0.95), rgba(19, 32, 53, 0.95));
  box-shadow: inset 0 0 0 1.5px var(--c), 0 0 24px -6px var(--c);
}

.empty {
  border: 1px dashed rgba(148, 178, 224, 0.22);
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
  font-size: 11.5px;
  color: var(--empty-fg);
  letter-spacing: 0.3px;
}

/* ------------------------------------------------------------ 人员卡 */
.card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px 9px 9px;
  border-radius: 12px;
  border-left: 3px solid var(--c, #38bdf8);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-left: 3px solid var(--c);
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  transition: transform 0.14s ease, box-shadow 0.2s, border-color 0.2s;
  animation: cardIn 0.28s ease both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.board.no-anim .card { animation: none; }
.card:hover {
  transform: translateY(-1px);
  border-color: var(--card-border-hover);
  box-shadow: 0 12px 22px -14px rgba(0, 0, 0, 0.9);
}
.card.is-dragging { opacity: 0.32; }
.card .info { min-width: 0; }
.card .row1 {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.card .name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card .role {
  font-size: 10.5px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 0 1 auto;
}
.card .note {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  color: color-mix(in srgb, var(--c) 40%, var(--text));
  background: color-mix(in srgb, var(--c) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 40%, transparent);
  border-radius: 999px;
  padding: 1px 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card .note.empty-note {
  color: var(--faint);
  background: transparent;
  border: 1px dashed var(--line);
  font-weight: 400;
}
.card .role2 {
  margin-top: 1px;
  font-size: 10.5px;
  color: var(--faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card .tag {
  flex: 0 0 auto;
  font-size: 9.5px;
  line-height: 1;
  padding: 2.5px 6px;
  border-radius: 999px;
  border: 1px solid;
  opacity: 0.95;
  white-space: nowrap;
}
.card .side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.card .days {
  font-size: 10.5px;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 15%, transparent);
  border-radius: 6px;
  padding: 1px 6px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.card .util {
  font-size: 10.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.card .util.warn { color: #fbbf24; }

/* 卡片右上角「详情」图标 */
.card .more {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
}
.card .more svg { width: 13px; height: 13px; }
.card:hover .more,
.card .more:focus-visible { opacity: 0.9; }
.card .more:hover { background: rgba(148, 178, 224, 0.16); color: var(--text); }
@media (hover: none) {
  .card .more { opacity: 0.55; }
}

/* 泳道内项目分组条 */
.proj {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 2px 1px;
  font-size: 10.5px;
  color: var(--faint);
  min-width: 0;
}
.proj:first-child { margin-top: 0; }
.proj b {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.proj span { flex: 0 0 auto; opacity: 0.8; }
.proj::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* 自定义动态标签 */
.custom-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  font-size: 12px;
  color: #e4eefc;
  cursor: grab;
}
.custom-chip.dragging {
  opacity: 0.45;
  cursor: grabbing;
}
.custom-chip.drag-over {
  outline: 2px dashed color-mix(in srgb, var(--c) 70%, transparent);
  outline-offset: 2px;
}
.custom-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.custom-chip button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0 1px;
}
.custom-chip button:hover { color: #ffb3bf; }

.ghost-card {  position: fixed;
  left: 0; top: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.96;
  box-shadow: 0 26px 48px -16px rgba(0, 0, 0, 0.95);
  transform-origin: center;
  animation: none;
}

/* ------------------------------------------------------------ 头像 */
.avatar {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px var(--ring, #38bdf8), 0 4px 12px -4px rgba(0, 0, 0, 0.8);
  background: var(--avatar-bg);
}
.avatar .face,
.avatar .face-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  display: block;
  object-fit: cover;
  overflow: hidden;
}
.avatar .acc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.avatar .badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--badge-ring);
  color: #06121f;
}
.avatar .badge svg { width: 11px; height: 11px; }

/* 生病动态 */
.avatar.sick { box-shadow: 0 0 0 2px #fb7185, 0 0 18px -2px rgba(251, 113, 133, 0.55); }
.avatar .sick-fx { animation: sickSway 3.4s ease-in-out infinite; transform-origin: 50px 70px; }
.avatar .sweat { animation: sweatDrop 2.6s ease-in infinite; }
.avatar .sweat.s2 { animation-delay: 1.3s; }
.avatar .steam { animation: steam 3s ease-in-out infinite; }
.avatar .steam.s2 { animation-delay: 1.5s; }
@keyframes sickSway {
  0%, 100% { transform: rotate(-2.2deg); }
  50% { transform: rotate(2.2deg); }
}
@keyframes sweatDrop {
  0% { opacity: 0; transform: translateY(-2px); }
  25% { opacity: 1; }
  100% { opacity: 0; transform: translateY(9px); }
}
@keyframes steam {
  0% { opacity: 0; transform: translateY(2px); }
  40% { opacity: 0.65; }
  100% { opacity: 0; transform: translateY(-7px); }
}
.avatar .wave-move { animation: waveMove 4s ease-in-out infinite; }
@keyframes waveMove {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(2px); }
}

/* ------------------------------------------------------------ 弹层 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 18px;
}
.modal.hidden { display: none; }
.modal-mask {
  position: absolute;
  inset: 0;
  background: var(--mask);
  backdrop-filter: blur(6px);
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-card {
  position: relative;
  width: min(620px, 100%);
  max-height: min(86dvh, 900px);
  overflow-y: auto;
  background: var(--modal-bg);
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  box-shadow: 0 40px 80px -30px #000;
  padding: 20px 20px 18px;
  animation: popIn 0.2s ease;
  scrollbar-width: thin;
}
.modal-card::-webkit-scrollbar { width: 8px; }
.modal-card::-webkit-scrollbar-thumb { background: rgba(148, 178, 224, 0.25); border-radius: 4px; }
@keyframes popIn {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.sheet-head { display: flex; align-items: center; gap: 12px; }
.sheet-head .avatar { width: 58px; height: 58px; }
/* 状态编辑弹窗：头像可点击更换 */
.avatar-edit { position: relative; flex: none; cursor: pointer; border-radius: 50%; transition: filter 0.15s ease, transform 0.15s ease; }
.avatar-edit:hover { filter: brightness(1.12); transform: scale(1.03); }
.avatar-edit:active { transform: scale(0.97); }
.avatar-edit .cam-badge {
  position: absolute; right: -3px; bottom: -3px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--accent); color: #06121f;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px var(--panel), 0 2px 6px rgba(0, 0, 0, 0.4);
}
.avatar-edit .cam-badge svg { width: 12px; height: 12px; }
.sheet-head h3 { margin: 0; font-size: 17px; font-weight: 650; }
.sheet-head .sub { margin-top: 3px; font-size: 12px; color: var(--muted); }
.sheet-head .close { margin-left: auto; }

.icon-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  width: 28px; height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: grid; place-items: center;
  font-size: 15px;
  line-height: 1;
}
.icon-btn:hover { color: var(--text); border-color: var(--line-strong); }

.section-title {
  margin: 20px 0 9px;
  font-size: 11.5px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--faint);
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.current-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  font-size: 12.5px;
  color: #bfe4f8;
  line-height: 1.5;
}
.current-note b { color: #e7f6ff; font-weight: 600; }

.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 7px;
}
.status-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--kpi-bg);
  color: var(--text);
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-align: left;
}
.status-btn i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); flex: 0 0 auto; }
.status-btn:hover { background: var(--btn-hover); border-color: var(--c); }
.status-btn.active { border-color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }

.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li {
  position: relative;
  padding: 0 0 14px 18px;
  border-left: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--muted);
}
.timeline li:last-child { padding-bottom: 0; border-left-color: transparent; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -4.5px; top: 3px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c, #64748b);
  box-shadow: 0 0 0 3px var(--ring-bg);
}
.timeline .t-top { display: flex; gap: 8px; align-items: baseline; }
.timeline .t-status { font-weight: 600; color: var(--text); }
.timeline .t-time { margin-left: auto; font-size: 11px; color: var(--faint); white-space: nowrap; }
.timeline .t-note { margin-top: 3px; color: var(--muted); font-size: 12px; }

.field { margin-top: 12px; }
.field label {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-bottom: 5px;
  letter-spacing: 0.3px;
}
.input, select.input, textarea.input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--line-strong);
  color: var(--text);
  border-radius: 9px;
  padding: 9px 11px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}
textarea.input { resize: vertical; min-height: 62px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; }
.input.small { padding: 6px 8px; font-size: 12px; border-radius: 7px; }
.input.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.form-row { display: flex; gap: 10px; }
.form-row > * { flex: 1 1 0; min-width: 0; }
/* 修复 WebKit 内核下 textarea 在 flex 行内缩成固有宽度的渲染问题 */
.form-row > textarea.input {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
}

.modal-actions {
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 18px;
  align-items: center;
}
.modal-actions .spacer { flex: 1; }

/* 分享弹窗按钮网格 */
.share-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.share-grid .btn { width: 100%; text-align: center; }

.hint { font-size: 11.5px; color: var(--faint); line-height: 1.55; margin-top: 8px; }
.hint code {
  background: rgba(148, 178, 224, 0.12);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  color: #a8c6e8;
}

.err { color: #ffb3bf; font-size: 12px; margin-top: 8px; min-height: 16px; }

/* ------------------------------------------------------------ 表格 */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: auto;
  max-height: 340px;
}
table.util {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
table.util th, table.util td {
  padding: 7px 8px;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
table.util th {
  position: sticky;
  top: 0;
  background: var(--th-bg);
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  z-index: 1;
}
table.util th:first-child, table.util td:first-child { text-align: left; position: sticky; left: 0; background: var(--td-sticky); }
table.util th:first-child { background: var(--th-bg); }
table.util tbody tr:hover td { background: rgba(56, 189, 248, 0.05); }
table.util tbody tr:hover td:first-child { background: var(--btn-hover); }
table.util td.zero { color: rgba(147, 166, 196, 0.32); }
table.util td.rate { font-weight: 600; color: #d9ecff; }
table.util td.rate.high { color: #fbbf24; }
table.util td.rate.low { color: #fb7185; }
table.util tfoot td {
  background: var(--th-bg);
  font-weight: 600;
  color: #dbeafa;
  position: sticky;
  bottom: 0;
}

.bar {
  display: inline-block;
  width: 46px;
  height: 4px;
  border-radius: 2px;
  background: rgba(148, 178, 224, 0.16);
  overflow: hidden;
  vertical-align: middle;
  margin-left: 6px;
}
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, #38bdf8, #818cf8); }

.weights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 8px;
}
.weight-item {
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 9px;
  background: var(--kpi-bg);
}
.weight-item span { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.weight-item span i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.weight-item input { width: 100%; border: none; background: transparent; color: var(--text); font-size: 13px; outline: none; font-variant-numeric: tabular-nums; }

.seg {
  display: inline-flex;
  background: var(--seg-bg);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
}
.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 12px;
  cursor: pointer;
}
.seg button.on { background: var(--seg-on); color: var(--text); }

/* ------------------------------------------------------------ 成员管理 */
.member-row {
  display: grid;
  grid-template-columns: 38px 1fr 1fr 1fr auto;
  gap: 9px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
.member-row:last-child { border-bottom: none; }
.member-row .avatar { width: 36px; height: 36px; }
.member-row .ops { display: flex; gap: 6px; }

/* ------------------------------------------------------------ 提示 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translate(-50%, 20px);
  background: var(--toast-bg);
  border: 1px solid var(--line-strong);
  color: #e3eefc;
  padding: 9px 15px;
  border-radius: 10px;
  font-size: 12.5px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 400;
  max-width: min(90vw, 460px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(251, 113, 133, 0.55); color: #ffc9d2; }

/* ------------------------------------------------------------ 登录 */
.login {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  background: var(--login-mask);
  backdrop-filter: blur(8px);
}
.login.hidden { display: none; }
.login-card {
  width: min(340px, 88vw);
  background: var(--login-card);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 24px 22px;
  display: grid;
  gap: 10px;
  box-shadow: var(--shadow);
}
.login-card h2 { margin: 0; font-size: 16px; }
.login-card p { margin: 0 0 6px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.login-card input {
  background: var(--login-input);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 10px 12px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.login-card input:focus { border-color: var(--accent); }
.login-err { color: #ffb3bf; font-size: 12px; min-height: 14px; }

/* ------------------------------------------------------------ 响应式 */
@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .kpis { order: 3; flex-basis: 100%; }
  .actions { margin-left: auto; }
  .conn { display: none; }
  body { overflow-x: hidden; overflow-y: auto; }
  .board {
    height: auto;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
    overflow: visible;
    padding: 12px;
  }
  .lane-body { max-height: none; overflow: visible; }
  .lane { border-top-width: 2px; }
  .modal-card { padding: 16px 14px; }
  .member-row { grid-template-columns: 36px 1fr auto; }
  .member-row .role-input { grid-column: 2 / 3; }
}

/* 手机端紧凑化：该缩小的缩小 */
@media (max-width: 640px) {
  /* 输入框字号 ≥16px，避免 iOS/微信内核聚焦时自动放大页面（关弹窗后页面卡在放大的 BUG） */
  .input, select.input, textarea.input, .login-card input {
    font-size: 16px;
  }
  .topbar { padding: 8px 10px; gap: 8px; }
  .brand h1, .topbar h1 { font-size: 16px; }
  #subline { font-size: 11px; }
  .kpis { gap: 6px; }
  .kpis .kpi { font-size: 11px; padding: 4px 8px; }
  .actions { gap: 6px; }
  .btn { padding: 6px 10px; font-size: 12px; }
  .view-switch { margin-left: 10px; }
  .vs-btn { padding: 4px 10px; font-size: 12px; }
  .cal-view { padding: 0 10px 20px; }
  .lane-head { padding: 9px 10px 7px; }
  .lane-head h2 { font-size: 12px; }
  .lane-head .count { font-size: 11px; padding: 1px 8px; }
  .lane-body { padding: 8px; gap: 7px; }
  .card { gap: 8px; padding: 8px 9px 8px 7px; }
  .card .name { font-size: 13px; }
  .card .note { font-size: 11px; }
  .card .eta-badge { font-size: 10px; }
  .eta-row { flex-wrap: nowrap; }
  .eta-row .eta-date { width: 118px; flex: 0 1 auto; min-width: 0; }
  .eta-row .input { min-width: 0; }
  .eta-row .eta-cal { padding: 7px 8px; }
  /* 手机端：输入区占满一行，按钮换行放下，编辑空间更大 */
  .form-row { flex-wrap: wrap; }
  .form-row > textarea.input { flex: 1 1 100%; }
  .form-row > .btn { flex: 0 0 auto; margin-left: auto; }
  .notice-bar { margin: 0 10px 8px; }
  .batch-bar { bottom: 10px; }
  .manage-menu { min-width: 156px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* ------------------------------------------------------------ 泳道拖动换位 */

.lane-head {
  cursor: grab;
  user-select: none;
}
.lane-head:active {
  cursor: grabbing;
}
.lane.lane-swap {
  outline: 2px dashed var(--c, #60a5fa);
  outline-offset: -4px;
  border-radius: 16px;
  opacity: 0.75;
}

/* ------------------------------------------------------------ 公告栏 */

.notice-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 16px 10px;
  cursor: pointer;
  padding: 9px 14px;
  border-radius: 12px;
  border: 1px solid rgba(250, 204, 21, 0.28);
  background: linear-gradient(90deg, rgba(250, 204, 21, 0.12), rgba(250, 204, 21, 0.04));
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.notice-bar:hover {
  border-color: rgba(250, 204, 21, 0.55);
}
.notice-bar.hidden {
  display: none;
}
.notice-icon {
  font-size: 15px;
  flex: 0 0 auto;
}
.notice-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #fde68a;
  font-weight: 600;
}
.notice-count {
  flex: 0 0 auto;
  font-size: 12px;
  color: rgba(253, 230, 138, 0.65);
}

.notice-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.notice-body {
  flex: 1;
  min-width: 0;
}
.notice-msg {
  font-size: 13px;
  color: var(--text, #e4eefc);
  white-space: pre-wrap;
  word-break: break-word;
}
.notice-time {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}

/* ------------------------------------------------------------ 操作日志 */
.audit-list {
  margin-top: 10px;
  max-height: 62dvh;
  overflow-y: auto;
  scrollbar-width: thin;
}
.audit-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 12.5px;
}
.audit-row:last-child { border-bottom: none; }
.audit-who {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.audit-who b {
  font-weight: 650;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audit-who span {
  color: var(--faint);
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.audit-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.audit-act {
  color: var(--accent);
  font-weight: 600;
}
.audit-detail {
  color: var(--muted);
  overflow-wrap: anywhere;
}
.link-btn {
  margin-left: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
@media (max-width: 640px) {
  .audit-row { grid-template-columns: 74px minmax(0, 1fr); gap: 8px; font-size: 12px; }
  .audit-who b { max-width: 74px; }
}

/* ============================================================
   浅色莫兰迪日间主题（html[data-theme="light"]）
   ============================================================ */
html[data-theme="light"] {
  --bg: #f3f1ec;
  --bg-2: #ebe8e1;
  --panel: #ffffff;
  --panel-2: #faf8f4;
  --line: rgba(58, 68, 86, 0.14);
  --line-strong: rgba(58, 68, 86, 0.28);
  --text: #2a3340;
  --muted: #5d6878;
  --faint: #8a93a2;
  --accent: #1f8fc4;
  --shadow: 0 18px 40px -22px rgba(60, 70, 90, 0.35);

  --topbar-bg: rgba(255, 255, 255, 0.86);
  --kpi-bg: rgba(255, 255, 255, 0.72);
  --btn-bg: #ffffff;
  --btn-hover: #eef1f5;
  --card-bg: linear-gradient(180deg, #ffffff, #fbfaf7);
  --card-border: rgba(58, 68, 86, 0.1);
  --card-border-hover: rgba(58, 68, 86, 0.24);
  --lane-bg: linear-gradient(180deg, #ffffff, #fdfcfa);
  --lane-head-border: rgba(58, 68, 86, 0.1);
  --input-bg: #ffffff;
  --seg-bg: #f0eee9;
  --seg-on: #dfe7ef;
  --modal-bg: #ffffff;
  --mask: rgba(40, 50, 65, 0.35);
  --toast-bg: #ffffff;
  --login-mask: rgba(243, 241, 236, 0.9);
  --login-card: #ffffff;
  --login-input: #f5f3ee;
  --th-bg: #eef1f5;
  --td-sticky: #ffffff;
  --avatar-bg: #e8ecf1;
  --badge-ring: #ffffff;
  --ring-bg: #f3f1ec;
  --hover-soft: rgba(0, 0, 0, 0.06);
  --empty-fg: rgba(90, 100, 120, 0.65);
}

html[data-theme="light"] body {
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(106, 169, 224, 0.16), transparent 60%),
    radial-gradient(900px 500px at 100% 0%, rgba(224, 127, 127, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
}

/* 泳道列头在浅色下加深一点，保证白字可读 */
html[data-theme="light"] .lane-head {
  background: color-mix(in srgb, var(--c, #38bdf8), #2f3a4c 16%);
}
html[data-theme="light"] .lane-head h2 { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.18); }
html[data-theme="light"] .lane-body {
  background: color-mix(in srgb, var(--c, #38bdf8) 10%, #ffffff);
}
html[data-theme="light"] .lane.drag-over { background: rgba(255, 255, 255, 0.92); }

/* 状态色文字在浅底上加深 */
html[data-theme="light"] .card .note {
  background: color-mix(in srgb, var(--c, #38bdf8) 12%, #ffffff);
  border-color: color-mix(in srgb, var(--c, #38bdf8) 45%, #ffffff);
}
html[data-theme="light"] .card .days {
  color: color-mix(in srgb, var(--c, #38bdf8), #24303f 45%);
  background: color-mix(in srgb, var(--c, #38bdf8) 14%, #ffffff);
}
html[data-theme="light"] .cal-eta {
  color: color-mix(in srgb, var(--c, #38bdf8), #24303f 45%);
  background: color-mix(in srgb, var(--c, #38bdf8) 12%, #ffffff);
}
html[data-theme="light"] .cal-pill {
  background: color-mix(in srgb, var(--c, #38bdf8) 16%, #ffffff);
  border-color: color-mix(in srgb, var(--c, #38bdf8) 50%, #ffffff);
}
html[data-theme="light"] .cal-pill:hover {
  background: color-mix(in srgb, var(--c, #38bdf8) 28%, #ffffff);
}

/* 视图切换/多选激活态 */
html[data-theme="light"] .vs-btn.active { color: #ffffff; }
html[data-theme="light"] #btnMulti.active { color: #ffffff; }

/* KPI 利用率胶囊 */
html[data-theme="light"] .kpi.util {
  border-color: rgba(31, 143, 196, 0.45);
  background: rgba(31, 143, 196, 0.1);
  color: #14688f;
}
html[data-theme="light"] .kpi.util b { color: #0d5273; }

/* 逾期 / 警示 / 错误色在浅底上加深 */
html[data-theme="light"] .card .eta-badge.overdue {
  color: #c22b2b;
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.45);
}
html[data-theme="light"] .card .util.warn { color: #a16207; }
html[data-theme="light"] table.util td.rate.high { color: #a16207; }
html[data-theme="light"] table.util td.rate.low { color: #c22b2b; }
html[data-theme="light"] .err,
html[data-theme="light"] .login-err,
html[data-theme="light"] .toast.err { color: #c22b2b; }

/* 提示与代码片段 */
html[data-theme="light"] .hint code {
  background: rgba(58, 68, 86, 0.1);
  color: #44546a;
}

/* 公告栏（琥珀色浅化） */
html[data-theme="light"] .notice-bar {
  border-color: rgba(180, 130, 10, 0.32);
  background: linear-gradient(90deg, rgba(217, 119, 6, 0.1), rgba(217, 119, 6, 0.04));
}
html[data-theme="light"] .notice-bar:hover { border-color: rgba(180, 130, 10, 0.55); }
html[data-theme="light"] .notice-text { color: #8a6207; }
html[data-theme="light"] .notice-count { color: rgba(138, 98, 7, 0.7); }

/* 当前备注块 */
html[data-theme="light"] .current-note {
  background: rgba(31, 143, 196, 0.08);
  border-color: rgba(31, 143, 196, 0.3);
  color: #155e75;
}
html[data-theme="light"] .current-note b { color: #0c4a6e; }

/* 弹层与菜单阴影轻量化 */
html[data-theme="light"] .modal-card { box-shadow: 0 40px 80px -40px rgba(60, 70, 90, 0.45); }
html[data-theme="light"] .manage-menu { box-shadow: 0 10px 30px rgba(60, 70, 90, 0.2); }
html[data-theme="light"] .batch-bar { box-shadow: 0 8px 30px rgba(60, 70, 90, 0.22); }
html[data-theme="light"] .ghost-card { box-shadow: 0 26px 48px -16px rgba(60, 70, 90, 0.4); }
html[data-theme="light"] .avatar { box-shadow: 0 0 0 2px var(--ring, #38bdf8), 0 4px 12px -4px rgba(60, 70, 90, 0.35); }

/* 日历周末微染 */
html[data-theme="light"] .cal-cell.weekend { background: rgba(58, 68, 86, 0.03); }
html[data-theme="light"] table.util td.zero { color: rgba(100, 110, 130, 0.45); }
