/* ============================================================
   BOSS view (layoutKind: cockpit) — 总控台
   Chỉ định nghĩa class RIÊNG của view; class chung ở components/shell.
   ============================================================ */

/* — Tiêu đề Hán nhỏ trong card-hd — */
.cn-hd { font-size: var(--fs-body); color: var(--muted); }

/* — Badge riêng cho bộ phận Booking (ngoài bộ badge chung) — */
.badge.book { background: color-mix(in srgb, var(--acc-book) 14%, transparent);
  color: var(--acc-book); border-color: color-mix(in srgb, var(--acc-book) 30%, transparent); }

/* — Tile NV trong ca (tỉ lệ on/total) — */
.staff-val { display: flex; align-items: baseline; gap: 6px; }
.staff-val .staff-on { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.staff-val .staff-tot { font-size: var(--fs-title); font-weight: 700; color: var(--faint); font-family: var(--mono); }

/* — Lưới cockpit: feed (rộng) | cột phải (duyệt + chart) — */
.cockpit-grid { display: grid; grid-template-columns: 1.25fr .85fr; gap: var(--sp-4); margin-top: var(--sp-5); align-items: start; }
.cockpit-side { gap: var(--sp-4); }
@media (max-width: 1120px) { .cockpit-grid { grid-template-columns: 1fr; } }

.feed-live { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-label); color: var(--ok); }
.feed-live .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }

/* — Dòng sự kiện liên bộ phận — */
.feed-list { gap: 2px; }
.feed-row { display: flex; align-items: center; gap: var(--sp-2) var(--sp-3); padding: 10px 10px;
  border-radius: var(--r-md); transition: background var(--mo-fast); position: relative; flex-wrap: wrap;
  animation: fadeUp var(--mo-base) var(--ease-out); animation-fill-mode: both; }
.feed-list .feed-row:nth-child(1) { animation-delay: 20ms; }
.feed-list .feed-row:nth-child(2) { animation-delay: 45ms; }
.feed-list .feed-row:nth-child(3) { animation-delay: 70ms; }
.feed-list .feed-row:nth-child(4) { animation-delay: 95ms; }
.feed-list .feed-row:nth-child(5) { animation-delay: 120ms; }
.feed-list .feed-row:nth-child(6) { animation-delay: 145ms; }
.feed-row:hover { background: var(--hover); }
.feed-row .f-time { font-size: 11px; color: var(--faint); font-family: var(--mono); width: 38px; flex: none; }
.feed-row .f-dept { flex: none; min-width: 52px; justify-content: center; letter-spacing: .5px; }
.feed-row .f-msg { flex: 1 1 150px; font-size: var(--fs-body); color: var(--ink); line-height: 1.45; min-width: 130px; }
.feed-row .f-act { flex: none; margin-left: auto; }
.feed-row .f-tag { flex: none; font-size: 11px; color: var(--muted); background: var(--card-2);
  padding: 3px 9px; border-radius: var(--r-pill); border: 1px solid var(--line-2); white-space: nowrap; }

/* — Card "Cần tôi xử lý" (审批) — */
.appr-list { gap: var(--sp-2); }
.appr-row { display: flex; align-items: center; gap: var(--sp-3); padding: 11px 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--bg-1);
  transition: border-color var(--mo-fast), background var(--mo-fast); }
.appr-row:hover { border-color: var(--line); }
.appr-row .a-info { flex: 1; min-width: 0; }
.appr-row .a-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.appr-row .a-kind { font-size: var(--fs-body); font-weight: 700; color: var(--ink); }
.appr-row .a-level { flex: none; }
.appr-row .a-level .ic { width: 12px; height: 12px; }
.appr-row .a-meta { display: flex; align-items: center; gap: 7px; margin-top: 3px; font-size: var(--fs-label); color: var(--muted); }
.appr-row .a-ref { font-family: var(--mono); color: var(--gold-l); }
.appr-row .a-sep { color: var(--faint); }
.appr-row .a-maker { display: inline-flex; align-items: center; gap: 3px; }
.appr-row .a-maker .ic { width: 12px; height: 12px; }
.a-actions { display: flex; flex-direction: column; gap: 5px; flex: none; }
.a-actions.inline { flex-direction: row; justify-content: flex-end; }
.a-actions .btn { justify-content: center; }

/* — Biểu đồ Nhịp ngày (今日节奏) — */
.pulse-peak { font-size: var(--fs-label); color: var(--gold-l); font-family: var(--mono); }
.pulse-chart { display: flex; align-items: flex-end; gap: 6px; height: 132px; padding-top: var(--sp-2); }
.pulse-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; }
.pulse-bar { width: 100%; min-height: 4px; border-radius: 5px 5px 3px 3px;
  background: linear-gradient(180deg, var(--gold-l), var(--purple));
  transition: height 520ms var(--ease-out); box-shadow: 0 0 0 1px var(--line-2) inset; }
.pulse-bar.hot { background: linear-gradient(180deg, #fbe7a8, var(--gold));
  box-shadow: 0 0 12px rgba(212,175,55,.35); }
.pulse-col:hover .pulse-bar { filter: brightness(1.12); }
.pulse-lab { font-size: 9px; color: var(--faint); font-family: var(--mono); }

/* — Trạng thái khoá tháng (月结) — */
.lock-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; }
.lock-status { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-emph); font-weight: 700; color: var(--warn); }
.lock-status.on { color: var(--ok); }
.lock-status .ic { width: 18px; height: 18px; }

/* — Lưới đối soát 4 nguồn — */
.recon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--sp-4); }
.recon-card { display: flex; flex-direction: column; gap: 8px; }
.recon-card h3 { font-size: var(--fs-emph); }
.recon-desc { font-size: var(--fs-body); color: var(--muted); line-height: 1.5; }
.recon-note { font-size: var(--fs-label); color: var(--faint); font-family: var(--mono); }
.recon-card .btn { align-self: flex-start; margin-top: 4px; }

/* — Khuyến mãi 活动管理: thanh tiêu ngân sách — */
.ac-bar { height: 6px; min-width: 70px; border-radius: 3px; background: var(--bg-1); overflow: hidden; }
.ac-fill { display: block; height: 100%; border-radius: 3px; transition: width var(--mo-base); }
.ac-fill.ok { background: var(--ok); } .ac-fill.warn { background: var(--warn); } .ac-fill.bad { background: var(--bad); }
.ac-table .nowrap { white-space: nowrap; }
.ac-table .ac-cond { font-size: 11px; line-height: 1.45; }
.ac-table .ac-budget { min-width: 150px; }
.ac-table .ac-b-num { font-family: var(--mono); font-size: 12px; margin-bottom: 4px; }
.ac-table .ac-b-num b { color: var(--gold-l); }
.ac-table .ac-bar { margin-bottom: 3px; }
.ac-table td:first-child { max-width: 240px; }
