/* Checklists - match Ivory stone / primary gold; keep mobile usable but compact */

.cl-shell { max-width: 52rem; }

.cl-mine { width: 100%; }
.cl-mine-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .cl-mine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .cl-mine-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.cl-mine-card {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  min-width: 0;
}

.cl-fill {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding-bottom: 5.5rem;
}
@media (max-width: 640px) {
  .cl-fill { max-width: none; }
  .cl-task { padding: 0.75rem; }
  .cl-btn-row { gap: 0.5rem; }
  .cl-btn-row .cl-btn { min-height: 44px; font-size: 0.875rem; }
  main.cl-workspace-full { padding-left: 0.75rem; padding-right: 0.75rem; padding-top: 1rem; }
  body.cl-staff-only main.cl-workspace-full { padding-bottom: 1.25rem; }
  body.cl-staff-only #whoami { max-width: 9.5rem; }
}

.cl-tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid #e7e5e4;
  margin-bottom: 0.75rem;
}
.cl-tabs button {
  flex: 1;
  min-height: 40px;
  border: 0;
  background: transparent;
  font-size: 0.75rem;
  font-weight: 600;
  color: #78716c;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.cl-tabs button.active {
  color: #1c1917;
  border-bottom-color: #9D7433;
}

.cl-card {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  margin-bottom: 0.65rem;
}
.cl-card.cl-locked { opacity: 0.55; }
.cl-card h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #1c1917;
  margin: 0 0 0.15rem;
}
.cl-meta { font-size: 0.7rem; color: #78716c; line-height: 1.35; }

.cl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid #e7e5e4;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  color: #44403c;
}
.cl-btn-primary {
  background: #9D7433;
  border-color: #9D7433;
  color: #fff;
}
.cl-btn-primary:hover { background: #7E5B26; border-color: #7E5B26; }
.cl-btn-danger {
  color: #b91c1c;
  border-color: #fecaca;
  background: #fff;
}
.cl-btn.selected {
  background: #FBF8F1;
  border-color: #9D7433;
  color: #7E5B26;
}
.cl-btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.4rem; }

.cl-task {
  border: 1px solid #e7e5e4;
  border-radius: 0.5rem;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.4rem;
  background: #fff;
}
.cl-task-title { font-size: 0.8125rem; font-weight: 600; margin-bottom: 0.4rem; }
.cl-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.3rem;
  border-radius: 0.25rem;
  background: #f5f5f4;
  color: #78716c;
  margin-left: 0.25rem;
}
.cl-badge.opt { background: #FBF8F1; color: #9D7433; }
.cl-badge.photo { background: #fff7ed; color: #c2410c; }

.cl-field {
  width: 100%;
  min-height: 36px;
  border: 1px solid #e7e5e4;
  border-radius: 0.5rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.8125rem;
  background: #fff;
}
.cl-option {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 36px;
  padding: 0.25rem 0.5rem;
  border: 1px solid #e7e5e4;
  border-radius: 0.45rem;
  margin-bottom: 0.3rem;
  font-size: 0.8125rem;
}
.cl-save { font-size: 0.65rem; color: #15803d; margin-top: 0.25rem; }
.cl-save.err { color: #b91c1c; }

.cl-submit-bar {
  position: sticky;
  bottom: 0;
  background: linear-gradient(to top, #fafaf9 70%, transparent);
  padding: 0.75rem 0 0.35rem;
  z-index: 5;
}
.cl-not-done { color: #b91c1c; font-weight: 600; }
.cl-photo-preview {
  margin-top: 0.35rem;
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 0.4rem;
}

/* Compact wizard */
.cl-wiz {
  max-width: 40rem;
}
.cl-wiz-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.cl-wiz-task {
  border: 1px solid #e7e5e4;
  border-radius: 0.5rem;
  padding: 0.45rem 0.5rem;
  margin-bottom: 0.35rem;
  background: #fafaf9;
}
.cl-wiz-task .cl-field { min-height: 32px; font-size: 0.75rem; padding: 0.3rem 0.45rem; }
.cl-wiz-actions button {
  min-height: 28px;
  min-width: 28px;
  width: 28px;
  padding: 0;
  font-size: 0.7rem;
}
.cl-preview-phone {
  max-width: 20rem;
  margin: 0 auto;
  border: 2px solid #44403c;
  border-radius: 1rem;
  padding: 0.55rem;
  background: #fafaf9;
  max-height: 60vh;
  overflow: auto;
}

/* Admin list */
.cl-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #78716c;
  margin: 1rem 0 0.5rem;
}
.cl-section-title:first-child { margin-top: 0; }
.cl-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  font-weight: 600;
  color: #57534e;
  background: #f5f5f4;
  border-radius: 0.35rem;
  padding: 0.15rem 0.4rem;
}
.cl-stat button {
  background: none;
  border: 0;
  color: #9D7433;
  font-weight: 700;
  font-size: 0.65rem;
  padding: 0;
  cursor: pointer;
}
.cl-occ {
  font-size: 0.7rem;
  color: #57534e;
  margin-top: 0.35rem;
}
.cl-occ ul {
  margin: 0.25rem 0 0;
  padding-left: 1rem;
  max-height: 8rem;
  overflow: auto;
}
.cl-detail-panel {
  margin-top: 0.55rem;
  border-top: 1px solid #e7e5e4;
  padding-top: 0.55rem;
  font-size: 0.75rem;
}
.cl-detail-panel details { margin-bottom: 0.35rem; }
.cl-detail-panel summary {
  cursor: pointer;
  font-weight: 600;
  color: #44403c;
  font-size: 0.7rem;
}
.cl-answer-line { margin: 0.15rem 0; color: #57534e; }
.cl-answer-line .cl-not-done { color: #b91c1c; }

.cl-report table { width: 100%; font-size: 0.75rem; border-collapse: collapse; }
.cl-report th, .cl-report td {
  text-align: left;
  padding: 0.45rem 0.3rem;
  border-bottom: 1px solid #e7e5e4;
}
.cl-report td button {
  background: none;
  border: 0;
  color: #9D7433;
  font-weight: 700;
  min-height: 32px;
  padding: 0 0.2rem;
}

@media (min-width: 640px) {
  .cl-btn { width: auto; }
  .cl-submit-bar .cl-btn { width: 100%; }
}

/* Response viewer: one filled checklist per slide, swipe sideways */
.cl-view-track {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
  background: #fafaf9;
}
.cl-view-slide {
  flex: 0 0 100%;
  min-width: 0;
  overflow-y: auto;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  padding: 0.85rem;
}
.cl-view-inner { max-width: 36rem; margin: 0 auto; }
.cl-viewer .cl-btn:disabled, .cl-viewer .cl-option input:disabled { opacity: 1; }
.cl-fill .cl-photo-preview[data-storage] { cursor: zoom-in; }
.cl-viewer .cl-photo-preview {
  max-height: 55vh;
  object-fit: contain;
  background: #f5f5f4;
  cursor: zoom-in;
}
.cl-comment {
  border-left: 3px solid #d6c3a0;
  background: #FBF8F1;
  border-radius: 0.35rem;
  padding: 0.35rem 0.55rem;
}
.cl-status {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 0.35rem;
  padding: 0.1rem 0.4rem;
  background: #f5f5f4;
  color: #57534e;
}
.cl-status.done { background: #ecfdf5; color: #047857; }
.cl-status.missed { background: #fff1f2; color: #be123c; }
.cl-status.open, .cl-status.not_open { background: #fffbeb; color: #b45309; }

/* Person timeline on the report */
.cl-tl-day { margin-top: 0.9rem; padding-left: 0.9rem; border-left: 2px solid #e7e5e4; }
.cl-tl-date {
  position: relative;
  font-size: 0.7rem;
  font-weight: 700;
  color: #44403c;
  margin-bottom: 0.4rem;
}
.cl-tl-date::before {
  content: '';
  position: absolute;
  left: calc(-0.9rem - 6px);
  top: 0.2rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9D7433;
}
.cl-tl-item {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 0.75rem;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
}
.cl-tl-item:hover { border-color: #d6c3a0; }
.cl-tl-item.missed { border-left: 3px solid #fda4af; }
.cl-tl-task { display: flex; align-items: center; gap: 0.4rem; font-size: 0.72rem; color: #57534e; min-width: 0; }
.cl-tl-thumb {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: 0.4rem;
  background: #f5f5f4;
  cursor: zoom-in;
}
