/* Patient portal — Shruti Dental. Deliberately lighter/warmer than the staff
   app: patients see this on a phone, in a waiting room, often in a hurry. */

:root{
  --ink:#152029; --body:#3d4c57; --muted:#6b7c88;
  --line:#e3e9ee; --bg:#f6f9fb; --card:#fff;
  --brand:#0f7b6c; --brand-d:#0b6357; --brand-t:#e7f5f2;
  --warn:#b4530a; --bad:#b3261e; --ok:#0f7b6c;
  --r:14px; --sh:0 1px 2px rgba(16,32,45,.06),0 6px 20px rgba(16,32,45,.06);
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font:16px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  color:var(--body); background:var(--bg);
  -webkit-text-size-adjust:100%;
  padding-bottom:env(safe-area-inset-bottom);
}
h1,h2,h3{color:var(--ink); margin:0 0 .4em; line-height:1.25; letter-spacing:-.01em}
h1{font-size:1.6rem} h2{font-size:1.22rem} h3{font-size:1.02rem}
p{margin:0 0 .9em}
a{color:var(--brand); text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%}

/* ---------- shell ---------- */
.phead{
  position:sticky; top:0; z-index:20; background:var(--card);
  border-bottom:1px solid var(--line);
  padding:calc(env(safe-area-inset-top) + 10px) 16px 10px;
  display:flex; align-items:center; gap:11px;
}
.phead .logo{
  width:38px;height:38px;flex:0 0 38px;border-radius:11px;
  background:var(--brand-t); display:grid;place-items:center;font-size:20px;
}
.phead .bn{font-weight:700;color:var(--ink);font-size:1.03rem;line-height:1.15}
.phead .bt{font-size:.74rem;color:var(--muted)}
.phead .sp{margin-left:auto}
.phead .who{
  font-size:.76rem;background:var(--brand-t);color:var(--brand-d);
  padding:5px 10px;border-radius:999px;font-weight:600;white-space:nowrap;
}
.wrap{max-width:760px; margin:0 auto; padding:20px 16px 40px}
.wrap.nar{max-width:560px}

/* ---------- nav ---------- */
.pn{
  display:flex; gap:4px; overflow-x:auto; padding:8px 12px;
  background:var(--card); border-bottom:1px solid var(--line);
  -webkit-overflow-scrolling:touch; scrollbar-width:none;
}
.pn::-webkit-scrollbar{display:none}
.pn a{
  flex:0 0 auto; padding:9px 14px; border-radius:999px; font-size:.9rem;
  color:var(--body); font-weight:500; white-space:nowrap; min-height:40px;
  display:inline-flex; align-items:center;
}
.pn a.on{background:var(--brand);color:#fff}
.pn a:hover{background:var(--brand-t);text-decoration:none}
.pn a.on:hover{background:var(--brand-d)}

/* ---------- cards ---------- */
.card{
  background:var(--card); border:1px solid var(--line); border-radius:var(--r);
  padding:18px; margin:0 0 14px; box-shadow:var(--sh);
}
.card.tight{padding:14px}
.card h2{margin-bottom:.55em}
.hero{
  background:linear-gradient(160deg,#0f7b6c,#0b6357); color:#eafffb;
  border:none; border-radius:var(--r); padding:26px 20px; margin-bottom:16px;
}
.hero h1{color:#fff; font-size:1.5rem; margin-bottom:.35em}
.hero p{color:#c9ece6; margin-bottom:1.1em}
.hero .cta{display:flex;flex-wrap:wrap;gap:10px}
.muted{color:var(--muted)}
.small{font-size:.86rem}
.tiny{font-size:.78rem}

/* ---------- buttons ---------- */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:12px 18px; border-radius:11px; border:1px solid transparent;
  background:var(--brand); color:#fff; font-weight:600; font-size:.95rem;
  cursor:pointer; min-height:46px; text-align:center; font-family:inherit;
}
.btn:hover{background:var(--brand-d); text-decoration:none}
.btn.ghost{background:#fff;color:var(--brand-d);border-color:var(--line)}
.btn.ghost:hover{background:var(--brand-t)}
.btn.wide{width:100%}
.btn.sm{padding:9px 14px;min-height:40px;font-size:.88rem}
.btn[disabled]{opacity:.55;cursor:not-allowed}

/* ---------- forms ---------- */
label{display:block;font-weight:600;color:var(--ink);font-size:.88rem;margin:0 0 5px}
input,select,textarea{
  width:100%; padding:12px 13px; font-size:16px; font-family:inherit;
  color:var(--ink); background:#fff;
  border:1px solid var(--line); border-radius:10px; min-height:46px;
}
textarea{min-height:88px;resize:vertical}
input:focus,select:focus,textarea:focus{
  outline:none;border-color:var(--brand);box-shadow:0 0 0 3px rgba(15,123,108,.13)
}
.f{margin:0 0 14px}
.f2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:560px){.f2{grid-template-columns:1fr}}
/* Date of birth: Day / Month / Year — ALWAYS one row.
   Ratios must fit the PLACEHOLDER words too ("Day" is wider than 2 digits).
   Never wraps, down to 320px. */
.dob{display:grid;grid-template-columns:minmax(0,.95fr) minmax(0,1.45fr) minmax(0,1.05fr);gap:6px}
.dob select{
  width:100%;min-width:0;padding-left:8px;padding-right:18px;min-height:44px;
  font-size:.9rem;text-overflow:ellipsis;
}
@media(max-width:360px){
  .dob{gap:4px}
  .dob select{padding-left:5px;padding-right:14px;font-size:.82rem}
}
.hint{font-size:.78rem;color:var(--muted);margin:5px 0 0}
.check{display:flex;gap:10px;align-items:flex-start;font-weight:400;font-size:.88rem;color:var(--body)}
.check input{width:20px;height:20px;min-height:20px;flex:0 0 20px;margin-top:2px}

/* ---------- alerts ---------- */
.alert{border-radius:11px;padding:12px 14px;margin:0 0 14px;font-size:.9rem;border:1px solid}
.alert.ok{background:#eefaf7;border-color:#bfe6de;color:#0a5a4f}
.alert.bad{background:#fdeeed;border-color:#f5c9c6;color:#8f1d17}
.alert.info{background:#eef4fb;border-color:#c9dcf2;color:#1c4a7a}

/* ---------- rows / lists ---------- */
.row{
  display:flex;gap:12px;align-items:flex-start;padding:13px 0;
  border-bottom:1px solid var(--line);
}
.row:last-child{border-bottom:none;padding-bottom:0}
.row .k{font-weight:600;color:var(--ink);font-size:.92rem}
.row .v{font-size:.9rem;text-align:right;margin-left:auto;max-width:62%;overflow-wrap:anywhere}
.pill{
  display:inline-block;padding:3px 10px;border-radius:999px;font-size:.73rem;
  font-weight:700;text-transform:uppercase;letter-spacing:.03em;
}
.pill.new{background:#fff4e5;color:#8a5a00}
.pill.seen{background:#eef4fb;color:#1c4a7a}
.pill.converted{background:#eefaf7;color:#0a5a4f}
.pill.closed{background:#f1f3f5;color:#5c6b76}
.pill.requested{background:#fff4e5;color:#8a5a00}
.pill.confirmed{background:#eefaf7;color:#0a5a4f}

/* ---------- treatment list ---------- */
.cat{margin:0 0 6px;font-size:.8rem;font-weight:700;color:var(--muted);
  text-transform:uppercase;letter-spacing:.05em}
.trow{
  display:flex;gap:12px;align-items:center;padding:12px 0;
  border-bottom:1px solid var(--line);
}
.trow:last-child{border-bottom:none}
.trow .tn{font-weight:600;color:var(--ink);font-size:.94rem}
.trow .tc{font-size:.78rem;color:var(--muted)}
.trow .tp{margin-left:auto;font-weight:700;color:var(--brand-d);white-space:nowrap}
.trow .tp small{display:block;font-weight:400;color:var(--muted);font-size:.72rem}

/* ---------- doctor ---------- */
.dochead{display:flex;gap:15px;align-items:center;margin-bottom:14px}
.avatar{
  width:66px;height:66px;flex:0 0 66px;border-radius:50%;
  background:var(--brand-t);display:grid;place-items:center;
  font-size:26px;font-weight:700;color:var(--brand-d);
}
.dochead .nm{font-size:1.16rem;font-weight:700;color:var(--ink);line-height:1.2}
.dochead .sp{font-size:.86rem;color:var(--muted)}
.creds{list-style:none;padding:0;margin:0}
.creds li{
  padding:10px 0;border-bottom:1px solid var(--line);display:flex;gap:10px;
  font-size:.9rem;
}
.creds li:last-child{border-bottom:none}
.creds .ck{color:var(--muted);min-width:104px;flex:0 0 104px}
.creds .cv{color:var(--ink);font-weight:500;overflow-wrap:anywhere}

/* ---------- slot chips ---------- */
.chips{display:flex;flex-wrap:wrap;gap:8px}
.chip{
  padding:10px 14px;border:1px solid var(--line);border-radius:10px;
  background:#fff;font-size:.88rem;font-weight:600;color:var(--body);
  cursor:pointer;min-height:44px;display:inline-flex;align-items:center;
}
.chip.on{background:var(--brand);border-color:var(--brand);color:#fff}
/* a day/slot the clinic is already full for */
.chip.off,.chip:disabled{
  background:#f4f5f5;border-color:#e6e8e8;color:#a8afaf;
  cursor:not-allowed;text-decoration:line-through;text-decoration-thickness:1px;
  opacity:.85;
}
.chip.off:hover,.chip:disabled:hover{background:#f4f5f5;border-color:#e6e8e8}
/* legend under the chips */
.chiplegend{display:flex;gap:14px;flex-wrap:wrap;margin-top:9px;font-size:.76rem;color:var(--muted)}
.chiplegend span{display:inline-flex;align-items:center;gap:6px}
.chiplegend i{width:13px;height:13px;border-radius:4px;display:inline-block;border:1px solid var(--line);background:#fff}
.chiplegend i.free{background:#fff}
.chiplegend i.full{background:#f4f5f5;border-color:#e6e8e8}

/* ---------- tabbar (mobile) ---------- */
.ptab{
  position:fixed;bottom:0;left:0;right:0;z-index:30;
  display:flex;background:var(--card);border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom);
}
.ptab a{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;
  padding:9px 4px 8px;font-size:.7rem;color:var(--muted);font-weight:600;
}
.ptab a .ti{font-size:19px;line-height:1}
.ptab a.on{color:var(--brand)}
.ptab a:hover{text-decoration:none}
/* Featured "Book" tab — green circle, white, lifted out of the bar.
   NOTE: the label sits BELOW the circle on the white bar, so it must be
   brand-green, not white — white-on-white would be invisible. */
.ptab a.cta{
  position:relative;color:var(--brand);font-weight:700;
  justify-content:flex-start;padding-top:0;padding-bottom:10px;
}
.ptab a.cta .ti{
  display:flex;align-items:center;justify-content:center;
  width:46px;height:46px;border-radius:50%;
  background:var(--brand);color:#fff;font-size:21px;font-weight:700;
  box-shadow:0 4px 12px rgba(15,123,108,.40);
  margin-top:-30px;margin-bottom:5px;
  border:3px solid var(--card);
  transition:transform .15s ease,box-shadow .15s ease;
}
.ptab a.cta:hover .ti,.ptab a.cta:focus-visible .ti{
  transform:translateY(-2px);box-shadow:0 6px 16px rgba(15,123,108,.5);
}
.ptab a.cta:active .ti{transform:translateY(0) scale(.96)}
.ptab a.cta.on{color:var(--brand)}
.ptab a.cta.on .ti{box-shadow:0 0 0 4px rgba(15,123,108,.18),0 4px 12px rgba(15,123,108,.40)}
@media(prefers-reduced-motion:reduce){.ptab a.cta .ti{transition:none}}
@media(min-width:760px){.ptab{display:none}}
@media(max-width:759px){
  .wrap{padding-bottom:104px}
  .pn{display:none}
}
.pfoot{
  text-align:center;font-size:.78rem;color:var(--muted);
  padding:22px 16px 30px;line-height:1.7;
}
.pfoot a{color:var(--muted);text-decoration:underline}

/* ---------- language switcher (header, every page) ---------- */
.phead .bh{min-width:0;flex:1 1 auto}
.phead .bn a{color:inherit;text-decoration:none}
.langsw{
  display:inline-flex;align-items:center;gap:2px;flex:0 0 auto;
  background:var(--brand-t);border:1px solid #cfe6e1;border-radius:999px;
  padding:2px;margin-right:6px;
}
.langsw .langb{
  display:inline-flex;align-items:center;justify-content:center;
  min-width:34px;min-height:30px;padding:0 8px;border-radius:999px;
  font-size:.76rem;font-weight:700;color:var(--brand-d);
  text-decoration:none;line-height:1;white-space:nowrap;
}
.langsw .langb:hover{background:#d6ede8;text-decoration:none}
.langsw .langb.on{background:var(--brand);color:#fff}
.langsw .langb.on:hover{background:var(--brand-d)}

/* phones: switcher drops under the brand row so the header never cramps */
@media(max-width:640px){
  .phead{flex-wrap:wrap;gap:8px 10px}
  .phead .bh{flex:1 1 auto}
  .langsw{order:3;margin:2px 0 0}
  .phead .who{order:2}
}
@media(max-width:380px){
  .langsw .langb{min-width:30px;padding:0 6px;font-size:.72rem}
}

/* live open/closed badge */
.pill.st-open{background:#e6f4ea;color:#12703a;border:1px solid #c7e6d2;font-weight:600}
.pill.st-shut{background:#fdf0e6;color:#8a4b16;border:1px solid #f2d9c2;font-weight:600}

/* consent helper link reads as a link, and the footer clears the mobile tab bar */
.consent a, label .consentlink{color:var(--brand-d);text-decoration:underline;text-underline-offset:2px}
@media(max-width:759px){.pfoot{padding-bottom:186px}}

/* Finding us: the map sits above the address block */
.mapwrap{position:relative;border:1px solid var(--line,#e3e6ea);border-radius:14px;overflow:hidden;margin:4px 0 14px;background:#eef1f3}
.mapwrap iframe{display:block;width:100%;height:230px;border:0}
@media(max-width:420px){.mapwrap iframe{height:190px}}

/* bills: paid reads calm, anything outstanding reads as money owed */
.pill.paid{background:#e6f4ea;color:#12703a}
.pill.due,.pill.unpaid,.pill.partial{background:#fdecea;color:#96231a}
