/* ──────────────────────────────────────────────
 * Daily Checklists styles. Layered on:
 *   • styles.css (global tokens: --gold, --border, --fg-*, --radius-*, shadows)
 *   • analytics.css (.summary-bar, .stat-pill, .report-section)
 * Adds: segmented checklist tabs, sectioned item rows with operator attribution,
 * a locked banner, winter chips, and the floating Confirm Complete bar.
 * ────────────────────────────────────────────── */

#checklists-root { padding-bottom: 96px; } /* room for the floating bar */

.cl-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted, #575760);
  margin: 0 0 16px;
}
.cl-date:empty { display: none; }

.cl-loading,
.cl-empty {
  padding: 40px 0;
  text-align: center;
  color: var(--fg-muted, #575760);
  font-size: 14px;
}

/* ─── Tabs ──────────────────────────────────────────────────────────────── */
.cl-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.cl-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--border, rgba(0,0,0,0.10));
  background: var(--bg, #fff);
  border-radius: var(--radius-full, 9999px);
  font-family: var(--font-body, 'Montserrat', sans-serif);
  font-weight: 600;
  font-size: 13px;
  color: var(--fg-strong, #0A0A0A);
  cursor: pointer;
  transition: all 0.15s ease-out;
  white-space: nowrap;
}
.cl-tab:hover { border-color: var(--gold, #B79B58); }
.cl-tab.active {
  background: var(--gold, #B79B58);
  border-color: var(--gold, #B79B58);
  color: #fff;
  box-shadow: var(--shadow-card, 0 4px 24px rgba(0,0,0,0.06));
}
.cl-tab-count {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: var(--radius-full, 9999px);
  background: var(--bg-subtle, #F4F4F2);
  color: var(--fg-muted, #575760);
}
.cl-tab.active .cl-tab-count { background: rgba(255,255,255,0.25); color: #fff; }
.cl-tab.complete .cl-tab-count { background: #2e7d52; color: #fff; }
.cl-tab.locked .cl-tab-count::after { content: ' 🔒'; }

/* ─── Panel ─────────────────────────────────────────────────────────────── */
.cl-panel {
  background: var(--bg, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: var(--radius-lg, 16px);
  box-shadow: var(--shadow-card, 0 4px 24px rgba(0,0,0,0.06));
  overflow: hidden;
}
.cl-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 14px;
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
}
.cl-panel-title {
  font-family: var(--font-display, 'Woodford Bourne PRO', Georgia, serif);
  font-size: 22px;
  color: var(--fg-strong, #0A0A0A);
  margin: 0;
}
.cl-panel-progress {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted, #575760);
  font-variant-numeric: tabular-nums;
}

.cl-locked-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--bg-subtle, #F4F4F2);
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.06));
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-muted, #575760);
}

/* ─── Sections + items ──────────────────────────────────────────────────── */
.cl-section { border-bottom: 1px solid var(--border, rgba(0,0,0,0.05)); }
.cl-section:last-child { border-bottom: none; }
.cl-section-head {
  padding: 14px 22px 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--gold-dark, #9A8145);
}

.cl-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 22px;
  cursor: pointer;
  transition: background 0.12s ease-out;
  -webkit-tap-highlight-color: transparent;
}
.cl-item:hover { background: var(--bg-soft, #FAF9F7); }
.cl-item.locked { cursor: default; }
.cl-item.locked:hover { background: transparent; }

.cl-check {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  margin-top: 1px;
  border: 2px solid var(--border-strong, rgba(0,0,0,0.22));
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #fff);
  transition: all 0.12s ease-out;
}
.cl-check svg { width: 15px; height: 15px; opacity: 0; transition: opacity 0.12s; }
.cl-item.checked .cl-check {
  background: var(--gold, #B79B58);
  border-color: var(--gold, #B79B58);
}
.cl-item.checked .cl-check svg { opacity: 1; stroke: #fff; }

.cl-item-body { flex: 1 1 auto; min-width: 0; }
.cl-item-label {
  font-size: 14.5px;
  line-height: 1.45;
  color: var(--fg-strong, #0A0A0A);
  word-break: break-word;
}
.cl-item.checked .cl-item-label { color: var(--fg-muted, #575760); }
.cl-item-meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--fg-faint, #888);
  font-variant-numeric: tabular-nums;
}
.cl-item-meta .who { color: #2e7d52; font-weight: 600; }

.cl-winter {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #2f6fb0;
  background: rgba(47,111,176,0.10);
  border-radius: var(--radius-full, 9999px);
  vertical-align: middle;
}

/* ─── Floating bar ──────────────────────────────────────────────────────── */
.cl-actionbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 40;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border, rgba(0,0,0,0.10));
  box-shadow: 0 -6px 28px rgba(0,0,0,0.08);
}
.cl-actionbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.cl-actionbar-progress {
  font-size: 14px;
  font-weight: 600;
  color: var(--fg-strong, #0A0A0A);
  font-variant-numeric: tabular-nums;
}
.cl-actionbar-progress .muted { color: var(--fg-muted, #575760); font-weight: 500; }
#cl-confirm-btn[disabled] { opacity: 0.5; cursor: default; }

/* Outstanding-items list inside the confirm modal */
.cl-outstanding {
  margin: 8px 0 0;
  padding: 12px 14px;
  max-height: 240px;
  overflow-y: auto;
  text-align: left;
  background: var(--bg-subtle, #F4F4F2);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
}
.cl-outstanding li { margin-left: 18px; }
