/* mod-casetime.css — Module H: checklists + contractor time tracking.
   Follows the core theme variables in styles.css; no new palette. */

/* ---------------- timer widget ---------------- */
.ct-timer {
  border: 2px solid var(--teal);
  background: var(--surface);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}
.ct-timer.running {
  border-color: var(--amber);
  background: var(--soft-amber, #fff8e6);
}
.ct-elapsed {
  font-size: 2.2rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.03em;
  margin: 0.2rem 0 0.8rem;
}
.ct-timer .row { margin-bottom: 0.6rem; }
.ct-timer label { display: block; margin-bottom: 0.5rem; }
.ct-timer input, .ct-timer select, .ct-timer textarea {
  width: 100%;
  margin-top: 0.25rem;
}
.ct-timer textarea { min-height: 56px; }

/* ---------------- checklist items ---------------- */
.ct-check-item {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  padding: 0.7rem;
  border: 1px solid var(--border, #ddd);
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: var(--surface);
}
.ct-check-item .ct-check {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  margin-top: 0.1rem;
  accent-color: var(--teal);
}
.ct-check-item .ct-body { flex: 1 1 auto; min-width: 0; }
.ct-check-item .ct-label { font-weight: 600; }
.ct-check-item.done .ct-label {
  text-decoration: line-through;
  color: var(--muted);
}
.ct-check-item .ct-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.25rem;
}
.ct-check-item.overdue {
  border-color: var(--red);
  background: var(--soft-red);
}
.ct-due {
  margin-top: 0.4rem;
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
}
.ct-due input[type="date"] { max-width: 170px; }
.ct-overdue-flag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
  margin-left: 0.5rem;
  text-transform: uppercase;
}

/* ---------------- template manager ---------------- */
.ct-tpl-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.4rem;
}
.ct-tpl-row input[type="text"] { flex: 1 1 auto; }

/* ---------------- time tables ---------------- */
.ct-entry-row td { vertical-align: top; }
.ct-entry-row .desc { font-size: 0.85rem; color: var(--muted); }
.ct-total-row td { font-weight: 700; }

/* compact week picker row */
.ct-weekrow { display: flex; gap: 0.5rem; align-items: end; flex-wrap: wrap; margin-bottom: 0.8rem; }
.ct-weekrow label { display: block; }

/* make sure date inputs don't overflow on small screens */
.ct-checklist select, .ct-checklist input[type="date"] { max-width: 100%; }
