/* i8studio MGR — Component styling matching PDF Specification */

/* Badge & Chip */
/* Badge & Chip */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  background: color-mix(in srgb, var(--c, #64748b) 18%, transparent);
  color: color-mix(in srgb, var(--c, #64748b) 60%, #fff);
  border: 1px solid color-mix(in srgb, var(--c, #64748b) 35%, transparent);
}
.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c, #64748b);
  flex: none;
}
.badge.plain::before { display: none; }
.badge-done, .badge-green { --c: #10b981; }
.badge-doing, .badge-orange { --c: #f59e0b; }
.badge-todo, .badge-gray { --c: #64748b; }
.badge-locked { --c: #475569; }
.badge-blue { --c: #3b82f6; }
.badge-red { --c: #ef4444; }
.badge-purple { --c: #a855f7; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: #c3cad9;
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
  white-space: nowrap;
}
.chip.blue { background: rgba(59, 130, 246, 0.15); color: #93c5fd; border-color: rgba(59, 130, 246, 0.35); }
.chip.orange { background: rgba(249, 115, 22, 0.15); color: #fdba74; border-color: rgba(249, 115, 22, 0.35); }
.chip.red { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); }
.chip.green { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; border-color: rgba(16, 185, 129, 0.35); }

/* Progress bar */
.prog { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); overflow: hidden; min-width: 60px; }
.prog span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #f97316, #fb923c); transition: width 0.4s ease; }
.prog.green span { background: linear-gradient(90deg, #10b981, #34d399); }
.prog.blue span { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.prog.red span { background: linear-gradient(90deg, #ef4444, #f87171); }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
  padding: 9px 12px;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.02);
}
.tbl td { padding: 9px 12px; border-bottom: 1px solid var(--panel-border); vertical-align: middle; }
.tbl tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.tbl tr.locked-row { opacity: 0.45; background: rgba(0, 0, 0, 0.15); }

/* ========================================================
   MÀN HÌNH 1: TẠO MỚI DỰ ÁN 3D (PAGE 1)
   ======================================================== */
.new-project-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}
.new-project-layout > div > .section-box:last-child { margin-bottom: 0; }
.np-actionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  padding: 12px 18px;
  background: #151a24;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  position: sticky;
  bottom: 8px;
  z-index: 5;
  box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.35);
}
.np-actionbar .np-act-info { flex: 1; min-width: 0; }
.np-actionbar .np-act-btns { display: flex; align-items: center; gap: 12px; }
.np-actionbar .np-status-field { margin: 0; display: flex; flex-direction: row; align-items: center; gap: 8px; }
.np-actionbar .np-status-field > span { white-space: nowrap; }
@media (max-width: 1280px) {
  .new-project-layout { grid-template-columns: minmax(0, 1fr); }
}
.section-box {
  background: #151a24;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 16px;
}
.section-box-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.package-item {
  display: block;
  padding: 10px 12px;
  background: #11141d;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  margin-bottom: 8px;
}
.package-item > .row > label,
.package-item > label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  cursor: pointer;
}
.package-item label.field { display: flex; flex-direction: column; align-items: stretch; gap: 4px; cursor: default; font-weight: 400; }
.package-item .np-pkg-row .inp, .package-item .np-scene-row .inp, .package-item .np-vr-row .inp { min-width: 0; }
.team-tag-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}
.team-pill {
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  background: #1e2434;
  border: 1px solid var(--panel-border);
  cursor: pointer;
  user-select: none;
  transition: 0.15s;
}
.team-pill:hover { border-color: var(--primary); }
.team-pill.active {
  background: rgba(0, 194, 255, 0.15);
  border-color: var(--primary);
  color: #fff;
}
.team-pill.active::before { content: '✕ '; font-size: 10px; color: var(--primary); }

/* ========================================================
   MÀN HÌNH 2: WATERFALL PLANNER (PAGE 2)
   ======================================================== */
.waterfall-header-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: #12151f;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  font-size: 12.5px;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 10px;
}
.phase-section {
  margin-bottom: 18px;
  background: #161b26;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  overflow: hidden;
}
.phase-section-title {
  padding: 10px 14px;
  background: #1a202e;
  border-bottom: 1px solid var(--panel-border);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.milestone-bar {
  padding: 10px 14px;
  background: rgba(0, 194, 255, 0.05);
  border-top: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ========================================================
   WATERFALL & MASTER TIMELINE ENHANCEMENTS
   ======================================================== */
.wf-project-hero {
  background: linear-gradient(180deg, #161b27 0%, #12151f 100%);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.wf-project-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 12px;
}
.wf-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 1100px) {
  .wf-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .wf-stat-grid { grid-template-columns: 1fr; }
}
.wf-stat-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.wf-stat-card .lbl {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.wf-stat-card .val {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.wf-stat-card .sub {
  font-size: 11px;
  color: #64748b;
}

/* ========================================================
   JOB EXECUTIVE META BOARD (BẢNG THÔNG TIN DỰ ÁN CHUẨN)
   ======================================================== */
.job-meta-board {
  display: flex;
  gap: 16px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 4px;
}
.job-meta-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1.25fr 0.9fr 0.9fr 1.15fr 1fr;
  gap: 12px 14px;
}
.job-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}
.job-meta-label {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.2px;
}
.job-meta-val {
  font-size: 12.5px;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.35;
  word-break: break-word;
}
.job-meta-val b {
  color: #fff;
}
.job-meta-kpi-card {
  width: 250px;
  flex-shrink: 0;
  background: rgba(18, 25, 41, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 8px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.job-meta-kpi-card .lbl {
  font-size: 10.5px;
  font-weight: 800;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.job-meta-kpi-card .val {
  font-size: 17px;
  font-weight: 800;
  color: #10b981;
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.job-meta-kpi-card .sub {
  font-size: 11px;
  color: #94a3b8;
}
.job-meta-doc-link {
  color: #38bdf8;
  font-size: 11.5px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s;
}
.job-meta-doc-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}
@media (max-width: 1200px) {
  .job-meta-board { flex-direction: column; }
  .job-meta-kpi-card { width: 100%; }
}
@media (max-width: 900px) {
  .job-meta-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ========================================================
   SERVER LAN / NAS LINK BAR & TASK SERVER DATA STYLES
   ======================================================== */
.wf-server-bar {
  background: rgba(14, 165, 233, 0.07);
  border: 1px solid rgba(14, 165, 233, 0.28);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.wf-server-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.wf-server-path-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 280px;
}
.wf-server-path-input {
  background: #0d121c !important;
  color: #f1f5f9 !important;
  border-color: #1e293b !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 11.5px !important;
}

/* Task Server Data Panel inside Task Detail Modal */
.task-server-data-panel {
  background: #111622;
  border: 1px solid #1e293b;
  border-left: 3px solid #0284c7;
  border-radius: 6px;
  padding: 10px 12px;
  margin-top: 12px;
}
.task-server-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.task-server-field {
  margin-top: 6px;
}
.task-server-val {
  background: #090d15;
  border: 1px solid #1b2333;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 11.5px;
  color: #f8fafc;
  word-break: break-all;
  user-select: all;
  font-family: 'JetBrains Mono', monospace;
}

/* LAN Badges on Kanban cards & Table rows */
.chip-lan {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.4;
}
.chip-lan:hover {
  background: rgba(2, 132, 199, 0.4);
  border-color: #38bdf8;
  transform: translateY(-1px);
}
.chip-lan.fix {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
}
.chip-lan.fix:hover {
  background: rgba(245, 158, 11, 0.4);
  border-color: #fbbf24;
}

/* Project Subtabs Bar */
.project-subtabs-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 16px;
  border-bottom: 1px solid var(--panel-border);
  padding-bottom: 10px;
  overflow-x: auto;
}
.project-subtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.project-subtab:hover {
  color: #f1f5f9;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}
.project-subtab.active {
  color: #ffffff;
  background: #1e293b;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  border-color: #38bdf8;
}

/* Master Timeline Controls & Gantt */
.wf-master-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #151a25;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  margin-bottom: 16px;
}
.wf-master-stat-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 990px) {
  .wf-master-stat-bar { grid-template-columns: repeat(2, 1fr); }
}
.wf-master-stat-card {
  background: #141824;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 12px 14px;
}
.wf-master-stat-card .lbl {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}
.wf-master-stat-card .val {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  font-family: 'JetBrains Mono', monospace;
}
.wf-master-stat-card .sub {
  font-size: 11.5px;
  color: #64748b;
  margin-top: 2px;
}

.gantt-master-row {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 12px;
  align-items: center;
  min-height: 48px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  z-index: 1;
  transition: background 0.15s;
}
.gantt-master-row:hover {
  background: rgba(255, 255, 255, 0.02);
}
.gantt-master-lbl {
  overflow: hidden;
  padding-right: 8px;
}
.gantt-proj-track {
  position: relative;
  height: 28px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  overflow: hidden;
}
.gantt-proj-bar {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
  overflow: hidden;
  white-space: nowrap;
}
.gantt-proj-bar:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 194, 255, 0.4);
}

/* ========================================================
   MÀN HÌNH 3: MY WORKSPACE / ARTIST (PAGE 3)
   ======================================================== */
.deadline-alert-banner {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  font-weight: 700;
  font-size: 12.5px;
  padding: 10px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.active-timer-box {
  background: #151a24;
  border: 2px solid #10b981;
  border-radius: 8px;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
  padding: 14px 18px;
  margin-bottom: 20px;
  position: relative;
}
.active-timer-box.paused {
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.2);
}
.active-timer-box.idle {
  border-color: #475569;
  box-shadow: none;
}
.timer-digital-clock {
  font-family: 'JetBrains Mono', Consolas, monospace;
  font-size: 26px;
  font-weight: 800;
  color: #10b981;
  letter-spacing: 1px;
}
.active-timer-box.paused .timer-digital-clock { color: #f59e0b; }

/* ========================================================
   MÀN HÌNH 4: QC / DUYỆT TASK (PAGE 4)
   ======================================================== */
.job-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 7px;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.5);
  border-radius: 4px;
  color: #f97316;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  line-height: 1.25;
}

.qc-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1240px) {
  .qc-layout { grid-template-columns: 260px minmax(0, 1fr); }
  .qc-side { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .qc-layout { grid-template-columns: 1fr; }
}

/* Cột 1: Chờ check */
.qc-list {
  background: var(--bg-card);
  border: 1px solid var(--panel-border);
  border-radius: var(--r);
  overflow: hidden;
}
.qc-list a.qc-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s ease;
  border-left: 3px solid transparent;
}
.qc-list a.qc-item:hover {
  background: rgba(255, 255, 255, 0.03);
}
.qc-list a.qc-item.active {
  background: rgba(249, 115, 22, 0.09);
  border-left-color: #f97316;
}
.qc-item-title {
  font-weight: 700;
  font-size: 13.5px;
  color: #f8fafc;
  margin: 6px 0 8px;
  line-height: 1.35;
}

/* Cột 2: Panel trung tâm soi ảnh */
.qc-main-panel {
  background: var(--bg-card);
  border: 1px solid var(--panel-border);
  border-radius: var(--r);
  padding: 16px;
}
.qc-breadcrumb {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 4px;
  font-weight: 500;
}
.qc-main-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}
.qc-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.15);
  border: 1px solid rgba(249, 115, 22, 0.4);
  color: #f97316;
  font-size: 11.5px;
  font-weight: 700;
}
.qc-round-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  background: #1e2638;
  border: 1px solid #334155;
  color: #cbd5e1;
  font-size: 11.5px;
  font-weight: 600;
}

.qc-stage, .qc-stage-wrap {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #000;
  cursor: crosshair;
  user-select: none;
  border: 1px solid var(--panel-border);
  margin-top: 12px;
}
.qc-stage img, .qc-stage-wrap img {
  display: block;
  width: 100%;
  height: auto;
}
.qc-stage.ro, .qc-stage-wrap.ro {
  cursor: default;
}
.qc-pin, .pin {
  position: absolute;
  width: 28px;
  height: 28px;
  margin: -28px 0 0 -14px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  display: grid;
  place-items: center;
  background: #ef4444;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease;
  z-index: 10;
}
.qc-pin span, .pin span {
  transform: rotate(45deg);
  font-size: 11px;
  font-weight: 800;
  color: #fff;
}
.qc-pin.fixed, .pin.fixed {
  background: #10b981;
}
.qc-pin:hover, .pin:hover {
  transform: rotate(-45deg) scale(1.2);
  z-index: 20;
}

/* Cột 3: Pin lỗi & Lịch sử */
.qc-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.qc-pin-card, .qc-history-card {
  background: var(--bg-card);
  border: 1px solid var(--panel-border);
  border-radius: var(--r);
  overflow: hidden;
}
.qc-empty-pins {
  text-align: center;
  padding: 36px 14px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
}
.qc-pin-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.qc-pin-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 11px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
}
.qc-pin-item.fixed {
  opacity: 0.75;
}
.qc-pin-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  flex: none;
}
.qc-pin-num.fixed {
  background: #10b981;
}
.qc-pin-text {
  font-size: 12.5px;
  color: #f1f5f9;
  line-height: 1.35;
  word-break: break-word;
}
.qc-pin-item.fixed .qc-pin-text {
  color: #94a3b8;
  text-decoration: line-through;
}

.btn-qc-pass {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border-radius: 6px;
  background: #10b981;
  border: 1px solid #10b981;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}
.btn-qc-pass:hover:not(:disabled) {
  background: #059669;
  border-color: #059669;
  transform: translateY(-1px);
}
.btn-qc-pass:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-qc-fix {
  display: block;
  width: 100%;
  padding: 11px 14px;
  border-radius: 6px;
  background: #25121b;
  border: 1px solid #9f1239;
  color: #fb7185;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}
.btn-qc-fix:hover:not(:disabled) {
  background: #341423;
  border-color: #e11d48;
  color: #f43f5e;
  transform: translateY(-1px);
}
.btn-qc-fix:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.qc-cond-note {
  margin-top: 10px;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.45;
}

/* Timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  position: relative;
  padding: 0 0 14px 20px;
  font-size: 12.5px;
  line-height: 1.4;
}
.timeline li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f97316;
}
.timeline li::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 15px;
  bottom: 0;
  width: 1px;
  background: var(--panel-border);
}
.timeline li:last-child::after {
  display: none;
}

.qc-note-card {
  background: #11151f;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.qc-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

/* ========================================================
   MÀN HÌNH 5: THỐNG KÊ KPI & NĂNG SUẤT (PAGE 5)
   ======================================================== */
.kpi-stat-cards {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 1200px) {
  .kpi-stat-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .kpi-stat-cards { grid-template-columns: repeat(2, 1fr); }
}
.kpi-pts-bar {
  display: flex;
  height: 5px;
  margin: 6px auto 6px;
  max-width: 200px;
  border-radius: 3px;
  overflow: hidden;
  background: rgba(148, 163, 184, .18);
}
.kpi-pts-bar i { display: block; height: 100%; transition: width .4s ease; }
.kpi-card {
  background: #151a24;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 16px 18px;
  text-align: center;
}
.kpi-card .lbl {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.kpi-card .val {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
}

/* ========================================================
   MÀN HÌNH 6: ỨNG DỤNG DI ĐỘNG (PAGE 6)
   ======================================================== */
.mobile-mockup-wrapper {
  display: flex;
  gap: 36px;
  justify-content: center;
  align-items: flex-start;
  padding: 20px 0;
  flex-wrap: wrap;
}
.mobile-device {
  width: 320px;
  height: 640px;
  background: #000;
  border-radius: 38px;
  border: 4px solid #2d3748;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
.mobile-statusbar {
  height: 36px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex: none;
}
.mobile-content {
  flex: 1;
  background: #0e121a;
  overflow-y: auto;
  padding: 14px;
  font-size: 12px;
}
.mobile-bottom-tabs {
  height: 48px;
  background: #11151f;
  border-top: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex: none;
  font-size: 10px;
  color: var(--text-muted);
}
.mobile-tab-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}
.mobile-tab-btn.active { color: var(--primary); }

/* ========================================================
   MÀN HÌNH 8/9: KANBAN TIẾN ĐỘ JOBS (PAGE 9)
   ======================================================== */
.kanban-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.team-tab-btn {
  padding: 5px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  background: #161b26;
  border: 1px solid var(--panel-border);
  color: var(--text-muted);
  cursor: pointer;
}
.team-tab-btn:hover { color: #fff; }
.team-tab-btn.active { background: #2563eb; color: #fff; border-color: #2563eb; }

.kanban-board-8col {
  display: grid;
  grid-template-columns: repeat(8, minmax(175px, 1fr));
  gap: 8px;
  overflow-x: auto;
  align-items: stretch;
  padding-bottom: 8px;
}
.kanban-board-8col.wide-mode {
  grid-template-columns: repeat(8, minmax(260px, 1fr));
  gap: 12px;
}
.kanban-board-5col {
  display: grid;
  grid-template-columns: repeat(5, minmax(220px, 1fr));
  gap: 12px;
  overflow-x: auto;
  align-items: stretch;
  padding-bottom: 12px;
}
.kanban-column {
  background: #131722;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 225px);
  min-height: 520px;
  overflow: hidden;
}
.kanban-column[data-col="done"] {
  border-top: 3px solid #10b981;
}
.kanban-column[data-col="done"] .kanban-col-head {
  background: #142323;
}
.kanban-col-head {
  padding: 8px 10px;
  background: #181d2a;
  border-bottom: 1px solid var(--panel-border);
  font-weight: 800;
  font-size: 11.5px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  flex-shrink: 0;
}
.kanban-col-head-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-col-sub {
  font-size: 10px;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.25;
}
.kanban-col-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #2c384e transparent;
}
.kanban-col-body::-webkit-scrollbar {
  width: 5px;
}
.kanban-col-body::-webkit-scrollbar-thumb {
  background: #2c384e;
  border-radius: 4px;
}
.kanban-job-card {
  background: #1c2232;
  border: 1px solid #283348;
  border-radius: 6px;
  padding: 8px 10px;
  cursor: grab;
  transition: 0.15s;
  flex-shrink: 0;
}
.kanban-job-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.kanban-job-card.active-timer-card {
  border-color: #10b981;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* ========================================================
   PHỤC HỒI: MODAL, TOAST, FORM (bị mất khi đổi giao diện)
   ======================================================== */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: flex-start; justify-content: center; padding: 6vh 16px; background: rgba(3, 6, 12, 0.72); backdrop-filter: blur(3px); overflow-y: auto; }
.modal.show { display: flex; animation: fadeIn .15s ease; }
.modal-card { width: 100%; max-width: 560px; background: #161b26; border: 1px solid var(--panel-border); border-radius: 10px; box-shadow: var(--shadow); animation: popIn .18s ease; }
.modal-card.wide { max-width: 1080px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--panel-border); }
.modal-head h3 { font-size: 15px; }
.modal-body { padding: 16px; max-height: 76vh; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--panel-border); }
.icon-btn { background: transparent; border: 0; color: var(--text-muted); font-size: 16px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }

#toasts { position: fixed; top: 68px; right: 20px; z-index: 1200; display: flex; flex-direction: column; gap: 10px; max-width: 380px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; border-radius: 8px; background: #182030; border: 1px solid rgba(255,255,255,0.12); border-left: 5px solid #10b981; box-shadow: 0 12px 30px rgba(0,0,0,0.6); font-size: 13px; color: #f8fafc; animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards; transition: opacity 0.35s ease, transform 0.35s ease; }
@keyframes toastSlideIn { from { transform: translateX(110%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast.err { border-left-color: #ef4444; }
.toast.warn { border-left-color: #f59e0b; }
.toast.info { border-left-color: #00c2ff; }
.toast.out { opacity: 0; transform: translateX(110%); }
.toast-ic { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: rgba(255,255,255,.1); flex: none; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.btn.ghost { background: transparent; }
.btn.xs { padding: 2px 8px; font-size: 11px; }
.btn.blue { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none !important; }
.chip.purple { background: rgba(168,85,247,.15); color: #d8b4fe; border-color: rgba(168,85,247,.3); }
.chip.yellow { background: rgba(245,158,11,.15); color: #fcd34d; border-color: rgba(245,158,11,.3); }
.avatar { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 11px; flex: none; }
.avatar.sm { width: 22px; height: 22px; font-size: 10px; }
.user-avatar .avatar { width: 28px; height: 28px; }
.who { display: inline-flex; align-items: center; gap: 6px; }
.live { color: #10b981; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.empty { text-align: center; padding: 20px; color: var(--text-muted); }
.empty-ic { font-size: 24px; margin-bottom: 6px; }
.callout, .callout-info { padding: 10px 14px; border-radius: 6px; background: rgba(0,194,255,.06); border: 1px solid rgba(0,194,255,.3); margin-bottom: 14px; font-size: 12.5px; }
.callout.red { background: rgba(239,68,68,.08); border-color: rgba(239,68,68,.4); color: #fca5a5; }
.warn-txt { color: #ef4444; } .ok-txt { color: #10b981; } .or-txt { color: #f59e0b; }
.mt-s { margin-top: 6px; }

/* ========================================================
   THÀNH PHẦN LIÊN KẾT GIỮA CÁC TAB
   ======================================================== */
.fix-box { background: rgba(239,68,68,.06); border: 1px solid rgba(239,68,68,.45); border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; }
.qc-queue { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px 12px; background: #12151f; border: 1px solid var(--panel-border); border-radius: 6px; }
.qc-q-item { padding: 5px 10px; border-radius: 5px; border: 1px solid var(--panel-border); background: #181d2a; color: #e2e8f0; font-size: 12px; }
.qc-q-item:hover { border-color: var(--primary); }
.qc-q-item.on { border-color: #f97316; background: rgba(249,115,22,.12); }
.qc-stage-wrap.ro { cursor: default; }
.phase-ready-box { padding: 8px 12px; margin-bottom: 12px; border: 1px solid rgba(16,185,129,.45); background: rgba(16,185,129,.07); border-radius: 6px; font-size: 12.5px; }
.task-history { max-height: 180px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.kcard.dragging { opacity: .4; }
.kcol.over { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
/* project cards & list */
.pcard {
  overflow: hidden;
  cursor: pointer;
  background: #111625;
  border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.pcard:hover {
  transform: translateY(-3px);
  border-color: rgba(249, 115, 22, .45);
  box-shadow: 0 10px 24px -6px rgba(0, 0, 0, .5);
}
.pcard .cover {
  height: 132px;
  background-size: cover;
  background-position: center;
  position: relative;
}
.pcard .cover::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11, 16, 32, 0.1) 0%, rgba(11, 16, 32, 0.4) 40%, rgba(11, 16, 32, 0.95) 100%);
  pointer-events: none;
}
.pcard .cover .badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  backdrop-filter: blur(8px);
  background: rgba(11, 16, 32, 0.82) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.pcard .cover .no {
  position: absolute;
  bottom: 10px;
  left: 14px;
  z-index: 2;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);
}
.pcard .body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pcard .code {
  font-weight: 700;
  color: #fff;
  font-size: 16px;
  line-height: 1.3;
}
.pcard .code small {
  display: block;
  font-weight: 400;
  color: #94a3b8;
  font-size: 12.5px;
  margin-top: 2px;
}
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; font-weight: 800; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--text-muted); font-size: 13px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .inp { width: auto; min-width: 140px; }
.tbl-wrap { overflow-x: auto; }
.thumb { width: 56px; height: 38px; border-radius: 7px; object-fit: cover; border: 1px solid var(--panel-border, rgba(255, 255, 255, 0.1)); }
.dash-sub { font-size: 12px; font-weight: 700; color: #94a3b8; margin-bottom: 10px; }
.bar-lbl { position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; white-space: nowrap; }
.m-card { background: #151a24; border: 1px solid #283348; border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; text-align: left; }
.m-title { font-weight: 800; font-size: 13px; color: #fff; margin-bottom: 10px; text-transform: uppercase; }
.gantt { display: flex; flex-direction: column; gap: 4px; overflow: hidden; position: relative; padding-bottom: 6px; }
.gantt-row { display: grid; grid-template-columns: 240px 1fr; gap: 10px; align-items: center; min-height: 24px; position: relative; z-index: 1; }
.gantt-phase { margin-top: 8px; border-top: 1px solid var(--panel-border); padding-top: 6px; }
.gantt-lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gantt-track { position: relative; height: 16px; background: rgba(255,255,255,.03); border-radius: 4px; }
.gantt-bar { position: absolute; top: 2px; bottom: 2px; border-radius: 3px; }
.gantt-grid { position: absolute; left: 250px; right: 0; top: 0; bottom: 0; pointer-events: none; z-index: 0; }
.gg-col { position: absolute; top: 0; bottom: 0; background: rgba(255,255,255,.035); }
.gg-col.today { background: rgba(239,68,68,.07); }
.gantt-today { position: absolute; top: 0; bottom: 0; border-left: 2px dashed #ef4444; z-index: 3; pointer-events: none; }
.gantt-today span { position: absolute; bottom: 2px; left: 4px; font-size: 10px; color: #ef4444; white-space: nowrap; background: #0f131c; padding: 0 4px; border-radius: 3px; }
.gantt-head { align-items: stretch; margin-bottom: 4px; }
.gantt-head .gantt-lbl { white-space: normal; line-height: 1.5; align-self: center; }
.gantt-dates { position: relative; height: 52px; border-bottom: 1px solid var(--panel-border); }
.gd-months, .gd-days { position: absolute; left: 0; right: 0; }
.gd-months { top: 0; height: 18px; }
.gd-days { top: 20px; height: 32px; }
.gd-month { position: absolute; top: 0; height: 18px; font-size: 11px; font-weight: 800; color: #00c2ff; border-left: 1px solid rgba(0,194,255,.35); padding-left: 6px; white-space: nowrap; overflow: hidden; letter-spacing: .3px; }
.gd-cell { position: absolute; top: 0; height: 32px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-left: 1px solid rgba(255,255,255,.05); line-height: 1.15; overflow: hidden; }
.gd-wd { font-size: 9px; color: #64748b; font-weight: 600; }
.gd-d { font-size: 11px; color: #cbd5e1; font-weight: 700; }
.gd-cell.we .gd-wd, .gd-cell.we .gd-d { color: #f59e0b; }
.gd-cell.today { background: #ef4444; border-radius: 4px; }
.gd-cell.today .gd-wd, .gd-cell.today .gd-d { color: #fff; }

/* ========================================================
   BẢNG CHẤM CÔNG & QUẢN TRỊ THỜI GIAN (TIMESHEET & LEAVE)
   ======================================================== */
.ts-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; background: #10141f; padding: 6px; border: 1px solid var(--panel-border); border-radius: 8px; }
.ts-tab { padding: 8px 16px; border-radius: 6px; font-weight: 700; font-size: 13px; color: #94a3b8; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; transition: all .15s ease; border: 1px solid transparent; }
.ts-tab:hover { color: #f1f5f9; background: rgba(255,255,255,.04); }
.ts-tab.active { color: #fff; background: #2563eb; border-color: #3b82f6; box-shadow: 0 2px 10px rgba(37,99,235,.4); }
.ts-tab .cnt { background: #ef4444; color: #fff; padding: 1px 6px; border-radius: 10px; font-size: 11px; font-weight: 800; }

.ts-top-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; padding: 10px 14px; background: #131722; border: 1px solid var(--panel-border); border-radius: 8px; }
.ts-month-ctrl { display: flex; align-items: center; gap: 8px; }
.ts-month-label { min-width: 140px; text-align: center; font-size: 15px; font-weight: 800; color: #fff; letter-spacing: .5px; }

.ts-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.ts-stat-card { background: #151a24; border: 1px solid var(--panel-border); border-radius: 8px; padding: 12px 16px; display: flex; flex-direction: column; justify-content: space-between; }
.ts-stat-card .lbl { font-size: 11px; font-weight: 800; color: #94a3b8; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.ts-stat-card .val { font-size: 20px; font-weight: 900; color: #fff; margin-bottom: 4px; font-family: 'JetBrains Mono', monospace; }
.ts-stat-card .sub { font-size: 11.5px; color: #64748b; }

.ts-main-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1200px) { .ts-main-grid { grid-template-columns: 1fr; } .ts-stat-grid { grid-template-columns: repeat(2, 1fr); } }

.ts-cal-card { background: #151a24; border: 1px solid var(--panel-border); border-radius: 8px; padding: 14px; }
.ts-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.ts-dh { text-align: center; padding: 8px 4px; font-size: 11.5px; font-weight: 800; color: #64748b; text-transform: uppercase; letter-spacing: .5px; }
.ts-dh.we { color: #f59e0b; }

.ts-day { min-height: 88px; background: #0f131c; border: 1px solid #232d3f; border-radius: 6px; padding: 6px 7px; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; transition: all .15s ease; user-select: none; }
.ts-day:hover { border-color: #00c2ff; background: #162030; transform: translateY(-1px); }
.ts-day.active { border-color: #00c2ff; background: #152238; box-shadow: 0 0 12px rgba(0,194,255,.3); }
.ts-day.today { border-color: #ef4444; }
.ts-day.off { background: rgba(255,255,255,.015); border-color: rgba(255,255,255,.04); }
.ts-day.empty { background: transparent; border: none; cursor: default; }

.ts-day-head { display: flex; justify-content: space-between; align-items: center; }
.ts-day-num { font-size: 13px; font-weight: 800; color: #cbd5e1; }
.ts-day.off .ts-day-num { color: #64748b; }
.ts-day.today .ts-day-num { color: #ef4444; }
.ts-day-body { text-align: center; margin: 4px 0; }
.ts-day-hours { font-size: 13.5px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.ts-day-hours.ok { color: #10b981; }
.ts-day-hours.warn { color: #f59e0b; }
.ts-day-missing { font-size: 9.5px; font-weight: 700; color: #ef4444; background: rgba(239,68,68,.12); padding: 1px 4px; border-radius: 3px; display: inline-block; }
.ts-day-chips { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; }
.ts-mini-chip { font-size: 9px; font-weight: 800; padding: 1px 4px; border-radius: 3px; }
.ts-mini-chip.h { background: rgba(59,130,246,.15); color: #93c5fd; }
.ts-mini-chip.ot { background: rgba(249,115,22,.15); color: #fdba74; }
.ts-mini-chip.ot2 { background: rgba(168,85,247,.15); color: #d8b4fe; }
.ts-mini-chip.leave { background: rgba(16,185,129,.15); color: #6ee7b7; }
.ts-mini-chip.hol { background: rgba(239,68,68,.18); color: #fca5a5; }

.ts-detail-card { background: #151a24; border: 1px solid var(--panel-border); border-radius: 8px; overflow: hidden; }
.ts-detail-head { padding: 12px 16px; background: #11151f; border-bottom: 1px solid var(--panel-border); display: flex; justify-content: space-between; align-items: center; }
.ts-detail-title { font-size: 14px; font-weight: 800; color: #fff; display: flex; align-items: center; gap: 8px; }
.ts-entry-row { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,.04); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ts-entry-row:hover { background: rgba(255,255,255,.02); }
.ts-entry-time { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; font-weight: 700; color: #00c2ff; min-width: 95px; }
.ts-entry-code { display: inline-flex; align-items: center; gap: 4px; }
.ts-entry-task { flex: 1; font-size: 12px; color: #e2e8f0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.ts-form-box { padding: 14px 16px; background: #10141f; border-top: 1px solid var(--panel-border); }
.ts-form-title { font-size: 12px; font-weight: 800; color: #00c2ff; text-transform: uppercase; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }

/* Legacy fallback classes for old timesheet refs */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; background: #10141f; padding: 6px; border: 1px solid var(--panel-border); border-radius: 8px; }
.tabs a { padding: 8px 16px; border-radius: 6px; font-weight: 700; font-size: 13px; color: #94a3b8; text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.tabs a:hover { color: #fff; background: rgba(255,255,255,.04); }
.tabs a.on { color: #fff; background: #2563eb; }
.tabs a .cnt { background: #ef4444; color: #fff; padding: 1px 6px; border-radius: 10px; font-size: 11px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.dh { text-align: center; padding: 6px; font-weight: 800; font-size: 11.5px; color: #64748b; }
.cal .d { min-height: 80px; background: #0f131c; border: 1px solid #232d3f; border-radius: 6px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; justify-content: space-between; }
.cal .d.sel { border-color: #00c2ff; background: #152238; }
.cal .d.today { border-color: #ef4444; }
.cal .d.off { background: rgba(255,255,255,.015); }
.grid.g-main { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.warn-txt { color: #ef4444; font-weight: 700; }

/* ========================================================
   1. LƯỚI 6 CỘT & CARD DỰ ÁN COMPACT (Page 1)
   ======================================================== */
.grid.g6 {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1600px) { .grid.g6 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .grid.g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) { .grid.g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .grid.g6 { grid-template-columns: 1fr; } }

.pcard.compact {
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
}
.pcard.compact .cover {
  height: 96px;
}
.pcard.compact .cover .badge {
  top: 6px;
  left: 6px;
  font-size: 10px;
  padding: 2px 7px;
}
.pcard.compact .cover .no {
  bottom: 6px;
  left: 9px;
  font-size: 17px;
}
.pcard.compact .body {
  padding: 8px 10px 10px;
  gap: 1px;
}
.pcard.compact .code {
  font-size: 13.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pcard.compact .code small {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.pcard.compact .chip {
  padding: 1px 5px;
  font-size: 10px;
}

/* ========================================================
   2. CỘT CẢNH BÁO BÊN PHẢI (RIGHT ALERT PANEL)
   ======================================================== */
.proj-main-layout {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.proj-main-content {
  flex: 1;
  min-width: 0;
}
.proj-alert-sidebar {
  width: 320px;
  flex: none;
  position: sticky;
  top: 70px;
}
@media (max-width: 1180px) {
  .proj-main-layout { flex-direction: column; }
  .proj-alert-sidebar { width: 100%; position: static; }
}

.alert-panel {
  background: #131826;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
.alert-panel-header {
  padding: 12px 14px;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.2) 0%, rgba(245, 158, 11, 0.1) 100%);
  border-bottom: 1px solid rgba(239, 68, 68, 0.25);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.alert-panel-title {
  font-size: 13px;
  font-weight: 800;
  color: #fca5a5;
  letter-spacing: 0.4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.alert-list {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}
.alert-item {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  transition: background 0.15s;
  text-decoration: none;
}
.alert-item:hover {
  background: rgba(255, 255, 255, 0.03);
}
.alert-item.urgent {
  background: rgba(239, 68, 68, 0.08);
  border-left: 3px solid #ef4444;
}
.alert-item.near-due {
  background: rgba(245, 158, 11, 0.06);
  border-left: 3px solid #f59e0b;
}
.alert-item.qc-wait {
  background: rgba(59, 130, 246, 0.06);
  border-left: 3px solid #3b82f6;
}
.alert-item-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.alert-item-meta {
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ========================================================
   3. DUYỆT QC - KHOANH VÙNG & TAG LỖI (Page 4)
   ======================================================== */
.qc-mode-toolbar {
  display: inline-flex;
  background: #111522;
  padding: 3px;
  border-radius: 6px;
  border: 1px solid var(--panel-border);
  gap: 4px;
}
.qc-mode-btn {
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: all 0.15s;
}
.qc-mode-btn.active {
  background: #00c2ff;
  color: #0b101c;
}
.qc-box-pin {
  position: absolute;
  border: 2px dashed #f59e0b;
  background: rgba(245, 158, 11, 0.16);
  border-radius: 4px;
  pointer-events: auto;
  cursor: pointer;
  z-index: 5;
  transition: border-color 0.15s, background-color 0.15s, box-shadow 0.15s;
}
.qc-box-pin:hover {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.28);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}
.qc-box-pin.fixed {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.15);
}
.qc-box-pin .box-num {
  position: absolute;
  top: -10px;
  left: -2px;
  background: #f59e0b;
  color: #0b101c;
  font-size: 10px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 3px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}
.qc-box-pin.fixed .box-num {
  background: #10b981;
  color: #fff;
}
.qc-drag-selection {
  position: absolute;
  border: 2px dashed #00c2ff;
  background: rgba(0, 194, 255, 0.2);
  pointer-events: none;
  z-index: 20;
}
.chip.qc-tag {
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
}
.chip.qc-tag.mat { background: rgba(168, 85, 247, 0.18); color: #d8b4fe; border-color: rgba(168, 85, 247, 0.4); }
.chip.qc-tag.arch { background: rgba(239, 68, 68, 0.18); color: #fca5a5; border-color: rgba(239, 68, 68, 0.4); }
.chip.qc-tag.light { background: rgba(245, 158, 11, 0.18); color: #fcd34d; border-color: rgba(245, 158, 11, 0.4); }
.chip.qc-tag.detail { background: rgba(59, 130, 246, 0.18); color: #93c5fd; border-color: rgba(59, 130, 246, 0.4); }

/* ========================================================
   4. BADGE DỰ ÁN MẸ - CON (GIAI ĐOẠN TIẾP THEO)
   ======================================================== */
.chip.parent-link {
  background: rgba(6, 182, 212, 0.15);
  color: #67e8f9;
  border-color: rgba(6, 182, 212, 0.4);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ========================================================
   5. NOTIFICATION CENTER (Hộp thông báo hiện đại)
   ======================================================== */
.notif-backdrop,
.notif-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 998;
  animation: notifFadeIn 0.15s ease;
}
@keyframes notifFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.topbar-notif-wrap {
  position: relative;
}

.notif-bell.active {
  background: rgba(0, 194, 255, 0.15);
  border-color: rgba(0, 194, 255, 0.4);
  color: #00c2ff;
}

.notif-popover,
.notif-drawer {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 440px;
  max-width: min(440px, calc(100vw - 24px));
  max-height: min(600px, calc(100vh - 84px));
  background: #141926;
  border: 1px solid #232c3d;
  border-radius: 14px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.06);
  z-index: 999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: notifPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: top right;
}
@keyframes notifPopIn {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notif-popover-head,
.notif-drawer-head {
  padding: 13px 18px;
  background: #111520;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.notif-head-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-head-icon {
  font-size: 16px;
}
.notif-head-title h3 {
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
  margin: 0;
}
.notif-count-badge {
  background: #0284c7;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.2px;
}

.notif-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.notif-action-btn {
  background: rgba(0, 194, 255, 0.1);
  border: 1px solid rgba(0, 194, 255, 0.25);
  color: #38bdf8;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}
.notif-action-btn:hover {
  background: rgba(0, 194, 255, 0.2);
  border-color: #38bdf8;
  color: #fff;
}
.notif-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 15px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.15s;
}
.notif-close-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Tabs */
.notif-popover-tabs {
  display: flex;
  background: #111520;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 16px;
}
.notif-tab {
  background: transparent;
  border: none;
  padding: 10px 4px 9px;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}
.notif-tab:hover {
  color: #cbd5e1;
}
.notif-tab.active {
  color: #38bdf8;
  border-bottom-color: #38bdf8;
}
.notif-tab-num {
  font-size: 10px;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
}
.notif-tab.active .notif-tab-num {
  background: rgba(56, 189, 248, 0.18);
  color: #38bdf8;
}

/* Body / List */
.notif-popover-body,
.notif-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
}
.notif-popover-body::-webkit-scrollbar,
.notif-drawer-body::-webkit-scrollbar {
  width: 5px;
}
.notif-popover-body::-webkit-scrollbar-thumb,
.notif-drawer-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
}

/* Card */
.notif-card,
.notif-drawer-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #171d2b;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.notif-card:hover,
.notif-drawer-item:hover {
  background: #1e2638;
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateX(-2px);
}
.notif-card.unread,
.notif-drawer-item.unread {
  background: rgba(56, 189, 248, 0.06);
  border-color: rgba(56, 189, 248, 0.22);
  border-left: 3.5px solid #0284c7;
}
.notif-card.unread:hover,
.notif-drawer-item.unread:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.4);
}
.notif-card.read {
  opacity: 0.8;
}
.notif-card.read:hover {
  opacity: 1;
}

.notif-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 15px;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.notif-card-main {
  flex: 1;
  min-width: 0;
}
.notif-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}
.notif-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 1.5px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.notif-time {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}
.notif-card-text {
  font-size: 12.5px;
  line-height: 1.45;
  color: #f1f5f9;
  word-break: break-word;
}
.notif-card.read .notif-card-text {
  color: #94a3b8;
}
.notif-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
  margin: 0 2px;
}
.notif-card-link {
  margin-top: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.notif-card:hover .notif-card-link {
  text-decoration: underline;
}

.notif-card-side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
  flex-shrink: 0;
}
.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 0 8px rgba(2, 132, 199, 0.8);
}
.notif-dot.read {
  display: none;
}
.notif-mark-single-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  font-size: 11px;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.15s;
}
.notif-card:hover .notif-mark-single-btn {
  opacity: 1;
}
.notif-mark-single-btn:hover {
  background: rgba(0, 194, 255, 0.2);
  border-color: #00c2ff;
  color: #fff;
}

/* Empty State */
.notif-empty {
  padding: 36px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.notif-empty-icon {
  font-size: 34px;
  margin-bottom: 8px;
}
.notif-empty-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 4px;
}
.notif-empty-sub {
  font-size: 11.5px;
  color: #94a3b8;
  max-width: 290px;
  line-height: 1.45;
}

/* Foot */
.notif-popover-foot,
.notif-drawer-foot {
  padding: 10px 16px;
  background: #111520;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-live-sync {
  font-size: 11px;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.notif-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ========================================================
   CẢNH BÁO DEADLINE GÓC PHẢI TRÊN MY WORKSPACE
   ======================================================== */
.workspace-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.workspace-user-meta {
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.workspace-deadline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.22) 0%, rgba(185, 28, 28, 0.35) 100%);
  border: 1px solid rgba(239, 68, 68, 0.7);
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.3), inset 0 0 10px rgba(239, 68, 68, 0.15);
  font-size: 12.5px;
  color: #fff;
  animation: alertGlow 2.5s infinite alternate;
  max-width: 580px;
}
@keyframes alertGlow {
  0% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.25); border-color: rgba(239, 68, 68, 0.6); }
  100% { box-shadow: 0 0 22px rgba(239, 68, 68, 0.6); border-color: #ef4444; }
}
.workspace-deadline-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 8px #ef4444;
  flex: none;
  animation: pulseDot 1.2s infinite;
}
@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}
.workspace-deadline-badge .badge-title {
  font-weight: 800;
  color: #fca5a5;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.workspace-deadline-badge .badge-tasks {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.workspace-deadline-badge .task-link {
  color: #fff;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  transition: color 0.15s;
}
.workspace-deadline-badge .task-link:hover {
  color: #67e8f9;
}
.workspace-deadline-badge .task-link b {
  color: #00c2ff;
}

tr.row-due-today {
  background: rgba(239, 68, 68, 0.08) !important;
  border-left: 3px solid #ef4444 !important;
}

/* ========================================================
   QC ENHANCEMENTS: ZOOM, PAN & BEFORE/AFTER SPLIT SLIDER
   ======================================================== */
.qc-toolbar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
  background: rgba(15, 23, 42, 0.6);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
}
.qc-ctrl-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(30, 41, 59, 0.7);
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.qc-ctrl-btn {
  background: transparent;
  border: 1px solid transparent;
  color: #cbd5e1;
  padding: 3px 9px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.qc-ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.qc-ctrl-btn.active {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}
.qc-zoom-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 700;
  color: #38bdf8;
  padding: 0 6px;
  min-width: 48px;
  text-align: center;
}
.qc-stage-viewport {
  position: relative;
  width: 100%;
  min-height: 440px;
  max-height: 72vh;
  overflow: hidden;
  background: #0b0f19;
  border-radius: 8px;
  border: 1px solid var(--panel-border);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: crosshair;
  user-select: none;
}
.qc-stage-viewport.panning {
  cursor: grab !important;
}
.qc-stage-viewport.panning.active-drag {
  cursor: grabbing !important;
}
.qc-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  transition: transform 0.05s ease-out;
}
.qc-canvas img {
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  display: block;
  pointer-events: none;
  border-radius: 4px;
}

/* Before / After Slider Container */
.qc-ba-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qc-ba-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.qc-ba-layer img {
  max-width: 100%;
  max-height: 72vh;
  width: auto;
  height: auto;
  display: block;
  pointer-events: none;
}
.qc-ba-before {
  z-index: 2;
  overflow: hidden;
}
.qc-ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #00c2ff;
  box-shadow: 0 0 12px rgba(0, 194, 255, 0.8);
  cursor: ew-resize;
  z-index: 15;
  transition: background 0.15s;
}
.qc-ba-handle:hover, .qc-ba-handle.dragging {
  background: #38bdf8;
  width: 6px;
  box-shadow: 0 0 18px rgba(56, 189, 248, 1);
}
.qc-ba-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #0ea5e9;
  border: 2px solid #fff;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  pointer-events: none;
}
.qc-label-tag {
  position: absolute;
  top: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 5;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.qc-label-tag.before { left: 14px; color: #f59e0b; border-color: rgba(245, 158, 11, 0.5); }
.qc-label-tag.after { right: 14px; color: #10b981; border-color: rgba(16, 185, 129, 0.5); }

/* Timeline Header Tabs */
.wf-nav-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  align-items: center;
  flex-wrap: wrap;
}
.wf-nav-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}
.wf-nav-tab.active {
  background: #0284c7;
  color: #fff;
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}
.wf-nav-tab:not(.active) {
  background: rgba(30, 41, 59, 0.7);
  color: #94a3b8;
  border-color: rgba(255, 255, 255, 0.08);
}
.wf-nav-tab:not(.active):hover {
  background: rgba(51, 65, 85, 0.8);
  color: #f1f5f9;
}

/* Page entrance animation */
#content {
  animation: pageSlideIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pageSlideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Global custom scrollbars */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.4);
}
::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  transition: background 0.2s ease;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(56, 189, 248, 0.6);
}

/* Interactive & micro-interaction smoothness */
.card, .kcard, .dash-card, .section-box, .stat-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s ease;
}
.kcard:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
  border-color: rgba(56, 189, 248, 0.35);
}
.btn {
  transition: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:active {
  transform: scale(0.97);
}

/* Command Palette (Ctrl + K) */
.palette-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.palette-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  padding: 8px 14px;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}
.palette-search-icon {
  font-size: 16px;
  opacity: 0.8;
}
.palette-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 14.5px;
  color: #fff;
  font-family: inherit;
}
.palette-input::placeholder {
  color: #64748b;
}
.palette-esc-kbd {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #94a3b8;
}
.palette-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
  margin: 10px 0 6px 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.palette-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.palette-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(30, 41, 59, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.palette-quick-btn:hover {
  background: rgba(2, 132, 199, 0.25);
  border-color: rgba(56, 189, 248, 0.4);
  color: #fff;
  transform: translateY(-1px);
}
.palette-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 4px;
}
.palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 6px;
  background: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: all 0.15s ease;
}
.palette-item:hover, .palette-item.active {
  background: rgba(2, 132, 199, 0.2);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateX(2px);
}
.palette-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.palette-item-icon {
  font-size: 16px;
  flex: none;
}
.palette-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.palette-item-title {
  font-size: 13px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.palette-item-sub {
  font-size: 11px;
  color: #94a3b8;
}

/* ========================================================
   MULTI-VIEW SWITCHER & EXTENDED WORKSPACE VIEWS
   ======================================================== */
.view-switcher-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #11151f;
  border: 1px solid #222b3d;
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 12px;
}
.view-switcher-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.view-switcher-group {
  display: flex;
  gap: 4px;
  background: #090d16;
  padding: 4px;
  border-radius: 8px;
  border: 1px solid #1e293b;
  flex-wrap: wrap;
}
.view-switch-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.view-switch-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
}
.view-switch-btn.active {
  background: #0284c7;
  color: #ffffff;
  box-shadow: 0 0 12px rgba(2, 132, 199, 0.4);
}
.view-switch-btn .view-icon {
  font-size: 14px;
}

/* TABLE VIEW STYLES */
.task-table-container {
  background: #11151f;
  border: 1px solid #1e293b;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  margin-bottom: 24px;
}
.task-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  text-align: left;
}
.task-table th {
  background: #171d2b;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 10px 14px;
  border-bottom: 1px solid #283348;
  white-space: nowrap;
}
.task-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #1b2333;
  color: #e2e8f0;
  vertical-align: middle;
}
.task-table tr:hover td {
  background: rgba(2, 132, 199, 0.08);
}
.task-table-foot {
  padding: 12px 16px;
  background: #141924;
  border-top: 1px solid #283348;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #94a3b8;
  flex-wrap: wrap;
  gap: 10px;
}

/* PEOPLE SWIMLANES VIEW STYLES */
.people-view-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}
.people-lane-card {
  background: #11151f;
  border: 1px solid #222b3d;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.people-lane-card:hover {
  border-color: #38bdf8;
}
.people-lane-head {
  padding: 10px 16px;
  background: #161c29;
  border-bottom: 1px solid #242f44;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.people-lane-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.people-lane-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(280px, 1fr));
  gap: 12px;
  padding: 12px;
  background: #0c1017;
  overflow-x: auto;
}
.people-subcol {
  background: #141924;
  border: 1px solid #20283a;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 220px;
}
.people-subcol-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 6px;
  border-bottom: 1px solid #222c40;
}

/* CALENDAR / TIMELINE DAY VIEW STYLES */
.calendar-view-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(220px, 1fr));
  gap: 10px;
  overflow-x: auto;
  align-items: start;
  margin-bottom: 24px;
}
.calendar-day-col {
  background: #11151f;
  border: 1px solid #1e283b;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 480px;
}
.calendar-day-col.is-today {
  border-color: #0284c7;
  box-shadow: 0 0 14px rgba(2, 132, 199, 0.2);
}
.calendar-day-head {
  padding: 10px 12px;
  background: #161c29;
  border-bottom: 1px solid #222c40;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.calendar-day-col.is-today .calendar-day-head {
  background: #0369a1;
  color: #fff;
}
.calendar-day-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

/* STAGE VIEW STYLES */
.stage-view-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(240px, 1fr));
  gap: 12px;
  overflow-x: auto;
  align-items: start;
  margin-bottom: 24px;
}
.stage-card-col {
  background: #11151f;
  border: 1px solid #1f293d;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  min-height: 480px;
}
.stage-col-head {
  padding: 12px 14px;
  background: #161c29;
  border-bottom: 1px solid #222c40;
}
.stage-progress-bar {
  height: 5px;
  background: #232c3f;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}
.stage-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #10b981);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* ========================================================
   EXECUTIVE DASHBOARD (BOD TỔNG QUAN ĐIỀU HÀNH CHUẨN TECHZEN & ODOO)
   ======================================================== */
.exec-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
@media (max-width: 1200px) {
  .exec-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .exec-kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .exec-kpi-grid { grid-template-columns: 1fr; }
}

.exec-kpi-card {
  position: relative;
  background: linear-gradient(180deg, #151c2c 0%, #101522 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px 16px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.exec-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.exec-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #38bdf8;
}
.exec-kpi-card.tone-bad::before { background: #ef4444; }
.exec-kpi-card.tone-ok::before { background: #10b981; }
.exec-kpi-card.tone-warn::before { background: #f59e0b; }
.exec-kpi-card.tone-purple::before { background: #a855f7; }

.exec-kpi-card .lbl {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  color: #94a3b8;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.exec-kpi-card .val {
  font-size: 24px;
  font-weight: 900;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 6px;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.exec-kpi-card .sub {
  font-size: 11.5px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.exec-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, 0.92fr);
  gap: 16px;
  margin-bottom: 18px;
}
@media (max-width: 1080px) {
  .exec-main-grid { grid-template-columns: 1fr; }
}

.exec-panel {
  background: #111622;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}
.exec-panel-head {
  padding: 12px 16px;
  background: #161c2b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.exec-panel-title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 8px;
}
.exec-panel-body {
  padding: 14px 16px;
}
.exec-panel-body.no-pad {
  padding: 0;
}

/* Team Health Table */
.team-health-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
.team-health-table th {
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.02);
  color: #94a3b8;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
}
.team-health-table td {
  padding: 11px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  vertical-align: middle;
}
.team-health-table tr.clickable:hover td {
  background: rgba(56, 189, 248, 0.04);
  cursor: pointer;
}
.team-health-table .num-c {
  text-align: center;
}
.team-health-table .num-r {
  text-align: right;
}

/* Mini Bar inside tables */
.micro-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 110px;
}
.micro-bar-track {
  flex: 1;
  height: 6px;
  background: #1e293b;
  border-radius: 999px;
  overflow: hidden;
}
.micro-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Alert list */
.exec-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}
.exec-alert-item:last-child {
  border-bottom: none;
}
.exec-alert-item:hover {
  background: rgba(255, 255, 255, 0.02);
}
.exec-alert-content {
  flex: 1;
}
.exec-alert-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
  margin-bottom: 2px;
}
.exec-alert-sub {
  font-size: 11.5px;
  color: #94a3b8;
}

/* Delivery Pipeline */
.exec-delivery-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.15s ease;
}
.exec-delivery-item:last-child {
  border-bottom: none;
}
.exec-delivery-item:hover {
  background: rgba(56, 189, 248, 0.03);
}

/* Month Trend Bar */
.exec-trend-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  height: 130px;
  padding-top: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.exec-trend-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.exec-trend-bars-pair {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 95px;
}
.exec-trend-bar {
  width: 16px;
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
  position: relative;
}
.exec-trend-bar.bar-proj {
  background: #38bdf8;
}
.exec-trend-bar.bar-pts {
  background: #10b981;
}
.exec-trend-bar:hover {
  filter: brightness(1.25);
}
.exec-trend-val {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9.5px;
  font-weight: 700;
  color: #cbd5e1;
  white-space: nowrap;
}
.exec-trend-month {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
}



/* ===== B1: Header thông tin dự án (Waterfall) ===== */
.proj-header-info { display:grid; grid-template-columns:repeat(4, minmax(0,1fr)); gap:10px; margin:12px 0 10px; }
.proj-header-info .phi-item { background:#0b0f19; border:1px solid rgba(255,255,255,0.06); border-radius:8px; padding:8px 10px; min-width:0; transition:border-color .15s ease; }
.proj-header-info .phi-item:hover { border-color:rgba(56,189,248,0.35); }
.proj-header-info .phi-lbl { font-size:10.5px; font-weight:800; letter-spacing:.5px; text-transform:uppercase; color:#64748b; margin-bottom:4px; }
.proj-header-info .phi-val { font-size:12.5px; color:#cbd5e1; line-height:1.5; }
.proj-header-info .phi-parts { display:flex; flex-wrap:wrap; gap:4px 12px; margin-top:4px; font-size:11.5px; color:#94a3b8; }
.proj-header-info .phi-parts i { font-style:normal; color:#64748b; }
.proj-header-info .phi-link { cursor:pointer; color:#38bdf8; font-family:ui-monospace, Consolas, monospace; font-weight:700; word-break:break-all; border-bottom:1px dashed rgba(56,189,248,.5); }
.proj-header-info .phi-link:hover { color:#7dd3fc; border-bottom-style:solid; }
.proj-note-clamp { white-space:pre-wrap; max-height:3.1em; overflow:hidden; position:relative; color:#e2e8f0; }
.proj-note-clamp:not(.open)::after { content:''; position:absolute; left:0; right:0; bottom:0; height:1.4em; background:linear-gradient(transparent, #0b0f19); }
.proj-note-clamp.open { max-height:none; }
.proj-status-help { display:inline-flex; align-items:center; justify-content:center; width:18px; height:18px; border-radius:50%; background:rgba(56,189,248,.12); color:#38bdf8; font-size:12px; cursor:help; }
@media (max-width: 1100px) { .proj-header-info { grid-template-columns:repeat(2, minmax(0,1fr)); } }

/* ===== v91: Header 2 cột (Con người | Thông tin job + KPI) ===== */
.proj-header-info.ph2 { grid-template-columns:minmax(300px, 0.85fr) minmax(0, 1.75fr); gap:12px; }
.ph2 .ph-col { background:#0b0f19; border:1px solid rgba(255,255,255,0.06); border-radius:10px; padding:10px 14px 8px; min-width:0; }
.ph2 .ph-col-title { font-size:10.5px; font-weight:800; letter-spacing:.6px; text-transform:uppercase; color:#7dd3fc; padding-bottom:6px; margin-bottom:2px; border-bottom:1px solid rgba(255,255,255,0.06); }
.ph2 .ph-row { display:grid; grid-template-columns:104px minmax(0,1fr); gap:10px; align-items:baseline; padding:5px 0; border-bottom:1px dashed rgba(255,255,255,0.05); }
.ph2 .ph-people > .ph-row:last-child { border-bottom:0; }
.ph2 .ph-lbl { font-size:11px; font-weight:700; color:#64748b; white-space:nowrap; }
.ph2 .ph-val { font-size:12.5px; color:#cbd5e1; line-height:1.45; min-width:0; overflow-wrap:anywhere; }
.ph2 .ph-val b { color:#e2e8f0; }
.ph2 .ph-val b.ph-client { color:#38bdf8; letter-spacing:.3px; }
.ph2 .ph-sub { font-size:11.5px; color:#94a3b8; margin-top:1px; }
.ph2 .ph-miss { color:#f59e0b; font-weight:700; font-size:12px; }
.ph2 .ph-job-body { display:flex; gap:14px; align-items:stretch; padding-top:8px; }
.ph2 .ph-job-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:9px; }
.ph2 .ph-fullname { color:#38bdf8; font-weight:800; font-size:14px; word-break:break-all; }
.ph2 .ph-tags { display:flex; flex-wrap:wrap; gap:6px; }
.ph2 .ph-tag { font-size:11.5px; font-weight:600; color:#cbd5e1; background:rgba(148,163,184,0.08); border:1px solid rgba(148,163,184,0.16); border-radius:999px; padding:2px 10px; }
.ph2 .ph-time { background:rgba(15,23,42,0.6); border:1px solid rgba(255,255,255,0.05); border-radius:8px; padding:8px 10px; }
.ph2 .ph-time-head { display:flex; justify-content:space-between; gap:10px; font-size:12px; color:#94a3b8; margin-bottom:6px; flex-wrap:wrap; }
.ph2 .ph-time-head b { color:#e2e8f0; }
.ph2 .ph-left { font-size:11px; font-weight:700; padding:1px 8px; border-radius:999px; background:rgba(16,185,129,0.12); color:#34d399; }
.ph2 .ph-time-bar { position:relative; height:6px; border-radius:999px; background:rgba(148,163,184,0.15); margin-bottom:6px; }
.ph2 .ph-time-bar span { position:absolute; left:0; top:0; bottom:0; border-radius:999px; background:linear-gradient(90deg,#0369a1,#0ea5e9); transition:width .4s ease; }
.ph2 .ph-time-bar i { position:absolute; top:50%; width:12px; height:12px; margin:-6px 0 0 -6px; border-radius:50%; background:#e0f2fe; border:2px solid #0284c7; box-shadow:0 0 0 3px rgba(2,132,199,0.2); }
.ph2 .ph-time.soon .ph-due { color:#f59e0b; }
.ph2 .ph-time.soon .ph-left { background:rgba(245,158,11,0.14); color:#fbbf24; }
.ph2 .ph-time.soon .ph-time-bar span { background:linear-gradient(90deg,#b45309,#f59e0b); }
.ph2 .ph-time.soon .ph-time-bar i { border-color:#f59e0b; box-shadow:0 0 0 3px rgba(245,158,11,0.2); }
.ph2 .ph-time.late .ph-due { color:#ef4444; }
.ph2 .ph-time.late .ph-left { background:rgba(239,68,68,0.14); color:#f87171; }
.ph2 .ph-time.late .ph-time-bar span { background:linear-gradient(90deg,#991b1b,#ef4444); }
.ph2 .ph-time.late .ph-time-bar i { border-color:#ef4444; box-shadow:0 0 0 3px rgba(239,68,68,0.2); }
.ph2 .ph-nas { font-size:12px; }
.ph2 .phi-link { cursor:pointer; color:#38bdf8; font-family:ui-monospace, Consolas, monospace; font-weight:700; word-break:break-all; border-bottom:1px dashed rgba(56,189,248,.5); }
.ph2 .phi-link:hover { color:#7dd3fc; border-bottom-style:solid; }
.ph2 .job-meta-kpi-card { width:240px; justify-content:flex-start; gap:2px; }
.ph2 .ph-note { grid-column:1 / -1; background:#0b0f19; border:1px solid rgba(255,255,255,0.06); border-radius:10px; padding:8px 14px; display:grid; grid-template-columns:150px minmax(0,1fr); gap:10px; align-items:start; }
.ph2 .ph-note .ph-lbl { padding-top:2px; }
@media (max-width: 1280px) { .ph2 .ph-job-body { flex-direction:column; } .ph2 .job-meta-kpi-card { width:100%; } }
@media (max-width: 1000px) { .proj-header-info.ph2 { grid-template-columns:1fr; } .ph2 .ph-note { grid-template-columns:1fr; } }

/* ===== v92: CS tạo job – Leader thêm task (gợi ý từ gói) ===== */
.np-task-note { font-size:12px; color:#bae6fd; background:rgba(2,132,199,0.08); border:1px solid rgba(2,132,199,0.3); border-radius:8px; padding:8px 10px; margin-bottom:10px; line-height:1.5; }
.wf-empty-tasks { display:flex; align-items:center; gap:12px; padding:12px 14px; margin-bottom:12px; border:1px dashed rgba(56,189,248,0.4); border-radius:10px; background:rgba(2,132,199,0.07); color:#cbd5e1; font-size:13px; }
.wf-empty-tasks .wf-empty-ico { font-size:22px; }
.sg-head { display:flex; flex-wrap:wrap; gap:6px 18px; font-size:12.5px; color:#94a3b8; padding:8px 10px; background:#0b0f19; border:1px solid rgba(255,255,255,0.06); border-radius:8px; margin-bottom:8px; }
.sg-head b { color:#e2e8f0; }
.sg-head #sg-sum { color:#34d399; }
.sg-head .over b { color:#ef4444; }
.sg-tools { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:8px; font-size:12.5px; }
.sg-wrap { max-height:52vh; overflow:auto; border:1px solid rgba(255,255,255,0.06); border-radius:8px; }
.sg-tbl { margin:0; }
.sg-tbl thead th { position:sticky; top:0; background:#111827; z-index:1; }
.sg-tbl td { padding:4px 8px; vertical-align:middle; }
.sg-tbl .sg-ph td { background:rgba(56,189,248,0.07); color:#7dd3fc; font-weight:800; font-size:11px; letter-spacing:.4px; text-transform:uppercase; padding:6px 10px; }
.sg-tbl .sg-title { width:100%; }
.sg-tbl .sg-pts { width:70px; text-align:right; font-weight:700; color:#10b981; }
.sg-tbl tr.off td:not(:first-child) { opacity:.45; }

/* ========================================================
   BÁO CÁO QUẢN TRỊ (#/reports) — tab theo kỳ
   ======================================================== */
.rep-tabs { display:flex; gap:4px; border-bottom:1px solid rgba(255,255,255,0.08); margin-bottom:16px; overflow-x:auto; }
.rep-tab { background:none; border:0; border-bottom:2px solid transparent; color:#94a3b8; font:inherit; font-size:13px; font-weight:700; padding:10px 14px; cursor:pointer; white-space:nowrap; transition:color .15s ease, border-color .15s ease, background .15s ease; border-radius:6px 6px 0 0; }
.rep-tab:hover { color:#e2e8f0; background:rgba(255,255,255,0.03); }
.rep-tab.active { color:#38bdf8; border-bottom-color:#38bdf8; background:rgba(56,189,248,0.06); }
.rep-body { animation:repFade .25s ease; }
@keyframes repFade { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
.rep-cards { grid-template-columns:repeat(4, 1fr); }
@media (max-width: 1000px) { .rep-cards { grid-template-columns:repeat(2, 1fr); } }
.rep-cards .val small { font-size:13px; font-weight:600; color:#94a3b8; }
.rep-chartbox { padding:4px 4px 0; }
.rep-legend { display:flex; align-items:center; gap:8px; font-size:12px; color:#94a3b8; margin-bottom:10px; justify-content:flex-end; }
.rep-legend i { display:inline-block; width:12px; height:12px; border-radius:3px; margin-left:12px; }
.rep-chart2 { display:flex; gap:10px; }
.rep-yaxis { display:flex; flex-direction:column; justify-content:space-between; height:170px; margin-top:22px; font-size:11px; color:#64748b; text-align:right; min-width:26px; }
.rep-plot { flex:1; display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:10px; }
.rep-col { display:flex; flex-direction:column; align-items:center; min-width:0; }
.rep-col-val { height:22px; font-size:14px; font-weight:800; color:#f8fafc; line-height:22px; }
.rep-col-track { width:100%; height:170px; display:flex; align-items:flex-end; justify-content:center; border-bottom:1px solid rgba(255,255,255,0.12);
  background:repeating-linear-gradient(to top, transparent 0, transparent 41px, rgba(255,255,255,0.05) 41px, rgba(255,255,255,0.05) 42px); }
.rep-col-total { width:min(56px, 62%); min-height:2px; background:rgba(148,163,184,.5); border-radius:5px 5px 0 0; display:flex; align-items:flex-end; overflow:hidden; transition:height .4s ease; }
.rep-col-ok { width:100%; background:linear-gradient(180deg,#60a5fa,#2563eb); transition:height .4s ease; }
.rep-col:hover .rep-col-total { filter:brightness(1.25); }
.rep-col-lbl { margin-top:8px; font-size:12.5px; font-weight:700; color:#cbd5e1; white-space:nowrap; }
.rep-col-sub { font-size:11.5px; color:#10b981; font-weight:700; }
.rep-col.empty .rep-col-lbl, .rep-col.empty .rep-col-sub { color:#475569; font-weight:500; }
.rep-tbl { font-size:13px; }
.rep-tbl th { padding:10px 14px; background:rgba(255,255,255,0.02); color:#94a3b8; font-weight:700; font-size:11px; text-transform:uppercase; letter-spacing:.5px; text-align:left; border-bottom:1px solid rgba(255,255,255,0.08); }
.rep-tbl td { padding:11px 14px; color:#cbd5e1; border-bottom:1px solid rgba(255,255,255,0.04); }
.rep-tbl .num-r { text-align:right; font-variant-numeric:tabular-nums; }
.rep-tbl .num-c { text-align:center; }
.rep-tbl tr.clickable:hover td { background:rgba(56,189,248,.05); }
.rep-tbl td, .rep-tbl th { white-space:nowrap; }
.rep-tbl tr.clickable { cursor:pointer; }
.rep-tbl tfoot .rep-total td { border-top:2px solid rgba(255,255,255,0.15); font-weight:800; background:rgba(255,255,255,0.03); }
.rep-tbl tr.rep-flag td { background:rgba(239,68,68,0.06); }
.rep-bar { height:6px; border-radius:3px; background:rgba(148,163,184,.15); overflow:hidden; margin-top:3px; }
.rep-bar i { display:block; height:100%; border-radius:3px; transition:width .4s ease; }
.rep-dual { display:grid; grid-template-columns:72px 1fr; gap:2px 8px; align-items:center; }
.rep-dual .rep-bar { margin-top:0; }
.rep-rank { display:grid; grid-template-columns:auto minmax(140px, 1.2fr) 2fr auto auto; gap:10px; align-items:center; padding:6px 0; border-bottom:1px dashed rgba(255,255,255,0.05); }
.rep-rank:last-child { border-bottom:0; }
.rep-rank-no { width:22px; height:22px; border-radius:50%; background:rgba(56,189,248,.12); color:#38bdf8; font-size:11px; font-weight:800; display:flex; align-items:center; justify-content:center; }
.rep-rank-name { font-size:12.5px; color:#e2e8f0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rep-rank-bar .rep-bar { margin-top:0; height:8px; }
.rep-rank-val { font-size:12.5px; color:#f8fafc; min-width:48px; text-align:right; }

/* ========================================================
   PHÂN BỔ NGUỒN LỰC — heatmap tải nhân sự × tuần
   ======================================================== */
.rh-summary { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:12px; }
.rh-legend { margin-left:auto; display:flex; align-items:center; gap:6px; font-size:11.5px; color:#94a3b8; }
.rh-legend i { display:inline-block; width:12px; height:12px; border-radius:3px; margin-left:8px; }
.rh-wrap { padding:0; overflow-x:auto; }
.rh-tbl { width:100%; border-collapse:separate; border-spacing:4px; font-size:12px; }
.rh-tbl th { color:#94a3b8; font-weight:800; font-size:11px; text-transform:uppercase; letter-spacing:.4px; padding:8px 4px; text-align:center; }
.rh-tbl th.rh-wk.now { color:#38bdf8; }
.rh-tbl .rh-name { text-align:left; min-width:220px; padding:6px 10px; position:sticky; left:0; background:#111622; z-index:1; }
.rh-cell { text-align:center; border-radius:6px; padding:7px 4px; min-width:74px; cursor:help; transition:transform .12s ease, box-shadow .12s ease; }
.rh-cell:hover { transform:scale(1.06); box-shadow:0 4px 14px rgba(0,0,0,.45); position:relative; z-index:2; }
.rh-cell b { font-size:13px; }
.rh-h { font-size:10.5px; opacity:.75; }
.rh-idle, .rh-legend .rh-idle { background:rgba(239,68,68,.18); color:#fca5a5; }
.rh-low, .rh-legend .rh-low { background:rgba(245,158,11,.14); color:#fcd34d; }
.rh-ok, .rh-legend .rh-ok { background:rgba(16,185,129,.22); color:#6ee7b7; }
.rh-over, .rh-legend .rh-over { background:rgba(249,115,22,.38); color:#fff; box-shadow:inset 0 0 0 1px rgba(249,115,22,.7); }
.rh-off { background:rgba(148,163,184,.06); }
.rh-none, .rh-legend .rh-none { background:rgba(148,163,184,.07); color:#94a3b8; }

/* ===== NHÂN SỰ RẢNH (BENCH) ===== */
.bench-wrap { padding: 4px 8px; overflow-x: auto; }
.bench-tbl td { vertical-align: middle; }
.bench-tbl th { white-space: nowrap; }
.bench-st { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 800; border: 1px solid transparent; }
.bench-st.free { background: rgba(16,185,129,.16); color: #34d399; border-color: rgba(16,185,129,.5); }
.bench-st.room { background: rgba(245,158,11,.14); color: #fbbf24; border-color: rgba(245,158,11,.45); }
.bench-st.busy { background: rgba(56,189,248,.12); color: #38bdf8; border-color: rgba(56,189,248,.4); }
.bench-st.over { background: rgba(239,68,68,.15); color: #f87171; border-color: rgba(239,68,68,.5); }
.bench-hrs { white-space: nowrap; }
.bench-bar { height: 5px; width: 120px; background: rgba(255,255,255,.08); border-radius: 3px; margin-top: 4px; overflow: hidden; }
.bench-bar i { display: block; height: 100%; border-radius: 3px; }
.bench-bar i.ok { background: #10b981; }
.bench-bar i.busy { background: #38bdf8; }
.bench-bar i.over { background: #ef4444; }
.bench-row:hover { background: rgba(255,255,255,.03); }
/* ===== QC v2: bố cục gọn 1 màn hình, toạ độ pin theo khung ảnh ===== */
.qc-head { margin-bottom: 14px; }
.qc-head h1 { font-size: 22px; font-weight: 800; color: #f8fafc; margin: 0 0 4px; }
.qc-head p { color: #94a3b8; font-size: 13px; margin: 0; }
.qc-layout { grid-template-columns: 250px minmax(0, 1fr) 320px; gap: 14px; }
@media (max-width: 1440px) { .qc-layout { grid-template-columns: 230px minmax(0, 1fr) 290px; } }
@media (max-width: 1240px) { .qc-layout { grid-template-columns: 230px minmax(0, 1fr); } .qc-side { grid-column: 1 / -1; position: static !important; } }
@media (max-width: 860px) { .qc-layout { grid-template-columns: 1fr; } }
.qc-list-body { max-height: calc(100vh - 230px); overflow-y: auto; }
.qc-empty-main { grid-column: 2 / -1; padding: 60px 20px; text-align: center; color: #94a3b8; }
.qc-main-panel { padding: 14px; min-width: 0; }
.qc-main-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.qc-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; font-size: 12px; color: #94a3b8; }
.qc-stage-wrap { margin-top: 0; border: 0; background: transparent; overflow: visible; cursor: default; border-radius: 0; }
.qc-stage-viewport { height: calc(100vh - 385px); min-height: 360px; max-height: none; }
.qc-img-box { position: relative; display: inline-block; max-width: 100%; vertical-align: middle; }
.qc-img-box img, .qc-canvas .qc-img-box img { display: block; max-width: 100%; max-height: calc(100vh - 389px); width: auto; height: auto; pointer-events: none; border-radius: 4px; margin: 0; }
.qc-img-box img.qc-img-before, .qc-canvas .qc-img-box img.qc-img-before { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; z-index: 2; }
.qc-img-box .qc-label-tag { z-index: 4; }
.qc-img-box .qc-ba-handle { z-index: 9; transform: translateX(-50%); }
.qc-img-box .qc-pin, .qc-img-box .qc-box-pin { z-index: 8; }
.qc-img-box.big img { max-height: 76vh; }
.qc-lightbox-stage { background: #0b0f19; border-radius: 8px; padding: 6px; display: flex; justify-content: center; }
.qc-stage-compact { background: #0b0f19; border: 1px solid var(--panel-border); border-radius: 8px; padding: 4px; display: flex; justify-content: center; cursor: zoom-in; }
.qc-stage-compact .qc-img-box img { max-height: 46vh; }
.qc-hint { margin-top: 6px; padding: 0 4px; font-size: 11.5px; color: #64748b; }
.qc-side { position: sticky; top: 12px; gap: 14px; }
.qc-pin-scroll { padding: 10px 12px !important; max-height: calc(100vh - 500px); min-height: 80px; overflow-y: auto; }
.qc-empty-pins { padding: 18px 10px; }
.qc-decide { padding: 12px 14px; border-top: 1px solid var(--panel-border); display: flex; flex-direction: column; gap: 8px; }
.qc-decide .qc-cond-note { margin-top: 2px; }
.qc-pin-item { cursor: pointer; transition: border-color .15s, background .15s; }
.qc-pin-item:hover { border-color: rgba(56, 189, 248, 0.35); }
.qc-pin-item.qc-hl { border-color: #38bdf8; background: rgba(56, 189, 248, 0.08); }
.qc-pin.qc-hl { transform: rotate(-45deg) scale(1.3); box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.55); z-index: 20; }
.qc-box-pin.qc-hl { box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.75); border-color: #38bdf8; z-index: 20; }
.qc-history-card .timeline li { padding-bottom: 10px; }

/* QC v2: cột phải vừa màn hình, lịch sử tự cuộn */
.qc-side { max-height: calc(100vh - 160px); }
.qc-pin-card { flex: none; }
.qc-history-card { flex: 1 1 auto; min-height: 110px; display: flex; flex-direction: column; }
.qc-history-card .panel-b { flex: 1; min-height: 0; overflow-y: auto; }

/* ===== KANBAN v2: tối giản màu – 1 màu nhấn (xanh), đỏ/vàng/xanh lá chỉ cho trạng thái cần chú ý ===== */
.kb-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.kb-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.kb-title h1 { font-size: 19px; font-weight: 800; color: #f1f5f9; margin: 0; }
.kb-scope { font-size: 12px; color: #64748b; font-weight: 500; }
.kb-head .view-switcher-group { background: #0d1119; border-color: #1f2737; padding: 3px; gap: 2px; }
.kb-head .view-switch-btn { padding: 6px 13px; font-weight: 600; color: #94a3b8; }
.kb-head .view-switch-btn.active { background: #0369a1; color: #fff; box-shadow: none; }

.kb-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; padding: 6px 8px; background: #11151d; border: 1px solid #1d2433; border-radius: 8px; }
.kb-teams { display: flex; gap: 2px; flex-wrap: wrap; }
.kb-toolbar .team-tab-btn { background: transparent; border: 1px solid transparent; color: #94a3b8; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.kb-toolbar .team-tab-btn:hover { background: #1a2130; color: #e2e8f0; }
.kb-toolbar .team-tab-btn.active { background: #0369a1; border-color: #0369a1; color: #fff; }
.kb-toolbar .team-tab-btn .dim { opacity: .65; margin-left: 2px; font-weight: 500; }
.kb-sep { width: 1px; height: 22px; background: #263044; margin: 0 2px; }
.kb-spacer { flex: 1; }
.kb-toolbar .inp.sm { background: #0d1119; border-color: #263044; }
.kb-mine { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #94a3b8; cursor: pointer; white-space: nowrap; }
.kb-wide { background: transparent !important; border: 1px solid #263044 !important; color: #cbd5e1 !important; font-weight: 600; }
.kb-wide.on { border-color: #0369a1 !important; color: #7dd3fc !important; }
.kb-count { font-size: 12px; color: #64748b; white-space: nowrap; }
.kb-count b { color: #e2e8f0; }

/* Cột: nền trung tính, chỉ 1 vạch màu mảnh trên đầu */
.kanban-board-8col { gap: 10px; }
.kanban-column, .kanban-column[data-col="done"] { background: #10141c; border: 1px solid #1c2331; border-top: 2px solid var(--kc, #475569); border-radius: 8px; height: calc(100vh - 216px); min-height: 460px; }
.kanban-col-head, .kanban-column[data-col="done"] .kanban-col-head { background: transparent; border-bottom: 1px solid #1c2331; padding: 9px 10px; cursor: help; }
.kb-col-title { color: #cbd5e1; font-size: 11.5px; font-weight: 700; letter-spacing: .2px; }
.kb-col-count { font-size: 11px; font-weight: 700; color: #94a3b8; background: #1a2130; border-radius: 999px; padding: 1px 8px; }
.kb-empty { text-align: center; color: #475569; font-size: 12px; padding: 24px 0; }

/* Card: 4 dòng, nền xám trung tính */
.kanban-job-card.kcard { background: #161b25; border: 1px solid #222a39; border-radius: 7px; padding: 9px 10px; box-shadow: none; }
.kanban-job-card.kcard:hover { border-color: #3a4760; transform: none; }
.kanban-job-card.kc-alert { box-shadow: inset 3px 0 0 #ef4444; }
.kanban-job-card.kc-locked { opacity: .55; }
.kanban-job-card.kc-done .kc-title { color: #cbd5e1; }
.kanban-job-card.active-timer-card { border-color: rgba(16, 185, 129, .5); box-shadow: none; }
.kc-job { font-size: 10.5px; color: #64748b; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 3px; }
.kc-title { font-size: 12.5px; font-weight: 700; color: #f1f5f9; line-height: 1.35; margin-bottom: 8px; word-break: break-word; }
.kc-code { color: #7c8aa3; font-weight: 700; margin-right: 1px; }
.kc-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11.5px; color: #94a3b8; }
.kc-who { display: flex; align-items: center; gap: 5px; min-width: 0; }
.kc-who .avatar.sm { width: 18px; height: 18px; font-size: 8.5px; }
.kc-name { color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-borrowed { color: #94a3b8; font-size: 10.5px; white-space: nowrap; }
.kc-warn { color: #f59e0b; font-weight: 600; }
.kc-right { white-space: nowrap; flex: none; color: #94a3b8; }
.kc-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.kc-ic, .kcard .chip-lan { display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 600; color: #94a3b8; background: #1c2230; border: 1px solid #273042; border-radius: 4px; padding: 0 6px; line-height: 17px; }
.kcard .chip-lan:hover { color: #e2e8f0; border-color: #3a4760; background: #222a3a; }
.kc-ic.red { color: #fca5a5; border-color: rgba(239, 68, 68, .35); background: rgba(239, 68, 68, .08); }
.kc-ic.green { color: #6ee7b7; border-color: rgba(16, 185, 129, .3); background: rgba(16, 185, 129, .07); }
.kc-note { margin-top: 7px; font-size: 11.5px; color: #94a3b8; font-style: italic; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kc-wait { margin-top: 7px; font-size: 11px; color: #64748b; }
.kc-actions { display: flex; gap: 6px; margin-top: 8px; }
.kc-btn { flex: 1; min-width: 0; padding: 5px 4px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; border-radius: 5px; border: 1px solid #2c374b; background: transparent; color: #cbd5e1; cursor: pointer; transition: .15s; }
.kc-btn:hover:not(:disabled) { border-color: #4b5a74; color: #fff; background: #1c2333; }
.kc-btn.primary { background: #0369a1; border-color: #0369a1; color: #fff; }
.kc-btn.primary:hover:not(:disabled) { background: #0284c7; border-color: #0284c7; }
.kc-btn:disabled { opacity: .4; cursor: not-allowed; }
.kc-btn.xs { flex: none; padding: 2px 8px; font-size: 10.5px; }
.kc-borrow { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 7px; padding: 4px 6px; border: 1px dashed rgba(245, 158, 11, .5); border-radius: 5px; font-size: 11px; color: #fcd34d; }

/* KANBAN v2 - people lane status */
.pl-stat{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:#94a3b8;white-space:nowrap}
.pl-dot{display:inline-block;width:8px;height:8px;border-radius:50%}
.people-subcol-title{color:#94a3b8;font-weight:700;font-size:12px;text-transform:none}

/* ===== TASK MODAL v2 – gọn, ít màu ===== */
.tm{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.05fr);gap:22px;align-items:start}
.tm-left,.tm-right{min-width:0}
.tm-pins{margin-top:10px}
.tm-pins .qc-pin-list:empty,.tm-pins .center{padding:8px 0}
.tm-sec{margin:16px 0 8px;font-size:11.5px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:#94a3b8;display:flex;align-items:center;gap:6px}
.tm-sec.between{justify-content:space-between}
.tm-k{font-size:12px;color:#64748b;font-weight:600}
.tm-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px;padding-bottom:14px;border-bottom:1px solid rgba(148,163,184,.12)}
.tm-actions .btn{background:transparent;border:1px solid #334155;color:#e2e8f0;box-shadow:none}
.tm-actions .btn:hover{border-color:#64748b;background:rgba(148,163,184,.08)}
.tm-actions .btn.primary,.tm-actions .btn.blue,.tm-actions .btn.success{background:#0369a1;border-color:#0369a1;color:#fff}
.tm-actions .btn.primary:hover,.tm-actions .btn.blue:hover,.tm-actions .btn.success:hover{background:#0284c7;border-color:#0284c7}
.tm-actions .btn.primary~.btn.blue,.tm-actions .btn.blue~.btn.blue,.tm-actions .btn.success~.btn{background:transparent;border-color:#334155;color:#e2e8f0}
.tm-actions .btn.tm-cancel{margin-left:auto;border-color:transparent;color:#f87171}
.tm-actions .btn.tm-cancel:hover{background:rgba(239,68,68,.1);border-color:rgba(239,68,68,.35)}
.tm-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:14px}
.tm-stats>div{background:#0f172a;border:1px solid rgba(148,163,184,.12);border-radius:8px;padding:8px 10px;display:flex;flex-direction:column;gap:2px;min-width:0}
.tm-stats b{font-size:15px;color:#f1f5f9;white-space:nowrap}
.tm-stats>div>.dim{font-size:11.5px}
.tm-stats>div{display:block}
.tm-stats .tm-k{display:block;margin-bottom:2px}
.tm-info{display:grid;grid-template-columns:96px minmax(0,1fr);gap:9px 12px;align-items:center;margin-top:14px;font-size:13px;color:#e2e8f0}
.tm-info .job-tag{margin-right:4px}
.tm-link{font-weight:600;color:#e2e8f0}
.tm-link:hover{color:#38bdf8}
.tm-lan{display:flex;flex-direction:column;gap:6px}
.tm-lan-row{display:grid;grid-template-columns:96px minmax(0,1fr) auto;gap:12px;align-items:center;font-size:12.5px}
.tm-lan-val{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:'JetBrains Mono',monospace;font-size:11.5px;color:#cbd5e1;background:#0f172a;border:1px solid rgba(148,163,184,.12);border-radius:6px;padding:5px 8px}
span.tm-lan-val{font-family:inherit;font-style:italic;background:transparent;border-color:transparent;padding-left:0;grid-column:span 2}
.tm-comments{display:flex;flex-direction:column;gap:8px;max-height:200px;overflow:auto}
.tm-cmt{font-size:12.5px;background:#0f172a;border:1px solid rgba(148,163,184,.1);border-radius:8px;padding:7px 10px;color:#e2e8f0}
.tm-hist{margin-top:16px;border-top:1px solid rgba(148,163,184,.12);padding-top:10px}
.tm-hist summary{cursor:pointer;font-size:11.5px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:#94a3b8;list-style:none}
.tm-hist summary::-webkit-details-marker{display:none}
.tm-hist summary::before{content:'▸';display:inline-block;margin-right:6px;transition:transform .15s}
.tm-hist[open] summary::before{transform:rotate(90deg)}
.tm-hist .task-history{margin-top:8px;max-height:220px;overflow:auto}
@media (max-width:900px){.tm{grid-template-columns:1fr}}.tm-actions:empty{display:none}
.tm-pins .qc-tag{background:rgba(148,163,184,.1)!important;color:#cbd5e1!important;border-color:transparent!important}
.tm-pins .btn-success{background:transparent!important;border:1px solid rgba(16,185,129,.45)!important;color:#34d399!important}
.tm-pins .qc-empty-pins{padding:10px 0;font-size:12.5px;color:#64748b}
/* ===== WORKSPACE – yêu cầu sửa chia đôi 1 hàng ===== */
.wsf-row{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px;align-items:start}
.wsf-col{background:#121826;border:1px solid rgba(148,163,184,.14);border-radius:10px;padding:10px 12px;min-width:0}
.wsf-head{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;letter-spacing:.3px;text-transform:uppercase;color:#cbd5e1;margin-bottom:6px}
.wsf-head .kb-col-count{margin-left:auto}
.wsf-item{padding:8px 0;border-top:1px solid rgba(148,163,184,.1)}
.wsf-item:first-of-type{border-top:0}
.wsf-title{font-size:13px;font-weight:700;color:#f1f5f9;margin-bottom:4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wsf-link{cursor:pointer}
.wsf-link:hover{color:#38bdf8}
.wsf-pin{display:flex;align-items:center;gap:8px;padding:3px 0;font-size:12.5px;color:#e2e8f0}
.wsf-pin.done .wsf-txt{color:#64748b;text-decoration:line-through}
.wsf-n{flex:none;width:18px;height:18px;border-radius:50%;background:rgba(239,68,68,.18);color:#fca5a5;font-size:11px;font-weight:700;display:inline-flex;align-items:center;justify-content:center}
.wsf-pin.done .wsf-n{background:rgba(16,185,129,.15);color:#6ee7b7}
.wsf-txt{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.wsf-pin .btn.xs{flex:none;border:1px solid rgba(16,185,129,.45);background:transparent;color:#34d399}
.wsf-quote{font-size:12.5px;color:#e2e8f0;background:#0f172a;border-left:2px solid #f59e0b;border-radius:4px;padding:6px 10px}
.wsf-empty{font-size:12.5px;color:#64748b;padding:10px 0}
.wsf-hint{font-size:11.5px;color:#64748b;margin-top:4px}
@media (max-width:1100px){.wsf-row{grid-template-columns:1fr}}
/* ===== VIỆC CỦA TÔI / BÀN LÀM VIỆC v2 ===== */
/* Lịch giao việc – đầu cột trung tính + vạch màu mảnh */
.calendar-day-col.cal-v2{border-color:rgba(148,163,184,.14);border-top:2px solid var(--kc,#334155);box-shadow:none}
.calendar-day-col.cal-v2 .calendar-day-head{background:#141a26;color:#cbd5e1;font-weight:700;letter-spacing:.2px}
.calendar-day-col.cal-v2.is-today .calendar-day-head{background:#141a26;color:#f1f5f9}
.calendar-day-col.cal-v2.is-today{background:#121a28}
.kb-col-count.cal-red{color:#fca5a5;background:rgba(239,68,68,.12)}
.kb-scope a{color:#38bdf8}
/* Popup chỉ đọc */
.tm-ro-note{margin-top:12px;padding:8px 10px;border:1px dashed #334155;border-radius:8px;font-size:12.5px;color:#94a3b8}
.tm-ro-note a{color:#38bdf8;font-weight:600}
/* Bảng việc được giao */
.ws-list-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:4px 0 8px}
.ws-list-title{display:flex;align-items:center;gap:8px;font-size:12.5px;font-weight:700;letter-spacing:.4px;text-transform:uppercase;color:#cbd5e1}
.ws-tbl td{vertical-align:middle;padding-top:9px;padding-bottom:9px}
.ws-tbl tr.ws-due td:first-child{box-shadow:inset 2px 0 0 #ef4444}
.ws-tbl tr.ws-timing td:first-child{box-shadow:inset 2px 0 0 #10b981}
.ws-tbl tr.ws-timing{background:rgba(16,185,129,.04)}
.ws-task{font-weight:700;color:#f1f5f9;cursor:pointer;font-size:13.5px}
.ws-task:hover{color:#38bdf8}
.ws-job{margin-top:3px;font-size:12px;color:#64748b;display:flex;align-items:center;flex-wrap:wrap;gap:4px}
.ws-job a{color:#94a3b8;font-family:'JetBrains Mono',monospace;font-size:11.5px}
.ws-job a:hover{color:#38bdf8}
.ws-tags{display:inline-flex;gap:4px;flex-wrap:wrap;margin-left:6px}
.ws-tags .chip-lan{display:inline-flex;align-items:center;font-size:10.5px;font-weight:600;color:#94a3b8;background:#1c2230;border:1px solid #2a3344;border-radius:4px;padding:0 6px;height:18px}
.ws-act{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.ws-act .btn{background:transparent;border:1px solid #334155;color:#e2e8f0;box-shadow:none}
.ws-act .btn:hover{border-color:#64748b;background:rgba(148,163,184,.08)}
.ws-act .btn.primary,.ws-act .btn.blue,.ws-act .btn.success{background:#0369a1;border-color:#0369a1;color:#fff}
.ws-act .btn.primary~.btn.blue{background:transparent;border-color:#334155;color:#e2e8f0}
.ws-wait{font-size:12px;color:#64748b}
.ws-done{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:16px}
.ws-done-item{font-size:12px;color:#cbd5e1;background:#141a26;border:1px solid rgba(148,163,184,.14);border-radius:6px;padding:3px 8px;cursor:pointer}
.ws-done-item:hover{border-color:#334155}/* Lịch giao việc vừa 1 màn hình (8 cột: Quá hạn · 6 ngày · Sau nữa) */
.calendar-view-grid{grid-template-columns:repeat(8,minmax(0,1fr));gap:8px;align-items:stretch;margin-bottom:0}
.calendar-day-col.cal-v2{min-height:0;height:calc(100vh - 216px)}
.calendar-day-col.cal-v2 .calendar-day-body{flex:1;overflow-y:auto}
@media (max-width:1400px){.calendar-view-grid{grid-template-columns:repeat(8,minmax(200px,1fr))}}
/* ===================== BÀN GIAO CHECK · NỘP ẢNH / VIDEO (v86) ===================== */
.ho-card { max-width: 640px; }
.ho { display: flex; flex-direction: column; gap: 8px; }
.ho-task { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid rgba(148,163,184,.14); border-radius: 10px; background: rgba(15,23,42,.45); }
.ho-task b { color: #f1f5f9; font-size: 13.5px; }
.ho-round { margin-left: auto; font-size: 11.5px; font-weight: 700; color: #7dd3fc; background: rgba(2,132,199,.14); border: 1px solid rgba(2,132,199,.35); padding: 2px 8px; border-radius: 999px; }
.ho-sec { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #94a3b8; }
.ho-sec .small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.ho-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 12px; border: 1.5px dashed rgba(148,163,184,.35); border-radius: 12px; background: rgba(15,23,42,.35); color: #cbd5e1; font-size: 13px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.ho-drop:hover, .ho-drop.over { border-color: #0284c7; background: rgba(2,132,199,.08); }
.ho-drop.has { padding: 10px 12px; flex-direction: row; justify-content: center; gap: 8px; }
.ho-drop.has .dim { display: none; }
.ho-drop-ic { font-size: 22px; line-height: 1; }
.ho-drop.has .ho-drop-ic { font-size: 16px; }
.ho-drop u { color: #7dd3fc; text-decoration: none; border-bottom: 1px solid rgba(125,211,252,.4); }
.ho-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.ho-thumbs:empty { display: none; }
.ho-thumb { position: relative; aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; border: 1px solid rgba(148,163,184,.2); background: #0b1220; }
.ho-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ho-thumb-n { position: absolute; left: 4px; top: 4px; font-size: 10px; font-weight: 800; color: #fff; background: rgba(2,6,23,.7); padding: 0 5px; border-radius: 4px; }
.ho-thumb-x { position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(2,6,23,.75); color: #f1f5f9; font-size: 11px; cursor: pointer; opacity: 0; transition: opacity .15s; }
.ho-thumb:hover .ho-thumb-x { opacity: 1; }
.ho-thumb-x:hover { background: #dc2626; }
.ho-vprev { display: flex; align-items: center; gap: 8px; min-height: 0; font-size: 12px; }
.ho-vprev:empty { display: none; }
.ho-vprev img { height: 38px; border-radius: 6px; border: 1px solid rgba(148,163,184,.2); }
.ho-vok { color: #34d399; font-weight: 700; }
.ho-vbad { color: #f87171; }
.ho-req { font-size: 12px; color: #94a3b8; padding: 7px 10px; border-left: 2px solid #0284c7; background: rgba(2,132,199,.06); border-radius: 0 6px 6px 0; }

/* Lần nộp: tab + ảnh nhỏ + video (popup task & màn QC) */
.sb { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.sb-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.sb-tab { font: inherit; font-size: 11.5px; font-weight: 600; color: #94a3b8; background: transparent; border: 1px solid rgba(148,163,184,.2); border-radius: 999px; padding: 2px 10px; cursor: pointer; }
.sb-tab:hover { color: #e2e8f0; border-color: rgba(148,163,184,.4); }
.sb-tab.on { color: #fff; background: #0369a1; border-color: #0284c7; }
.sb-new { font-size: 9.5px; font-weight: 800; color: #34d399; text-transform: uppercase; }
.sb-tab.on .sb-new { color: #bbf7d0; }
.sb-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: #cbd5e1; }
.sb-lbl { font-weight: 700; color: #f1f5f9; }
.sb-note { font-size: 12.5px; color: #cbd5e1; font-style: italic; padding: 5px 9px; border-left: 2px solid rgba(148,163,184,.35); background: rgba(15,23,42,.35); border-radius: 0 6px 6px 0; }
.sb-thumbs { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 2px; }
.sb-thumb { width: 64px; height: 46px; object-fit: cover; border-radius: 6px; border: 2px solid transparent; opacity: .65; cursor: pointer; flex: none; transition: opacity .15s, border-color .15s; }
.sb-thumb:hover { opacity: 1; }
.sb-thumb.on { opacity: 1; border-color: #0284c7; }
.sb-video { display: flex; align-items: center; gap: 10px; padding: 7px 9px; border: 1px solid rgba(148,163,184,.16); border-radius: 10px; background: rgba(15,23,42,.45); }
.sb-vthumb { width: 72px; height: 44px; object-fit: cover; border-radius: 6px; flex: none; }
.sb-vic { width: 44px; height: 44px; display: grid; place-items: center; font-size: 20px; background: rgba(148,163,184,.08); border-radius: 6px; flex: none; }
.sb-vinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #e2e8f0; }
.sb-vinfo code { font-size: 11px; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-video.playing { padding: 0; display: block; overflow: hidden; background: #000; }
.sb-video.playing iframe, .sb-video.playing video { display: block; width: 100%; aspect-ratio: 16/9; border: 0; }
.qc-main-panel > .sb { margin: 10px 0 8px; }.sb-tab.on .dim { color: #bae6fd; }

/* Ô nộp ảnh trong popup chi tiết task (v87) */
.ho-inline { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 10px; border: 1.5px dashed rgba(2,132,199,.55); border-radius: 12px; background: rgba(2,132,199,.07); cursor: pointer; transition: background .15s, border-color .15s; }
.ho-inline:hover, .ho-inline.over { background: rgba(2,132,199,.14); border-color: #0284c7; }
.ho-inline-ic { font-size: 24px; line-height: 1; }
.ho-inline-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ho-inline-t b { color: #e0f2fe; font-size: 13.5px; }
.ho-inline-t span { color: #94a3b8; font-size: 12px; }
.ho-inline .btn { flex: none; }
/* Popup bàn giao: xác nhận lỗi QC đã sửa (v88) */
.ho-pins { display: flex; flex-direction: column; gap: 4px; }
.ho-pin { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid rgba(239,68,68,.3); border-radius: 8px; background: rgba(239,68,68,.06); cursor: pointer; font-size: 12.5px; color: #e2e8f0; transition: background .15s, border-color .15s; }
.ho-pin input { width: 16px; height: 16px; accent-color: #10b981; flex: none; margin: 0; }
.ho-pin-n { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #dc2626; color: #fff; font-size: 11px; font-weight: 800; flex: none; }
.ho-pin-t { flex: 1; min-width: 0; }
.ho-pin-ok { font-size: 11px; font-weight: 700; color: #64748b; }
.ho-pin:has(input:checked) { border-color: rgba(16,185,129,.35); background: rgba(16,185,129,.06); }
.ho-pin:has(input:checked) .ho-pin-n { background: #10b981; }
.ho-pin:has(input:checked) .ho-pin-t { color: #94a3b8; text-decoration: line-through; }
.ho-pin:has(input:checked) .ho-pin-ok { color: #34d399; }
.ho-pin.need:not(:has(input:checked)) { border-color: #ef4444; box-shadow: 0 0 0 2px rgba(239,68,68,.25); }
.ho-inline-t .ho-inline-warn { color: #fbbf24; font-weight: 600; }
/* Video = đường dẫn LAN (v89) */
.ho-vname { color: #e2e8f0; font-weight: 600; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; }
.ho-vbad code { font-size: 11px; color: #fca5a5; }
