/* ============================================================
   摇篮 · 运营指挥看板  styles.css
   Design Contract: rmb-note × frosted glass（人民币纸币 × 磨砂玻璃）
   主色: 藕粉胭脂 #B88A7D / 数据色: 青蓝 #6B80A3 / 底: 暖纸白 #F6F3F1
   配色原则: 低饱和暖色系、主界面类目色 ≤5、色弱可辨（明度差 + 色相分离）
             服务排程按 7 类任务/7 个班组上色，同屏仅出现单一视图，色相均落在同一暖冷平衡区间
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --bg: #F6F3F1;
  --bg-grad:
    radial-gradient(1100px 700px at 12% -10%, rgba(184, 138, 125, 0.05), transparent 62%),
    radial-gradient(900px 620px at 96% 4%, rgba(107, 128, 163, 0.04), transparent 64%),
    radial-gradient(800px 600px at 70% 108%, rgba(94, 140, 106, 0.03), transparent 66%),
    linear-gradient(160deg, #FAF7F5 0%, #F6F3F1 52%, #F0EBE8 100%);
  --bg-elev: rgba(255, 255, 255, 0.78);
  --bg-elev-2: rgba(255, 255, 255, 0.94);
  --surface-grad: linear-gradient(155deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 56%, rgba(255, 255, 255, 0.86) 100%);
  --surface-line: inset 0 1px 0 rgba(255, 255, 255, 1);
  --glass-blur: blur(12px) saturate(106%);
  --border: rgba(46, 39, 37, 0.10);
  --border-strong: rgba(184, 138, 125, 0.44);

  --primary: #B88A7D;
  --primary-deep: #AE6F63;
  --primary-soft: rgba(184, 138, 125, 0.10);
  --data: #6B80A3;
  --data-soft: rgba(107, 128, 163, 0.10);
  --blush: #7D6A93;

  --text: #2E2725;
  --text-sub: rgba(46, 39, 37, 0.64);
  --text-mute: rgba(46, 39, 37, 0.44);

  --success: #5E8C6A;
  --warning: #C08A4C;
  --danger: #B7675F;
  --info: #6B80A3;

  --font-display: "Noto Serif SC", "STSong", "SimSun", Georgia, serif;
  --font-body: "PingFang SC", "Noto Sans CJK SC", "Hiragino Sans GB", "Microsoft YaHei", -apple-system, sans-serif;
  --font-mono: "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  --shadow-card: 0 12px 30px rgba(74, 60, 42, 0.14);
  --shadow-elev: 0 20px 48px rgba(74, 60, 42, 0.20);
  --glow-primary: 0 0 0 4px rgba(158, 46, 38, 0.14);
  --glow-data: 0 0 0 4px rgba(42, 96, 106, 0.14);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-grad);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* 背景氛围：暖纸底 + 低饱和彩色光斑（磨砂玻璃需要背后有层次才出效果） */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(760px 460px at 8% 8%, rgba(179, 68, 60, 0.05), transparent 62%),
    radial-gradient(820px 500px at 92% 86%, rgba(63, 110, 117, 0.05), transparent 62%),
    radial-gradient(700px 460px at 70% 4%, rgba(124, 148, 99, 0.05), transparent 62%);
  pointer-events: none;
  z-index: 0;
  animation: blobDrift 20s ease-in-out infinite alternate;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(420px 420px at 18% 26%, rgba(179, 68, 60, 0.04), transparent 65%),
    radial-gradient(520px 520px at 84% 74%, rgba(63, 110, 117, 0.05), transparent 55%),
    radial-gradient(360px 360px at 58% 94%, rgba(191, 160, 106, 0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: blobDrift 16s ease-in-out infinite alternate-reverse;
}
@keyframes blobDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(46px, -32px, 0) scale(1.08); }
}
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }
svg { display: block; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 动效 ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(143, 181, 154, 0.45); }
  50%      { box-shadow: 0 0 0 6px rgba(143, 181, 154, 0); }
}
@keyframes dangerBlink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes rotateBar {
  from { width: 0%; }
  to   { width: 100%; }
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes barIn {
  from { opacity: 0; transform: translateY(-50%) translateY(10px); }
  to   { opacity: 1; transform: translateY(-50%); }
}
@keyframes rankGrow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes nowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(198, 147, 132, 0.5); }
  50%      { box-shadow: 0 0 0 5px rgba(198, 147, 132, 0); }
}
@keyframes stripes { from { background-position: 0 0; } to { background-position: 22px 0; } }
@keyframes growX { from { width: 0; } }
.reveal { animation: fadeUp 0.5s var(--ease) backwards; }

/* ---------- 应用骨架 ---------- */
.app {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- 顶栏 ---------- */
.topbar {
  height: 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.64));
  backdrop-filter: blur(16px) saturate(112%);
  -webkit-backdrop-filter: blur(16px) saturate(112%);
  flex-shrink: 0;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.brand-name { font-size: 16px; letter-spacing: 2px; color: var(--text); }
.brand-sub { font-size: 11px; color: var(--text-mute); letter-spacing: 3px; margin-top: 2px; }
.topbar-title {
  text-align: center;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 6px;
  background: linear-gradient(90deg, var(--text), var(--primary-deep), var(--data), var(--text));
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: titleFlow 9s linear infinite;
}
.topbar-title em { font-style: normal; color: inherit; }
@keyframes titleFlow { to { background-position: 200% 0; } }
.topbar-right { display: flex; justify-content: flex-end; align-items: center; gap: 20px; }
.clock { text-align: right; }
.clock-time { font-family: var(--font-mono); font-size: 22px; color: var(--primary); letter-spacing: 1px; }
.clock-date { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.live-chip {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--success);
  border: 1px solid rgba(143, 181, 154, 0.42);
  background: rgba(143, 181, 154, 0.12);
  padding: 5px 12px; border-radius: 999px;
  transition: box-shadow 0.2s var(--ease);
}
.live-chip:hover { box-shadow: 0 0 0 4px rgba(143, 181, 154, 0.14); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulseDot 2s infinite; }
/* 演示数据（未登录）：收敛为中性态，避免误读成“已连接” */
.live-chip:not(.is-real):not(.is-error) {
  color: var(--text-sub);
  border-color: var(--border);
  background: rgba(255, 255, 255, 0.55);
}
.live-chip:not(.is-real):not(.is-error) .live-dot { background: var(--text-mute); animation: none; }
.live-chip:not(.is-real):not(.is-error):hover { box-shadow: 0 0 0 4px rgba(46, 39, 37, 0.06); }
/* 真实数据：绿色常亮，点不呼吸跳动，表示链路稳定 */
.live-chip.is-real {
  color: var(--success);
  border-color: rgba(143, 181, 154, 0.42);
  background: rgba(143, 181, 154, 0.12);
}
.live-chip.is-real .live-dot { background: var(--success); animation: pulseDot 2s infinite; }
/* 连接异常回退：琥珀警示态，提示当前看到的是演示数据 */
.live-chip.is-error {
  color: var(--warning);
  border-color: rgba(217, 174, 106, 0.42);
  background: rgba(217, 174, 106, 0.12);
}
.live-chip.is-error .live-dot { background: var(--warning); animation: none; }
.live-chip.is-error:hover { box-shadow: 0 0 0 4px rgba(217, 174, 106, 0.14); }

/* 脱敏模式开关 */
.privacy-chip {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px;
  color: var(--data);
  border: 1px solid rgba(216, 172, 122, 0.42);
  background: rgba(216, 172, 122, 0.12);
  padding: 5px 12px; border-radius: 999px;
  transition: box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}
.privacy-chip svg, .live-chip svg {
  width: 13px; height: 13px;
  transition: transform 0.3s var(--ease);
}
.privacy-chip:hover svg, .live-chip:hover svg {
  transform: rotate(12deg) scale(1.1);
}
.privacy-chip:hover { box-shadow: 0 0 0 4px rgba(216, 172, 122, 0.14); }
/* 全量模式含内部数据，给一个明确的警示态 */
.privacy-chip.full {
  color: var(--danger);
  border-color: rgba(201, 127, 121, 0.5);
  background: rgba(201, 127, 121, 0.14);
  animation: dangerBlink 2.4s infinite;
}
.privacy-chip.full:hover { box-shadow: 0 0 0 4px rgba(201, 127, 121, 0.16); }
/* 脱敏占位符：等宽 + 拉开字距，与真实数值明显区分 */
.masked { font-family: var(--font-mono); letter-spacing: 2px; color: var(--text-mute); }

/* ---------- 视图切换 ---------- */
.tabs-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 28px 0;
  flex-shrink: 0;
}
.tabs { display: flex; gap: 10px; }
.tab {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(14px) saturate(110%);
  -webkit-backdrop-filter: blur(14px) saturate(110%);
  color: var(--text-sub);
  font-size: 14px;
  letter-spacing: 1px;
  transition: all 0.25s var(--ease);
}
.tab:hover { color: var(--text); border-color: var(--border-strong); }
.tab.active {
  color: var(--primary-deep);
  background: var(--primary-soft);
  border-color: var(--border-strong);
  box-shadow: var(--glow-primary);
}
.tab svg { width: 16px; height: 16px; transition: transform 0.25s var(--ease); }
.tab:hover svg { transform: translateY(-2px) scale(1.15); }
.tab.active svg { color: var(--primary); }
.rotate-zone { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.rotate-track {
  width: 140px; height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.rotate-fill { height: 100%; background: var(--primary); border-radius: 2px; }
.rotate-fill.running { animation: rotateBar 20s linear both; }
.rotate-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-sub);
  transition: all 0.2s var(--ease);
}
.rotate-btn:hover { color: var(--primary); border-color: var(--border-strong); }
.rotate-btn svg { width: 14px; height: 14px; }

/* ---------- 主区域 ---------- */
.main { flex: 1; min-height: 0; padding: 18px 28px 12px; display: flex; flex-direction: column; }
.view { display: none; }
/* 视图撑满剩余高度，由内部布局吸收空间 */
.view.active { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ---------- KPI 卡 ---------- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.kpi {
  position: relative;
  display: flex; align-items: center; gap: 13px;
  background: var(--surface-grad);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--r-md);
  padding: 15px 16px;
  box-shadow: var(--surface-line), var(--shadow-card);
  transition: translate 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  overflow: hidden;
}
/* 光带周期扫过 */
.kpi::after {
  content: "";
  position: absolute;
  top: -60%; bottom: -60%;
  left: -70%;
  width: 45%;
  background: linear-gradient(105deg, transparent, rgba(244, 237, 231, 0.13), transparent);
  transform: skewX(-18deg);
  animation: sheen 5.2s var(--ease) infinite;
  animation-delay: calc(var(--i, 0) * 0.75s);
  pointer-events: none;
}
@keyframes sheen {
  0%   { left: -70%; }
  55%  { left: 135%; }
  100% { left: 135%; }
}
/* 聚光灯轮巡 */
.kpi.spot {
  translate: 0 -2px;
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(198, 147, 132, 0.20), var(--shadow-elev);
}
.kpi:hover { translate: 0 -2px; border-color: var(--border-strong); box-shadow: var(--shadow-elev); }
.kpi-ic {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  animation: icBob 3.6s ease-in-out infinite alternate;
  animation-delay: calc(var(--i, 0) * 0.4s);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
.kpi:hover .kpi-ic {
  transform: scale(1.12) rotate(-4deg);
  box-shadow: 0 6px 16px rgba(74, 60, 42, 0.18);
}
@keyframes icBob {
  from { transform: translateY(0); }
  to   { transform: translateY(-4px); }
}
.kpi-ic svg { width: 20px; height: 20px; transition: transform 0.28s var(--ease); }
.kpi:hover .kpi-ic svg { transform: scale(1.1); }
.kpi-ic.rose { background: var(--primary-soft); color: var(--primary); }
.kpi-ic.cyan { background: var(--data-soft); color: var(--data); }
.kpi-ic.green { background: rgba(143, 181, 154, 0.15); color: var(--success); }
.kpi-ic.amber { background: rgba(217, 174, 106, 0.15); color: var(--warning); }
.kpi-ic.red { background: rgba(201, 127, 121, 0.15); color: var(--danger); }
.kpi-ic.blue { background: rgba(148, 163, 180, 0.15); color: var(--info); }
.kpi-num {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
/* 数字渐变流光（玫瑰 → 杏橘） */
.kpi-count {
  font-variant-numeric: tabular-nums;
  background: linear-gradient(120deg, var(--primary-deep), var(--primary), var(--data), var(--primary-deep));
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: numFlow 7s linear infinite;
}
.kpi-count.tick { animation: numFlow 7s linear infinite, tickFlash 0.9s var(--ease); }
@keyframes numFlow { to { background-position: 220% 0; } }
@keyframes tickFlash {
  0%   { filter: brightness(1); }
  35%  { filter: brightness(1.6); }
  100% { filter: brightness(1); }
}
.kpi-num small { font-size: 13px; color: var(--text-sub); margin-left: 2px; }
.kpi-label { font-size: 12px; color: var(--text-sub); margin-top: 3px; }
.kpi-trend { font-size: 11px; margin-left: 6px; }
.kpi-trend.up { color: var(--success); }
.kpi-trend.down { color: var(--danger); }

/* ---------- 通用卡片 ---------- */
.card {
  background: var(--surface-grad);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--surface-line), var(--shadow-card);
  overflow: hidden;
}
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.34);
}
.card-head svg {
  width: 16px; height: 16px; color: var(--primary);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
  animation: headIconFloat 3.2s ease-in-out infinite alternate;
}
/* hover 时移除动画：paused 动画的 transform 会覆盖 hover 变换，animation:none 才能生效 */
.card:hover .card-head svg {
  animation: none;
  transform: scale(1.18) rotate(6deg);
  color: var(--primary-deep);
}
@keyframes headIconFloat {
  0%   { transform: translateY(0) rotate(0deg); }
  25%  { transform: translateY(-1px) rotate(-1deg); }
  50%  { transform: translateY(-2px) rotate(0deg); }
  75%  { transform: translateY(-1px) rotate(1deg); }
  100% { transform: translateY(0) rotate(0deg); }
}
/* 各模块图标专属动效 */
#rooms-head svg    { animation-duration: 2.8s; }
#alerts-head svg   { animation: alertPulse 2.4s ease-in-out infinite; }
#feed-head svg     { animation: spinSlow 8s linear infinite; }
#gantt-head svg    { animation-duration: 3.6s; }
#meal-head svg     { animation: mealWobble 2.6s ease-in-out infinite; }
#rev-head svg      { animation-duration: 3.0s; }
#funnel-head svg   { animation-duration: 3.4s; }
#rank-head svg     { animation: rankBounce 2.2s ease-in-out infinite; }
#donut-head svg    { animation: donutSpin 6s linear infinite; }
#occ-head svg      { animation-duration: 3.8s; }

@keyframes alertPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.15); opacity: 0.75; }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes mealWobble {
  0%, 100% { transform: rotate(0deg); }
  25%      { transform: rotate(-4deg); }
  75%      { transform: rotate(4deg); }
}
@keyframes rankBounce {
  0%, 100% { transform: translateY(0); }
  30%      { transform: translateY(-3px); }
  60%      { transform: translateY(1px); }
}
@keyframes donutSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
.card-title { font-size: 15px; letter-spacing: 3px; color: var(--text); }
.card-sub { font-size: 12px; color: var(--text-mute); margin-left: auto; display: flex; align-items: center; gap: 8px; }
.card-body { padding: 16px 18px; }

/* ---------- 视图一：房态 ---------- */
.rooms-layout {
  display: grid;
  grid-template-columns: 1fr 336px;
  gap: 16px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}
/* 左卡撑满，房卡行间隙均分吸收高度 */
.rooms-layout > .card { display: flex; flex-direction: column; }
.rooms-layout > .card .card-body { flex: 1; display: flex; flex-direction: column; }
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(236px, 1fr));
  gap: 14px;
  flex: 1;
  grid-auto-rows: 1fr;
  align-content: stretch;
}
/* 房间数正好「满行差一间」时（如 7 间），最后一行 3 张卡各占 1/3 铺满，
   避免右下角留出一个空网格与过大的行间距 */
@media (min-width: 1281px) {
  .room-grid.is-fill-row { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .room-grid.is-fill-row .room-card { grid-column: span 3; }
  .room-grid.is-fill-row .room-card:nth-last-child(-n+3) { grid-column: span 4; }
}
/* 右列两卡均分高度，内容垂直铺开 */
.side-col { display: flex; flex-direction: column; gap: 16px; }
.side-col .card { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.side-col .card-body { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; }
.side-col .timeline { flex: 1; display: flex; flex-direction: column; justify-content: space-evenly; }
.side-col .tl-item { padding-bottom: 0; }
.room-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(184, 138, 125, 0.16);
  border-radius: var(--r-md);
  padding: 14px 14px 12px 18px;
  cursor: pointer;
  transition: translate 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
  overflow: hidden;
}
.room-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--text-mute);
  transition: width 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.room-card:hover {
  translate: 0 -4px;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-elev);
}
.room-card:hover::before {
  width: 5px;
  box-shadow: 0 0 12px rgba(184, 138, 125, 0.35);
}
.room-card:hover .room-no {
  color: var(--primary);
  letter-spacing: 2px;
}
.room-card:active { translate: 0 -1px; }
/* 房卡周期性微光闪烁（模拟实时状态刷新） */
.room-card.flash { animation: roomFlash 1.6s var(--ease); }
@keyframes roomFlash {
  0%   { box-shadow: var(--shadow-card); }
  35%  { box-shadow: 0 0 0 4px rgba(216, 172, 122, 0.32), var(--shadow-elev); }
  100% { box-shadow: var(--shadow-card); }
}
.room-card.is-stay::before {
  background: linear-gradient(180deg, var(--primary), var(--blush), var(--data), var(--primary));
  background-size: 100% 300%;
  animation: stayFlow 5s linear infinite;
  box-shadow: 0 0 10px rgba(198, 147, 132, 0.45);
}
@keyframes stayFlow { to { background-position: 0 300%; } }
.room-card.is-free::before { background: #79A98E; }
.room-card.is-clean::before { background: var(--warning); }
.room-card.is-book::before { background: var(--info); }
.room-top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.room-no {
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--text);
  letter-spacing: 1px;
  transition: color 0.25s var(--ease), letter-spacing 0.25s var(--ease);
}
.room-tag {
  font-size: 10px; padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-sub);
  letter-spacing: 1px;
}
.room-tag.stay { color: var(--primary-deep); border-color: var(--border-strong); background: var(--primary-soft); }
.room-tag.free { color: #9EDCB4; background: rgba(143, 181, 154, 0.14); border-color: transparent; }
.room-tag.clean { color: #D9AE6A; background: rgba(217, 174, 106, 0.14); border-color: transparent; }
.room-tag.book { color: #B4C8E4; background: rgba(148, 163, 180, 0.16); border-color: transparent; }
.room-vip {
  font-size: 10px; padding: 2px 7px; border-radius: 999px;
  color: #FFF6F8; background: linear-gradient(135deg, #A96E68, #C99C6C);
  font-weight: 600; letter-spacing: 1px;
}
.room-mom { font-size: 14px; color: var(--text); margin-bottom: 4px; }
.room-days { font-size: 12px; color: var(--text-sub); margin-bottom: 8px; }
.room-days b { color: var(--primary-deep); font-family: var(--font-mono); font-weight: 600; }
.room-baby {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--text-sub);
  padding: 6px 9px;
  background: var(--bg-elev-2);
  border-radius: var(--r-sm);
  margin-bottom: 8px;
}
.room-baby svg { width: 13px; height: 13px; color: var(--data); }
/* 备注贴底，吸收同一行卡片的剩余高度 */
.room-notes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; }
.room-note {
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 4px;
  color: var(--text-mute);
  border: 1px solid var(--border);
}
.room-note.warn { color: var(--warning); border-color: rgba(217, 174, 106, 0.4); }
.room-note.danger { color: var(--danger); border-color: rgba(201, 127, 121, 0.4); animation: dangerBlink 2.4s infinite; }

/* 右列：预警 + 今日动态 */
.side-col { display: flex; flex-direction: column; gap: 16px; }
.alert-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 0;
  border-bottom: 1px dashed var(--border);
}
.alert-item:last-child { border-bottom: none; padding-bottom: 0; }
.alert-item:first-child { padding-top: 0; }
.alert-ic { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.alert-ic svg { width: 15px; height: 15px; }
.alert-ic.danger { background: rgba(201, 127, 121, 0.16); color: var(--danger); animation: dangerBreath 2s ease-in-out infinite; }
@keyframes dangerBreath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 127, 121, 0.35); }
  50%      { box-shadow: 0 0 0 6px rgba(201, 127, 121, 0); }
}
.alert-ic.warning { background: rgba(217, 174, 106, 0.16); color: var(--warning); }
/* 安全态：真实数据无异常时的提示项，弱化但仍占位 */
.alert-ic.safe { background: rgba(143, 181, 154, 0.14); color: var(--success); }
.alert-main { flex: 1; min-width: 0; }
.alert-title { font-size: 13px; color: var(--text); }
.alert-title b { color: var(--danger); }
.alert-title.w b { color: var(--warning); }
.alert-title.ok b { color: var(--success); }
.alert-meta { font-size: 11px; color: var(--text-mute); margin-top: 3px; }

.timeline { position: relative; padding-left: 16px; }
.timeline::before {
  content: "";
  position: absolute; left: 3px; top: 6px; bottom: 6px;
  width: 1px;
  background: var(--border-strong);
}
.tl-item { position: relative; padding: 0 0 14px 12px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item.fresh { animation: fadeUp 0.5s var(--ease) backwards; }
.tl-item.fresh .tl-text { color: var(--primary-deep); }
.tl-item::before {
  content: "";
  position: absolute; left: -16px; top: 5px;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px rgba(198, 147, 132, 0.5);
  animation: tlPulse 2.4s ease-in-out infinite;
}
@keyframes tlPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(198, 147, 132, 0.45); }
  50%      { transform: scale(1.25); box-shadow: 0 0 0 5px rgba(198, 147, 132, 0); }
}
.tl-item.cy::before { background: var(--data); box-shadow: 0 0 8px rgba(216, 172, 122, 0.55); }
.tl-item.gr::before { background: var(--success); box-shadow: 0 0 8px rgba(143, 181, 154, 0.55); }
.tl-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
.tl-text { font-size: 13px; color: var(--text); margin-top: 2px; }
.tl-text em { font-style: normal; color: var(--primary-deep); }

/* ---------- 视图二：服务排程 ---------- */
.sched-layout {
  display: grid;
  grid-template-columns: 1fr 336px;
  gap: 16px;
  align-items: stretch;
  flex: 1;
  min-height: 0;
}
/* 左右两卡同高撑满，内部均分吸收高度 */
.sched-layout > .card { display: flex; flex-direction: column; }
.sched-layout > .card .card-body { flex: 1; display: flex; flex-direction: column; }
.gantt-wrap { padding: 18px; flex: 1; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
#gantt-rows { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.gantt-axis {
  display: grid;
  grid-template-columns: 124px 1fr;
  margin-bottom: 6px;
}
.gantt-hours { position: relative; height: 14px; }
.gantt-hours span {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-mute);
  transform: translateX(-50%);
}
.gantt-hours span:first-child { transform: none; }
#gantt-rows { position: relative; }
.gantt-row {
  display: grid;
  grid-template-columns: 124px 1fr;
  align-items: stretch;
  flex: 1;
  min-height: 56px;
}
/* 岗位聚合时行高收敛，8 条班组也能在一屏内排开 */
.gantt-mode-group .gantt-row { min-height: 44px; }
.gantt-mode-group #gantt-rows { overflow-y: auto; padding-right: 2px; }
.gantt-mode-person #gantt-rows { overflow-y: auto; padding-right: 2px; }
.gantt-staff { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding-right: 12px; }
.gantt-staff b { font-size: 13px; color: var(--text); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.gantt-staff span { font-size: 10px; color: var(--text-mute); }
.gantt-row.group { cursor: pointer; transition: background 0.2s var(--ease); }
.gantt-row.group:hover { background: var(--primary-soft); }
.gantt-row.group:hover .grp-badge { border-color: rgba(184, 138, 125, 0.5); }
.grp-name { white-space: nowrap; }
.grp-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.grp-badge {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-sub);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 7px;
  line-height: 16px;
  font-weight: 500;
}
.grp-warn { font-style: normal; color: var(--danger); }
/* 任务密度热力：不透明实块，深浅代表同时段在办任务数 */
.gantt-lane.heat { background: none; }
.heat-cell {
  position: absolute;
  top: 4px; bottom: 4px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: rgba(46, 39, 37, 0.82);
  font-weight: 500;
  cursor: pointer;
  animation: fadeUp 0.45s var(--ease) backwards;
}
.heat-cell span { pointer-events: none; }
.heat-cell.has-conflict {
  box-shadow: inset 0 0 0 2px rgba(183, 103, 95, 0.55);
  color: var(--danger);
}
/* 岗位 / 个人视图切换（卡片头右侧） */
.gantt-mode {
  display: inline-flex;
  margin-left: auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.gantt-mode button {
  border: none;
  background: rgba(255, 255, 255, 0.55);
  color: var(--text-sub);
  font-size: 11px;
  letter-spacing: 1px;
  padding: 5px 13px;
  transition: all 0.2s var(--ease);
}
.gantt-mode button.on {
  background: var(--primary-soft);
  color: var(--primary-deep);
  font-weight: 600;
}
.gantt-mode button:hover { color: var(--text); }
.legend-heat {
  width: 14px; height: 9px;
  border-radius: 3px;
  background: linear-gradient(90deg, rgba(184, 138, 125, 0.12), rgba(184, 138, 125, 0.62));
}
.legend-dot.is-unassigned {
  border: 1px dashed rgba(125, 106, 147, 0.32);
  background: repeating-linear-gradient(135deg,
    rgba(125, 106, 147, 0.18) 0, rgba(125, 106, 147, 0.18) 3px,
    transparent 3px, transparent 6px);
}
.legend-dot.is-conflict {
  background: transparent;
  box-shadow: inset 0 0 0 2px rgba(183, 103, 95, 0.55);
}
.legend-dot.is-shift {
  background: rgba(184, 138, 125, 0.10);
  border: 1px solid rgba(184, 138, 125, 0.40);
}
.legend-item.is-hint { color: var(--primary-deep); }
.gantt-lane {
  position: relative;
  height: 100%;
  background:
    repeating-linear-gradient(90deg,
      var(--border) 0, var(--border) 1px,
      transparent 1px, transparent calc(100% / 16));
}
.gantt-now {
  position: absolute;
  top: -4px; bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), rgba(198, 147, 132, 0.22));
  pointer-events: none;
  z-index: 3;
  left: 124px;
}
.gantt-now::before {
  content: "";
  position: absolute; top: -3px; left: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--primary);
  transform: translateX(-50%);
  animation: nowPulse 2s infinite;
}
.gantt-now::after {
  content: attr(data-t);
  position: absolute; top: -22px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 10px;
  color: #FFF6EE;
  background: var(--primary);
  padding: 1px 7px;
  border-radius: 999px;
  white-space: nowrap;
}
.gantt-bar {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 26px;
  border-radius: var(--r-sm);
  font-size: 11px;
  color: #FBF1E8;
  font-weight: 500;
  display: flex; align-items: center;
  padding: 0 9px;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  transition: filter 0.2s var(--ease), transform 0.2s var(--ease);
  transform-origin: left center;
  animation: barIn 0.5s var(--ease) backwards;
}
.gantt-bar:hover { filter: brightness(1.06); transform: translateY(-50%) scaleY(1.08); z-index: 2; }
.gantt-bar.nursing { background: linear-gradient(135deg, #C98B7E, #B88A7D); }
.gantt-bar.doctor { background: linear-gradient(135deg, #6B80A3, #5A6D8F); }
.gantt-bar.rehab { background: linear-gradient(135deg, #C08A4C, #A67A3E); }
.gantt-bar.bath { background: linear-gradient(135deg, #7D6A93, #6B5A80); }
.gantt-bar.early { background: linear-gradient(135deg, #5E8C6A, #4E7A5A); }
.gantt-bar.meal { background: linear-gradient(135deg, #A08A6B, #8B7758); }
.gantt-bar.house { background: linear-gradient(135deg, #6E8A8C, #5C7779); }
/* 长班任务（≥4h）：半透明背景带，让同员工的其他任务在它上方分层显示 */
.gantt-bar.shift {
  top: 5px; bottom: 5px; height: auto; max-height: none;
  transform: none;
  animation: none;
  justify-content: flex-end;
  padding: 0 12px;
  background: rgba(184, 138, 125, 0.10);
  border: 1px solid rgba(184, 138, 125, 0.34);
  color: rgba(46, 39, 37, 0.72);
  font-size: 11px;
  font-weight: 400;
  z-index: 0;
}
.gantt-bar.shift:hover { transform: none; filter: none; }
.gantt-bar.shift .shift-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 未指派任务：淡藕紫斜纹，退到背景层，只做「待分派」提示 */
.gantt-bar.unassigned {
  justify-content: center;
  padding: 0 4px;
  background: repeating-linear-gradient(135deg,
    rgba(125, 106, 147, 0.20) 0, rgba(125, 106, 147, 0.20) 6px,
    rgba(125, 106, 147, 0.06) 6px, rgba(125, 106, 147, 0.06) 12px);
  border: 1px dashed rgba(125, 106, 147, 0.40);
  color: rgba(46, 39, 37, 0.72);
}
.gantt-bar.unassigned b { font-size: 11px; color: rgba(46, 39, 37, 0.80); font-weight: 600; }
.gantt-bar.unassigned .gu-count { white-space: nowrap; }
.gantt-row.is-unassigned .gantt-staff b { color: var(--text-mute); font-weight: 500; letter-spacing: 1px; }
.gantt-legend { display: flex; gap: 16px; padding: 0 18px 16px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-sub); }
.legend-dot { width: 9px; height: 9px; border-radius: 3px; }

/* 餐卡：整列均分铺满 */
.meal-list { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; justify-content: space-evenly; gap: 7px; }
.meal-card {
  display: flex; gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  border: 1px solid var(--border);
  transition: border-color 0.25s var(--ease), translate 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.meal-card:hover {
  border-color: var(--border-strong);
  translate: 3px 0;
  box-shadow: 0 6px 18px rgba(74, 60, 42, 0.10);
}
.meal-card:hover .meal-time {
  color: var(--primary);
  border-right-color: var(--primary);
  letter-spacing: 2px;
}
.meal-card.current {
  border-color: var(--border-strong);
  box-shadow: var(--glow-primary);
  animation: mealGlow 2.6s var(--ease) infinite;
}
@keyframes mealGlow {
  0%, 100% { box-shadow: var(--glow-primary); }
  50%      { box-shadow: 0 0 0 7px rgba(216, 172, 122, 0.16); }
}
.meal-time {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--primary-deep);
  writing-mode: vertical-lr;
  letter-spacing: 1px;
  display: flex; align-items: center;
  border-right: 1px dashed var(--border-strong);
  padding-right: 10px;
  flex-shrink: 0;
}
.meal-info { flex: 1; min-width: 0; }
.meal-name { font-size: 13px; line-height: 1.35; color: var(--text); margin-bottom: 2px; }
.meal-dish { font-size: 11.5px; line-height: 1.4; color: var(--text-sub); margin-bottom: 4px; }
.meal-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.meal-chip {
  font-size: 9.5px; padding: 1px 7px;
  border-radius: 999px;
  background: var(--data-soft); color: var(--data);
}
.meal-chip.warm { background: var(--primary-soft); color: var(--primary-deep); }
.meal-progress {
  margin-top: 6px;
  height: 4px;
  border-radius: 3px;
  background: rgba(244, 237, 231, 0.10);
  overflow: hidden;
}
.meal-progress-fill {
  height: 100%;
  width: var(--p, 60%);
  border-radius: 3px;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.4) 0 8px, transparent 8px 16px),
    linear-gradient(90deg, #C69384, #D8AC7A);
  background-size: 22px 100%, 100% 100%;
  animation: stripes 1s linear infinite, growX 0.9s var(--ease) backwards;
}
.meal-note {
  margin-top: 10px;
  padding: 7px 11px;
  border-radius: var(--r-sm);
  background: rgba(217, 174, 106, 0.10);
  border: 1px dashed rgba(217, 174, 106, 0.4);
  color: var(--warning);
  font-size: 11px;
  display: flex; align-items: center; gap: 7px;
}
.meal-note svg { width: 13px; height: 13px; flex-shrink: 0; }

/* 矮屏（1366×768 等）：压缩餐单行高，尽量一屏放下 6 段餐 */
@media (max-height: 820px) {
  /* 班组行 8 条在一屏内排开，避免滚动与图例重叠 */
  .gantt-mode-group .gantt-row { min-height: 38px; }
  .gantt-row.group .gantt-staff { gap: 0; }
  .gantt-row.group .gantt-staff > span { font-size: 9px; line-height: 12px; }
  .gantt-row.group .gantt-staff b { font-size: 12px; }
  .meal-list { gap: 4px; }
  .meal-card { padding: 6px 10px; gap: 10px; }
  .meal-dish { font-size: 11px; margin-bottom: 2px; }
  /* 矮屏优先保证 6 段餐完整，数据日期已在卡片头标注 */
  .meal-note { display: none; }
}

/* ---------- 视图三：经营概览 ---------- */
.biz-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 16px;
  flex: 1;
  min-height: 0;
}
.biz-grid .c4 { grid-column: span 4; }
.biz-grid .c2 { grid-column: span 2; }
.chart-body { padding: 12px 18px 16px; min-height: 0; overflow: hidden; }
/* 卡片内容垂直填充，消除大片空白 */
.biz-grid .card { display: flex; flex-direction: column; }
.biz-grid .card-body,
.biz-grid .chart-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* 漏斗 */
.funnel { display: flex; flex-direction: column; gap: 8px; padding: 6px 4px 2px; }
.funnel-bar {
  position: relative;
  overflow: hidden;
  height: 44px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  margin: 0 auto;
  color: #FFF6EE;
  font-size: 13px;
  transition: filter 0.2s var(--ease);
  animation: fadeUp 0.5s var(--ease) both;
}
/* 漏斗流光 */
.funnel-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, 0.4) 50%, transparent 65%);
  transform: translateX(-100%);
  animation: barSheen 3.8s var(--ease) infinite;
  animation-delay: calc(var(--fi, 0) * 0.5s);
}
.funnel-bar:hover { filter: brightness(1.05); }
.funnel-bar b { font-family: var(--font-mono); font-size: 16px; }
.funnel-bar .f-label { letter-spacing: 2px; }
.funnel-conv {
  text-align: center;
  font-size: 11px;
  color: var(--text-mute);
  padding: 1px 0;
}
.funnel-conv em { font-style: normal; color: var(--primary-deep); font-family: var(--font-mono); }
.funnel-bar.f1 { width: 100%; background: linear-gradient(135deg, #C98B7E, #B88A7D); }
.funnel-bar.f2 { width: 78%; background: linear-gradient(135deg, #C08A4C, #A67A3E); }
.funnel-bar.f3 { width: 56%; background: linear-gradient(135deg, #5E8C6A, #4E7A5A); }
.funnel-bar.f4 { width: 38%; background: linear-gradient(135deg, #6B80A3, #5A6D8F); }

/* 排行条 */
/* 排行条：整卡高度均分铺开 */
.rank-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  gap: 13px;
  padding-top: 4px;
}
.rank-item { display: grid; grid-template-columns: 92px 1fr 52px; align-items: center; gap: 10px; }
.rank-name { font-size: 12px; color: var(--text-sub); text-align: right; white-space: nowrap; }
.rank-track { height: 8px; background: rgba(244, 237, 231, 0.09); border-radius: 4px; overflow: hidden; }
.rank-fill {
  position: relative;
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(216, 172, 122, 0.55), var(--primary));
  transform-origin: left;
  animation: rankGrow 0.8s var(--ease) backwards;
  overflow: hidden;
}
/* 排行条流光 */
.rank-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 30%, rgba(255, 246, 238, 0.28) 50%, transparent 70%);
  transform: translateX(-100%);
  animation: barSheen 3.2s var(--ease) infinite;
}
@keyframes barSheen {
  0%   { transform: translateX(-100%); }
  55%  { transform: translateX(100%); }
  100% { transform: translateX(100%); }
}
.rank-val { font-family: var(--font-mono); font-size: 12px; color: var(--text); text-align: right; }

/* 环形图例 */
/* 环形图例：垂直居中铺满（需覆盖 .biz-grid .card-body 的纵向排列） */
.biz-grid .card-body.donut-flex {
  flex: 1;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-top: 6px;
}
.donut-legend { flex: 1; display: flex; flex-direction: column; gap: 9px; }
.dl-item { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-sub); }
.dl-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.dl-item b { margin-left: auto; font-family: var(--font-mono); font-weight: 500; color: var(--text); }

/* 仪表盘底部信息 */
.gauge-note { text-align: center; font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.gauge-note em { font-style: normal; color: var(--success); font-family: var(--font-mono); }

/* ---------- 手写 SVG 图表 ---------- */
.ch-svg { width: 100%; height: auto; }
.ch-tick { font-size: 9px; fill: var(--text-mute); font-family: var(--font-mono); }
.ch-xlab { font-size: 9px; fill: var(--text-mute); font-family: var(--font-mono); }
.ch-area { opacity: 0; animation: fadeIn 1s var(--ease) 0.3s forwards; }
.ch-line {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: drawLine 1.4s var(--ease) 0.2s forwards;
}
.ch-dot { animation: fadeIn 0.4s var(--ease) 1.4s both; }
.ch-pulse { animation: chPulse 2.2s var(--ease) 1.4s infinite; }
.ch-hit { fill: transparent; cursor: pointer; }
.ch-hit-dot { opacity: 0; transition: opacity 0.15s var(--ease); pointer-events: none; }
.ch-hit:hover + .ch-hit-dot, .ch-hit-dot.on { opacity: 1; }
/* 曲线流光点（沿线条流动的亮斑） */
.ch-flow {
  fill: none;
  stroke: rgba(255, 255, 255, 0.8);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-dasharray: 0.015 0.05;
  animation: flowDash 2.6s linear infinite;
  pointer-events: none;
}
@keyframes flowDash { to { stroke-dashoffset: -0.065; } }
@keyframes chPulse {
  0%   { opacity: 0.8; stroke-width: 2; r: 4; }
  100% { opacity: 0; stroke-width: 1; r: 14; }
}
.ch-tip {
  position: fixed;
  transform: translate(-50%, calc(-100% - 6px));
  background: #36281F;
  color: #FFF6EE;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.18s var(--ease);
  z-index: 90;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.55);
}
.donut-seg { transition: filter 0.2s var(--ease); }
.donut-seg:hover { filter: brightness(1.06); }
.donut-num { font-size: 21px; font-weight: 600; fill: var(--text); font-family: var(--font-display); }
.donut-cap { font-size: 9px; fill: var(--text-mute); letter-spacing: 1px; }

/* ---------- 底部公告 ---------- */
.notice-bar {
  flex-shrink: 0;
  height: 40px;
  display: flex; align-items: center;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(18px) saturate(110%);
  -webkit-backdrop-filter: blur(18px) saturate(110%);
  overflow: hidden;
  padding: 0 28px;
  gap: 18px;
}
.notice-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--primary-deep);
  letter-spacing: 2px;
  flex-shrink: 0;
}
.notice-label svg { width: 14px; height: 14px; }
.notice-viewport { flex: 1; overflow: hidden; position: relative; height: 100%; display: flex; align-items: center; }
.notice-track {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
}
.notice-track span { font-size: 12px; color: var(--text-sub); margin-right: 64px; }
.notice-track span em { font-style: normal; color: var(--primary-deep); }
.notice-time { font-size: 11px; color: var(--text-mute); font-family: var(--font-mono); flex-shrink: 0; }

/* ---------- 岗位下钻抽屉 ---------- */
.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(36, 28, 22, 0.34);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: none;
  z-index: 70;
}
.drawer-mask.open { display: block; animation: fadeIn 0.25s var(--ease); }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0;
  width: min(440px, 94vw);
  display: flex; flex-direction: column;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.99), rgba(252, 248, 245, 0.97));
  backdrop-filter: blur(24px) saturate(110%);
  -webkit-backdrop-filter: blur(24px) saturate(110%);
  border-left: 1px solid rgba(184, 138, 125, 0.26);
  box-shadow: -24px 0 60px rgba(74, 60, 42, 0.18);
  transform: translateX(102%);
  transition: transform 0.32s var(--ease);
  z-index: 71;
}
.drawer.open { transform: none; }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 20px 14px; border-bottom: 1px solid var(--border); }
.drawer-title { display: flex; align-items: center; gap: 7px; font-family: var(--font-display); font-size: 17px; letter-spacing: 2px; }
.drawer-sub { margin-top: 5px; font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
.drawer-head .modal-close { flex-shrink: 0; }
.drawer-tools { padding: 12px 16px 10px; display: flex; flex-direction: column; gap: 9px; border-bottom: 1px solid var(--border); }
.drawer-search {
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.82);
  font-family: inherit;
  font-size: 12px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.drawer-search:focus { border-color: var(--border-strong); box-shadow: var(--glow-primary); }
.drawer-search::placeholder { color: var(--text-mute); }
.drawer-filters { display: flex; gap: 6px; flex-wrap: wrap; }
.drawer-filter {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.62);
  color: var(--text-sub);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 999px;
  transition: all 0.2s var(--ease);
}
.drawer-filter em { font-style: normal; font-family: var(--font-mono); font-size: 10px; color: var(--text-mute); margin-left: 2px; }
.drawer-filter.on { color: var(--primary-deep); border-color: var(--border-strong); background: var(--primary-soft); }
.drawer-filter.on em { color: var(--primary-deep); }
.drawer-list { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 10px 12px; }
.member + .member { border-top: 1px solid var(--border); }
.member-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 8px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background 0.2s var(--ease);
}
.member-row:hover { background: var(--primary-soft); }
.member-avatar {
  width: 28px; height: 28px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  color: var(--primary-deep);
  background: rgba(184, 138, 125, 0.12);
  border: 1px solid rgba(184, 138, 125, 0.22);
}
.member-main { flex: 1; min-width: 0; }
.member-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.member-top b { font-size: 12.5px; font-weight: 500; }
.member-role { font-size: 10px; color: var(--text-mute); }
.member-state {
  font-size: 10px;
  line-height: 15px;
  padding: 0 6px;
  border-radius: 999px;
  color: var(--text-sub);
  background: rgba(46, 39, 37, 0.05);
}
.member-state.live { color: var(--primary-deep); background: var(--primary-soft); }
.member-state.done { color: var(--success); background: rgba(94, 140, 106, 0.12); }
.member-state.idle { color: var(--text-mute); }
.member-state.danger { color: var(--danger); background: rgba(183, 103, 95, 0.12); }
.member-meta { margin-top: 2px; font-size: 10.5px; color: var(--text-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-load { width: 56px; flex-shrink: 0; text-align: right; }
.member-load-bar { display: block; height: 4px; border-radius: 2px; background: rgba(46, 39, 37, 0.08); overflow: hidden; }
.member-load-bar i { display: block; height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--primary), var(--primary-deep)); }
.member-load em { font-style: normal; font-family: var(--font-mono); font-size: 9px; color: var(--text-mute); }
.member-chevron { flex-shrink: 0; color: var(--text-mute); font-size: 15px; line-height: 1; transition: transform 0.2s var(--ease); }
.member.open .member-chevron { transform: rotate(90deg); color: var(--primary); }
.member-detail { padding: 4px 8px 12px 46px; animation: fadeIn 0.25s var(--ease); }
.mini-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 10px; color: var(--text-sub); }
.mini-head em { font-style: normal; margin-left: auto; color: var(--text-mute); }
.mini-hours { position: relative; height: 13px; margin-bottom: 2px; }
.mini-hours span {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 8px;
  color: var(--text-mute);
  transform: translateX(-50%);
}
.mini-hours span:first-child { transform: none; }
.mini-lane {
  position: relative;
  height: 34px;
  border-radius: var(--r-sm);
  background-image: repeating-linear-gradient(90deg, var(--border) 0, var(--border) 1px, transparent 1px, transparent 100%);
  background-repeat: repeat-x;
}
.mini-lane .gantt-bar { height: 22px; font-size: 10px; }
.mini-lane .gantt-bar.shift { height: auto; }
.mini-empty { padding: 8px 0 2px; font-size: 11px; color: var(--text-mute); }
.drawer-foot { padding: 10px 16px 14px; border-top: 1px solid var(--border); font-size: 10.5px; color: var(--text-mute); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(36, 28, 22, 0.52);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center; justify-content: center;
  z-index: 60;
}
.modal-mask.open { display: flex; animation: fadeIn 0.25s var(--ease); }
.modal {
  width: 460px; max-width: calc(100vw - 48px);
  max-height: 82vh; overflow: auto;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.98), rgba(252, 248, 245, 0.96));
  backdrop-filter: blur(24px) saturate(110%);
  -webkit-backdrop-filter: blur(24px) saturate(110%);
  border: 1px solid rgba(184, 138, 125, 0.26);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-elev);
  animation: fadeUp 0.3s var(--ease);
}
.modal-head {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; letter-spacing: 2px; }
.modal-title .room-no { color: var(--primary-deep); font-family: var(--font-mono); }
.modal-close {
  margin-left: auto;
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent; color: var(--text-sub);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s var(--ease);
}
.modal-close:hover { color: var(--danger); border-color: rgba(201, 127, 121, 0.4); }
.modal-close svg { width: 14px; height: 14px; }
.modal-body { padding: 18px 22px 22px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.dg-item {
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 13px;
}
.dg-label { font-size: 11px; color: var(--text-mute); margin-bottom: 4px; }
.dg-value { font-size: 14px; color: var(--text); }
.dg-value.hl { color: var(--primary-deep); font-family: var(--font-display); font-size: 17px; }
.dg-full { grid-column: span 2; }
.modal-section-title { font-size: 12px; color: var(--text-sub); letter-spacing: 2px; margin: 14px 0 8px; }

/* ---------- 后端连接弹窗 ---------- */
.login-modal { width: min(460px, calc(100vw - 40px)); }
.login-desc {
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-mute);
  margin-bottom: 16px;
}
.login-field { display: block; margin-bottom: 12px; }
.login-field span {
  display: block;
  font-size: 11px;
  color: var(--text-mute);
  letter-spacing: 2px;
  margin-bottom: 6px;
}
.login-field input {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.login-field input::placeholder { color: var(--text-mute); }
.login-field input:focus {
  border-color: var(--border-strong);
  background: #FFFFFF;
  box-shadow: var(--glow-primary);
}
.login-error {
  min-height: 16px;
  font-size: 12px;
  color: var(--danger);
  margin-bottom: 10px;
}
.login-actions { display: flex; justify-content: flex-end; gap: 10px; }
.btn {
  height: 38px;
  padding: 0 20px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 13px;
  letter-spacing: 1px;
  transition: all 0.2s var(--ease);
}
.btn:hover { border-color: var(--border-strong); }
.btn.ghost { color: var(--text-sub); }
.btn.ghost:hover { color: var(--text); background: rgba(184, 138, 125, 0.10); }
.btn.primary {
  border-color: rgba(198, 147, 132, 0.5);
  background: linear-gradient(135deg, rgba(198, 147, 132, 0.9), rgba(216, 172, 122, 0.82));
  color: #2A1B26;
  font-weight: 600;
}
.btn.primary:hover { box-shadow: var(--glow-primary); }
.btn.primary:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }
.login-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 11px;
  line-height: 1.7;
  color: var(--text-mute);
  word-break: break-all;
}
.login-foot b { color: var(--primary-deep); font-weight: 500; }
.link-btn {
  border: none;
  background: transparent;
  padding: 0;
  margin-left: 6px;
  font-size: 11px;
  color: var(--danger);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { opacity: 0.8; }

/* ---------- Toast ---------- */
.toast-host {
  position: fixed;
  left: 50%; bottom: 64px;
  transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  z-index: 80;
  pointer-events: none;
}
.toast {
  padding: 10px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px) saturate(110%);
  -webkit-backdrop-filter: blur(18px) saturate(110%);
  border: 1px solid rgba(184, 138, 125, 0.28);
  color: var(--text);
  font-size: 13px;
  box-shadow: var(--shadow-elev);
  animation: fadeUp 0.3s var(--ease);
}
.toast.fade { opacity: 0; transition: opacity 0.4s var(--ease); }

/* ---------- 空状态 ---------- */
.empty {
  padding: 32px 0;
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
}

/* ---------- 响应式 ---------- */
/* 系统开启「减少动态效果」时降级为静帧：长时间值守 / 无障碍场景 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: 0.001ms !important;
  }
}

@media (max-width: 1280px) {
  /* 中小屏允许纵向滚动：取消一屏锁定高度 */
  .app { height: auto; min-height: 100vh; }
  .main { min-height: 0; }
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .rooms-layout, .sched-layout { grid-template-columns: 1fr; flex: none; }
  .side-col { display: grid; grid-template-columns: 1fr 1fr; }
  .biz-grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: none; flex: none; }
  .biz-grid .c4, .biz-grid .c2 { grid-column: span 1; }
  .topbar-title { display: none; }
}
@media (max-width: 720px) {
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .side-col { grid-template-columns: 1fr; }
  .biz-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
  .main { padding: 14px 16px; }
  .tabs-bar { padding: 12px 16px 0; flex-wrap: wrap; }
  .rotate-zone { display: none; }
}
