@font-face { font-family: "Bricolage Grotesque"; src: url(fonts/bricolage-grotesque.woff2) format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }

/* Sarjanam Care — one stylesheet for master panel, owner panel and public booking page.
   --brand is set per business from its chosen colour (default medical teal). */
:root {
  --brand: #0f9d8a;
  --brand-soft: color-mix(in srgb, var(--brand) 12%, #fff);
  --bg: #f2f8f7; --card: #fff; --line: #e1ebe9; --text: #0f2a3d; --muted: #5f7483;
  --red: #dc2626; --amber: #d97706; --blue: #2563eb; --violet: #7c3aed; --green: #16a34a;
  --shadow: 0 1px 2px rgba(15, 42, 61, .05), 0 4px 16px rgba(15, 42, 61, .05);
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.5 "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--brand); }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.25; }
h1 { font-size: 21px; } h2 { font-size: 16px; } h3 { font-size: 15px; }
small, .muted { color: var(--muted); }
.ic { width: 18px; height: 18px; flex-shrink: 0; vertical-align: -3px; }

/* Sarjanam logo colours (from sarjanam.in) */
:root { --sj-orange: #ff7a45; --sj-ink: #2b1d16; --sj-purple: #8b5cf6; --sj-teal: #0f9d8a; }
input, select, textarea, button { font-family: inherit; }

/* ---------- Sarjanam Care logo ---------- */
.sj-logo { display: inline-flex; flex-direction: column; line-height: 1; font-family: "Bricolage Grotesque", system-ui, sans-serif; text-decoration: none; }
.sj-word { font-weight: 800; color: var(--sj-ink); letter-spacing: -.03em; display: inline-flex; align-items: baseline; }
.sj-s { color: var(--sj-orange); font-size: 1.18em; }
.sj-care { color: var(--sj-teal); margin-left: .22em; font-weight: 700; }
.sj-by { display: flex; align-items: center; gap: .5em; color: var(--sj-purple); font-weight: 700; letter-spacing: .12em; font-size: .3em; margin-top: .45em; padding-left: .9em; }
.sj-by i { display: inline-block; width: 2.6em; height: 2px; background: var(--sj-orange); border-radius: 2px; }
.sj-sm { font-size: 15px; } .sj-sm .sj-by { font-size: 6px; }
.sj-md { font-size: 24px; } .sj-md .sj-by { font-size: 7.5px; }
.sj-lg { font-size: 36px; } .sj-lg .sj-by { font-size: 10px; }
.brand-lg { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 20px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); }
.powered { margin-top: 10px; font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100vh; }
.side { width: 236px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
.brand { padding: 18px 16px; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--line); }
.brand img { width: 38px; height: 38px; object-fit: contain; border-radius: 10px; }
.brand .mark { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px; flex-shrink: 0; }
.brand strong { line-height: 1.2; }
.brand small { display: block; font-size: 11px; }
.side nav { padding: 10px; flex: 1; overflow-y: auto; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: #33495a; text-decoration: none; font-weight: 500; margin-bottom: 2px; }
.side nav a:hover { background: var(--bg); }
.side nav a.on { background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.side nav a.cta { background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 10px; justify-content: center; }
.side nav a.cta:hover { filter: brightness(.94); }
.nav-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 12px 6px; }
.soon { margin-left: auto; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; background: #fef3c7; color: #92400e; padding: 1px 7px; border-radius: 99px; }
.side-foot { padding: 14px 16px; border-top: 1px solid var(--line); font-size: 13px; }
.side-foot a { display: inline-flex; align-items: center; gap: 6px; }
.side-foot small { display: block; margin-top: 8px; }
.main { flex: 1; padding: 22px 28px 60px; min-width: 0; max-width: 1280px; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.top h1 { margin: 0; }
.menu-btn { display: none; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 6px 10px; font-size: 16px; }

/* ---------- Blocks ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid2 { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; align-items: start; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; box-shadow: var(--shadow); display: flex; gap: 12px; align-items: center; color: var(--muted); font-size: 13px; }
.stat b { display: block; font-size: 26px; line-height: 1.1; color: var(--text); }
.stat-ic { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); flex-shrink: 0; }
.stat-ic .ic { width: 22px; height: 22px; }
.stat-ic.amber { background: #fef3c7; color: var(--amber); }
.stat-ic.green { background: #dcfce7; color: var(--green); }
.stat-ic.blue { background: #dbeafe; color: var(--blue); }
.flash { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; padding: 10px 14px; border-radius: 12px; margin-bottom: 16px; }
.note { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; padding: 10px 14px; border-radius: 12px; margin-bottom: 16px; }
.error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; padding: 10px 14px; border-radius: 12px; margin-bottom: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.right { margin-left: auto; }

/* Big action tiles on the Today page */
.tiles { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 16px; }
.tile { display: flex; gap: 12px; align-items: center; padding: 16px; border-radius: 16px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); text-decoration: none; color: var(--text); font-weight: 700; transition: transform .12s, border-color .12s; }
.tile:hover { transform: translateY(-2px); border-color: var(--brand); }
.tile small { display: block; font-weight: 400; }
.tile.main-tile { background: var(--brand); color: #fff; border-color: var(--brand); }
.tile.main-tile small { color: #fff; opacity: .85; }
.tile.main-tile .stat-ic { background: rgba(255,255,255,.2); color: #fff; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }

/* ---------- Forms ---------- */
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #cfdcda; border-radius: 10px; font: inherit; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
textarea { min-height: 70px; resize: vertical; }
.field { margin-bottom: 12px; }
.fields { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin-bottom: 12px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.check input { width: auto; accent-color: var(--brand); }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 10px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(.94); }
.btn.light { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.btn.grey { background: #fff; color: var(--text); border-color: #cfdcda; }
.btn.red { background: #fff; color: var(--red); border-color: #fecaca; }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.sm .ic { width: 14px; height: 14px; }
form.inline { display: inline; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #e7eeed; color: #33495a; white-space: nowrap; }
.badge.booked { background: #dbeafe; color: #1e40af; }
.badge.waiting { background: #fef3c7; color: #92400e; }
.badge.serving { background: #ede9fe; color: #5b21b6; }
.badge.done, .badge.active, .badge.sent { background: #dcfce7; color: #166534; }
.badge.cancelled, .badge.noshow, .badge.suspended, .badge.expired, .badge.failed { background: #fee2e2; color: #991b1b; }
.token { display: inline-flex; align-items: center; justify-content: center; min-width: 36px; height: 36px; padding: 0 6px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 700; }

/* ---------- Autocomplete dropdown (assets/app.js) ---------- */
.ac-wrap { position: relative; }
.ac-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid #cfdcda; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 240px; overflow-y: auto; min-width: 220px; }
.ac-item { padding: 8px 10px; cursor: pointer; }
.ac-item small { display: block; }
.ac-item.on, .ac-item:hover { background: var(--brand-soft); }

/* ---------- Prescription form ---------- */
.rx-rows { min-width: 620px; }
.rx-rows td { padding: 4px; border: 0; }
.rx-rows td:first-child { width: 38%; }
.rx-rows td:last-child { width: 40px; }
.rx-rows input { padding: 8px; }
.rx-grid { display: grid; gap: 16px; grid-template-columns: 2.2fr 1fr; align-items: start; }
@media (max-width: 1150px) { .rx-grid { grid-template-columns: 1fr; } }

/* ---------- Login and small centred pages ---------- */
body.plain { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 16px;
  background: radial-gradient(circle at 20% 10%, var(--brand-soft), transparent 45%), var(--bg); }
.box { width: 100%; max-width: 400px; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); }
.box h1 { margin-bottom: 4px; }
.box .brand { border: 0; padding: 0 0 18px; }
.box .btn { width: 100%; justify-content: center; }

/* ---------- Public booking page ---------- */
.pub { max-width: 640px; margin: 0 auto; padding: 16px; }
.pub-head { text-align: center; padding: 26px 16px 20px; margin: 0 -16px 16px; background: linear-gradient(180deg, var(--brand-soft), transparent); }
.pub-head img { max-height: 84px; max-width: 220px; object-fit: contain; }
.pub-head .mark { width: 64px; height: 64px; border-radius: 18px; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; }
.pub-head h1 { font-size: 24px; margin: 10px 0 4px; }
.pub-contact { display: inline-flex; gap: 6px; align-items: center; margin-top: 6px; font-weight: 600; text-decoration: none; }
.step-title { font-weight: 700; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; }
.step-num { width: 26px; height: 26px; border-radius: 99px; background: var(--brand); color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { border: 1px solid #cfdcda; background: #fff; border-radius: 12px; padding: 9px 14px; cursor: pointer; font: inherit; color: var(--text); text-align: left; transition: border-color .12s, background .12s; }
.choice small { display: block; }
.choice:hover { border-color: var(--brand); }
.choice.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.choice.on small { color: #fff; opacity: .85; }
.pub-foot { text-align: center; color: var(--muted); font-size: 13px; padding: 16px 0 30px; }

/* Booking success: circle draws, tick draws, then the text slides up */
.success { text-align: center; padding: 28px 18px; }
.tick { width: 96px; height: 96px; margin: 4px auto 12px; display: block; }
.tick circle { fill: none; stroke: var(--brand); stroke-width: 4; stroke-dasharray: 290; stroke-dashoffset: 290; animation: draw .6s ease-out forwards; transform-origin: center; }
.tick .fill { fill: var(--brand); stroke: none; opacity: 0; transform: scale(.6); transform-origin: center; animation: pop .35s .5s ease-out forwards; }
.tick path { fill: none; stroke: #fff; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .35s .8s ease-out forwards; }
.success > *:not(.tick) { opacity: 0; animation: rise .4s 1s ease-out forwards; }
.success .when { font-size: 20px; font-weight: 700; margin: 6px 0; }
.success .summary { background: var(--bg); border-radius: 12px; padding: 12px; margin: 14px auto; max-width: 360px; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tick *, .success > * { animation-duration: .01s !important; animation-delay: 0s !important; } }

/* ---------- Home page ---------- */
.home { max-width: 1040px; margin: 0 auto; padding: 0 20px 40px; }
.home-nav { display: flex; align-items: center; padding: 18px 0; }
.home-nav .brand { border: 0; padding: 0; }
.hero { text-align: center; padding: 50px 0 36px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); letter-spacing: -.02em; max-width: 760px; margin: 0 auto 14px; }
.hero p { font-size: 17px; color: var(--muted); max-width: 620px; margin: 0 auto 22px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.feature .stat-ic { margin-bottom: 10px; }
.feature p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.home h2.sec { text-align: center; font-size: 24px; margin: 46px 0 18px; }
.plan { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; box-shadow: var(--shadow); text-align: center; }
.plan .price { font-size: 32px; font-weight: 800; }
.plan .price small { font-size: 14px; font-weight: 400; }

/* ---------- Queue TV display ---------- */
body.tv { background: #0b2030; color: #fff; margin: 0; padding: 3vw; }
.tv h1 { font-size: 3vw; text-align: center; margin-bottom: 2vw; }
.tv-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2vw; }
.tv-card { background: #143348; border-radius: 1.5vw; padding: 2vw; text-align: center; }
.tv-card h2 { font-size: 2vw; color: #9fb6c4; }
.tv-now { font-size: 11vw; font-weight: 800; line-height: 1.1; color: #5eead4; }
.tv-next { font-size: 2.2vw; color: #cbd5e1; }

/* ---------- Phone ---------- */
@media (max-width: 800px) {
  .side { position: fixed; z-index: 30; left: -250px; transition: left .2s; }
  .side.open { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .menu-btn { display: block; }
  .main { padding: 14px 12px 60px; }
  .grid2 { grid-template-columns: 1fr; }
}

/* ---------- Printing: only the prescription sheet ---------- */
@media print {
  .side, .top, .no-print, .flash, .note { display: none !important; }
  body { background: #fff; }
  .main { padding: 0; max-width: none; }
}
.rx-sheet { background: #fff; max-width: 800px; margin: 0 auto; padding: 24px 32px; border: 1px solid var(--line); border-radius: 4px; min-height: 900px; display: flex; flex-direction: column; }
.rx-sheet.a5 { max-width: 560px; min-height: 760px; font-size: 13px; }
.rx-head { display: flex; gap: 16px; align-items: center; border-bottom: 2px solid var(--brand); padding-bottom: 12px; margin-bottom: 12px; }
.rx-head img { max-height: 70px; max-width: 140px; object-fit: contain; }
.rx-head .rx-title { flex: 1; white-space: pre-line; }
.rx-patient { display: flex; flex-wrap: wrap; gap: 4px 20px; border-bottom: 1px solid var(--line); padding-bottom: 8px; margin-bottom: 12px; }
.rx-sheet h3 { margin: 12px 0 4px; color: var(--brand); }
.rx-sheet .pre { white-space: pre-line; }
.rx-foot { margin-top: auto; padding-top: 30px; }
.rx-sign { text-align: right; margin-bottom: 14px; }
.rx-foot-text { border-top: 1px solid var(--line); padding-top: 8px; font-size: 12px; color: var(--muted); white-space: pre-line; text-align: center; }
@media print { .rx-sheet { border: 0; max-width: none; padding: 0 6mm; } }

/* Feature checkboxes / option cards */
.feature-picks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-bottom: 12px; }
.pick { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; font-weight: 400; transition: border-color .15s, background .15s; }
.pick input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand); flex-shrink: 0; }
.pick small { display: block; color: var(--muted); }
.pick:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }

/* ---------- Prescription header/footer (print and preview) ---------- */
.rx-part { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 12px; align-items: center; font-size: 13px; }
.rx-header { padding-bottom: 10px; margin-bottom: 12px; }
.rx-footer { padding-top: 8px; margin-top: 12px; color: #33495a; font-size: 12px; }
.rx-header.lined { border-bottom: 2px solid var(--brand); }
.rx-footer.lined { border-top: 2px solid var(--brand); }
.rx-z > * + * { margin-top: 3px; }
.rx-left { text-align: left; } .rx-center { text-align: center; } .rx-right { text-align: right; }
.rx-logo { max-height: 64px; max-width: 150px; object-fit: contain; }
.rx-center .rx-logo { margin: 0 auto; display: block; }
.rx-right .rx-logo { margin-left: auto; display: block; }
.rx-clinic { font-size: 20px; font-weight: 800; color: var(--brand); line-height: 1.2; }
.rx-part .pre { white-space: pre-line; }

/* ---------- Drag-and-drop layout builder ---------- */
.lay-title { font-weight: 700; font-size: 13px; margin: 14px 0 6px; }
.lay-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.zone { min-height: 84px; border: 2px dashed #cfdcda; border-radius: 12px; padding: 22px 8px 8px; position: relative; background: #fbfdfd; transition: border-color .15s, background .15s; cursor: pointer; }
.zone.over { border-color: var(--brand); background: var(--brand-soft); }
.zone-name { position: absolute; top: 5px; left: 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tray { min-height: 54px; padding-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.tray .chip { margin: 0; }
.chip { background: #fff; border: 1px solid #cfdcda; border-radius: 10px; padding: 7px 10px; margin-bottom: 6px; font-size: 13px; font-weight: 600; cursor: grab; display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow); user-select: none; transition: transform .12s, box-shadow .12s; }
.chip:hover { transform: translateY(-1px); border-color: var(--brand); }
.chip.dragging { opacity: .4; }
.chip.picked { outline: 2px solid var(--brand); background: var(--brand-soft); }
.grip { color: #9fb2b0; letter-spacing: -2px; font-size: 12px; }
.paper-wrap { background: #e7eeed; border-radius: 12px; padding: 16px; display: flex; justify-content: center; }
.paper { background: #fff; width: 336px; min-height: 475px; padding: 14px 16px; box-shadow: 0 4px 18px rgba(0,0,0,.12); display: flex; flex-direction: column; font-size: 9px; transition: width .2s; }
.paper.a5 { width: 238px; min-height: 336px; }
.paper .rx-part { font-size: 8px; gap: 6px; }
.paper .rx-clinic { font-size: 12px; }
.paper .rx-logo { max-height: 32px; max-width: 70px; }
.paper .rx-header { padding-bottom: 6px; margin-bottom: 6px; }
.pv-space { background: repeating-linear-gradient(45deg, #f4f7f7, #f4f7f7 6px, #fff 6px, #fff 12px); color: var(--muted); font-size: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.paper:not(.blank) .pv-space { background: none; }
.pv-body { flex: 1; }
.pv-patient { border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 8px; font-weight: 600; }
.pv-lines b { display: block; color: var(--brand); margin: 6px 0 4px; }
.pv-lines i { display: block; height: 5px; background: #eef3f2; border-radius: 3px; margin-bottom: 5px; }
@media (max-width: 700px) { .lay-row { grid-template-columns: 1fr; } }

/* =========================================================
   Public booking page (b.php)
   ========================================================= */
body.pub-body { background: #f6faf9; }
.pub-hero { position: relative; overflow: hidden; color: #fff; text-align: center; padding: 34px 16px 70px;
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 55%, #0b2030)); }
.pub-hero-in { position: relative; z-index: 1; max-width: 640px; margin: 0 auto; animation: rise .6s ease-out both; }
.blob { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .25; background: #fff; animation: float 12s ease-in-out infinite; }
.blob.b1 { width: 260px; height: 260px; top: -90px; left: -60px; }
.blob.b2 { width: 180px; height: 180px; bottom: -70px; right: -30px; background: #ffd5c2; animation-duration: 15s; animation-delay: -4s; }
.blob.b3 { width: 90px; height: 90px; top: 30%; right: 18%; opacity: .18; animation-duration: 9s; animation-delay: -2s; }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 33% { transform: translate(18px, -14px) scale(1.06); } 66% { transform: translate(-12px, 10px) scale(.96); } }
.pub-logo { width: 92px; height: 92px; margin: 0 auto 12px; border-radius: 24px; background: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.18); padding: 10px; animation: pop .5s .15s ease-out both; transform: scale(.6); opacity: 0; }
.pub-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pub-logo .mark { font-size: 40px; font-weight: 800; color: var(--brand); }
.pub-hero h1 { font-size: clamp(24px, 6vw, 32px); margin: 0 0 4px; letter-spacing: -.02em; }
.pub-where { opacity: .9; }
.pub-about { opacity: .92; max-width: 520px; margin: 10px auto 0; }
.pub-actions { display: flex; justify-content: center; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pub-actions a { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; font-weight: 600; font-size: 14px;
  padding: 8px 14px; border-radius: 99px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(6px); transition: background .15s; }
.pub-actions a:hover { background: rgba(255,255,255,.28); }

.pub { max-width: 640px; margin: -46px auto 0; padding: 0 14px 120px; position: relative; z-index: 2; }
.pub .card { border-radius: 20px; padding: 18px; }
.rise { animation: rise .5s ease-out both; }
.pub .rise:nth-of-type(1) { animation-delay: .1s; } .pub .rise:nth-of-type(2) { animation-delay: .18s; }
.pub .rise:nth-of-type(3) { animation-delay: .26s; } .pub .rise:nth-of-type(4) { animation-delay: .34s; }
.pub .rise:nth-of-type(5) { animation-delay: .42s; } .pub .rise:nth-of-type(6) { animation-delay: .5s; }
.trust { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.trust span { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); }
.trust .ic { color: var(--brand); width: 15px; height: 15px; }

/* Doctor cards */
.docs { display: grid; gap: 10px; }
.doc, .doc-one { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 16px;
  padding: 12px; cursor: pointer; font: inherit; color: var(--text); transition: border-color .15s, transform .15s, box-shadow .15s; }
.doc:hover { border-color: var(--brand); transform: translateY(-1px); }
.doc.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.doc-one { cursor: default; border: 1px solid var(--line); }
.avatar { width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 17px;
  color: #fff; background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 60%, #8b5cf6)); }
.doc-txt { flex: 1; } .doc-txt small { display: block; color: var(--muted); }
.doc-check { width: 26px; height: 26px; border-radius: 99px; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; transform: scale(0); transition: transform .2s cubic-bezier(.3,1.6,.6,1); }
.doc-check .ic { width: 15px; height: 15px; }
.doc.on .doc-check { transform: scale(1); }

/* Date strip: scrolls sideways on phones */
.dates { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 8px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.date { flex: 0 0 64px; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 9px 4px; border-radius: 14px;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer; font: inherit; color: var(--text); transition: all .15s; }
.date small { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.date b { font-size: 21px; line-height: 1.1; }
.date:hover { border-color: var(--brand); }
.date.on { background: var(--brand); border-color: var(--brand); color: #fff; transform: translateY(-2px); box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); }
.date.on small { color: #fff; opacity: .85; }

/* Time slots */
.slot-head { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 10px 0 8px; }
.slot-head:first-child { margin-top: 0; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.slot { padding: 10px 6px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; font: inherit; font-weight: 600; font-size: 14px; color: var(--text);
  cursor: pointer; animation: rise .3s ease-out both; transition: border-color .15s, background .15s, transform .15s; }
.slot:hover { border-color: var(--brand); }
.slot.on { background: var(--brand); border-color: var(--brand); color: #fff; animation: tap .3s ease-out; }
@keyframes tap { 0% { transform: scale(1); } 40% { transform: scale(.92); } 100% { transform: scale(1); } }
.hint { display: flex; gap: 8px; align-items: center; color: var(--muted); background: var(--bg); border-radius: 12px; padding: 14px; }
.skeleton { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.skeleton i { height: 42px; border-radius: 12px; background: linear-gradient(90deg, #eef3f2 25%, #f8fbfb 50%, #eef3f2 75%); background-size: 200% 100%; animation: shimmer 1s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* Sticky bottom bar with summary and Book button */
.book-bar { position: fixed; left: 0; right: 0; margin: 0 auto; bottom: 14px; width: min(612px, calc(100% - 24px)); z-index: 20;
  display: flex; align-items: center; gap: 12px; background: #0f2a3d; color: #fff; padding: 10px 10px 10px 18px; border-radius: 18px;
  box-shadow: 0 12px 30px rgba(15, 42, 61, .35); animation: rise .5s .6s ease-out both; }
.bar-txt { flex: 1; min-width: 0; }
.bar-txt small { display: block; opacity: .7; font-size: 11px; }
.bar-txt strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.book-bar .btn { padding: 12px 18px; border-radius: 12px; opacity: .55; }
.book-bar.ready .btn { opacity: 1; animation: glow 1.8s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--brand) 60%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
.btn.loading { pointer-events: none; opacity: .7; }

/* Success extras */
.success { position: relative; overflow: hidden; }
.success .when span { color: var(--brand); font-size: 26px; }
.sum-row { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; border-bottom: 1px dashed var(--line); text-align: left; }
.sum-row:last-child { border-bottom: 0; }
.sum-row span { color: var(--muted); }
.success .summary { max-width: 380px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 8px; height: 13px; border-radius: 2px; opacity: 0; animation-name: fall; animation-timing-function: ease-in; animation-fill-mode: forwards; }
@keyframes fall { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--x), 460px) rotate(var(--r)); } }
.pub-foot { display: flex; justify-content: center; align-items: center; gap: 6px; }
@media (prefers-reduced-motion: reduce) { .blob, .rise, .slot, .book-bar, .pub-logo, .pub-hero-in, .confetti i { animation: none !important; opacity: 1; transform: none; } .confetti { display: none; } }
