/* Same design language as the clinic website (entnavimumbai v2): warm paper, terracotta + gold, Newsreader + Hanken Grotesk. */
:root {
  --paper: #f3ece1;
  --paper-2: #ebe2d4;
  --card: #fbf7f0;
  --ink: #1e1712;
  --ink-2: #57493d;
  --ink-3: #8a796a;
  --rule: rgba(30, 23, 18, .14);
  --rule-2: rgba(30, 23, 18, .28);
  --terra: #a4502c;
  --terra-2: #c26a44;
  --gold: #b08a3e;
  --gold-2: #d6b36a;
  --sage: #3e7a57;
  --serif: 'Newsreader', 'Iowan Old Style', Georgia, serif;
  --sans: 'Hanken Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --radius: 14px;
  --ease: cubic-bezier(.2, .7, .1, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
/* paper grain, as on the website */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 60;
  opacity: .5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .38 0 0 0 0 .3 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--terra); color: var(--card); }
main { max-width: 640px; margin: 0 auto; padding: 0 18px 130px; position: relative; }
a { color: var(--terra); text-underline-offset: 3px; }

h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -.01em; margin: 0; }
h1 { font-size: clamp(30px, 8vw, 40px); line-height: 1.15; margin: 6px 0 8px; }
em { font-style: italic; color: var(--terra); }
.muted { color: var(--ink-2); }

/* kicker label with the gold rule, as on the website */
.kicker, h2 {
  font: 500 12px/1 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 26px 0 12px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.kicker::before, h2::before { content: ''; width: 28px; height: 1px; background: var(--gold); flex: none; }

/* brand bar: logo + name, like the website nav */
.bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.bar::after { content: ''; position: absolute; left: 0; bottom: -1px; width: 56px; height: 1px; background: var(--gold); }
.bar .logo { width: 46px; height: 46px; flex: none; object-fit: contain; }
.brand-t b { display: block; font: 500 17px/1.2 var(--serif); }
.brand-t small { font-size: 11.5px; color: var(--ink-3); letter-spacing: .04em; }

.card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
}

/* buttons: pills, like the website */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  min-height: 48px;
  padding: .85em 1.5em;
  border-radius: 999px;
  border: 1px solid var(--rule-2);
  background: transparent;
  color: var(--ink);
  font: 500 15px/1 var(--sans);
  letter-spacing: .01em;
  cursor: pointer;
  text-decoration: none;
  transition: background .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.btn:hover { border-color: var(--ink); }
.btn.primary { background: var(--terra); border-color: var(--terra); color: var(--card); }
.btn.primary:hover { background: var(--ink); border-color: var(--ink); }
.btn.warn { color: var(--terra); border-color: var(--terra); }
.btn.ghost { color: var(--ink-2); border-color: transparent; }
.btn.small { min-height: 40px; padding: .6em 1.1em; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: default; }
.btn:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; background: var(--card); }
.chip.on, .slots .btn.on { background: var(--ink); border-color: var(--ink); color: var(--card); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.slots .btn { background: var(--card); padding: .85em .5em; }
.slots .btn.on { background: var(--ink); }

label { display: block; font-weight: 500; font-size: 14.5px; color: var(--ink-2); margin: 14px 0 6px; }
input[type=text], input[type=tel], select.btn {
  width: 100%;
  padding: 13px 14px;
  font: 400 17px/1.3 var(--sans);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: 12px;
}
select.btn { border-radius: 12px; justify-content: flex-start; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-weight: 400; font-size: 14.5px; margin: 16px 0; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; flex: none; accent-color: var(--terra); }

/* messages */
.msg { padding: 12px 14px; border-radius: 12px; margin: 12px 0; background: #f6e3da; color: #7a3317; font-size: 15px; }
.msg.ok { background: #e4efe7; color: #245538; }
.msg.info { background: var(--card); color: var(--ink-2); border: 1px solid var(--rule); border-left: 3px solid var(--gold); }

/* live badge, like the website's open/closed badge */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .55em;
  font: 500 13px/1.3 var(--sans);
  padding: .65em 1em;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--rule);
  color: var(--ink-2);
  margin: 6px 0;
}
.badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; position: relative; }
.badge.open { color: var(--sage); }
.badge.open i { background: var(--sage); }
.badge.open i::after { content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--sage); animation: ping 2s var(--ease) infinite; }
@keyframes ping { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .badge.open i::after { animation: none; } }

/* staff queue */
.top { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.top h1 { margin: 0; }
ul.list { padding: 0; margin: 0; }
.row {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 14px;
  margin: 8px 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.row.urgent { border-color: var(--terra); box-shadow: inset 3px 0 0 var(--terra); }
.who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.who strong { font: 500 18px/1.25 var(--serif); overflow-wrap: anywhere; }
.tag { font-size: 13px; color: var(--ink-3); }
.tag.warn { color: var(--terra); font-weight: 600; }
.eta { font: 500 14px/1.2 var(--sans); color: var(--terra); letter-spacing: .02em; }
.acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.now { border: 1px solid var(--gold); box-shadow: 0 0 0 3px rgba(176, 138, 62, .14); }
.now strong { font: 500 20px/1.25 var(--serif); }
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  background: rgba(243, 236, 225, .88);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-top: 1px solid var(--rule);
  display: flex;
  gap: 10px;
  justify-content: center;
}
.dock .btn { flex: 1; max-width: 300px; min-height: 56px; font-size: 16px; }
.dock .btn:not(.primary) { background: var(--card); }

/* calendars */
.calhead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 10px; }
.calhead .month { font: 400 22px/1.2 var(--serif); }
.legend { font-size: 13px; color: var(--ink-3); margin: 8px 0 0; }

/* patient calendar: the next 7 days */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.day {
  appearance: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 8px 0 7px; min-height: 76px; border: 1px solid var(--rule-2); border-radius: 12px;
  background: var(--card); color: var(--ink); font: inherit; cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease);
}
.day .dow { font: 500 10.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.day .num { font: 500 21px/1.1 var(--serif); }
.day .sub { font: 600 11px/1.1 var(--sans); color: var(--sage); }
.day.on { background: var(--ink); border-color: var(--ink); color: var(--card); }
.day.on .dow, .day.on .sub { color: var(--gold-2); }
.day[disabled] { background: transparent; opacity: .55; cursor: default; }
.day[disabled] .sub { color: var(--ink-3); font-weight: 500; }
.day:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* staff: tabs and the month calendar */
.tabs { display: flex; gap: 8px; margin: 2px 0 6px; }
.tabs .btn.on { background: var(--ink); border-color: var(--ink); color: var(--card); }
.mgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.mdow { text-align: center; font: 500 10.5px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); padding: 4px 0 6px; }
.mday {
  appearance: none; display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  min-height: 64px; padding: 6px 5px; border: 1px solid var(--rule); border-radius: 10px;
  background: var(--card); color: var(--ink); font: inherit; cursor: pointer; text-align: left;
}
.mday .n { font: 500 15px/1 var(--serif); }
.mday .c { font: 700 12px/1 var(--sans); color: var(--terra); }
.mday .f { font: 500 10px/1 var(--sans); color: var(--sage); }
.mday.out { visibility: hidden; border: 0; }
.mday.closed { background: transparent; border-style: dashed; color: var(--ink-3); }
.mday.past { opacity: .75; }
.mday.today { box-shadow: 0 0 0 2px var(--gold); }
.mday.sel { background: var(--ink); border-color: var(--ink); color: var(--card); }
.mday.sel .c { color: var(--gold-2); }
.mday.sel .f { color: var(--gold-2); }
.row.dim { opacity: .55; }
.calhead .btn { font-size: 26px; line-height: 1; min-width: 48px; padding: .3em .6em; }

/* hosted demo label */
.demo {
  display: inline-block;
  margin: 0 0 12px;
  padding: .5em 1em;
  border-radius: 999px;
  background: #f6ead1;
  border: 1px solid var(--gold-2);
  color: #6b4e12;
  font: 600 12px/1.3 var(--sans);
}
