:root {
  --pt-green: #1f6f5c;
  --pt-green-soft: #e3f1ec;
  --pt-amber: #f0b429;
  --pt-red: #c0392b;
  --pt-grey: #e9ecef;
  --bs-body-bg: #f6f8f7;
}

body { background: var(--bs-body-bg); }
.app-container { max-width: 1100px; }
.brand-icon { color: var(--pt-green); width: 22px; height: 22px; }
[data-lucide] { width: 18px; height: 18px; vertical-align: -3px; }
.card { border: 0; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.section-title { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: #6c757d; font-weight: 600; }

/* ---------- Patient screens: big, one thing at a time ---------- */
.patient-screen { font-size: 1.2rem; }
.patient-main { max-width: 560px; margin: 0 auto; padding: 16px 16px 140px; }
.patient-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: flex; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid #dee2e6;
}
.patient-bar .btn { font-size: 1.1rem; padding: .8rem .5rem; }
.patient-bar [data-lucide] { width: 22px; height: 22px; }

.step-label { color: #6c757d; font-size: 1rem; }
.progress-thin { height: 8px; }
.progress-thin .progress-bar { background: var(--pt-green); }

.ex-card { padding: 24px 20px; }
.ex-name { font-size: 2rem; font-weight: 700; line-height: 1.15; }
.ex-target { font-size: 1.4rem; color: var(--pt-green); font-weight: 600; }
.ex-instructions { white-space: pre-line; font-size: 1.15rem; }

.btn-huge {
  display: block; width: 100%; font-size: 1.6rem; font-weight: 700;
  padding: 1.1rem 1rem; border-radius: 16px;
}
.btn-done { background: var(--pt-green); border-color: var(--pt-green); color: #fff; }
.btn-done:hover, .btn-done:focus { background: #185a4a; color: #fff; }

.stepper { display: flex; align-items: center; gap: 12px; }
.stepper button { width: 64px; height: 64px; font-size: 2rem; border-radius: 50%; line-height: 1; }
.stepper output { min-width: 3.5ch; text-align: center; font-size: 2rem; font-weight: 700; }

.faces { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.face input { position: absolute; opacity: 0; pointer-events: none; }
.face label {
  display: block; text-align: center; padding: 14px 4px; border-radius: 16px;
  border: 3px solid var(--pt-grey); background: #fff; cursor: pointer;
}
.face .emoji { font-size: 3.2rem; line-height: 1.1; display: block; }
.face .lbl { font-size: 1rem; }
.face input:checked + label { border-color: var(--pt-green); background: var(--pt-green-soft); }
.face input:focus-visible + label { outline: 3px solid #86b7fe; }

.chip-check input { position: absolute; opacity: 0; pointer-events: none; }
.chip-check label {
  display: block; padding: 14px 16px; border-radius: 12px; border: 2px solid var(--pt-grey);
  background: #fff; cursor: pointer; font-size: 1.15rem;
}
.chip-check input:checked + label { border-color: var(--pt-red); background: #fdecea; font-weight: 600; }

/* ---------- Dashboard ---------- */
.stat { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-label { color: #6c757d; font-size: .85rem; }

.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 360px; }
.cal-head { font-size: .7rem; color: #6c757d; text-align: center; }
.cal-day {
  aspect-ratio: 1; border-radius: 6px; font-size: .75rem;
  display: flex; align-items: center; justify-content: center; color: #495057;
}
.cal-done    { background: var(--pt-green); color: #fff; }
.cal-partial { background: var(--pt-amber); color: #000; }
.cal-missed  { background: #f5c6cb; }
.cal-today   { outline: 2px solid var(--pt-green); }
.cal-future, .cal-before { background: transparent; color: #ced4da; }
.cal-legend span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; }

.alert-open { border-left: 4px solid var(--pt-red); }
.chart-box { position: relative; height: 220px; }
.small-muted { font-size: .85rem; color: #6c757d; }
.table-sm td, .table-sm th { vertical-align: middle; }
