:root {
  --navy: #12374f;
  --deep: #0c293d;
  --blue: #176580;
  --coral: #e85d3d;
  --coral-dark: #c94a31;
  --mist: #f2f7f9;
  --soft: #e6f0f3;
  --line: #dbe5e9;
  --ink: #203746;
  --muted: #6a7b86;
  --green: #176c4b;
  --amber: #946012;
  --red: #a53535;
  --shadow: 0 18px 55px rgba(12, 41, 61, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f8fafb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #f8fafb; color: var(--ink); }
a { color: var(--blue); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
.wrap { width: min(1180px, calc(100% - 44px)); margin-inline: auto; }
.site-top { position: relative; z-index: 2; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.95); }
.site-top-inner { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy); font-weight: 850; text-decoration: none; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; font-weight: 650; letter-spacing: .04em; }
.brand-mark, .hero-note-mark { display: grid; width: 43px; height: 43px; flex: none; place-items: center; border-radius: 14px; background: var(--navy); color: #fff; font-size: .78rem; font-weight: 900; letter-spacing: .06em; }
.public-nav { display: flex; flex-wrap: wrap; gap: 10px; }
.public-nav a { padding: 10px 14px; border-radius: 999px; color: var(--navy); font-size: .86rem; font-weight: 800; text-decoration: none; }
.public-nav a:hover { background: var(--mist); }
.public-hero { padding: 75px 0 78px; overflow: hidden; background: radial-gradient(circle at 83% 16%, rgba(232,93,61,.14), transparent 24%), linear-gradient(125deg, var(--deep), var(--navy) 72%, #28637b); color: #fff; }
.public-hero-grid { display: grid; grid-template-columns: 1.15fr .7fr; align-items: center; gap: 70px; }
.eyebrow { margin: 0 0 13px; color: var(--coral-dark); font-size: .68rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.public-hero .eyebrow { color: #f7b4a1; }
h1, h2, h3, p { overflow-wrap: anywhere; }
.public-hero h1 { max-width: 720px; margin: 0; color: #fff; font-size: clamp(2.7rem, 6vw, 5.2rem); letter-spacing: -.065em; line-height: .99; }
.lead { max-width: 610px; margin: 22px 0 0; color: #d9e7ec; font-size: 1.07rem; line-height: 1.75; }
.text-link { display: inline-flex; margin-top: 20px; color: var(--blue); font-weight: 800; text-decoration: none; }
.public-hero .text-link { color: #ffd2c5; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.hero-note { padding: 26px; border: 1px solid rgba(255,255,255,.2); border-radius: 23px; background: rgba(255,255,255,.08); box-shadow: 0 25px 65px rgba(0,0,0,.12); backdrop-filter: blur(8px); }
.hero-note-mark { margin-bottom: 24px; border: 1px solid rgba(255,255,255,.2); background: var(--coral); }
.hero-note strong { display: block; font-size: 1.1rem; }
.hero-note p { margin: 9px 0 0; color: #d9e7ec; font-size: .89rem; line-height: 1.65; }
.public-hero--contact { padding-block: 58px; }
.section { padding: 54px 0 74px; }
.public-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); align-items: start; gap: 26px; }
.form-card, .side-card, .receipt-card { border: 1px solid var(--line); border-radius: 21px; background: #fff; box-shadow: var(--shadow); }
.form-card { padding: clamp(22px, 4vw, 40px); }
.side-card { position: sticky; top: 20px; padding: 27px; }
.section-heading { margin-bottom: 25px; }
.section-heading .eyebrow { margin-bottom: 7px; }
.section-heading h2, .side-card h3 { margin: 0; color: var(--navy); font-size: clamp(1.55rem, 3vw, 2rem); letter-spacing: -.04em; }
.section-heading p:not(.eyebrow) { margin: 9px 0 0; }
.muted { color: var(--muted); }
.small { font-size: .8rem; line-height: 1.6; }
.stack-form { display: grid; gap: 17px; }
.stack-form label, .export-form label, .filter-form label { display: grid; gap: 7px; color: var(--navy); font-size: .82rem; font-weight: 800; }
.stack-form input:not([type=checkbox]), .stack-form select, .stack-form textarea,
.filter-form input, .filter-form select, .export-form input, .export-form select,
.manage-row input:not([type=checkbox]), .manage-row select {
  width: 100%; min-height: 47px; padding: 11px 13px; border: 1px solid #ccd9df; border-radius: 10px; outline: 0; background: #fff; color: var(--ink); font-size: .91rem; font-weight: 500; transition: border-color .18s ease, box-shadow .18s ease;
}
.stack-form textarea { min-height: 130px; resize: vertical; }
.stack-form input:focus, .stack-form select:focus, .stack-form textarea:focus,
.manage-row input:focus, .manage-row select:focus, .filter-form input:focus, .filter-form select:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,101,128,.13);
}
.form-two { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 15px; }
.check-row { display: flex !important; grid-template-columns: auto 1fr; align-items: flex-start; gap: 10px !important; color: var(--muted) !important; font-size: .78rem !important; font-weight: 550 !important; line-height: 1.55; }
.check-row input { flex: none; width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--blue); }
.honeypot { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.btn { display: inline-flex; min-height: 44px; align-items: center; justify-content: center; gap: 8px; padding: 11px 17px; border: 1px solid transparent; border-radius: 10px; cursor: pointer; font-size: .88rem; font-weight: 850; text-align: center; text-decoration: none; transition: transform .18s ease, background .18s ease, box-shadow .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid rgba(232,93,61,.55); outline-offset: 3px; }
.btn--primary { background: var(--coral); color: #fff; box-shadow: 0 8px 17px rgba(201,74,49,.18); }
.btn--primary:hover { background: var(--coral-dark); }
.btn--quiet { border-color: var(--line); background: #fff; color: var(--navy); }
.btn--small { min-height: 34px; padding: 7px 10px; border-color: var(--line); background: #fff; color: var(--navy); font-size: .75rem; }
.btn:disabled { cursor: not-allowed; opacity: .55; transform: none; }
.payment-callout { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid #c8e3e9; border-radius: 11px; background: #f0f8fa; color: var(--navy); font-size: .83rem; }
.payment-callout span { color: var(--muted); line-height: 1.5; }
.clinic-contact { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.clinic-contact small, .receipt-grid small, .receipt-number small { display: block; color: var(--muted); font-size: .69rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.clinic-contact p { margin: 5px 0 14px; color: var(--ink); font-size: .89rem; line-height: 1.6; }
.clinic-contact a { font-weight: 800; }
.steps { display: grid; gap: 17px; margin: 20px 0 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 34px 1fr; align-items: start; gap: 10px; color: var(--muted); font-size: .85rem; line-height: 1.5; }
.steps b { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 10px; background: var(--soft); color: var(--blue); font-size: .7rem; }
.notice { margin: 0 0 18px; padding: 13px 15px; border: 1px solid #cddfe6; border-radius: 11px; background: #f0f7fa; color: var(--navy); font-size: .85rem; line-height: 1.55; }
.notice--success { border-color: #b5ddca; background: #edf8f1; color: var(--green); }
.notice--error { border-color: #ebc0c0; background: #fff2f1; color: var(--red); }
.notice--warning { border-color: #f0dfb7; background: #fff8e9; color: var(--amber); }
.receipt-card { max-width: 880px; margin: 0 auto; padding: clamp(22px, 4vw, 42px); }
.receipt-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.receipt-head h1, .receipt-head h2 { margin: 0; color: var(--navy); font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -.05em; }
.receipt-head p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: .86rem; }
.receipt-number { min-width: 150px; padding: 14px; border-radius: 12px; background: var(--mist); }
.receipt-number strong { display: block; margin-top: 5px; color: var(--navy); }
.receipt-card > .notice { margin-top: 20px; }
.receipt-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; padding: 25px 0; }
.receipt-grid strong { display: block; margin-top: 6px; color: var(--navy); font-size: .95rem; }
.receipt-total { display: flex; justify-content: space-between; gap: 16px; padding: 17px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: var(--navy); font-weight: 800; }
.receipt-total strong { color: var(--coral-dark); font-size: 1.3rem; }
.online-payment-form { display: grid; justify-items: start; gap: 9px; padding: 20px 0 4px; }
.online-payment-form p { margin: 0; }
.checkout-card h1 { margin: 0; color: var(--navy); font-size: clamp(1.8rem, 4vw, 2.7rem); letter-spacing: -.05em; }
.checkout-card > p:not(.eyebrow) { max-width: 650px; line-height: 1.6; }
.razorpay-checkout { display: grid; justify-items: start; gap: 12px; margin: 22px 0; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--mist); }
.checkout-status { margin: 0; color: var(--navy); font-size: .9rem; line-height: 1.55; }
.public-footer { padding: 24px 0; border-top: 1px solid var(--line); background: #fff; color: var(--muted); font-size: .8rem; }
.public-footer .wrap { display: flex; justify-content: space-between; gap: 15px; }

/* Staff portal */
.admin-shell { display: grid; min-height: 100vh; grid-template-columns: 255px minmax(0,1fr); background: #f4f7f8; }
.admin-sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 22px 16px 16px; border-right: 1px solid var(--line); background: #fff; }
.admin-sidebar .brand { padding: 0 8px 23px; border-bottom: 1px solid var(--line); }
.admin-nav { display: grid; align-content: start; gap: 4px; padding-top: 18px; }
.admin-nav a { padding: 11px 12px; border-radius: 9px; color: #516573; font-size: .86rem; font-weight: 750; text-decoration: none; }
.admin-nav a:hover, .admin-nav a.active { background: var(--mist); color: var(--blue); }
.admin-nav a.active { box-shadow: inset 3px 0 var(--coral); }
.nav-label { margin: 18px 11px 5px; color: #9aa8af; font-size: .65rem; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.sidebar-bottom { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding: 14px 8px 4px; border-top: 1px solid var(--line); color: var(--navy); font-size: .8rem; font-weight: 800; }
.sidebar-bottom small { display: block; margin-top: 3px; color: var(--muted); font-size: .7rem; font-weight: 600; }
.logout-btn { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--red); cursor: pointer; font-size: .72rem; font-weight: 800; }
.admin-main { min-width: 0; padding: 32px clamp(18px, 4vw, 52px) 25px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.admin-topbar .eyebrow { margin-bottom: 5px; }
.admin-topbar h1 { margin: 0; color: var(--navy); font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -.05em; text-transform: capitalize; }
.user-pill { padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: .76rem; font-weight: 800; }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { min-height: 135px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 7px 24px rgba(12,41,61,.035); }
.stat-card small { display: block; color: var(--muted); font-size: .72rem; font-weight: 800; }
.stat-card strong { display: block; margin-top: 12px; color: var(--navy); font-size: clamp(1.55rem, 3vw, 2.15rem); letter-spacing: -.05em; }
.stat-card span { display: block; margin-top: 5px; color: #96a4ab; font-size: .7rem; }
.panel { min-width: 0; margin-bottom: 19px; padding: 21px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: 0 7px 24px rgba(12,41,61,.035); }
.panel--soft { background: var(--mist); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 17px; }
.panel-heading .eyebrow { margin-bottom: 5px; }
.panel-heading h2 { margin: 0; color: var(--navy); font-size: 1.25rem; letter-spacing: -.035em; }
.empty-state { padding: 28px 12px; color: var(--muted); text-align: center; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 10px 11px; border-bottom: 1px solid var(--line); color: #83929a; font-size: .66rem; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 11px; border-bottom: 1px solid #edf1f3; color: var(--ink); font-size: .82rem; vertical-align: top; }
td strong { color: var(--navy); }
td small { display: block; margin-top: 4px; color: var(--muted); font-size: .73rem; line-height: 1.45; }
tr:last-child td { border-bottom: 0; }
.status { display: inline-flex; padding: 5px 8px; border-radius: 999px; background: #edf2f5; color: #60717b; font-size: .67rem; font-weight: 850; white-space: nowrap; }
.status--confirmed, .status--completed, .status--paid, .status--converted { background: #e8f5ee; color: var(--green); }
.status--pending, .status--new, .status--issued { background: #fff4dd; color: var(--amber); }
.status--cancelled, .status--closed, .status--no_show { background: #fceceb; color: var(--red); }
.filter-form, .export-form { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 17px; }
.filter-form label, .export-form label { min-width: 150px; }
.filter-form input, .filter-form select, .export-form input, .export-form select { min-height: 40px; padding: 8px 10px; font-size: .79rem; }
.filter-form { margin-bottom: 18px; }
.action-cell { min-width: 225px; }
.inline-form { display: flex; align-items: center; gap: 6px; }
.inline-form select { max-width: 145px; min-height: 34px; padding: 6px 7px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--navy); font-size: .72rem; }
.mini-link { display: inline-flex; margin-top: 5px; font-size: .73rem; font-weight: 800; }
.payment-details { margin-top: 9px; font-size: .73rem; }
.payment-details summary { color: var(--blue); cursor: pointer; font-weight: 850; }
.payment-warning { color: var(--amber) !important; font-weight: 800; }
.compact-form { max-width: 190px; gap: 8px; margin-top: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--mist); }
.compact-form label { font-size: .7rem; }
.compact-form input, .compact-form select { min-height: 34px !important; padding: 6px 8px !important; font-size: .75rem !important; }
.message-cell { max-width: 420px; white-space: pre-wrap; }
.manage-row { display: grid; grid-template-columns: 1.2fr 1.4fr 1.4fr auto auto auto; align-items: end; gap: 10px; padding: 15px 0; border-bottom: 1px solid #edf1f3; }
.manage-row label { display: grid; gap: 6px; color: var(--navy); font-size: .72rem; font-weight: 800; }
.manage-row input:not([type=checkbox]), .manage-row select { min-height: 38px; padding: 7px 9px; font-size: .78rem; }
.manage-row--service { grid-template-columns: 1.6fr .75fr .8fr auto auto auto; }
.check-mini { display: flex !important; align-items: center; gap: 5px !important; white-space: nowrap; }
.check-mini input { accent-color: var(--blue); }
.doctor-assignment { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; }
.doctor-assignment legend { padding: 0 6px; color: var(--navy); font-size: .7rem; font-weight: 850; }
.check-grid { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.subheading { margin: 22px 0 8px; color: var(--navy); font-size: 1rem; }
.settings-form { max-width: 620px; }
.settings-form label { max-width: 100%; }
.admin-footer { padding: 14px 0; color: #98a5ac; font-size: .72rem; text-align: center; }
.auth-shell { display: grid; min-height: 100vh; place-items: center; padding: 26px; background: radial-gradient(circle at 80% 15%, rgba(232,93,61,.13), transparent 25%), linear-gradient(135deg, #eef4f6, #f9fbfc); }
.auth-card { width: min(470px,100%); padding: clamp(24px,5vw,42px); border: 1px solid var(--line); border-radius: 21px; background: #fff; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0 0 22px; color: var(--navy); font-size: 2.3rem; letter-spacing: -.06em; }
.auth-card .brand { margin-bottom: 34px; }
.auth-card .small { margin: 18px 0 0; }

@media (max-width: 1000px) {
  .admin-shell { grid-template-columns: 210px minmax(0,1fr); }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .manage-row, .manage-row--service { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 720px) {
  .wrap { width: min(100% - 30px,1180px); }
  .site-top-inner { align-items: flex-start; flex-direction: column; padding-block: 14px; }
  .public-nav { width: 100%; gap: 4px; }
  .public-nav a { padding: 8px 10px; font-size: .78rem; }
  .public-hero { padding: 48px 0 54px; }
  .public-hero-grid, .public-layout { grid-template-columns: 1fr; gap: 22px; }
  .public-hero-grid { gap: 30px; }
  .hero-note { padding: 20px; }
  .section { padding: 32px 0 48px; }
  .side-card { position: static; }
  .form-two { grid-template-columns: 1fr; gap: 15px; }
  .public-footer .wrap { flex-direction: column; }
  .admin-shell { display: block; }
  .admin-sidebar { position: relative; width: 100%; height: auto; padding: 13px 14px 10px; border-right: 0; border-bottom: 1px solid var(--line); }
  .admin-sidebar .brand { padding: 0 3px 12px; }
  .admin-nav { display: flex; overflow-x: auto; gap: 5px; padding: 10px 0 2px; scrollbar-width: thin; }
  .admin-nav a { flex: none; padding: 9px 10px; font-size: .75rem; white-space: nowrap; }
  .admin-nav .nav-label { display: none; }
  .sidebar-bottom { margin-top: 8px; padding: 9px 3px 2px; }
  .admin-main { padding: 23px 15px; }
  .admin-topbar { align-items: flex-start; }
  .panel { padding: 15px; }
  .manage-row, .manage-row--service { grid-template-columns: 1fr 1fr; }
  .export-form label, .filter-form label { flex: 1 1 130px; }
  .receipt-head { flex-direction: column; }
  .receipt-number { width: fit-content; }
}
@media (max-width: 440px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { min-height: 118px; padding: 13px; }
  .stat-card small { font-size: .67rem; }
  .stat-card strong { font-size: 1.5rem; }
  .receipt-grid { grid-template-columns: 1fr; gap: 15px; }
  .receipt-total { flex-direction: column; }
  .manage-row, .manage-row--service { grid-template-columns: 1fr; }
  .admin-topbar { flex-direction: column; }
}
@media print {
  body { background: #fff; }
  .site-top, .public-footer, .no-print, .admin-sidebar, .admin-topbar { display: none !important; }
  .wrap, .receipt-card { width: 100%; max-width: none; margin: 0; padding: 12px; border: 0; box-shadow: none; }
  .receipt-card { break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
