/* Therapia brand — Teal #0AADB5, warm off-white #FFFBF5, claymorphism */
:root {
  --teal: #0AADB5;
  --teal-d: #08949b;
  --bg: #FFFBF5;
  --ink: #2b2b2b;
  --muted: #8a857c;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 8px 24px rgba(10, 173, 181, 0.10), 0 2px 6px rgba(0,0,0,0.05);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
.wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 18px; }
.topbar { background: var(--teal); color: #fff; }
.bar { display: flex; align-items: baseline; gap: 12px; padding: 14px 18px; }
.logo { font-weight: 800; font-size: 1.25rem; letter-spacing: .5px; }
.tag { opacity: .9; font-size: .9rem; }
main.wrap { padding-top: 22px; padding-bottom: 22px; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 18px;
}
.card.narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
h1 { font-size: 1.5rem; margin: 0 0 10px; }
h3 { margin: 22px 0 8px; font-size: 1.05rem; }
.intro { color: var(--muted); }
.muted { color: var(--muted); }

.form { display: flex; flex-direction: column; gap: 14px; margin-top: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--muted); }
input[type=text], input[type=tel], input[type=password], textarea {
  width: 100%; padding: 11px 13px; border: 1px solid #e7e1d7; border-radius: 12px;
  font: inherit; background: #fffdf9;
}
input:focus, textarea:focus { outline: 2px solid var(--teal); border-color: var(--teal); }

.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; text-align: center;
  background: var(--teal); color: #fff; font-weight: 700;
  padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow);
}
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: #fff; color: var(--teal); border: 1.5px solid var(--teal); box-shadow: none; }
.btn.wa { background: #25D366; }
.btn.danger { background: #d9534f; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }

.errors { background: #fdecea; color: #9c2b25; border-radius: 12px; padding: 10px 14px; margin: 12px 0; }

/* Recorded video (patient + admin views) */
.recording { width: 100%; max-width: 480px; border-radius: 14px; box-shadow: var(--shadow); display: block; background: #000; }

/* Guided recorder widget (/apply) */
.record-block { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-weight: 600; }
.small { font-size: .85rem; }
.recorder { display: flex; flex-direction: column; gap: 12px; }
.recorder-stage {
  position: relative; width: 100%; max-width: 480px; aspect-ratio: 3 / 4;
  background: #000; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow);
}
.rec-video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }
.rec-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: space-between; padding: 18px;
  pointer-events: none; text-align: center;
  background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,0) 35%, rgba(0,0,0,.45) 100%);
}
.rec-step { color: #fff; font-weight: 800; font-size: 1.25rem; text-shadow: 0 1px 4px rgba(0,0,0,.6); }
.rec-count {
  align-self: center; color: #fff; font-weight: 800; font-size: 2.6rem;
  width: 64px; height: 64px; line-height: 64px; border-radius: 50%;
  background: rgba(10,173,181,.85); box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.rec-dots { display: flex; gap: 8px; flex-wrap: wrap; }
.rec-dots .dot { width: 10px; height: 10px; border-radius: 50%; background: #e0dacd; }
.rec-dots .dot.on { background: var(--teal); }
.recorder-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.record-fallback input[type=file] {
  width: 100%; padding: 11px 13px; border: 1px solid #e7e1d7; border-radius: 12px;
  font: inherit; background: #fffdf9;
}
.fallback-steps { margin: 6px 0; padding-left: 20px; color: var(--muted); }
.fallback-steps li { margin: 2px 0; }

.msg { border-radius: 14px; padding: 10px 14px; margin: 8px 0; background: #f4f1ea; }
.msg.doctor { background: #e6f7f8; }
.msg .who { font-size: .8rem; font-weight: 700; color: var(--teal); }
.msg p { margin: 4px 0 0; }

.tbl { width: 100%; border-collapse: collapse; margin-top: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #eee6da; font-size: .92rem; }
.pill { padding: 2px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: #eee; }
.pill.new { background: #fff2cc; color: #8a6d00; }
.pill.replied { background: #d6f5e3; color: #1a7a47; }
.pill.closed { background: #e3e3e3; color: #555; }

.copybox { width: 100%; border-radius: 12px; border: 1px solid #e7e1d7; padding: 10px; font: inherit; background: #fffdf9; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }

.foot { padding: 18px; }
.disclaimer { color: var(--muted); font-size: .82rem; border-top: 1px solid #eee6da; padding-top: 14px; }
