/* =============================================================
   CLEANING-MGR.CSS — Phase bar + Summary strip + Section layout
   ============================================================= */

/* ===== Phase Bar (sticky) ===== */
.cmgr-phase-bar {
  position: sticky;
  top: var(--sticky-top, 104px);
  z-index: 95;
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  background: var(--color-white);
  border-bottom: 2px solid var(--color-gray-200);
  box-shadow: var(--shadow-md);
  transition: top .3s ease;
}

.cmgr-phase-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  background: var(--color-gray-50);
  border: 2px solid transparent;
  font-size: .85rem;
  font-weight: 600;
  color: var(--color-gray-600);
  transition: all var(--transition-normal);
  min-height: 56px;
}

.cmgr-phase-btn.active {
  background: rgba(139,92,246,.08);
  border-color: var(--color-mode-cmgr);
  color: var(--color-mode-cmgr);
}

.cmgr-phase-btn:active {
  transform: scale(.97);
}

.cmgr-phase-count {
  font-size: .7rem;
  font-weight: 700;
  background: var(--color-gray-200);
  color: var(--color-gray-600);
  border-radius: 10px;
  padding: 1px 8px;
  min-width: 24px;
  text-align: center;
}

.cmgr-phase-btn.active .cmgr-phase-count {
  background: var(--color-mode-cmgr);
  color: #fff;
}

/* ===== Summary Strip ===== */
.cmgr-summary-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-100);
  font-size: .8rem;
  color: var(--color-gray-600);
  flex-wrap: wrap;
}

.cmgr-summary-item {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.cmgr-summary-item strong {
  font-size: .95rem;
  color: var(--color-gray-900);
}

.cmgr-summary-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cmgr-summary-dot.todo     { background: var(--color-todo); }
.cmgr-summary-dot.active   { background: var(--color-inprog); }
.cmgr-summary-dot.done     { background: var(--color-done); }
.cmgr-summary-dot.alert    { background: var(--color-error); }

.cmgr-progress-bar {
  flex: 1;
  min-width: 80px;
  height: 6px;
  background: var(--color-gray-200);
  border-radius: 3px;
  overflow: hidden;
}

.cmgr-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-done), #16a34a);
  border-radius: 3px;
  transition: width .4s ease;
}

/* ===== Section Layout ===== */
.cmgr-section {
  padding: 20px 16px;
  min-height: 120px;
}

.cmgr-section + .cmgr-section {
  border-top: 1px solid var(--color-gray-200);
}

.cmgr-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid rgba(27,45,79,.08);
}

/* ===== Shared Toggle Button (completed / checked sections) ===== */
.cmgr-toggle-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  font-size: .95rem;
  font-weight: 600;
  color: var(--color-gray-600);
  cursor: pointer;
  min-height: 44px;
  transition: background var(--transition-fast);
}

.cmgr-toggle-btn:active {
  background: var(--color-gray-200);
}

.cmgr-toggle-arrow {
  font-size: .8rem;
  color: var(--color-gray-400);
}

/* ===== Shared Completed Row ===== */
.cmgr-completed-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
}

.cmgr-completed-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--color-gray-50);
  border-radius: var(--radius-sm);
  color: var(--color-gray-400);
}

.cmgr-cr-room {
  font-weight: 700;
  font-size: .95rem;
  color: var(--color-gray-600);
  min-width: 44px;
}

.cmgr-cr-staff {
  flex: 1;
  font-size: .85rem;
  color: var(--color-gray-400);
}

.cmgr-cr-time {
  font-size: .8rem;
  color: var(--color-gray-400);
  white-space: nowrap;
}

/* ===== Print ===== */
@media print {
  .cmgr-phase-bar { display: none; }
  .cmgr-summary-strip { break-inside: avoid; }
  .cmgr-section { page-break-inside: avoid; }
}
