/* ================= An Rehab Station: professional app look =================
   Loaded after styles.css. Brand colours live in :root of styles.css. */
body { letter-spacing: -0.005em; }
h1, h2, h3 { letter-spacing: -0.015em; color: var(--text); }
h1 { font-weight: 700; }
.card, .stat, .table-wrap, .target { border-color: transparent; box-shadow: var(--shadow); }
.card, .stat { border-radius: 16px; }
.stat .v { color: var(--primary-dark); }
button, .btn { border-radius: 12px; font-weight: 500; transition: transform .06s ease, background .15s ease; }
button:active, .btn:active { transform: scale(.98); }
button.primary, .btn.primary { box-shadow: 0 4px 12px rgba(15, 118, 110, .25); }
input, textarea, select { border-radius: 12px; background: #fbfdfc; }
.badge.blue { background: var(--primary-soft); color: var(--primary-dark); }

/* App bar with logo (signed-in views) */
.appbar {
  position: sticky; top: 0; z-index: 11;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 16px; padding-top: calc(8px + env(safe-area-inset-top));
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.appbar img { height: 34px; width: auto; }
.appbar .brand { font-weight: 700; color: var(--primary-dark); font-size: 1.02rem; }
.appbar .who { margin-left: auto; font-size: .82rem; color: var(--muted); }
.nav { box-shadow: 0 -4px 20px rgba(16, 48, 45, .06); }
.nav a.active { color: var(--primary); }

/* Login */
.auth { border-radius: 20px; padding: 26px 22px; }
.auth-logo { display: block; margin: 0 auto 8px; max-width: 160px; max-height: 110px; }

/* ---------- Public booking page ---------- */
body.booking { padding: 0 0 24px; background: var(--bg); }
.hero {
  background: linear-gradient(160deg, var(--primary-dark), var(--primary) 60%, #14a294);
  color: #fff; padding: 28px 16px 54px; text-align: center;
  border-radius: 0 0 28px 28px;
}
.hero-inner { max-width: 640px; margin: 0 auto; }
.hero-logo { max-width: 140px; max-height: 110px; background: #fff; border-radius: 20px; padding: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); margin-bottom: 10px; }
.hero h1 { color: #fff; font-size: 1.6rem; margin: 6px 0; }
.hero-intro { opacity: .92; margin: 0 auto 10px; max-width: 520px; }
.hero-contact { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; font-size: .92rem; }
.hero-contact a { color: #fff; font-weight: 600; }
.book-main { max-width: 640px; margin: -34px auto 0; padding: 0 16px; }
.book-footer { padding: 18px 0 8px; font-size: .8rem; }
.steps { list-style: none; padding: 12px; margin: 0 0 14px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); }
.steps li { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: .76rem; color: var(--muted); }
.steps li span { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #eef2f1; font-weight: 700; color: var(--muted); }
.steps li.active { color: var(--primary-dark); font-weight: 600; }
.steps li.active span { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px var(--primary-soft); }
.steps li.done span { background: var(--primary-soft); color: var(--primary-dark); }
.pick-summary { background: var(--accent-soft); color: #6b4f24; border-radius: 12px; padding: 10px 12px; font-size: .9rem; margin-bottom: 4px; }
.svc-list { display: grid; gap: 10px; }
.svc { display: grid; gap: 4px; text-align: left; justify-items: start; justify-content: stretch; align-content: start; width: 100%; padding: 16px; background: #fff; border: 2px solid transparent; box-shadow: var(--shadow); border-radius: 16px; min-height: 0; }
.svc:hover { border-color: var(--primary-soft); }
.svc-name { font-weight: 700; font-size: 1.05rem; color: var(--text); }
.svc-meta { color: var(--primary-dark); font-size: .9rem; }
.svc-desc { color: var(--muted); font-size: .88rem; }
.date-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.date-chip { flex: 0 0 72px; display: flex; flex-direction: column; gap: 2px; padding: 10px 4px; border-radius: 16px; background: #fff; border: 2px solid transparent; box-shadow: var(--shadow); scroll-snap-align: start; min-height: 0; }
.date-chip .dc-dow { font-size: .74rem; color: var(--muted); }
.date-chip .dc-day { font-size: 1.35rem; font-weight: 700; }
.date-chip .dc-mon { font-size: .72rem; color: var(--muted); }
.date-chip:disabled { opacity: .35; box-shadow: none; background: transparent; }
.date-chip[aria-pressed="true"] { border-color: var(--primary); }
.slot-group { margin: 14px 0 6px; font-size: .9rem; color: var(--muted); font-weight: 600; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot { background: #fff; box-shadow: var(--shadow); border: 2px solid transparent; font-weight: 600; color: var(--primary-dark); }
.slot:hover { border-color: var(--primary); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip { min-height: 34px; padding: 5px 12px; border-radius: 999px; font-size: .86rem; background: #fff; }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
button.big { min-height: 52px; font-size: 1.05rem; }
button.link { background: none; border: 0; color: var(--primary-dark); padding: 0; min-height: 0; font-weight: 600; box-shadow: none; }
.back { margin-top: 16px; }
.small { font-size: .8rem; }
.done-card { padding: 28px 18px; margin-top: 10px; }
.done-icon { width: 64px; height: 64px; margin: 0 auto 6px; border-radius: 50%; display: grid; place-items: center; font-size: 2rem; color: #fff; background: var(--primary); box-shadow: 0 0 0 8px var(--primary-soft); }
.center-row { justify-content: center; }

/* ---------- Therapy (owner) ---------- */
.booking-card { border-left: 4px solid var(--accent); }
.booking-card.pending { border-left-color: #d97706; }
.booking-card.confirmed { border-left-color: var(--primary); }
.lesson-card.therapy { border-left: 4px solid var(--accent); }
.pain-scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 3px; }
.pain-scale button { min-height: 36px; padding: 0; font-size: .85rem; }
.pain-scale button[aria-pressed="true"] { color: #fff; border-color: transparent; }
.pain-scale button[aria-pressed="true"][data-level="low"] { background: var(--green); }
.pain-scale button[aria-pressed="true"][data-level="mid"] { background: #d97706; }
.pain-scale button[aria-pressed="true"][data-level="high"] { background: var(--red); }
.visit { border-left: 3px solid var(--primary-soft); padding-left: 10px; margin: 10px 0; }
.share-link { display: flex; gap: 6px; }
.share-link input { font-size: .85rem; }

@media (min-width: 900px) {
  .appbar { position: fixed; left: 0; right: 0; top: 0; }
  body:not(.booking) { padding-top: 110px; }
  .nav { top: 51px; }
}
