:root {
  --brand: #0b6e8a;
  --brand-2: #14a3a3;
  --brand-dark: #084e63;
  --ink: #142536;
  --muted: #6b7c8d;
  --line: #e2e9f0;
  --bg: #f3f7fa;
  --card: #fff;
  --ok: #17915c;
  --warn: #c98a0c;
  --bad: #d0453b;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 64, .05), 0 8px 24px rgba(16, 40, 64, .06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { font-family: 'Plus Jakarta Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: 2rem; font-weight: 800; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 700; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.page { padding-top: 28px; padding-bottom: 60px; min-height: 70vh; }
.narrow { max-width: 760px; margin: 0 auto; }
.muted { color: var(--muted); }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.inline { display: inline; }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-2); margin-bottom: 6px; }
.eyebrow.light { color: #bff3ee; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.page-head { margin-bottom: 22px; }
.page-head h1 { margin: 0; }
.section-title { margin: 28px 0 14px; font-size: 1.15rem; }

/* Top bar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand small { font-weight: 500; font-size: .8rem; color: var(--muted); margin-left: 2px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: grid; place-items: center; font-size: 1.4rem; font-weight: 800; }
.mainnav { display: flex; align-items: center; gap: 4px; }
.mainnav a { color: var(--ink); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: .93rem; }
.mainnav a:hover { background: var(--bg); text-decoration: none; }
.mainnav a.active { background: #e3f2f5; color: var(--brand-dark); font-weight: 600; }
.mainnav .btn { color: #fff; }
.nav-user { margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.nav-user a { padding: 0; }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--brand); color: #fff; border: 0; border-radius: 10px; padding: 11px 20px; font: inherit; font-weight: 600; cursor: pointer; transition: transform .08s, background .2s, box-shadow .2s; }
.btn:hover { background: var(--brand-dark); text-decoration: none; box-shadow: 0 6px 18px rgba(11, 110, 138, .25); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-sm { padding: 7px 13px; font-size: .86rem; border-radius: 8px; }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-ghost { background: #fff; color: var(--brand); border: 1px solid var(--line); }
.btn-ghost:hover { background: #f0f7f9; box-shadow: none; }
.btn-white { background: #fff; color: var(--brand-dark); }
.btn-white:hover { background: #eafaf8; }
.btn-success { background: var(--ok); }
.btn-success:hover { background: #12784b; }
.btn-danger { background: var(--bad); }
.btn-danger:hover { background: #b13229; }
.link-danger { background: none; border: 0; color: var(--bad); cursor: pointer; font: inherit; font-size: .85rem; padding: 0; }

/* Cards, alerts, badges */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; border: 1px solid rgba(226, 233, 240, .7); }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .94rem; }
.alert-success { background: #e6f6ee; color: #0f6b43; }
.alert-error { background: #fdecea; color: #a32a21; }
.alert-info { background: #e7f3f8; color: #0a5a72; }
.badge { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #eef2f6; color: var(--muted); }
.badge-confirmed { background: #e3f2f5; color: var(--brand-dark); }
.badge-in_progress { background: #fff3d6; color: #8a5d00; }
.badge-completed { background: #e6f6ee; color: #0f6b43; }
.badge-pending { background: #fff3d6; color: #8a5d00; }
.badge-cancelled, .badge-no_show { background: #fdecea; color: #a32a21; }
.pill { display: inline-block; background: #e3f2f5; color: var(--brand-dark); padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.big-num { font-size: 1.4rem; font-weight: 800; color: var(--brand); }

/* Forms */
.form label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 14px; }
.form input, .form select, .form textarea, .filters input, .filters select, .search input, select.sm {
  display: block; width: 100%; margin-top: 6px; padding: 11px 13px; border: 1px solid #cfdae4; border-radius: 9px; font: inherit; font-weight: 400; background: #fff; color: var(--ink); transition: border .15s, box-shadow .15s; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(20, 163, 163, .15); }
.form.compact label { margin-bottom: 10px; }
.form.compact textarea, .form.compact input { padding: 9px 11px; }
.form fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.form legend { font-weight: 800; font-size: 1rem; margin-bottom: 12px; padding: 0; }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form .check input { width: auto; margin-top: 4px; flex-shrink: 0; }
label.check.sm { display: inline-flex; gap: 4px; font-size: .8rem; font-weight: 400; }
label.check.sm input { width: auto; display: inline; margin: 0; }
select.sm { display: inline-block; width: auto; padding: 5px 8px; margin: 0; font-size: .85rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 16px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.two-col.wide-left { grid-template-columns: 1.6fr 1fr; }
.filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; padding: 16px 20px; }
.filters label { font-size: .82rem; font-weight: 600; }
.search { display: flex; gap: 8px; align-items: center; }
.search input { margin: 0; min-width: 240px; padding: 8px 12px; }

/* Tables */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 10px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 10px; border-bottom: 1px solid #eef2f6; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.inactive td { opacity: .5; }
.seg { display: inline-flex; background: #e9eef3; padding: 4px; border-radius: 10px; }
.seg a { padding: 7px 16px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: .9rem; }
.seg a.active { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.seg a:hover { text-decoration: none; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border: 1px solid rgba(226, 233, 240, .7); }
.stat span { display: block; color: var(--muted); font-size: .82rem; font-weight: 600; }
.stat strong { display: block; font-size: 1.75rem; font-weight: 800; margin-top: 4px; }
.stat small { color: var(--muted); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; margin-bottom: 24px; padding-top: 10px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.bar span { width: 100%; background: linear-gradient(180deg, var(--brand-2), var(--brand)); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.bar em { font-style: normal; font-size: .72rem; color: var(--muted); margin-top: 4px; }

/* Auth */
.auth-box { max-width: 440px; margin: 30px auto; }
.auth-box h1 { font-size: 1.6rem; }

/* Landing */
.landing { padding: 0; }
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(255, 255, 255, .18), transparent 60%), linear-gradient(135deg, #084e63 0%, #0b6e8a 45%, #14a3a3 100%); color: #fff; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; padding-top: 70px; padding-bottom: 80px; }
.hero h1 { font-size: 3.1rem; line-height: 1.08; font-weight: 800; margin-bottom: 18px; }
.hero .lead { font-size: 1.15rem; opacity: .92; max-width: 560px; }
.hero-cta { display: flex; align-items: center; gap: 22px; margin: 28px 0 22px; flex-wrap: wrap; }
.price-tag { font-size: 1.6rem; font-weight: 800; }
.price-tag small { font-size: .9rem; font-weight: 500; opacity: .8; }
.live-slot { display: inline-flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); padding: 10px 16px; border-radius: 999px; backdrop-filter: blur(6px); }
.live-slot .dot { width: 10px; height: 10px; border-radius: 50%; background: #5ff0b0; box-shadow: 0 0 0 0 rgba(95, 240, 176, .7); animation: ping 1.8s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(95, 240, 176, .7); } 70% { box-shadow: 0 0 0 12px rgba(95, 240, 176, 0); } 100% { box-shadow: 0 0 0 0 rgba(95, 240, 176, 0); } }
.hero-visual { display: flex; justify-content: center; }
.phone { width: 280px; height: 520px; background: #0c1b29; border-radius: 40px; padding: 14px; position: relative; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); transform: rotate(-4deg); }
.phone-video { height: 100%; border-radius: 28px; background: linear-gradient(160deg, #2b5876, #4e4376); position: relative; overflow: hidden; }
.doc-silhouette { position: absolute; left: 50%; bottom: 0; width: 180px; height: 300px; transform: translateX(-50%); background: radial-gradient(circle at 50% 22%, #f2d2b6 0 38px, transparent 39px), radial-gradient(ellipse at 50% 100%, #fff 0 95px, transparent 96px); }
.doc-silhouette::after { content: ''; position: absolute; left: 50%; top: 104px; width: 36px; height: 60px; transform: translateX(-50%); border: 3px solid #14a3a3; border-top: 0; border-radius: 0 0 20px 20px; }
.self-view { position: absolute; right: 14px; top: 14px; width: 70px; height: 96px; border-radius: 12px; background: linear-gradient(160deg, #d8e7ef, #9fbccc); border: 2px solid rgba(255, 255, 255, .6); }
.call-bar { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 14px; }
.call-bar span { width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .25); }
.call-bar .end { background: #e5484d; }
.phone-card { position: absolute; left: -70px; top: 90px; background: #fff; color: var(--ink); padding: 12px 16px; border-radius: 14px; box-shadow: 0 12px 30px rgba(0, 0, 0, .2); transform: rotate(4deg); min-width: 200px; }
.phone-card strong { display: block; font-size: .92rem; }
.phone-card small { color: var(--muted); }
.phone-card::before { content: '\2713'; float: left; width: 30px; height: 30px; border-radius: 50%; background: #e6f6ee; color: var(--ok); display: grid; place-items: center; font-weight: 800; margin-right: 10px; }
.phone-card.rx { left: auto; right: -60px; top: 330px; }
.phone-card.rx::before { content: 'Rx'; background: #e3f2f5; color: var(--brand); font-size: .75rem; }
.steps { padding: 70px 20px 30px; }
.step-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 30px; }
.step { background: #fff; padding: 26px; border-radius: var(--radius); box-shadow: var(--shadow); }
.step span { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 800; margin-bottom: 14px; }
.step p { color: var(--muted); margin: 0; }
.doctors-sec { padding: 40px 20px; }
.doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 26px; }
.doc-tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; color: var(--ink); transition: transform .15s, box-shadow .15s; margin: 0; }
.doc-tile:hover { transform: translateY(-3px); text-decoration: none; box-shadow: 0 14px 34px rgba(16, 40, 64, .12); }
.doc-tile .avatar { margin-bottom: 8px; }
.doc-tile .next { margin-top: 10px; font-size: .82rem; font-weight: 700; color: var(--ok); background: #e6f6ee; padding: 4px 12px; border-radius: 999px; }
.doc-tile .next.none { color: var(--muted); background: #eef2f6; }
.trust { padding: 40px 20px 50px; }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.trust-grid h3 { color: var(--brand-dark); }
.trust-grid p { color: var(--muted); }
.emergency { margin-top: 30px; font-size: .9rem; color: var(--muted); }
.cta-band { background: linear-gradient(135deg, #084e63, #14a3a3); color: #fff; padding: 60px 0; }

/* Avatars */
.avatar { width: 46px; height: 46px; border-radius: 50%; background: linear-gradient(135deg, #d5eef2, #b9e2e6); color: var(--brand-dark); display: inline-grid; place-items: center; font-weight: 800; overflow: hidden; flex-shrink: 0; }
.avatar.lg { width: 76px; height: 76px; font-size: 1.4rem; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Booking */
.book-main { min-width: 0; }
.book-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 26px; align-items: start; }
.mode-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.mode { text-align: left; background: #fff; border: 2px solid var(--line); border-radius: var(--radius); padding: 16px 18px; cursor: pointer; font: inherit; color: var(--ink); transition: border .15s, box-shadow .15s; }
.mode strong { display: block; font-size: 1rem; }
.mode span { color: var(--muted); font-size: .87rem; }
.mode.active { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(20, 163, 163, .12); }
.doctor-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 18px; }
.doc-card { display: flex; gap: 12px; align-items: center; text-align: left; background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; font: inherit; color: var(--ink); }
.doc-card.active { border-color: var(--brand-2); background: #f2fbfb; }
.doc-meta strong { display: block; font-size: .93rem; }
.doc-meta small { color: var(--muted); font-size: .8rem; }
.date-strip-wrap { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.strip-nav { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 1.3rem; cursor: pointer; color: var(--brand); }
.date-strip { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 10px; scrollbar-width: thin; flex: 1; }
.day { scroll-snap-align: start; flex: 0 0 82px; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 10px 6px; cursor: pointer; text-align: center; font: inherit; color: var(--ink); display: flex; flex-direction: column; transition: all .15s; }
.day .dow { font-size: .75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.day .dnum { font-size: 1.5rem; font-weight: 800; line-height: 1.15; }
.day .mon { font-size: .75rem; color: var(--muted); }
.day .cnt { font-size: .7rem; font-weight: 700; color: var(--ok); margin-top: 4px; }
.day:hover:not(:disabled) { border-color: var(--brand-2); }
.day.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border-color: transparent; color: #fff; }
.day.active .dow, .day.active .mon, .day.active .cnt { color: #e1fbf8; }
.day.full { opacity: .45; cursor: not-allowed; }
.day.full .cnt { color: var(--muted); }
.slot-panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px 24px; min-height: 240px; }
.slot-panel h2 { font-size: 1.2rem; margin-bottom: 6px; }
.slot-group { margin-top: 18px; }
.slot-group h4 { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.slot { background: #f0f8fa; border: 1.5px solid #cfe8ee; color: var(--brand-dark); border-radius: 10px; padding: 10px 0; font: inherit; font-weight: 700; cursor: pointer; transition: all .12s; }
.slot:hover { background: #e0f3f5; border-color: var(--brand-2); }
.slot.selected { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(11, 110, 138, .3); }
.book-summary { position: sticky; top: 86px; }
.sum-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0 0 18px; font-size: .93rem; }
.sum-list dt { color: var(--muted); }
.sum-list dd { margin: 0; font-weight: 600; }
.sum-total { display: flex; justify-content: space-between; align-items: center; background: #f3f7fa; border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.sum-total strong { font-size: 1.4rem; }
.pay-logos { text-align: center; font-size: .8rem; margin: 10px 0 0; }
.skeleton-row, .skeleton-grid { height: 90px; width: 100%; border-radius: 14px; background: linear-gradient(90deg, #eef3f7 25%, #f7fafc 37%, #eef3f7 63%); background-size: 400% 100%; animation: shimmer 1.4s infinite; }
.skeleton-grid { height: 160px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.spinner { width: 48px; height: 48px; border-radius: 50%; border: 4px solid #e3f2f5; border-top-color: var(--brand); margin: 6px auto 18px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.big-tick { width: 70px; height: 70px; border-radius: 50%; background: #e6f6ee; color: var(--ok); display: grid; place-items: center; font-size: 2.2rem; font-weight: 800; margin: 0 auto 14px; }

/* Patient dashboard */
.appt-cards { display: grid; gap: 14px; }
.appt-card { display: flex; align-items: center; gap: 18px; margin: 0; }
.appt-card.is-open { border: 2px solid var(--ok); }
.appt-date { width: 64px; text-align: center; background: #f0f8fa; border-radius: 12px; padding: 8px 0; flex-shrink: 0; }
.appt-date span { display: block; font-size: .72rem; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.appt-date strong { display: block; font-size: 1.6rem; line-height: 1.1; color: var(--brand-dark); }
.appt-info { flex: 1; display: flex; flex-direction: column; }
.empty-state { text-align: center; padding: 40px; }
.next-up { display: flex; justify-content: space-between; align-items: center; gap: 20px; background: linear-gradient(135deg, #f0fafa, #fff); border: 2px solid #cdeeee; }

/* Doctor schedule */
.sched-day { display: grid; grid-template-columns: 120px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid #eef2f6; }
.sched-name { font-weight: 700; }
.sched-blocks { display: flex; flex-direction: column; gap: 8px; }
.sched-block { display: flex; align-items: center; gap: 8px; }
.sched-block input { width: 120px; margin: 0; padding: 7px 10px; }
.off-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #eef2f6; }
.sig-pad { width: 100%; height: 180px; border: 2px dashed #c4d4e0; border-radius: 12px; background: #fff; touch-action: none; cursor: crosshair; margin-bottom: 12px; }
.sig-current { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.sig-current img { max-width: 260px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

/* Patient file */
.pf-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.pf-head h3 { margin: 0; font-size: 1.25rem; }
.pf-grid { display: grid; grid-template-columns: 150px 1fr; gap: 8px 14px; font-size: .92rem; margin: 0 0 20px; }
.pf-grid dt { color: var(--muted); font-weight: 600; }
.pf-grid dd { margin: 0; }
.pf h4 { margin: 20px 0 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.hist { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.hist summary { padding: 10px 14px; cursor: pointer; display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.hist dl { padding: 0 14px 12px; margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 6px 12px; font-size: .9rem; }
.hist dt { color: var(--muted); }
.hist dd { margin: 0; }
.rx-mini { border-left: 3px solid var(--brand-2); background: #f6fafb; padding: 10px 14px; border-radius: 0 10px 10px 0; margin-bottom: 10px; font-size: .92rem; }
.rx-mini ul { margin: 6px 0 0; padding-left: 18px; }
.rx-mini.issued { border-left-color: var(--ok); background: #eef9f3; }

/* Consultation room */
body.consult-page { background: #0e1c2a; }
body.consult-page .site-footer { display: none; }
.consult-main { padding: 0; }
.consult { display: grid; grid-template-columns: 1fr; height: calc(100vh - 66px); }
.consult.with-panel { grid-template-columns: 1fr 440px; }
.video-area { display: flex; flex-direction: column; min-height: 0; color: #fff; }
.video-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: #13263a; gap: 12px; }
.video-head .muted { color: #9fb3c6; margin-left: 10px; font-size: .88rem; }
.timer { font-weight: 700; font-variant-numeric: tabular-nums; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); font-size: .88rem; }
.timer.live { background: #17915c; }
.timer.over { background: #c98a0c; }
.jitsi-frame { flex: 1; min-height: 0; }
.jitsi-frame iframe { border: 0; }
.waiting { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; color: #fff; }
.waiting h2 { max-width: 520px; }
.waiting .muted { color: #9fb3c6; }
.countdown { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; margin: 10px 0 20px; }
.tips { list-style: none; padding: 0; color: #b9cad9; line-height: 2; }
.pulse { width: 90px; height: 90px; border-radius: 50%; background: radial-gradient(circle, #14a3a3 0 30%, transparent 31%); animation: ping2 2s infinite; margin-bottom: 20px; }
@keyframes ping2 { 0% { box-shadow: 0 0 0 0 rgba(20, 163, 163, .6); } 100% { box-shadow: 0 0 0 40px rgba(20, 163, 163, 0); } }
.consult-panel { background: #fff; display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab { flex: 1; background: none; border: 0; padding: 14px 6px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; }
.tab.active { color: var(--brand-dark); border-bottom-color: var(--brand); }
.tab-body { flex: 1; overflow-y: auto; padding: 18px 20px; }
.panel-foot { padding: 14px 20px; border-top: 1px solid var(--line); }
.rx-item { border: 1px solid var(--line); border-radius: 10px; padding: 12px 12px 4px; margin-bottom: 10px; background: #fbfdfe; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #fff; padding: 22px 0; font-size: .85rem; color: var(--ink); }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* Responsive */
@media (max-width: 980px) {
  .book-layout, .two-col, .two-col.wide-left, .hero-inner { grid-template-columns: 1fr; }
  .book-summary { position: static; }
  .hero-visual { display: none; }
  .hero h1 { font-size: 2.3rem; }
  .step-grid, .stats { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .consult.with-panel { grid-template-columns: 1fr; height: auto; }
  .consult .video-area { height: 62vh; }
  .consult-panel { min-height: 70vh; }
}
@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .mainnav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 10px 20px 20px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  body.nav-open .mainnav { display: flex; }
  .nav-user { border: 0; margin: 10px 0 0; padding: 0 12px; }
  .grid-2, .grid-3, .mode-switch { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .step-grid { grid-template-columns: 1fr; }
  h1 { font-size: 1.6rem; }
  .card { padding: 18px; }
  .table { display: block; overflow-x: auto; }
  .sched-day { grid-template-columns: 1fr; }
  .appt-card { flex-wrap: wrap; }
  .pf-grid { grid-template-columns: 1fr; }
  .next-up { flex-direction: column; align-items: stretch; }
  .search input { min-width: 0; }
}

/* ---- Web app / mobile polish ---- */
.install-box { display: flex; align-items: center; gap: 14px; padding: 14px 18px; position: relative; border: 2px solid #cdeeee; }
.install-box img { border-radius: 12px; flex-shrink: 0; }
.install-box > div { flex: 1; display: flex; flex-direction: column; font-size: .92rem; }
.install-close { background: none; border: 0; font-size: 1.4rem; color: var(--muted); cursor: pointer; padding: 0 4px; }
body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.consult { height: calc(100vh - 66px); height: calc(100dvh - 66px); }
@media (max-width: 980px) {
  .consult.with-panel { height: auto; }
  .consult.with-panel .video-area { height: 60vh; height: 60dvh; }
  .consult:not(.with-panel) .video-area { height: calc(100dvh - 66px); }
}
@media (max-width: 760px) {
  input, select, textarea { font-size: 16px !important; } /* stops iPhone zooming into fields */
  .strip-nav { display: none; }
  .day { flex-basis: 74px; }
  .slot-grid { grid-template-columns: repeat(4, 1fr); }
  .slot { padding: 12px 0; }
  .slot-panel { padding: 18px 16px; }
  .book-summary { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .video-head { padding: 10px 14px; flex-wrap: wrap; }
  .video-head .muted { display: block; margin: 2px 0 0; }
  .countdown { font-size: 2rem; }
  .appt-card .btn { width: 100%; }
  .page-head.row-between .btn-lg { width: 100%; }
  .topbar { padding-top: env(safe-area-inset-top); }
  .brand small { display: none; }
}
@media (display-mode: standalone) {
  .site-footer { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
}
@media (max-width: 760px) {
  .install-box { flex-wrap: wrap; }
  .install-box > div { flex-basis: calc(100% - 100px); }
  .install-box [data-install] { width: 100%; order: 3; }
  .install-close { position: absolute; top: 8px; right: 10px; }
}

/* ---- v2: staff calendar, booking, reports ---- */
.wide-page { max-width: 1500px; }
.mainnav a { padding: 8px 10px; }
@media (max-width: 1280px) and (min-width: 761px) { .mainnav a { font-size: .85rem; padding: 7px 7px; } .brand small { display: none; } .nav-user { margin-left: 4px; padding-left: 8px; } }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.small { font-size: .82rem; }
.text-bad { color: var(--bad); }
h4.mini { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 8px; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f6fafb; }
.filters-inline { flex-wrap: wrap; }
.filters-inline input, .filters-inline select { width: auto; min-width: 0; margin: 0; padding: 7px 10px; }
.copy-row { display: flex; gap: 8px; margin-bottom: 8px; }
.copy-row input { flex: 1; padding: 8px 10px; border: 1px solid #cfdae4; border-radius: 8px; font: inherit; font-size: .82rem; background: #f6f9fb; }
.lookup { display: flex; flex-direction: column; gap: 4px; margin: -6px 0 12px; }
.lookup button { text-align: left; background: #f0f8fa; border: 1px solid #cfe8ee; border-radius: 8px; padding: 8px 12px; font: inherit; cursor: pointer; }
.lookup button:hover { border-color: var(--brand-2); }
.email-preview { border: 1px solid var(--line); border-radius: 10px; padding: 18px; background: #fff; }
.type-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: #9aa9b7; }
.type-dot.online { background: var(--brand-2); } .type-dot.in_person { background: #6b5bd2; } .type-dot.follow_up { background: #d8912a; }

.cal-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-title { font-size: 1.35rem; margin: 0 0 0 8px; }
.cal-filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cal-filters input, .cal-filters select { padding: 7px 10px; border: 1px solid #cfdae4; border-radius: 8px; font: inherit; font-size: .9rem; background: #fff; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; margin-bottom: 12px; align-items: center; }
.lg::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; background: #9aa9b7; }
.lg.online::before { background: var(--brand-2); } .lg.in_person::before { background: #6b5bd2; } .lg.follow_up::before { background: #d8912a; }
.lg.pending::before { background: #fff; border: 2px dashed var(--brand-2); box-sizing: border-box; }
.lg.block::before { background: repeating-linear-gradient(45deg, #dfe5eb 0 4px, #eef2f6 4px 8px); }
.lg.hours::before { background: #e5f6f4; border: 1px solid #c8ebe7; }
.cal-scroll { overflow: auto; max-height: calc(100vh - 210px); min-height: 420px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); }
.cal { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(150px, 1fr)); min-width: calc(56px + var(--cols) * 150px); }
.cal-head { position: sticky; top: 0; z-index: 3; background: #fff; border-bottom: 1px solid var(--line); border-left: 1px solid #eef2f6; padding: 10px 8px; text-align: center; font-weight: 700; font-size: .9rem; }
.cal-head a { color: var(--ink); }
.cal-head small { display: block; color: var(--muted); font-weight: 500; font-size: .75rem; }
.cal-head.is-today { background: #eaf7f7; color: var(--brand-dark); }
.cal-corner { border-left: 0; }
.cal-times { position: relative; }
.cal-times span { position: absolute; right: 8px; transform: translateY(-50%); font-size: .72rem; color: var(--muted); }
.cal-times span:first-child { transform: none; }
.cal-col { position: relative; border-left: 1px solid #eef2f6; cursor: copy;
  background-image: repeating-linear-gradient(to bottom, #e9eef3 0 1px, transparent 1px var(--hour)), repeating-linear-gradient(to bottom, transparent 0 calc(var(--hour) / 2), #f4f7fa calc(var(--hour) / 2) calc(var(--hour) / 2 + 1px), transparent calc(var(--hour) / 2 + 1px) var(--hour)); }
.cal-hours { position: absolute; left: 0; right: 0; background: rgba(20, 163, 163, .07); border-left: 3px solid rgba(20, 163, 163, .35); pointer-events: none; }
.cal-block { position: absolute; left: 2px; right: 2px; background: repeating-linear-gradient(45deg, #dfe5eb 0 6px, #eef2f6 6px 12px); border-radius: 6px; font-size: .72rem; color: #4d5d6c; padding: 2px 6px; overflow: hidden; pointer-events: none; }
.cal-ev { position: absolute; left: 4px; right: 4px; border-radius: 7px; padding: 3px 7px; font-size: .78rem; line-height: 1.3; overflow: hidden; color: #fff; background: #7d8c9b; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); z-index: 2; }
.cal-ev:hover { text-decoration: none; filter: brightness(1.06); z-index: 4; }
.cal-ev small { display: block; opacity: .9; font-size: .7rem; }
.cal-ev.online { background: var(--brand-2); } .cal-ev.in_person { background: #6b5bd2; } .cal-ev.follow_up { background: #d8912a; }
.cal-ev.st-pending { background: #fff; color: var(--brand-dark); border: 2px dashed var(--brand-2); }
.cal-ev.st-completed { opacity: .7; } .cal-ev.st-no_show { opacity: .5; text-decoration: line-through; }
.cal-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 3; pointer-events: none; }
.cal-now::before { content: ''; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bad); }
@media (max-width: 760px) { .cal-title { font-size: 1.05rem; width: 100%; margin: 6px 0 0; } .cal-nav { flex-wrap: wrap; } .cal { grid-template-columns: 46px repeat(var(--cols), minmax(130px, 1fr)); } }
