:root {
  --ink: #182326;
  --muted: #5f6f73;
  --line: #d9e1df;
  --paper: #f7faf9;
  --white: #ffffff;
  --teal: #0f8f83;
  --teal-dark: #0a5f59;
  --mint: #dff4ed;
  --coral: #e87d67;
  --amber: #f0b44d;
  --red: #ca4f48;
  --shadow: 0 18px 50px rgba(22, 45, 47, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.9);
  border-bottom: 1px solid rgba(217, 225, 223, 0.8);
  backdrop-filter: blur(16px);
}

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

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--white);
  background: var(--teal-dark);
  border-radius: 8px;
  font-weight: 800;
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

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

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.nav {
  display: flex;
  gap: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.nav a:hover {
  color: var(--teal-dark);
}

.nav-cta,
.primary-button,
.secondary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.nav-cta,
.primary-button {
  color: var(--white);
  background: var(--teal);
  padding: 0 18px;
  box-shadow: 0 10px 24px rgba(15, 143, 131, 0.22);
}

.primary-button:disabled {
  cursor: progress;
  opacity: 0.72;
}

.secondary-button,
.ghost-button {
  color: var(--teal-dark);
  background: var(--mint);
  padding: 0 18px;
}

.ghost-button {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.hero {
  position: relative;
  min-height: 620px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(12, 30, 31, 0.85), rgba(12, 30, 31, 0.54) 42%, rgba(12, 30, 31, 0.12) 100%);
}

.hero-content {
  position: relative;
  width: min(680px, calc(100% - 36px));
  margin-left: clamp(18px, 7vw, 90px);
  padding: 96px 0 120px;
  color: var(--white);
}

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

.hero h1 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(44px, 7vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 590px;
  margin: 22px 0 30px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 19px;
  line-height: 1.55;
}

.hero-actions,
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.content-section {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 72px 0;
}
.content-section .section-heading h2,
.content-section .section-heading > p {
  color: var(--page-text);
}
.services-grid,
.patient-benefits {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.patient-benefits {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.service-item,
.patient-benefits article {
  min-height: 168px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(22, 45, 47, 0.08);
}

.service-item strong,
.patient-benefits strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
}

.service-item p,
.patient-benefits p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.benefits-band {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.patient-benefits {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 36px 0;
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  width: min(1160px, calc(100% - 36px));
  margin: 0 auto;
  background: var(--line);
}

.benefit-item {
  min-height: 154px;
  padding: 28px;
  background: var(--white);
}

.benefit-item strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
}

.benefit-item p,
.section-heading p,
.flow-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.booking-section,
.panel-section {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 72px 0;
}

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

.section-heading.compact {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  max-width: none;
}

.section-heading h2 {
  margin: 0 0 12px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.05;
  letter-spacing: 0;
  color: var(--page-text);
}
.booking-section .section-heading > p {
  color: var(--page-text);
}
.booking-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}

.booking-form,
.clinic-card,
.table-shell,
.flow-list {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.booking-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  padding: 24px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.span-2 {
  grid-column: span 2;
}

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

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--teal);
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(15, 143, 131, 0.16);
  border-color: var(--teal);
}

.submit-button {
  align-self: end;
}

.time-picker {
  display: grid;
  gap: 12px;
}

.time-picker-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.time-picker-heading strong {
  font-size: 14px;
}

.time-picker-heading span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
  text-align: right;
}

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

.time-slot {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease, transform 140ms ease;
}

.time-slot:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
  transform: translateY(-1px);
}

.time-slot.is-selected {
  color: var(--white);
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: 0 10px 24px rgba(15, 143, 131, 0.2);
}

.time-slot.is-occupied,
.time-slot:disabled {
  color: #7f8b8f;
  background: #edf0f2;
  border-color: #d4dcda;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.privacy-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  align-items: start;
  gap: 12px;
  padding: 14px;
  color: var(--muted);
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.privacy-consent a {
  color: var(--teal-dark);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.clinic-card {
  padding: 26px;
}

.clinic-card h3 {
  margin: 0 0 8px;
  font-size: 24px;
}

.clinic-card dl {
  display: grid;
  gap: 18px;
  margin: 28px 0 0;
}

.clinic-card dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.clinic-card dd {
  margin: 5px 0 0;
  font-weight: 700;
}

.confirmation-panel {
  margin-top: 22px;
  padding: 22px;
  color: var(--teal-dark);
  background: var(--mint);
  border: 1px solid rgba(15, 143, 131, 0.22);
  border-radius: 8px;
}

.confirmation-panel strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.confirmation-panel p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.confirmation-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.confirmation-details div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 143, 131, 0.14);
  border-radius: 8px;
}

.confirmation-details dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.confirmation-details dd {
  margin: 5px 0 0;
  color: var(--ink);
  font-weight: 800;
}

.edit-page {
  width: min(980px, calc(100% - 36px));
  margin: 0 auto;
  padding: 64px 0 84px;
}

.edit-hero {
  margin-bottom: 24px;
}

.edit-hero h1 {
  margin: 0;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1;
  letter-spacing: 0;
}

.edit-hero p:not(.eyebrow) {
  max-width: 660px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.edit-card,
.edit-message {
  margin-top: 18px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.edit-message strong {
  display: block;
  margin-bottom: 8px;
  font-size: 20px;
}

.edit-message p {
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.warning-message {
  color: #8a4d00;
  background: #fff7e6;
  border-color: rgba(240, 180, 77, 0.42);
  box-shadow: none;
}

.edit-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.edit-summary div {
  min-height: 96px;
  padding: 16px;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.edit-summary dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.edit-summary dd {
  margin: 8px 0 0;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

#editAppointmentStatus {
  text-transform: capitalize;
}

.edit-form {
  display: grid;
  gap: 18px;
}

.edit-action-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.edit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.danger-button {
  background: var(--red);
  box-shadow: 0 10px 24px rgba(202, 79, 72, 0.2);
}

.edit-success {
  display: grid;
  gap: 16px;
  color: var(--teal-dark);
  background: var(--mint);
  border-color: rgba(15, 143, 131, 0.28);
  box-shadow: 0 18px 50px rgba(15, 143, 131, 0.12);
}

.edit-success[hidden] {
  display: none;
}

.edit-success strong {
  font-size: 24px;
  line-height: 1.2;
}

.edit-success p {
  max-width: 620px;
  margin: 0;
  color: var(--ink);
  line-height: 1.55;
}

.edit-success .primary-button {
  width: fit-content;
}

.admin-topbar {
  background: rgba(247, 250, 249, 0.94);
}

.admin-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 58px 0 18px;
}

.admin-hero h1 {
  max-width: 760px;
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.02;
  letter-spacing: 0;
}

.admin-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.admin-section {
  padding-top: 48px;
}

.toolbar {
  align-items: center;
  margin-bottom: 16px;
}

.metric {
  min-width: 168px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric strong {
  display: block;
  font-size: 28px;
}

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

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

.reserved-slot-card {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(22, 45, 47, 0.08);
}

.reserved-slot-card div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.reserved-slot-card strong {
  font-size: 18px;
}

.reserved-slot-card div span {
  color: var(--teal-dark);
  font-size: 20px;
  font-weight: 800;
}

.reserved-slot-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

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

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

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

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

tr:last-child td {
  border-bottom: 0;
}

.empty-table {
  padding: 32px;
  color: var(--muted);
  text-align: center;
  font-weight: 700;
}

.patient-name {
  display: block;
  margin-bottom: 5px;
  font-weight: 800;
}

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

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-nuevo {
  color: #6f4b02;
  background: #fff1cf;
}

.status-confirmado {
  color: var(--teal-dark);
  background: var(--mint);
}

.status-completado {
  color: #5d6570;
  background: #edf0f2;
}

.status-cancelada {
  color: #8f2f2a;
  background: #ffe3df;
}

.status-requiere-atencion,
.status-requiere-atencion-urgente {
  color: #8f2f2a;
  background: #ffe3df;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 250px;
}

.action-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  padding: 0 10px;
}

.action-button:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.danger-action:hover {
  border-color: var(--red);
  color: var(--red);
}

.automation-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.flow-list {
  display: grid;
  gap: 0;
  padding: 12px;
}

.flow-step {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.flow-step:last-child {
  border-bottom: 0;
}

.flow-step span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--white);
  background: var(--teal-dark);
  border-radius: 8px;
  font-weight: 800;
}

.messages-shell table {
  min-width: 900px;
}

.message-body {
  max-width: 360px;
  color: var(--muted);
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  max-width: min(420px, calc(100% - 44px));
  padding: 15px 17px;
  color: var(--white);
  background: var(--teal-dark);
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.site-footer {
  display: grid;
  gap: 14px;
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 42px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

.site-footer a {
  border-bottom: 1px solid currentColor;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.legal-links a {
  color: var(--page-text);
  font-weight: 800;
}

.legal-links span {
  color: #a6b1b3;
}

.clinic-access {
  justify-self: center;
}

.legal-page {
  display: grid;
  gap: 22px;
  width: min(760px, calc(100% - 36px));
  margin: 0 auto;
  padding: 64px 0;
}

.legal-page h1 {
  margin: 16px 0 0;
  font-size: clamp(34px, 6vw, 54px);
  line-height: 1.05;
  letter-spacing: 0;
}

.legal-page p {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

.admin-shell-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid rgba(217, 225, 223, 0.86);
  backdrop-filter: blur(16px);
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.current-date-pill {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 0 14px;
  color: var(--teal-dark);
  background: var(--mint);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 800;
}

.admin-app {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
  padding: 46px 0 72px;
}

.agenda-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.agenda-hero h1 {
  max-width: 760px;
  margin: 0 0 14px;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: 0;
}

.agenda-hero p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.agenda-controls,
.day-summary,
.daily-agenda {
  margin-top: 22px;
}

.agenda-controls {
  display: grid;
  grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
  gap: 16px;
  align-items: end;
}

.day-picker,
.patient-search {
  display: grid;
  gap: 12px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(22, 45, 47, 0.08);
}

.day-buttons,
.patient-search {
  display: flex;
  gap: 10px;
}

.patient-search label {
  flex: 1;
}

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

.summary-card {
  min-height: 112px;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(22, 45, 47, 0.08);
}

.summary-card span {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.summary-card strong {
  display: block;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.05;
}

.summary-card.wide strong {
  font-size: 20px;
  line-height: 1.25;
}

.search-results {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.search-empty,
.search-card {
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(22, 45, 47, 0.06);
}

.search-card > button,
.history-list button {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.search-card strong,
.search-card span,
.search-card small {
  display: block;
}

.search-card span,
.search-card small,
.history-list button {
  color: var(--muted);
}

.search-card strong {
  margin-bottom: 5px;
}

.history-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.daily-agenda {
  padding-top: 32px;
}

.agenda-slots {
  display: grid;
  gap: 14px;
}

.agenda-slot {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 220px;
  gap: 18px;
  align-items: start;
  padding: 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(22, 45, 47, 0.08);
}

.free-slot {
  border-left-color: #9fb7b2;
}

.status-border-cancelada {
  border-left-color: var(--red);
}

.slot-time {
  color: var(--teal-dark);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.slot-state {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.slot-state.free {
  color: var(--teal-dark);
  background: var(--mint);
}

.slot-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.small-button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.appointment-card {
  display: grid;
  gap: 14px;
}

.appointment-main {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.appointment-main strong,
.appointment-main span {
  display: block;
}

.appointment-main strong {
  margin-bottom: 4px;
  font-size: 18px;
}

.appointment-main span,
.canceled-mini {
  color: var(--muted);
}

.appointment-meta,
.detail-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.appointment-meta div,
.detail-list div {
  padding: 12px;
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.appointment-meta dt,
.detail-list dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.appointment-meta dd,
.detail-list dd {
  margin: 5px 0 0;
  line-height: 1.45;
}

.canceled-mini {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 700;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(24, 35, 38, 0.42);
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.compact-modal {
  width: min(560px, 100%);
}

.modal-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.modal-header h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.modal-close {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

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

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.form-error {
  min-height: 22px;
  margin: 14px 0 0;
  color: var(--red);
  font-weight: 800;
}

.detail-content {
  display: grid;
  gap: 16px;
}

@media (max-width: 960px) {
  .nav {
    display: none;
  }

  .benefits-grid,
  .services-grid,
  .patient-benefits,
  .reserved-slots,
  .agenda-controls,
  .day-summary,
  .booking-layout,
  .automation-layout {
    grid-template-columns: 1fr;
  }

  .benefits-grid {
    background: transparent;
    gap: 12px;
    padding: 18px 0;
  }

  .admin-hero {
    display: block;
  }

  .admin-hero .secondary-button {
    margin-top: 22px;
  }

  .admin-shell-header,
  .admin-header-actions,
  .agenda-hero,
  .day-buttons,
  .patient-search {
    align-items: stretch;
    flex-direction: column;
  }

  .agenda-slot {
    grid-template-columns: 1fr;
  }

  .slot-actions {
    justify-content: flex-start;
  }

  .appointment-meta,
  .detail-list,
  .edit-summary {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
  }

  .nav-cta {
    display: none;
  }

  .hero {
    min-height: 590px;
  }

  .hero-overlay {
    background: linear-gradient(90deg, rgba(12, 30, 31, 0.9), rgba(12, 30, 31, 0.7));
  }

  .booking-form {
    grid-template-columns: 1fr;
  }

  .time-picker-heading {
    display: grid;
  }

  .time-picker-heading span {
    text-align: left;
  }

  .time-slots,
  .confirmation-details,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .section-heading.compact {
    display: block;
  }
}
