/* Login, forgot-password and new-password pages.
   The dashboard's green header band greets the desk with the clinic's own
   time; the card overlaps its lower edge. Milk white + green, nothing else. */
:root {
  --page: #f8f7f2; --surface: #fff; --line: #e7e5dc; --line-strong: #cfccbf;
  --ink: #17231d; --ink-2: #47524c; --ink-3: #5f6a63;
  --band: #14845f; --band-deep: #127a5c; --band-ink: #ffffff; --band-ink-2: #ffffff;
  --green: #0a7a5a; --green-press: #086448; --green-soft: #e2f3eb; --green-ink: #075c43;
  --stop: #b91c1c; --stop-soft: #fdecec;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --shadow-float: 0 24px 48px -16px rgba(11, 45, 34, .28), 0 4px 10px rgba(15, 23, 42, .06);
  --gutter: clamp(20px, 7vw, 120px);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { background: var(--page); }
body {
  min-height: 100dvh; background: var(--page); color: var(--ink);
  font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased;
  caret-color: var(--green);
}
::selection { background: #cfeadd; color: var(--ink); }
[hidden] { display: none !important; }

/* ---------- Green band ---------- */
.band {
  background: var(--band); color: var(--band-ink);
  padding: 28px var(--gutter) 88px;
}
.band-in { position: relative; max-width: 1440px; margin: 0 auto; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 17px; line-height: 1.15; }
.brand small { display: block; font-weight: 400; font-size: 13px; color: var(--band-ink-2); }
.mark {
  width: 40px; height: 40px; flex: none; border-radius: 10px; background: #fff; color: var(--band-deep);
  display: grid; place-items: center;
}
.mark svg { width: 22px; height: 22px; }

.clock { margin: 32px 0 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 20px; row-gap: 4px; }
.clock-time {
  font-size: clamp(44px, 5vw, 64px); font-weight: 600; line-height: 1; letter-spacing: -.025em;
  font-variant-numeric: tabular-nums;
}
.clock-time.tick { animation: tick .5s var(--ease); }
@keyframes tick { from { opacity: .35; filter: blur(2px); } }
.clock-date { font-size: clamp(19px, 2vw, 24px); color: var(--band-ink); }
.clock-zone { width: 100%; font-size: 14px; color: var(--band-ink-2); }

/* Riya's voice: a soft wave on the band's empty right side. */
.voice {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  width: min(46%, 560px); height: 132px; display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.voice i {
  width: 3px; height: 100%; border-radius: 3px; background: rgba(255, 255, 255, .34);
  transform: scaleY(.12); animation: voice 2.4s ease-in-out infinite;
}
.voice i:nth-child(3n) { animation-duration: 1.9s; background: rgba(255, 255, 255, .5); }
.voice i:nth-child(4n+1) { animation-duration: 2.9s; }
.voice i:nth-child(5n+2) { animation-duration: 1.6s; }
.voice i:nth-child(7n) { background: rgba(255, 255, 255, .62); }
.voice i:nth-child(2n) { animation-delay: -.6s; } .voice i:nth-child(3n+1) { animation-delay: -1.3s; }
.voice i:nth-child(5n) { animation-delay: -.2s; } .voice i:nth-child(6n+4) { animation-delay: -1.8s; }
/* the wave swells in the middle and fades at both ends */
.voice i:nth-child(-n+6), .voice i:nth-last-child(-n+6) { opacity: .45; }
.voice i:nth-child(-n+3), .voice i:nth-last-child(-n+3) { opacity: .25; }
@keyframes voice { 0%, 100% { transform: scaleY(.12); } 30% { transform: scaleY(.7); } 55% { transform: scaleY(.3); } 75% { transform: scaleY(1); } }

/* ---------- Card over the band ---------- */
.stage {
  max-width: 1440px; margin: -60px auto 0; padding: 0 var(--gutter) 64px;
  display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 80px; align-items: start;
  box-sizing: content-box;
}
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 36px;
  box-shadow: var(--shadow-float);
  animation: rise .6s var(--ease) both;
}
@keyframes rise { from { transform: translateY(10px); box-shadow: 0 4px 10px -6px rgba(11, 45, 34, .2); } }
h1 { margin: 0; font-size: 26px; line-height: 1.2; font-weight: 600; letter-spacing: -.015em; }
.sub { margin: 6px 0 24px; color: var(--ink-2); font-size: 15px; }

form { display: grid; gap: 18px; }
label { display: grid; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink-2); }
input {
  width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px;
  font: inherit; color: var(--ink); background: #fff;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
input:hover { border-color: #b9b6a8; }
input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(10, 122, 90, .2); }
input[aria-invalid="true"] { border-color: var(--stop); }
input[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(185, 28, 28, .16); }

.pw { position: relative; }
.pw input { padding-right: 72px; }
.reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  height: 36px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent;
  color: var(--green-ink); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.reveal:hover { background: var(--green-soft); }

.primary {
  height: 48px; margin-top: 6px; border: 0; border-radius: 10px; background: var(--green); color: #fff;
  font: inherit; font-weight: 600; cursor: pointer;
  box-shadow: 0 2px 4px -1px rgba(8, 100, 72, .3);
  transition: background-color .15s var(--ease), transform .15s var(--ease);
}
.primary:hover { background: var(--green-press); }
.primary:active { transform: scale(.985); }
.primary:disabled { opacity: .7; cursor: progress; }

.link {
  justify-self: start; margin-top: 18px; padding: 4px 0; border: 0; background: none; color: var(--green-ink);
  font: inherit; font-size: 15px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px;
}
.link:hover { text-decoration-thickness: 2px; }
:is(.primary, .link, .reveal):focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }

.msg { margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; font-size: 15px; background: var(--green-soft); color: var(--green-ink); }
.msg.error { background: var(--stop-soft); color: var(--stop); }

/* ---------- Note beside the card ---------- */
.note { justify-self: center; width: 100%; max-width: 580px; color: var(--ink-2); }
.note p { margin: 0 0 14px; font-size: 16px; }
.note .line { display: flex; gap: 12px; align-items: flex-start; }
.note svg { width: 20px; height: 20px; flex: none; margin-top: 2px; fill: none; stroke: var(--green); stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- What Riya does: a small drawn scene beside the card ---------- */
.scene { margin: 0 0 32px; }
.note > .line { margin-left: 0; }
.scene-stack {
  position: relative; display: grid; gap: 16px;
}
.scene-stack::before { /* the thread from the call to the booking */
  content: ""; position: absolute; left: 39px; top: 60px; bottom: 70px; width: 0;
  border-left: 1.5px dashed #b9d9c9;
}
.s-call, .s-toast, .s-row {
  position: relative; display: flex; align-items: center; gap: 12px; min-width: 0;
  border-radius: 14px; padding: 14px 16px;
}
.s-call { background: #fff; border: 1px solid var(--line); }
.s-toast {
  background: #fff; border: 1px solid var(--line); overflow: hidden;
  box-shadow: 0 12px 28px -10px rgba(11, 45, 34, .28), 0 2px 6px rgba(15, 23, 42, .05);
  margin-left: 36px; animation: pop 9s var(--ease) infinite;
}
.s-row { border: 1px solid var(--line); background: #fff; animation: fresh 9s var(--ease) infinite; }
.s-ico { width: 46px; height: 46px; flex: none; border-radius: 10px; display: grid; place-items: center; }
.s-ico svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.s-ico.call { background: var(--band); color: #fff; }
.s-ico.booked { background: var(--green-soft); color: var(--green-ink); }
.s-txt { flex: 1; min-width: 0; display: grid; gap: 4px; line-height: 1.25; }
.s-txt b { font-size: 16px; font-weight: 600; color: var(--ink); }
.s-txt > span:not(.sk) { font-size: 14px; color: var(--ink-3); }
.s-view { font-size: 14px; font-weight: 600; color: var(--green-ink); padding: 6px 10px; border-radius: 8px; background: var(--green-soft); }
.s-timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--green); transform-origin: left; animation: drain 9s linear infinite; }

.wave { display: flex; align-items: center; gap: 4px; height: 30px; }
.wave i { width: 4px !important; }
.wave i { width: 3px; height: 100%; border-radius: 2px; background: var(--band); transform: scaleY(.3); animation: talk 1.1s ease-in-out infinite; }
.wave i:nth-child(2) { animation-delay: -.9s; } .wave i:nth-child(3) { animation-delay: -.3s; }
.wave i:nth-child(4) { animation-delay: -.7s; } .wave i:nth-child(5) { animation-delay: -.1s; }
.wave i:nth-child(6) { animation-delay: -.5s; } .wave i:nth-child(7) { animation-delay: -.8s; }

.sk { display: block; height: 8px; border-radius: 4px; background: var(--sunk, #ebe9e1); }
.sk.dark { background: #d6dbd7; height: 10px; }
.sk.tall { height: 12px; }
.w40 { width: 44px; flex: none; } .w45 { width: 45%; } .w60 { width: 60%; } .w70 { width: 70%; }
.s-who { flex: 1; min-width: 0; display: grid; gap: 6px; }
.chip { flex: none; font-size: 13px; font-weight: 500; padding: 5px 11px; border-radius: 999px; white-space: nowrap; }
.chip.src { color: var(--green-ink); background: var(--green-soft); }
.chip.exp { display: inline-flex; align-items: center; gap: 6px; color: #334155; background: #f1f3f6; }
.chip.exp i { width: 7px; height: 7px; border-radius: 50%; background: #475569; }

.scene figcaption { margin-top: 18px; font-size: 16px; color: var(--ink-2); }

@keyframes talk { 0%, 100% { transform: scaleY(.3); } 50% { transform: scaleY(1); } }
/* One loop: the pop-up arrives, the booking row lights up, then both settle. */
@keyframes pop {
  0%, 6% { transform: translateY(-6px) scale(.97); box-shadow: 0 2px 6px -4px rgba(11, 45, 34, .2); }
  14%, 100% { transform: none; }
}
@keyframes drain { 0%, 8% { transform: scaleX(1); } 70%, 100% { transform: scaleX(0); } }
@keyframes fresh {
  0%, 12% { background: #fff; border-color: var(--line); }
  20%, 55% { background: #eef8f2; border-color: #b9d9c9; }
  75%, 100% { background: #fff; border-color: var(--line); }
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1080px) { .voice { display: none; } }
@media (max-width: 860px) {
  .scene { display: none; }
  .band { padding-bottom: 84px; }
  .clock { margin-top: 24px; }
  .stage { grid-template-columns: minmax(0, 1fr); gap: 28px; margin-top: -56px; }
  .note { justify-self: start; max-width: 44ch; }
}
@media (max-width: 480px) {
  .band { padding-top: 22px; }
  .card { padding: 26px 22px; border-radius: 14px; }
  .clock-zone { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .clock-time.tick, .s-toast, .s-row, .s-timer, .wave i, .voice i { animation: none; }
  .voice i { transform: scaleY(.4); }
  .wave i { transform: scaleY(.6); }
  * { transition: none !important; }
}
