:root {
  --ink: #14202b;
  --muted: #5e6c77;
  --line: #dbe8ed;
  --line-strong: #c5d8df;
  --blue: #55c7ea;
  --blue-dark: #157d9d;
  --pink: #eb6da5;
  --teal: #0ca89e;
  --green: #178464;
  --red: #a4375a;
  --amber: #a56a12;
  --paper: #ffffff;
  --canvas: #f4f8fa;
  --soft-blue: #edf9fd;
  --soft-pink: #fff2f7;
  --soft-green: #e8f7f1;
  --shadow: 0 18px 46px rgba(30, 55, 68, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(85, 199, 234, 0.45);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon,
.feature-icon {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.08;
}

h1 {
  font-size: clamp(2.35rem, 5vw, 4.8rem);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0;
}

h3 {
  font-size: 1.2rem;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.status-banner {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 8px 18px;
  color: #fff;
  background: var(--ink);
  font-size: 0.82rem;
}

.status-banner span {
  color: #c8d8df;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 5vw, 76px);
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand {
  flex: 0 0 auto;
}

.brand img {
  display: block;
  width: min(245px, 42vw);
  height: auto;
}

.public-header nav {
  display: flex;
  align-items: center;
  gap: 20px;
}

.public-header nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  text-decoration: none;
}

.public-header nav a:hover {
  color: var(--blue-dark);
}

.text-button,
.text-link,
.icon-text-button {
  border: 0;
  padding: 0;
  color: var(--blue-dark);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.public-header .text-button,
.icon-text-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.text-button:hover,
.text-link:hover,
.icon-text-button:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 20px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.button.primary {
  color: #fff;
  background: var(--blue-dark);
  box-shadow: 0 10px 24px rgba(21, 125, 157, 0.2);
}

.button.compact {
  min-height: 40px;
  padding: 0 15px;
  font-size: 0.9rem;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--blue-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.care-start {
  display: grid;
  grid-template-columns: minmax(260px, 0.7fr) minmax(450px, 1.15fr);
  gap: clamp(30px, 6vw, 84px);
  align-items: center;
  min-height: calc(100vh - 130px);
  padding: clamp(36px, 6vw, 76px) clamp(18px, 6vw, 90px);
  background: linear-gradient(120deg, #fff 0 42%, #edf9fd 42% 74%, #fff3f8 100%);
}

.care-copy {
  max-width: 610px;
}

.care-copy h1 {
  max-width: 600px;
  margin-bottom: 22px;
}

.care-copy > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.check-list {
  display: grid;
  gap: 11px;
  margin: 26px 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 27px;
  line-height: 1.5;
}

.check-list li::before {
  position: absolute;
  left: 0;
  color: var(--teal);
  content: "✓";
  font-weight: 900;
}

.guide-panel,
.doctor-card,
.auth-card,
.surface,
.metric-card,
.welcome-strip,
.email-mode {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  box-shadow: var(--shadow);
}

.guide-panel {
  position: relative;
  width: 100%;
  max-width: 760px;
  justify-self: end;
  overflow: hidden;
  border-top: 4px solid var(--blue);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-title > span:last-child,
.panel-title strong,
.panel-title small {
  display: block;
}

.panel-title small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.73rem;
  font-style: normal;
  font-weight: 650;
}

.guide-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--pink);
  box-shadow: 0 0 0 5px var(--soft-pink);
}

.guide-avatar .icon {
  width: 22px;
  height: 22px;
}

.live-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--teal);
}

.progress-track {
  height: 4px;
  background: #e4f1f5;
}

.progress-track span {
  display: block;
  width: 12%;
  height: 100%;
  background: var(--blue-dark);
  transition: width 180ms ease;
}

.chat-window {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 220px;
  max-height: 320px;
  overflow-y: auto;
  padding: 18px;
  background-color: #f7fbfc;
  background-image: radial-gradient(circle, rgba(21, 125, 157, 0.09) 1px, transparent 1px);
  background-size: 18px 18px;
}

.message {
  max-width: 88%;
  border-radius: 7px;
  padding: 12px 14px;
  line-height: 1.5;
}

.message.bot {
  position: relative;
  margin-left: 13px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 6px 14px rgba(30, 55, 68, 0.06);
}

.message.bot::before {
  position: absolute;
  top: 15px;
  left: -20px;
  display: grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 50%;
  background: var(--pink);
  box-shadow: 0 0 0 3px var(--soft-pink);
  content: "";
}

.message.user {
  justify-self: end;
  color: #fff;
  background: var(--blue-dark);
}

.chat-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 16px 18px;
}

.chat-options button,
.filter-row button,
.card-actions button,
.row-actions button,
.table-action,
.portal-sidebar nav button {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
}

.chat-options button {
  position: relative;
  min-height: 46px;
  padding: 10px 34px 10px 12px;
  text-align: left;
}

.chat-options button::after {
  position: absolute;
  top: 50%;
  right: 12px;
  color: var(--blue-dark);
  content: "\2192";
  font-weight: 900;
  transform: translateY(-50%);
}

.chat-options button:hover,
.filter-row button:hover,
.filter-row button.active {
  border-color: var(--blue);
  background: var(--soft-blue);
}

.route-result {
  margin: 0 18px 16px;
  padding: 14px;
  color: var(--blue-dark);
  border: 1px solid #bfe8f4;
  border-radius: 6px;
  background: var(--soft-blue);
}

.route-result strong,
.route-result span {
  display: block;
}

.route-result span {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.emergency-note {
  margin: 0;
  padding: 0 18px 17px;
  color: #7b334f;
  font-size: 0.8rem;
  line-height: 1.45;
}

.trust-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.trust-row div {
  min-height: 98px;
  padding: 23px clamp(16px, 3vw, 34px);
  border-right: 1px solid var(--line);
}

.feature-icon {
  width: 28px;
  height: 28px;
  margin-bottom: 14px;
  color: var(--blue-dark);
}

.feature-icon.pink {
  color: var(--pink);
}

.feature-icon.green {
  color: var(--green);
}

.feature-icon.amber {
  color: var(--amber);
}

.trust-row div:last-child {
  border-right: 0;
}

.trust-row strong,
.trust-row span {
  display: block;
}

.consultation-band {
  display: grid;
  grid-template-columns: minmax(260px, 0.54fr) minmax(520px, 1.46fr);
  gap: clamp(30px, 5vw, 72px);
  align-items: center;
  padding: clamp(58px, 8vw, 96px) clamp(18px, 6vw, 90px);
  background: #f5fafc;
}

.consultation-copy {
  max-width: 520px;
}

.consultation-copy h2 {
  margin-bottom: 18px;
}

.consultation-copy > p:not(.eyebrow) {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.consultation-gallery {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.65fr);
  gap: 14px;
  min-width: 0;
}

.consultation-image {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 7px;
  background: #dceef4;
  box-shadow: var(--shadow);
}

.consultation-image-primary {
  aspect-ratio: 16 / 9;
}

.consultation-image-secondary {
  aspect-ratio: 4 / 5;
}

.consultation-image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.consultation-image-secondary img {
  object-position: 40% center;
}

.trust-row span {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.4;
}

.specialists-section {
  padding: clamp(58px, 8vw, 96px) clamp(18px, 6vw, 90px);
  background: #fff;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin-bottom: 12px;
}

.section-heading > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.6;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-bottom: 24px;
}

.filter-row button {
  min-height: 42px;
  padding: 0 14px;
  font-weight: 800;
}

.doctor-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.directory-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  justify-items: start;
  border-left: 3px solid var(--pink);
  padding: 20px 24px;
  background: var(--soft-pink);
}

.directory-empty span {
  color: var(--muted);
}

.directory-empty a {
  color: var(--blue-dark);
  font-weight: 800;
}

.doctor-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 21px;
}

.doctor-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.avatar {
  display: grid;
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--blue-dark);
  font-weight: 900;
}

.large-avatar {
  width: 78px;
  height: 78px;
  font-size: 1.2rem;
}

.availability-dot {
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 800;
}

.availability-dot::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--green);
  content: "";
}

.specialty-label {
  margin: 19px 0 7px;
  color: var(--blue-dark);
  font-weight: 900;
}

.doctor-card h3 {
  margin-bottom: 10px;
}

.doctor-card > p:not(.specialty-label) {
  color: var(--muted);
  line-height: 1.55;
}

dl {
  margin: auto 0 18px;
}

dl div {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  text-align: right;
  font-weight: 800;
}

.card-actions,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-actions button,
.row-actions button,
.table-action {
  min-height: 38px;
  padding: 0 12px;
  font-weight: 800;
}

.card-actions button {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.card-actions .primary-action {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
}

.process-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--ink);
  color: #fff;
}

.process-band > div {
  padding: clamp(28px, 5vw, 56px);
  border-right: 1px solid #344651;
}

.process-band > div:last-child {
  border-right: 0;
}

.process-band span,
.process-band strong {
  display: block;
}

.process-band span {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 1.6rem;
  font-weight: 900;
}

.process-band span .icon {
  width: 24px;
  height: 24px;
}

.process-band p {
  margin: 9px 0 0;
  color: #c8d8df;
  line-height: 1.55;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 27px clamp(18px, 6vw, 90px);
  color: var(--muted);
  background: #fff;
}

footer img {
  width: 210px;
}

footer p {
  max-width: 680px;
  margin: 0;
  line-height: 1.5;
}

.footer-brand {
  display: grid;
  gap: 12px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 11px 20px;
  max-width: 470px;
}

.footer-links a {
  color: var(--blue-dark);
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.info-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 6vw, 90px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.info-header img {
  display: block;
  width: min(235px, 48vw);
}

.info-header nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.info-header a {
  color: var(--blue-dark);
  font-weight: 800;
  text-decoration: none;
}

.info-shell {
  min-height: calc(100vh - 180px);
  background: #fff;
}

.info-hero {
  padding: clamp(54px, 8vw, 100px) clamp(18px, 7vw, 110px);
  border-bottom: 1px solid var(--line);
  background: #eff9fc;
}

.info-hero > div {
  max-width: 860px;
}

.info-hero h1 {
  margin-bottom: 20px;
}

.info-hero p:not(.eyebrow) {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.12rem;
  line-height: 1.75;
}

.info-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.34fr);
  gap: clamp(36px, 7vw, 100px);
  max-width: 1250px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 90px) clamp(18px, 6vw, 80px);
}

.info-article {
  max-width: 820px;
}

.info-article section + section,
.info-article details + details {
  margin-top: 40px;
}

.info-article h2 {
  margin-bottom: 14px;
  font-size: 1.55rem;
}

.info-article p,
.info-article li {
  color: var(--muted);
  line-height: 1.75;
}

.info-article ul {
  padding-left: 22px;
}

.info-aside {
  align-self: start;
  border-left: 3px solid var(--pink);
  padding: 4px 0 4px 22px;
}

.info-aside strong,
.info-aside a {
  display: block;
}

.info-aside p {
  color: var(--muted);
  line-height: 1.55;
}

.info-aside a {
  margin-top: 14px;
  color: var(--blue-dark);
  font-weight: 800;
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 0 0 22px;
}

.faq-item summary {
  cursor: pointer;
  font-size: 1.05rem;
  font-weight: 850;
}

.faq-item p {
  margin: 14px 0 0;
}

.policy-note {
  border-left: 3px solid var(--amber);
  padding: 14px 18px;
  background: #fff9ee;
}

.auth-screen {
  min-height: calc(100vh - 34px);
  padding: 28px clamp(18px, 6vw, 90px) 60px;
  background: linear-gradient(145deg, #fff 0 52%, #ecf9fd 52% 76%, #fff3f8 100%);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.auth-brand img {
  width: min(250px, 50vw);
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(380px, 0.7fr);
  gap: clamp(36px, 8vw, 120px);
  align-items: center;
  max-width: 1180px;
  min-height: calc(100vh - 150px);
  margin: 0 auto;
}

.auth-intro {
  max-width: 600px;
}

.auth-intro h1 {
  margin-bottom: 20px;
}

.auth-intro > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.auth-card {
  width: 100%;
  max-width: 520px;
  justify-self: end;
  padding: 22px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  border-radius: 6px;
  background: #edf2f4;
}

.segmented button {
  min-height: 42px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.segmented button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 3px 10px rgba(20, 32, 43, 0.08);
}

.form-stack,
.form-grid {
  display: grid;
  gap: 15px;
}

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

.full-field {
  grid-column: 1 / -1;
}

label,
legend {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

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

input,
select {
  min-height: 46px;
}

textarea {
  resize: vertical;
  line-height: 1.45;
}

fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  padding: 12px;
}

fieldset label,
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 600;
}

fieldset input,
.checkbox-row input {
  width: auto;
  min-height: auto;
  margin: 3px 0 0;
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.form-message.error {
  color: var(--red);
}

.form-message.success {
  color: var(--green);
}

.portal-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100vh - 34px);
}

.portal-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: calc(100vh - 34px);
  flex-direction: column;
  padding: 24px 18px;
  color: #fff;
  background: var(--ink);
}

.portal-sidebar > img {
  width: 205px;
  padding: 6px;
  border-radius: 4px;
  background: #fff;
}

.account-summary {
  display: grid;
  gap: 3px;
  margin: 26px 0;
  padding: 18px 0;
  border-top: 1px solid #31434e;
  border-bottom: 1px solid #31434e;
}

.account-summary > span {
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.account-summary small {
  overflow: hidden;
  color: #b9cad2;
  text-overflow: ellipsis;
}

.portal-sidebar nav {
  display: grid;
  gap: 7px;
}

.portal-sidebar nav button {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  padding: 0 13px;
  color: #d5e1e6;
  border-color: transparent;
  background: transparent;
  text-align: left;
  font-weight: 750;
}

.portal-sidebar nav button:hover,
.portal-sidebar nav button.active {
  color: #fff;
  border-color: #385360;
  background: #203541;
}

.signout-button {
  min-height: 42px;
  margin-top: auto;
  border: 1px solid #47606d;
  border-radius: 6px;
  color: #fff;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.portal-main {
  min-width: 0;
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 102px;
  padding: 18px clamp(20px, 4vw, 54px);
  border-bottom: 1px solid var(--line);
  background: rgba(244, 248, 250, 0.95);
  backdrop-filter: blur(10px);
}

.portal-topbar h1 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.portal-topbar .eyebrow {
  margin-bottom: 4px;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 11px;
}

.topbar-user > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--pink);
  font-weight: 900;
}

.topbar-user div {
  display: grid;
}

.topbar-user small {
  color: var(--muted);
}

.menu-button {
  display: none;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  font-weight: 800;
}

.portal-content {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 4vw, 54px);
}

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

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

.metric-card {
  display: grid;
  gap: 5px;
  min-height: 154px;
  align-content: center;
  padding: 20px;
}

.metric-card strong {
  font-size: 2.35rem;
}

.metric-card span {
  font-weight: 900;
}

.metric-card small {
  color: var(--muted);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 18px;
  align-items: start;
}

.doctors-admin-grid,
.booking-grid {
  grid-template-columns: minmax(360px, 0.78fr) minmax(420px, 1.22fr);
}

.surface {
  min-width: 0;
  padding: 22px;
}

.narrow-surface {
  max-width: 680px;
}

.surface-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.surface-heading h2,
.surface-heading h3 {
  margin: 0;
  font-size: 1.35rem;
}

.surface-heading .eyebrow {
  margin-bottom: 5px;
}

.table-shell {
  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;
  vertical-align: middle;
}

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

td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.table-action {
  color: var(--blue-dark);
  border-color: transparent;
  background: transparent;
}

.status,
.role-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-requested,
.status-queued {
  color: #865510;
  background: #fff2d9;
}

.status-confirmed,
.status-sent,
.status-completed {
  color: #0f6d53;
  background: var(--soft-green);
}

.status-cancelled {
  color: #8d2d4f;
  background: var(--soft-pink);
}

.role-pill {
  color: var(--blue-dark);
  background: var(--soft-blue);
}

.readiness-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.readiness-list li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.readiness-list li div {
  display: grid;
}

.readiness-list small {
  margin-top: 3px;
  color: var(--muted);
}

.ready-dot,
.pending-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
}

.ready-dot {
  background: var(--green);
}

.pending-dot {
  background: var(--amber);
}

.admin-doctor-list,
.email-list,
.patient-list,
.prescription-list {
  display: grid;
  gap: 11px;
}

.admin-doctor-list article,
.email-list article {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr) auto;
  gap: 13px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.admin-doctor-list article > div:nth-child(2),
.email-list article > div:first-child {
  display: grid;
  gap: 3px;
}

.admin-doctor-list span,
.admin-doctor-list small,
.email-list span,
.email-list small {
  color: var(--muted);
}

.email-mode {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
}

.email-mode div {
  display: grid;
  gap: 4px;
}

.email-mode span:not(.status) {
  color: var(--muted);
}

.welcome-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(22px, 4vw, 34px);
  background: #fff;
}

.welcome-strip h2 {
  margin-bottom: 10px;
}

.welcome-strip p:last-child {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
}

.booking-help p:not(.eyebrow) {
  color: var(--muted);
  line-height: 1.6;
}

.empty-state {
  padding: 38px 18px;
  text-align: center;
}

.empty-state strong {
  font-size: 1.1rem;
}

.empty-state p {
  margin: 7px 0 0;
  color: var(--muted);
}

.patient-card {
  display: flex;
  align-items: center;
  gap: 14px;
}

.patient-card > div:last-child {
  display: grid;
  gap: 4px;
}

.patient-card span,
.patient-card small {
  color: var(--muted);
}

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

.prescription-list article {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px;
}

.prescription-list header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--line);
}

.prescription-list header div {
  display: grid;
  gap: 3px;
}

.prescription-list header span,
.prescription-meta span {
  color: var(--muted);
  font-size: 0.84rem;
}

.rx-mark {
  color: var(--pink) !important;
  font-size: 1.3rem !important;
  font-weight: 900;
}

.prescription-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 13px 0;
}

.prescription-list h3 {
  margin-bottom: 13px;
}

.prescription-list p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.modal {
  width: min(680px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 0;
  border-radius: 8px;
  padding: 26px;
  box-shadow: 0 26px 80px rgba(10, 28, 38, 0.28);
}

.wide-modal {
  width: min(920px, calc(100vw - 32px));
}

.modal::backdrop {
  background: rgba(10, 26, 35, 0.58);
  backdrop-filter: blur(3px);
}

.modal-close {
  display: block;
  margin: 0 0 16px auto;
  border: 0;
  color: var(--blue-dark);
  background: transparent;
  font-weight: 900;
  cursor: pointer;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.profile-top h2 {
  margin-bottom: 5px;
}

.profile-top span,
.doctor-profile > p {
  color: var(--muted);
  line-height: 1.6;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0;
}

.detail-grid > div {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.detail-grid span,
.detail-grid small {
  color: var(--muted);
  font-size: 0.82rem;
}

.concern-box {
  margin: 18px 0;
  padding: 16px;
  border-left: 4px solid var(--pink);
  background: var(--soft-pink);
}

.concern-box span {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.concern-box p {
  margin: 7px 0 0;
  line-height: 1.55;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.prescription-editor {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.success-note {
  color: var(--green);
  font-weight: 800;
}

.email-preview h2 {
  margin-bottom: 18px;
}

.email-body {
  margin: 20px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--canvas);
  line-height: 1.6;
  white-space: pre-wrap;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: min(360px, calc(100vw - 40px));
  border-radius: 6px;
  padding: 13px 17px;
  color: #fff;
  background: var(--ink);
  box-shadow: var(--shadow);
  font-weight: 800;
}

@media (max-width: 1100px) {
  .consultation-band {
    grid-template-columns: 1fr;
  }

  .consultation-copy {
    max-width: 760px;
  }

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

  .content-grid,
  .doctors-admin-grid,
  .booking-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-doctor-list article,
  .email-list article {
    grid-template-columns: auto minmax(150px, 1fr);
  }

  .admin-doctor-list .row-actions,
  .email-list .row-actions {
    grid-column: 1 / -1;
    padding-left: 69px;
  }
}

@media (max-width: 850px) {
  .public-header {
    gap: 16px;
    padding: 12px 18px;
  }

  .brand img {
    width: 185px;
  }

  .public-header nav {
    gap: 13px;
    font-size: 0.88rem;
  }

  .public-header .button {
    display: none;
  }

  .care-start {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 28px;
    background: linear-gradient(180deg, #effaff, #fff4f8 58%, #fff);
  }

  .guide-panel {
    max-width: none;
    justify-self: stretch;
    order: -1;
  }

  .trust-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-row div:nth-child(2) {
    border-right: 0;
  }

  .trust-row div:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .process-band {
    grid-template-columns: 1fr;
  }

  .process-band > div {
    border-right: 0;
    border-bottom: 1px solid #344651;
  }

  .auth-layout {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 44px;
  }

  .auth-card {
    max-width: none;
    justify-self: stretch;
  }

  .portal-shell {
    grid-template-columns: 1fr;
  }

  .portal-sidebar {
    position: fixed;
    z-index: 30;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

  .portal-shell.menu-open .portal-sidebar {
    transform: translateX(0);
  }

  .menu-button {
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
  }

  .detail-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .status-banner {
    display: grid;
    gap: 2px;
    text-align: center;
  }

  .public-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .public-header nav {
    width: 100%;
    justify-content: space-between;
  }

  .care-start,
  .consultation-band,
  .specialists-section {
    padding-left: 15px;
    padding-right: 15px;
  }

  .consultation-gallery {
    grid-template-columns: 1fr;
  }

  .consultation-image-primary,
  .consultation-image-secondary {
    aspect-ratio: 4 / 3;
  }

  .consultation-image-secondary img {
    object-position: center;
  }

  .chat-options,
  .doctor-grid,
  .form-grid,
  .prescription-list,
  .metric-grid,
  .patient-metrics {
    grid-template-columns: 1fr;
  }

  .message {
    max-width: 100%;
  }

  .trust-row {
    grid-template-columns: 1fr;
  }

  .trust-row div {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .auth-screen {
    padding: 20px 15px 44px;
  }

  .auth-brand {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-topbar {
    align-items: flex-start;
    flex-wrap: wrap;
    min-height: 130px;
    padding: 15px;
  }

  .portal-topbar > div:nth-child(2) {
    order: 3;
    width: 100%;
  }

  .portal-content {
    padding: 15px;
  }

  .surface,
  .metric-card {
    padding: 17px;
  }

  .welcome-strip,
  .email-mode {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-doctor-list article,
  .email-list article {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .admin-doctor-list .row-actions,
  .email-list .row-actions {
    padding-left: 0;
  }

  .inline-form,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .modal {
    width: calc(100vw - 20px);
    padding: 18px;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .info-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .info-header nav {
    width: 100%;
    justify-content: space-between;
  }

  .info-content {
    grid-template-columns: 1fr;
  }
}
