:root {
  --bg: #ffffff;
  --band: #f3faf8;
  --band-2: #eef8f3;
  --surface: #ffffff;
  --ink: #10272b;
  --muted: #63777a;
  --primary: #087783;
  --primary-dark: #064b56;
  --teal-soft: #dff5f2;
  --green: #38a169;
  --green-soft: #e5f7ec;
  --gold: #d8a73d;
  --danger: #c92a3f;
  --line: #d9e9e6;
  --shadow: 0 18px 48px rgba(6, 75, 86, 0.12);
  --shadow-soft: 0 10px 30px rgba(6, 75, 86, 0.08);
  --radius: 8px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
p { overflow-wrap: break-word; }

.wrap {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.ticker {
  width: 100%;
  overflow: hidden;
  background: #053f49;
  color: #fff;
  white-space: nowrap;
}

.ticker-track {
  display: flex;
  gap: 52px;
  width: max-content;
  padding: 9px 0;
  animation: ticker 58s linear infinite;
}

.ticker span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  font-weight: 800;
}

.ticker span::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #7ee2b8;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.notice-bar {
  border-bottom: 1px solid #f3d594;
  background: #fff6df;
  color: #684b08;
  font-weight: 800;
  padding: 10px 0;
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(217, 233, 230, 0.86);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.header-row {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  min-width: 250px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand strong, .brand small { display: block; }
.brand strong { font-size: 1rem; letter-spacing: 0; }
.brand small { color: var(--muted); font-size: 0.77rem; font-weight: 750; }

.brand-copy {
  min-width: 0;
}

.logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #087783, #23a785);
  color: #fff;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(8, 119, 131, 0.18);
}

.brand-logo {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 50%;
  filter: drop-shadow(0 10px 18px rgba(6, 75, 86, 0.12));
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  border-radius: 8px;
  color: #294347;
  font-size: 0.84rem;
  font-weight: 820;
  padding: 9px 8px;
}

.nav a:hover, .nav a.active {
  background: var(--teal-soft);
  color: var(--primary-dark);
}

.actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.header-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  margin-left: auto;
}

.menu-btn, .icon-btn, .btn {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 900;
}

.menu-btn, .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-color: var(--line);
  color: var(--primary-dark);
  padding: 9px 12px;
}

.whatsapp-btn {
  border-color: #bfead3;
  background: var(--green-soft);
  color: #156a43;
}

.menu-btn { display: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: #fff;
  padding: 11px 16px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(8, 119, 131, 0.2);
}

.btn.outline {
  background: #fff;
  border-color: var(--line);
  color: var(--primary);
}

.btn.danger { background: var(--danger); }

.hero {
  position: relative;
  overflow: hidden;
  min-height: calc(100vh - 98px);
  background: #fff;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.94) 42%, rgba(255,255,255,0.36) 68%, rgba(255,255,255,0.08) 100%),
    var(--hero-image);
  background-position: center;
  background-size: cover;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 385px;
  gap: 46px;
  align-items: center;
  min-height: calc(100vh - 98px);
  padding: 58px 0 44px;
}

.hero-copy { max-width: 760px; }
.hero-copy, .panel, .card, .content, .section-head { min-width: 0; }

.hero h1, .page-hero h1, .department-hero h1 {
  margin: 0;
  color: #0d2f35;
  font-size: clamp(3.25rem, 8vw, 6.6rem);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero p, .page-hero p, .department-hero p, .lead {
  max-width: 690px;
  color: #445f63;
  font-size: clamp(1.02rem, 1.45vw, 1.22rem);
}

.trust-strip, .mini-stats, .status-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 26px;
}

.stat, .status-grid span {
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  padding: 16px;
}

.stat strong, .status-grid strong {
  display: block;
  color: var(--primary-dark);
  font-size: 1.55rem;
  line-height: 1;
}

.stat span, .status-grid span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
}

.hero-panel, .panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  padding: 22px;
}

.hero-panel h2, .panel h2, .panel h3 { margin-top: 0; }

.quick-form, .form {
  display: grid;
  gap: 14px;
}

.section {
  padding: 76px 0;
  background: #fff;
}

.section.compact { padding: 22px 0; }
.section.muted, .page-hero, .department-hero { background: var(--band); }

.emergency-access {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.emergency-tile {
  min-height: 116px;
  display: grid;
  align-content: center;
  gap: 8px;
  border: 1px solid #bee7e2;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f2fbf8);
  box-shadow: var(--shadow-soft);
  padding: 18px;
}

.emergency-tile:first-child {
  border-color: #f5b5bd;
  background: linear-gradient(180deg, #fff, #fff4f5);
}

.emergency-tile strong {
  color: var(--primary-dark);
  font-size: 1.02rem;
}

.emergency-tile span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 28px;
}

.section-head h2, .content h2, .admin-head h2 {
  margin: 0;
  color: #12363b;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-head p, .content p, .card p, .panel p {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.grid.two-admin, .split, .assistant-layout, .payment-layout, .appointment-layout, .department-content, .department-hero-grid, .admin-auth { grid-template-columns: repeat(2, 1fr); }
.split, .assistant-layout, .payment-layout, .appointment-layout, .department-content, .department-hero-grid, .admin-auth {
  display: grid;
  gap: 34px;
  align-items: start;
}

.appointment-layout {
  grid-template-columns: minmax(0, 0.85fr) minmax(420px, 1fr);
}

.card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(6, 75, 86, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-3px);
  border-color: #b8ded9;
  box-shadow: var(--shadow-soft);
}

.card img, .visual-card img, .department-doctor-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  background: var(--band);
}

.card-body {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.card h3, .panel h3 {
  margin: 0;
  color: #15383d;
  font-size: 1.08rem;
  line-height: 1.2;
}

.icon, .pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--primary-dark);
  font-size: 0.76rem;
  font-weight: 950;
  padding: 7px 9px;
}

.pill {
  border-radius: 999px;
  background: var(--green-soft);
  color: #166343;
}

.text-link {
  color: var(--primary);
  font-weight: 920;
}

.visual-card, .department-doctor-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.visual-card img { height: 440px; }
.department-doctor-card { display: grid; grid-template-columns: 42% 1fr; align-items: center; }
.department-doctor-card img { height: 100%; min-height: 260px; }
.department-doctor-card div { padding: 22px; }

.page-hero, .department-hero {
  padding: 70px 0;
}

.department-hero {
  position: relative;
  overflow: hidden;
}

.department-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(243,250,248,0.98), rgba(243,250,248,0.88), rgba(243,250,248,0.2)),
    var(--dept-image);
  background-size: cover;
  background-position: center;
}

.department-hero-grid {
  position: relative;
  z-index: 1;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: uppercase;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: #29464a;
  font-size: 0.84rem;
  font-weight: 850;
}

.input, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  outline: none;
}

.input:focus, textarea:focus {
  border-color: #2aa9a1;
  box-shadow: 0 0 0 4px rgba(42, 169, 161, 0.14);
}

.textarea { min-height: 110px; resize: vertical; }
.error { min-height: 16px; color: var(--danger); font-size: 0.78rem; font-weight: 750; }

.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #31555a;
  font-size: 0.9rem;
  font-weight: 760;
}

.consent-field input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: var(--primary);
}

.emergency-panel {
  margin-top: 22px;
  border-color: rgba(201, 42, 63, 0.25);
  background: linear-gradient(180deg, #fff, #fff6f6);
}

.opd-time {
  color: var(--primary-dark);
  font-size: 0.9rem;
}

.check-list, .activity-list, .summary-list {
  padding: 0;
  margin: 18px 0 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin: 10px 0;
  padding-left: 24px;
  color: #36555a;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.48em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 22px;
}

.toolbar .input { max-width: 520px; }

.summary-list {
  display: grid;
  gap: 8px;
}

.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}

.summary-list strong {
  color: var(--primary-dark);
}

.gateway-grid, .upi-box {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 20px;
}

.payment-hero-section {
  min-height: calc(100vh - 74px);
  background:
    linear-gradient(135deg, rgba(139, 20, 35, 0.98), rgba(217, 38, 67, 0.96)),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.2), transparent 34%);
  color: #fff;
}

.payment-hero-section .payment-layout {
  align-items: center;
}

.payment-hero-copy .eyebrow,
.payment-hero-copy h2,
.payment-hero-copy p {
  color: #fff;
}

.payment-hero-copy h2 {
  max-width: 720px;
  font-size: clamp(2.4rem, 5vw, 4.4rem);
  line-height: 1;
  margin: 0;
}

.payment-hero-copy .lead {
  max-width: 560px;
  color: rgba(255, 255, 255, 0.92);
}

.direct-pay-box {
  display: grid;
  gap: 12px;
  max-width: 460px;
  margin-top: 24px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 24px 60px rgba(70, 0, 15, 0.22);
  padding: 20px;
}

.direct-pay-box span,
.direct-pay-box small {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
}

.direct-pay-box strong {
  color: #fff;
  font-size: 2.9rem;
  line-height: 1;
}

.direct-pay-btn {
  width: 100%;
  background: #fff;
  color: var(--danger);
}

.direct-pay-btn:hover {
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
}

.payment-details-card {
  display: grid;
  gap: 10px;
  max-width: 620px;
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 18px;
}

.payment-details-card h3 {
  margin: 0 0 4px;
  color: #fff;
}

.payment-detail-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding-top: 10px;
}

.payment-detail-row span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  font-weight: 850;
}

.payment-detail-row strong {
  color: #fff;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.payment-confirm-card {
  background: rgba(255, 255, 255, 0.98);
}

.gateway-card, .upi-box, .gateway-box, .assistant-capture, .panel.flat {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  padding: 16px;
}

.gateway-card strong, .upi-box strong { display: block; color: var(--primary-dark); }
.payment-link-line {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 760;
  overflow-wrap: anywhere;
}
.upi-qr {
  width: 112px;
  min-height: 112px;
  display: grid;
  place-items: center;
  border: 2px solid var(--primary-dark);
  color: var(--primary-dark);
  font-weight: 950;
  text-align: center;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #255055;
  font-size: 0.86rem;
  font-weight: 820;
  padding: 9px 12px;
}

.ai-doctor-page {
  min-height: calc(100vh - 74px);
  background:
    linear-gradient(135deg, rgba(234, 250, 247, 0.96), rgba(240, 249, 255, 0.92)),
    radial-gradient(circle at 14% 18%, rgba(8, 119, 131, 0.18), transparent 30%),
    radial-gradient(circle at 86% 12%, rgba(56, 161, 105, 0.18), transparent 28%);
}

.ai-doctor-hero {
  min-height: calc(100vh - 74px);
  display: grid;
  align-items: center;
  padding: 54px 0;
}

.ai-doctor-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.86fr) minmax(420px, 1.14fr);
  gap: 28px;
  align-items: stretch;
}

.ai-doctor-info {
  display: grid;
  align-content: center;
  gap: 18px;
  min-width: 0;
}

.ai-doctor-info h1 {
  margin: 0;
  color: #0b3338;
  font-size: clamp(2.45rem, 5vw, 5.2rem);
  line-height: 0.98;
}

.ai-doctor-info p {
  max-width: 610px;
  color: #35595e;
  font-size: 1.05rem;
}

.doctor-orb {
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 28px;
  background: linear-gradient(145deg, #087783, #38a169);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 950;
  box-shadow: 0 24px 50px rgba(8, 119, 131, 0.24);
  animation: avatarFloat 3.2s ease-in-out infinite;
}

.medical-graphic {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.medical-graphic span {
  min-width: 64px;
  min-height: 54px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.82);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255,255,255,0.9), rgba(224,247,242,0.82));
  color: var(--primary-dark);
  font-weight: 950;
  box-shadow: var(--shadow-soft);
  transform: perspective(320px) rotateX(7deg) rotateY(-8deg);
}

@keyframes avatarFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.glass-card {
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 24px 70px rgba(6, 75, 86, 0.14);
  backdrop-filter: blur(18px);
}

.ai-chat-shell {
  min-height: min(760px, calc(100vh - 128px));
  display: grid;
  grid-template-rows: auto auto 1fr auto auto auto;
  overflow: hidden;
}

.ai-chat-head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid rgba(217, 233, 230, 0.78);
  padding: 16px;
}

.ai-chat-head strong,
.ai-chat-head span {
  display: block;
}

.ai-chat-head span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.ai-avatar,
.msg-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 8px;
  background: linear-gradient(145deg, #087783, #23a785);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 950;
}

.language-select,
.voice-btn {
  width: 118px;
  min-height: 40px;
  padding: 8px 10px;
}

.voice-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--primary-dark);
  font-weight: 900;
}

.voice-btn.listening {
  border-color: var(--danger);
  color: var(--danger);
  animation: pulseAlert 1s ease infinite;
}

.ai-safety-strip,
.ai-emergency-alert {
  display: grid;
  gap: 4px;
  border: 1px solid #f0c3c8;
  border-radius: 8px;
  background: #fff5f6;
  color: #7b1d2a;
  font-weight: 850;
  margin: 18px 0;
  padding: 14px;
}

.ai-safety-strip span {
  color: #65464a;
  font-size: 0.88rem;
  font-weight: 720;
}

.ai-emergency-alert {
  margin: 0 0 12px;
  background: var(--danger);
  color: #fff;
}

.chat-log {
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  scroll-behavior: smooth;
}

.chat-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: bubbleIn 0.24s ease both;
}

.chat-row.user {
  flex-direction: row-reverse;
}

.chat-row.user .msg-avatar {
  background: #15383d;
}

.chat-msg {
  max-width: min(78%, 680px);
  border: 1px solid rgba(217, 233, 230, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 12px 26px rgba(6, 75, 86, 0.08);
  padding: 13px 14px;
  color: #183f44;
  font-weight: 650;
}

.chat-msg.user {
  margin-left: 0;
  background: var(--primary);
  color: #fff;
}

.ai-result p {
  margin: 0 0 11px;
}

.emergency-card {
  border-radius: 8px;
  background: #fff1f2;
  color: #8d1f2d;
  margin-bottom: 12px;
  padding: 12px;
}

@keyframes bubbleIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.typing-indicator {
  width: fit-content;
  display: flex;
  gap: 5px;
  align-items: center;
  margin: 0 18px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  padding: 12px 14px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  animation: typingPulse 0.9s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.15s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.3s; }

@keyframes typingPulse {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(-4px); }
}

.language-options,
.gender-options,
.pain-options,
.quick-replies,
.final-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid rgba(217, 233, 230, 0.78);
  padding: 12px 16px 0;
}

.language-options {
  animation: bubbleIn 0.28s ease both;
}

.final-actions {
  padding-bottom: 12px;
}

.success-pop {
  animation: bubbleIn 0.32s ease both;
}

.appointment-cta {
  background: var(--green);
}

.capture-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.capture-status span {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--band);
  color: var(--muted);
  padding: 9px;
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

.capture-status span.done {
  border-color: #bfead3;
  background: var(--green-soft);
  color: #175b3c;
}

.capture-status strong {
  display: block;
  color: var(--primary-dark);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.ai-patient-form {
  margin-top: 18px;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 14px;
}

.insurance-band {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.insurance-band span {
  border: 1px solid #bfead3;
  border-radius: 999px;
  background: #fff;
  color: #1f6948;
  font-weight: 900;
  padding: 9px 12px;
}

.map-wrap { margin-top: 28px; }
.map-wrap iframe {
  width: 100%;
  min-height: 370px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.footer {
  background: #073f49;
  color: #e8f7f4;
  padding: 58px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 28px;
}

.footer h3 { margin-top: 0; color: #fff; }
.footer p, .footer a, .footer-bottom { color: #c7dfdd; }
.footer a { display: block; margin: 8px 0; font-weight: 760; }
.footer .logo { box-shadow: none; }
.footer-logo {
  width: 96px;
  height: 96px;
  max-height: none;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid rgba(255,255,255,0.14);
  margin-top: 36px;
  padding-top: 20px;
  font-size: 0.88rem;
}

.float-actions {
  position: fixed;
  right: 16px;
  bottom: 92px;
  z-index: 40;
  display: grid;
  gap: 9px;
}

.float-actions a {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--primary-dark);
  box-shadow: var(--shadow-soft);
  font-size: 0.72rem;
  font-weight: 950;
}

.float-actions .emergency-float {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
  animation: pulseAlert 1.8s ease infinite;
}

@keyframes pulseAlert {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 42, 63, 0.35); }
  50% { box-shadow: 0 0 0 11px rgba(201, 42, 63, 0); }
}

.sticky-call-now {
  position: fixed;
  left: 16px;
  bottom: 18px;
  z-index: 42;
  border-radius: 8px;
  background: var(--danger);
  color: #fff;
  box-shadow: 0 16px 34px rgba(201, 42, 63, 0.22);
  font-weight: 950;
  padding: 12px 18px;
}

.toast {
  position: fixed;
  left: 50%;
  top: 18px;
  z-index: 80;
  max-width: min(440px, calc(100% - 32px));
  transform: translate(-50%, -130%);
  border-radius: 8px;
  background: #12383d;
  color: #fff;
  box-shadow: var(--shadow);
  padding: 13px 16px;
  transition: transform 0.24s ease;
}

.toast.show { transform: translate(-50%, 0); }

.admin-shell {
  display: grid;
  grid-template-columns: 245px 1fr;
  gap: 22px;
}

.admin-sidebar {
  position: sticky;
  top: 96px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.admin-user {
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
  padding: 8px 8px 14px;
}

.admin-user strong, .admin-user span { display: block; }
.admin-user span { color: var(--muted); font-size: 0.82rem; }

.admin-tab {
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #29464a;
  font-weight: 850;
  text-align: left;
  padding: 10px;
}

.admin-tab.active, .admin-tab:hover {
  background: var(--teal-soft);
  color: var(--primary-dark);
}

.danger-text { color: var(--danger); }
.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.admin-table th, .admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px;
  text-align: left;
  vertical-align: top;
  font-size: 0.88rem;
}

.admin-table th {
  background: var(--band);
  color: #21474c;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.table-wrap table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
  border-bottom: 1px solid var(--line);
  padding: 10px;
  text-align: left;
  vertical-align: top;
  font-size: 0.86rem;
}

.table-wrap th {
  background: var(--band);
  color: #21474c;
  white-space: nowrap;
}

.appointment-table table { min-width: 1220px; }

.admin-inline {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 8px;
  margin-bottom: 6px;
}

.admin-note {
  min-width: 180px;
  min-height: 82px;
  resize: vertical;
}

.message-cell {
  min-width: 260px;
  white-space: pre-wrap;
}

.hint { color: var(--muted); font-size: 0.88rem; }
.faq-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin: 10px 0;
  padding: 16px;
}
.faq-item summary { cursor: pointer; font-weight: 900; color: var(--primary-dark); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 1240px) {
  .nav {
    display: none;
    position: absolute;
    inset: 74px 16px auto 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
    padding: 8px;
  }

  .nav.open { display: grid; }
  .menu-btn { display: inline-flex; }
  .desktop-cta { display: none; }

  .hero-grid, .grid.three, .grid.four, .footer-grid, .emergency-access {
    grid-template-columns: repeat(2, 1fr);
  }

  .ai-doctor-grid {
    grid-template-columns: 1fr;
  }

  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
}

@media (max-width: 760px) {
  .wrap { width: min(100% - 24px, 1180px); }
  .header-row { min-height: 68px; }
  .brand { min-width: 0; }
  .brand-copy, .icon-btn { display: none; }
  .brand-logo { width: 58px; height: 58px; }
  .menu-btn { flex: 0 0 auto; }
  .nav { inset: 68px 12px auto 12px; }

  .hero { min-height: auto; }
  .hero-grid {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 42px 0 30px;
  }

  .hero::before {
    background:
      linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(255,255,255,0.94) 55%, rgba(255,255,255,0.72) 100%),
      var(--hero-image);
    background-position: center top;
  }

  .hero h1, .page-hero h1, .department-hero h1 {
    font-size: clamp(2.55rem, 15vw, 4.05rem);
  }

  .hero .actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .hero .actions .btn {
    width: 100%;
  }

  .section { padding: 56px 0; }
  .section.compact { padding: 18px 0; }

  .grid.three,
  .grid.four,
  .footer-grid,
  .emergency-access,
  .capture-status,
  .split,
  .assistant-layout,
  .payment-layout,
  .appointment-layout,
  .department-content,
  .department-hero-grid,
  .admin-auth,
  .form-grid,
  .trust-strip,
  .mini-stats,
  .admin-metrics,
  .status-grid,
  .gateway-grid,
  .upi-box {
    grid-template-columns: 1fr;
  }

  .section-head, .admin-head, .toolbar, .footer-bottom {
    align-items: stretch;
    flex-direction: column;
  }

  .department-doctor-card { grid-template-columns: 1fr; }
  .visual-card img { height: 300px; }
  .chat-form { grid-template-columns: 1fr; }

  .float-actions {
    top: 116px;
    right: 10px;
    bottom: auto;
  }

  .float-actions a {
    width: 46px;
    height: 46px;
  }

  .payment-hero-section {
    min-height: auto;
  }

  .payment-detail-row {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .direct-pay-box strong {
    font-size: 2.35rem;
  }

  .sticky-call-now {
    left: 12px;
    right: 12px;
    bottom: 10px;
    transform: none;
    text-align: center;
  }

  .ai-doctor-hero {
    align-items: start;
    padding: 34px 0 76px;
  }

  .ai-doctor-info h1 {
    font-size: clamp(2.4rem, 14vw, 3.8rem);
  }

  .ai-chat-shell {
    min-height: 640px;
  }

  .ai-chat-head {
    grid-template-columns: auto 1fr;
  }

  .language-select {
    grid-column: 1 / -1;
    width: 100%;
  }

  .chat-msg {
    max-width: calc(100% - 54px);
  }

  .final-actions .btn {
    width: 100%;
  }
}
