:root {
  --ink: #10212b;
  --muted: #62717c;
  --line: #d9e2e6;
  --surface: #ffffff;
  --soft: #eef6f5;
  --teal: #00796b;
  --teal-dark: #00594f;
  --coral: #d94f45;
  --gold: #d69622;
  --blue: #2563a9;
  --shadow: 0 20px 60px rgba(16, 33, 43, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  gap: 0;
  padding: 0 clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-top,
.header-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.header-top {
  padding: 12px 0 10px;
}

.header-bottom {
  padding: 10px 0 12px;
  border-top: 1px solid #edf2f4;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: max-content;
}

.brand-emblem {
  position: relative;
  display: grid;
  width: 74px;
  height: 54px;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, #003e82 0%, #005caa 48%, #e52f35 49%, #ff5b5d 100%);
  color: #fff;
  box-shadow: 0 12px 28px rgba(0, 54, 110, 0.22);
}

.brand-emblem strong {
  font-size: 24px;
  line-height: 1;
}

.brand-emblem small {
  position: absolute;
  top: 6px;
  right: 7px;
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: #0b3d78;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.brand-wordmark strong,
.brand-wordmark small {
  display: block;
}

.brand-wordmark strong {
  color: #07539b;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 800;
  line-height: 0.88;
}

.brand-wordmark small {
  color: #d83c3c;
  font-size: clamp(13px, 1.6vw, 20px);
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.header-contact {
  display: grid;
  gap: 2px;
  text-align: right;
}

.header-contact span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.header-contact a {
  color: #07539b;
  font-size: 20px;
  font-weight: 800;
}

.header-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.header-action,
.primary-button,
.secondary-button,
.danger-button,
.send-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

.header-action,
.primary-button,
.send-button {
  background: var(--teal);
  color: #fff;
}

.secondary-button {
  background: #fff;
  color: var(--teal-dark);
  border: 1px solid var(--line);
}

.danger-button {
  background: var(--coral);
  color: #fff;
}

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1fr);
  gap: clamp(24px, 4vw, 54px);
  align-items: center;
  min-height: calc(100vh - 116px);
  padding: clamp(36px, 6vw, 78px) clamp(18px, 5vw, 72px);
  background:
    linear-gradient(100deg, rgba(0, 121, 107, 0.94), rgba(11, 69, 91, 0.75)),
    url("https://www.tahirahospital.in/_/rsrc/1741277713157/home/1000445381%20%281%29.jpg") center / cover;
  color: #fff;
}

.hero-copy {
  max-width: 650px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #ffd374;
}

.hero h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1;
  letter-spacing: 0;
}

.hero-copy p:not(.eyebrow) {
  max-width: 640px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 18px;
}

.hero-actions,
.emergency-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.chat-shell,
.finder-panel,
.booking-panel,
.dashboard,
.hospital-info,
.login-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.chat-shell {
  display: flex;
  min-height: 620px;
  max-height: 760px;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
}

.chat-header,
.language-row,
.composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.chat-header {
  justify-content: space-between;
}

.chat-header span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.status-pill {
  border-radius: 999px;
  background: #e2f7ef;
  color: #08724e !important;
  padding: 6px 10px;
  font-weight: 800;
}

.language-row {
  flex-wrap: wrap;
  padding-top: 10px;
  padding-bottom: 10px;
}

.chip,
.quick-prompts button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.chip {
  padding: 0 13px;
}

.chip.active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.messages {
  display: flex;
  min-height: 300px;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 18px;
  background: #f9fcfc;
}

.message {
  max-width: min(82%, 520px);
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
}

.message.assistant {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--line);
}

.message.user {
  align-self: flex-end;
  background: var(--teal);
  color: #fff;
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.quick-prompts button {
  padding: 0 12px;
}

.composer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.composer input {
  min-width: 0;
  flex: 1;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--coral);
  cursor: pointer;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  padding: 44px clamp(18px, 5vw, 72px);
  background: #fff;
}

.section-grid article {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.feature-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 8px;
  background: var(--soft);
  color: var(--teal-dark);
  font-weight: 900;
}

h2 {
  margin: 0 0 10px;
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: 0;
}

.section-grid h2 {
  margin-top: 18px;
  font-size: 20px;
}

.section-grid p,
.hospital-info p,
.emergency-band p,
.form-note {
  color: var(--muted);
}

.workbench {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 22px;
  padding: 52px clamp(18px, 5vw, 72px);
  background: var(--soft);
}

.finder-panel,
.booking-panel,
.dashboard,
.hospital-info {
  padding: clamp(20px, 3vw, 30px);
}

label {
  display: grid;
  gap: 8px;
  color: #31434d;
  font-size: 14px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
}

textarea {
  resize: vertical;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.recommendation {
  margin-top: 18px;
  padding: 18px;
  border-radius: 8px;
  background: #f7fbfb;
  border: 1px solid var(--line);
}

.recommendation strong {
  display: block;
  margin-bottom: 8px;
}

.doctor-list {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.reminder-row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 16px 0 20px;
}

.reminder-row label {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reminder-row input {
  width: auto;
}

.emergency-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 44px clamp(18px, 5vw, 72px);
  background: #fff7f5;
  border-top: 1px solid #f3d1cb;
  border-bottom: 1px solid #f3d1cb;
}

.emergency-band > div:first-child {
  max-width: 760px;
}

.admin-login,
.hospital-info,
.dashboard {
  margin: 52px clamp(18px, 5vw, 72px);
}

.admin-login {
  display: grid;
  place-items: center;
}

.login-card {
  width: min(100%, 760px);
  padding: clamp(20px, 3vw, 30px);
}

.login-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.dashboard-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-locked {
  display: none;
}

.admin-unlocked {
  display: block;
}

.info-list {
  display: grid;
  gap: 12px;
}

.info-list p {
  margin: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.metrics div {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fcfc;
}

.metrics strong,
.metrics span {
  display: block;
}

.metrics strong {
  color: var(--teal-dark);
  font-size: 28px;
}

.metrics span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 14px;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.floating-whatsapp {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 20;
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 999px;
  background: #1fa855;
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
}

@media (max-width: 1060px) {
  .hero,
  .workbench {
    grid-template-columns: 1fr;
  }

  .section-grid,
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .app-header {
    position: static;
    padding-inline: 16px;
  }

  .header-top,
  .header-bottom {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    min-width: 0;
  }

  .header-top {
    padding-bottom: 12px;
  }

  .brand {
    min-width: 0;
    width: 100%;
  }

  .brand-emblem {
    width: 54px;
    height: 42px;
    flex: 0 0 54px;
  }

  .brand-wordmark strong {
    font-size: 32px;
  }

  .brand-wordmark small {
    font-size: 13px;
    letter-spacing: 0.08em;
  }

  .header-contact {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .header-contact span {
    display: none;
  }

  .header-contact a {
    font-size: 17px;
  }

  .header-nav {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    width: 100%;
    min-width: 0;
  }

  .header-nav a {
    display: grid;
    min-width: max-content;
    min-height: 34px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    padding: 0 11px;
    font-size: 13px;
  }

  .header-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
  }

  .header-action,
  .header-actions .secondary-button {
    width: 100%;
    min-height: 40px;
    padding: 0 10px;
    font-size: 13px;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: 42px;
  }

  .chat-shell {
    min-height: 580px;
  }

  .section-grid,
  .form-grid,
  .login-grid,
  .metrics {
    grid-template-columns: 1fr;
  }

  .emergency-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .composer {
    flex-wrap: wrap;
  }

  .composer input {
    flex-basis: calc(100% - 54px);
  }

  .send-button {
    width: 100%;
  }
}
